_Z16FDK_Delay_CreateP15FDK_SignalDelayth:
  110|  1.38k|                     const UCHAR num_channels) {
  111|  1.38k|  FDK_ASSERT(data != NULL);
  ------------------
  |  |  221|  1.38k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (111:3): [True: 1.38k, False: 0]
  ------------------
  112|  1.38k|  FDK_ASSERT(num_channels > 0);
  ------------------
  |  |  221|  1.38k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 1.38k, False: 0]
  ------------------
  113|       |
  114|  1.38k|  if (delay > 0) {
  ------------------
  |  Branch (114:7): [True: 1.38k, False: 0]
  ------------------
  115|  1.38k|    data->delay_line =
  116|  1.38k|        (PCM_DEC*)FDKcalloc(num_channels * delay, sizeof(PCM_DEC));
  117|  1.38k|    if (data->delay_line == NULL) {
  ------------------
  |  Branch (117:9): [True: 0, False: 1.38k]
  ------------------
  118|      0|      return -1;
  119|      0|    }
  120|  1.38k|  } else {
  121|      0|    data->delay_line = NULL;
  122|      0|  }
  123|  1.38k|  data->num_channels = num_channels;
  124|  1.38k|  data->delay = delay;
  125|       |
  126|  1.38k|  return 0;
  127|  1.38k|}
_Z15FDK_Delay_ApplyP15FDK_SignalDelayPijh:
  130|   347k|                     const UINT frame_length, const UCHAR channel) {
  131|   347k|  FDK_ASSERT(data != NULL);
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (131:3): [True: 347k, False: 0]
  ------------------
  132|       |
  133|   347k|  if (data->delay > 0) {
  ------------------
  |  Branch (133:7): [True: 546, False: 347k]
  ------------------
  134|    546|    C_ALLOC_SCRATCH_START(tmp, PCM_DEC, MAX_FRAME_LENGTH)
  ------------------
  |  |  324|    546|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  135|    546|    FDK_ASSERT(frame_length <= MAX_FRAME_LENGTH);
  ------------------
  |  |  221|    546|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (135:5): [True: 546, False: 0]
  ------------------
  136|    546|    FDK_ASSERT(channel < data->num_channels);
  ------------------
  |  |  221|    546|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (136:5): [True: 546, False: 0]
  ------------------
  137|    546|    FDK_ASSERT(time_buffer != NULL);
  ------------------
  |  |  221|    546|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (137:5): [True: 546, False: 0]
  ------------------
  138|    546|    if (frame_length >= data->delay) {
  ------------------
  |  Branch (138:9): [True: 288, False: 258]
  ------------------
  139|    288|      FDKmemcpy(tmp, &time_buffer[frame_length - data->delay],
  140|    288|                data->delay * sizeof(PCM_DEC));
  141|    288|      FDKmemmove(&time_buffer[data->delay], &time_buffer[0],
  142|    288|                 (frame_length - data->delay) * sizeof(PCM_DEC));
  143|    288|      FDKmemcpy(&time_buffer[0], &data->delay_line[channel * data->delay],
  144|    288|                data->delay * sizeof(PCM_DEC));
  145|    288|      FDKmemcpy(&data->delay_line[channel * data->delay], tmp,
  146|    288|                data->delay * sizeof(PCM_DEC));
  147|    288|    } else {
  148|    258|      FDKmemcpy(tmp, &time_buffer[0], frame_length * sizeof(PCM_DEC));
  149|    258|      FDKmemcpy(&time_buffer[0], &data->delay_line[channel * data->delay],
  150|    258|                frame_length * sizeof(PCM_DEC));
  151|    258|      FDKmemcpy(&data->delay_line[channel * data->delay],
  152|    258|                &data->delay_line[channel * data->delay + frame_length],
  153|    258|                (data->delay - frame_length) * sizeof(PCM_DEC));
  154|    258|      FDKmemcpy(&data->delay_line[channel * data->delay +
  155|    258|                                  (data->delay - frame_length)],
  156|    258|                tmp, frame_length * sizeof(PCM_DEC));
  157|    258|    }
  158|    546|    C_ALLOC_SCRATCH_END(tmp, PCM_DEC, MAX_FRAME_LENGTH)
  159|    546|  }
  160|       |
  161|   347k|  return;
  162|   347k|}
_Z17FDK_Delay_DestroyP15FDK_SignalDelay:
  164|   333k|void FDK_Delay_Destroy(FDK_SignalDelay* data) {
  165|   333k|  if (data->delay_line != NULL) {
  ------------------
  |  Branch (165:7): [True: 1.38k, False: 332k]
  ------------------
  166|  1.38k|    FDKfree(data->delay_line);
  167|  1.38k|  }
  168|   333k|  data->delay_line = NULL;
  169|   333k|  data->delay = 0;
  170|   333k|  data->num_channels = 0;
  171|       |
  172|   333k|  return;
  173|   333k|}

_Z21aacDecoder_drcDisableP8CDrcInfo:
  159|   481k|void aacDecoder_drcDisable(HANDLE_AAC_DRC self) {
  160|   481k|  self->enable = 0;
  161|   481k|  self->applyExtGain = 0;
  162|   481k|  self->progRefLevelPresent = 0;
  163|   481k|}
_Z19aacDecoder_drcResetP8CDrcInfo:
  172|  21.8k|void aacDecoder_drcReset(HANDLE_AAC_DRC self) {
  173|  21.8k|  self->applyExtGain = 0;
  174|  21.8k|  self->additionalGainPrev = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  21.8k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  |  |  ------------------
  |  |  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  21.8k|          : ((((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|  21.8k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  175|  21.8k|  self->additionalGainFilterState = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  21.8k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  |  |  ------------------
  |  |  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  21.8k|          : ((((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|  21.8k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  176|  21.8k|  self->additionalGainFilterState1 = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  21.8k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  |  |  ------------------
  |  |  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  21.8k|          : ((((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|  21.8k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  177|  21.8k|}
_Z18aacDecoder_drcInitP8CDrcInfo:
  186|  21.8k|void aacDecoder_drcInit(HANDLE_AAC_DRC self) {
  187|  21.8k|  CDrcParams *pParams;
  188|       |
  189|  21.8k|  if (self == NULL) {
  ------------------
  |  Branch (189:7): [True: 0, False: 21.8k]
  ------------------
  190|      0|    return;
  191|      0|  }
  192|       |
  193|       |  /* init control fields */
  194|  21.8k|  self->enable = OFF;
  ------------------
  |  |  134|  21.8k|#define OFF 0
  ------------------
  195|  21.8k|  self->numThreads = 0;
  196|       |
  197|       |  /* init params */
  198|  21.8k|  pParams = &self->params;
  199|  21.8k|  pParams->bsDelayEnable = 0;
  200|  21.8k|  pParams->cut = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|  pParams->usrCut = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|  pParams->boost = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|  pParams->usrBoost = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|  pParams->targetRefLevel = 96;
  205|  21.8k|  pParams->expiryFrame = AACDEC_DRC_DFLT_EXPIRY_FRAMES;
  ------------------
  |  |  118|  21.8k|  (0) /* Default DRC data expiry time in AAC frames   */
  ------------------
  206|  21.8k|  pParams->applyHeavyCompression = OFF;
  ------------------
  |  |  134|  21.8k|#define OFF 0
  ------------------
  207|  21.8k|  pParams->usrApplyHeavyCompression = OFF;
  ------------------
  |  |  134|  21.8k|#define OFF 0
  ------------------
  208|       |
  209|  21.8k|  pParams->defaultPresentationMode = DISABLED_PARAMETER_HANDLING;
  210|  21.8k|  pParams->encoderTargetLevel = MAX_REFERENCE_LEVEL; /* worst case assumption */
  ------------------
  |  |  128|  21.8k|#define MAX_REFERENCE_LEVEL (127)
  ------------------
  211|       |
  212|  21.8k|  self->update = 1;
  213|  21.8k|  self->numOutChannels = 0;
  214|  21.8k|  self->prevAacNumChannels = 0;
  215|       |
  216|       |  /* initial program ref level = target ref level */
  217|  21.8k|  self->progRefLevel = pParams->targetRefLevel;
  218|  21.8k|  self->progRefLevelPresent = 0;
  219|  21.8k|  self->presMode = -1;
  220|       |
  221|  21.8k|  aacDecoder_drcReset(self);
  222|  21.8k|}
_Z29aacDecoder_drcInitChannelDataP15CDrcChannelData:
  231|  1.97M|void aacDecoder_drcInitChannelData(CDrcChannelData *pDrcChData) {
  232|  1.97M|  if (pDrcChData != NULL) {
  ------------------
  |  Branch (232:7): [True: 1.97M, False: 0]
  ------------------
  233|  1.97M|    pDrcChData->expiryCount = 0;
  234|  1.97M|    pDrcChData->numBands = 1;
  235|  1.97M|    pDrcChData->bandTop[0] = DRC_BLOCK_LEN_DIV_BAND_MULT - 1;
  ------------------
  |  |  126|  1.97M|#define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  124|  1.97M|#define DRC_BLOCK_LEN (1024)
  |  |  ------------------
  |  |               #define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  125|  1.97M|#define DRC_BAND_MULT (4)
  |  |  ------------------
  ------------------
  236|  1.97M|    pDrcChData->drcValue[0] = 0;
  237|  1.97M|    pDrcChData->drcInterpolationScheme = 0;
  238|  1.97M|    pDrcChData->drcDataType = UNKNOWN_PAYLOAD;
  239|  1.97M|  }
  240|  1.97M|}
_Z22aacDecoder_drcSetParamP8CDrcInfo16AACDEC_DRC_PARAMi:
  252|   870k|                                         AACDEC_DRC_PARAM param, INT value) {
  253|   870k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
  254|       |
  255|   870k|  switch (param) {
  256|      0|    case DRC_CUT_SCALE:
  ------------------
  |  Branch (256:5): [True: 0, False: 870k]
  ------------------
  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: 870k]
  ------------------
  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: 870k]
  ------------------
  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: 870k]
  ------------------
  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: 870k]
  ------------------
  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: 870k]
  ------------------
  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|  58.3k|    case DRC_BS_DELAY:
  ------------------
  |  Branch (333:5): [True: 58.3k, False: 811k]
  ------------------
  334|  58.3k|      if (value < 0 || value > 1) {
  ------------------
  |  Branch (334:11): [True: 0, False: 58.3k]
  |  Branch (334:24): [True: 0, False: 58.3k]
  ------------------
  335|      0|        return AAC_DEC_SET_PARAM_FAIL;
  336|      0|      }
  337|  58.3k|      if (self == NULL) {
  ------------------
  |  Branch (337:11): [True: 0, False: 58.3k]
  ------------------
  338|      0|        return AAC_DEC_INVALID_HANDLE;
  339|      0|      }
  340|  58.3k|      self->params.bsDelayEnable = value;
  341|  58.3k|      break;
  342|   811k|    case DRC_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (342:5): [True: 811k, False: 58.3k]
  ------------------
  343|   811k|      if (self == NULL) {
  ------------------
  |  Branch (343:11): [True: 0, False: 811k]
  ------------------
  344|      0|        return AAC_DEC_INVALID_HANDLE;
  345|      0|      }
  346|   811k|      self->params.expiryFrame = (value > 0) ? (UINT)value : 0;
  ------------------
  |  Branch (346:34): [True: 0, False: 811k]
  ------------------
  347|   811k|      break;
  348|      0|    case MAX_OUTPUT_CHANNELS:
  ------------------
  |  Branch (348:5): [True: 0, False: 870k]
  ------------------
  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: 870k]
  ------------------
  356|      0|      return AAC_DEC_SET_PARAM_FAIL;
  357|   870k|  } /* switch(param) */
  358|       |
  359|   870k|  return ErrorStatus;
  360|   870k|}
_Z25aacDecoder_drcMarkPayloadP8CDrcInfoP13FDK_BITSTREAM23AACDEC_DRC_PAYLOAD_TYPE:
  399|   101k|                              AACDEC_DRC_PAYLOAD_TYPE type) {
  400|   101k|  UINT bsStartPos;
  401|   101k|  int i, numBands = 1, bitCnt = 0;
  402|       |
  403|   101k|  if (self == NULL) {
  ------------------
  |  Branch (403:7): [True: 0, False: 101k]
  ------------------
  404|      0|    return 0;
  405|      0|  }
  406|       |
  407|   101k|  bsStartPos = FDKgetValidBits(bs);
  408|       |
  409|   101k|  switch (type) {
  410|  84.5k|    case MPEG_DRC_EXT_DATA: {
  ------------------
  |  Branch (410:5): [True: 84.5k, False: 17.0k]
  ------------------
  411|  84.5k|      bitCnt = 4;
  412|       |
  413|  84.5k|      if (FDKreadBits(bs, 1)) { /* pce_tag_present */
  ------------------
  |  Branch (413:11): [True: 20.6k, False: 63.9k]
  ------------------
  414|  20.6k|        FDKreadBits(bs, 8);     /* pce_instance_tag + drc_tag_reserved_bits */
  415|  20.6k|        bitCnt += 8;
  416|  20.6k|      }
  417|       |
  418|  84.5k|      if (FDKreadBits(bs, 1)) { /* excluded_chns_present */
  ------------------
  |  Branch (418:11): [True: 77.3k, False: 7.23k]
  ------------------
  419|  77.3k|        FDKreadBits(bs, 7);     /* exclude mask [0..7] */
  420|  77.3k|        bitCnt += 8;
  421|   144k|        while (FDKreadBits(bs, 1)) { /* additional_excluded_chns */
  ------------------
  |  Branch (421:16): [True: 66.8k, False: 77.3k]
  ------------------
  422|  66.8k|          FDKreadBits(bs, 7);        /* exclude mask [x..y] */
  423|  66.8k|          bitCnt += 8;
  424|  66.8k|        }
  425|  77.3k|      }
  426|       |
  427|  84.5k|      if (FDKreadBits(bs, 1)) {         /* drc_bands_present */
  ------------------
  |  Branch (427:11): [True: 76.8k, False: 7.76k]
  ------------------
  428|  76.8k|        numBands += FDKreadBits(bs, 4); /* drc_band_incr */
  429|  76.8k|        FDKreadBits(bs, 4);             /* reserved */
  430|  76.8k|        bitCnt += 8;
  431|   619k|        for (i = 0; i < numBands; i++) {
  ------------------
  |  Branch (431:21): [True: 542k, False: 76.8k]
  ------------------
  432|   542k|          FDKreadBits(bs, 8); /* drc_band_top[i] */
  433|   542k|          bitCnt += 8;
  434|   542k|        }
  435|  76.8k|      }
  436|       |
  437|  84.5k|      if (FDKreadBits(bs, 1)) { /* prog_ref_level_present */
  ------------------
  |  Branch (437:11): [True: 76.0k, False: 8.47k]
  ------------------
  438|  76.0k|        FDKreadBits(bs, 8); /* prog_ref_level + prog_ref_level_reserved_bits */
  439|  76.0k|        bitCnt += 8;
  440|  76.0k|      }
  441|       |
  442|   635k|      for (i = 0; i < numBands; i++) {
  ------------------
  |  Branch (442:19): [True: 550k, False: 84.5k]
  ------------------
  443|   550k|        FDKreadBits(bs, 8); /* dyn_rng_sgn[i] + dyn_rng_ctl[i] */
  444|   550k|        bitCnt += 8;
  445|   550k|      }
  446|       |
  447|  84.5k|      if ((self->numPayloads < MAX_DRC_THREADS) &&
  ------------------
  |  |  109|  84.5k|  ((8) + 1) /* Heavy compression value is handled just like MPEG DRC data */
  ------------------
  |  Branch (447:11): [True: 24.1k, False: 60.4k]
  ------------------
  448|  24.1k|          ((INT)FDKgetValidBits(bs) >= 0)) {
  ------------------
  |  Branch (448:11): [True: 23.9k, False: 249]
  ------------------
  449|  23.9k|        self->drcPayloadPosition[self->numPayloads++] = bsStartPos;
  450|  23.9k|      }
  451|  84.5k|    } break;
  452|       |
  453|  17.0k|    case DVB_DRC_ANC_DATA:
  ------------------
  |  Branch (453:5): [True: 17.0k, False: 84.5k]
  ------------------
  454|  17.0k|      bitCnt += 8;
  455|       |      /* check sync word */
  456|  17.0k|      if (FDKreadBits(bs, 8) == DVB_ANC_DATA_SYNC_BYTE) {
  ------------------
  |  |  132|  17.0k|#define DVB_ANC_DATA_SYNC_BYTE (0xBC) /* DVB ancillary data sync byte. */
  ------------------
  |  Branch (456:11): [True: 10.5k, False: 6.49k]
  ------------------
  457|  10.5k|        int dmxLevelsPresent, compressionPresent;
  458|  10.5k|        int coarseGrainTcPresent, fineGrainTcPresent;
  459|       |
  460|       |        /* bs_info field */
  461|  10.5k|        FDKreadBits(
  462|  10.5k|            bs,
  463|  10.5k|            8); /* mpeg_audio_type, dolby_surround_mode, presentation_mode */
  464|  10.5k|        bitCnt += 8;
  465|       |
  466|       |        /* Evaluate ancillary_data_status */
  467|  10.5k|        FDKreadBits(bs, 3); /* reserved, set to 0 */
  468|  10.5k|        dmxLevelsPresent =
  469|  10.5k|            FDKreadBits(bs, 1); /* downmixing_levels_MPEG4_status */
  470|  10.5k|        FDKreadBits(bs, 1);     /* reserved, set to 0 */
  471|  10.5k|        compressionPresent =
  472|  10.5k|            FDKreadBits(bs, 1); /* audio_coding_mode_and_compression status */
  473|  10.5k|        coarseGrainTcPresent =
  474|  10.5k|            FDKreadBits(bs, 1); /* coarse_grain_timecode_status */
  475|  10.5k|        fineGrainTcPresent =
  476|  10.5k|            FDKreadBits(bs, 1); /* fine_grain_timecode_status */
  477|  10.5k|        bitCnt += 8;
  478|       |
  479|       |        /* MPEG4 downmixing levels */
  480|  10.5k|        if (dmxLevelsPresent) {
  ------------------
  |  Branch (480:13): [True: 8.40k, False: 2.13k]
  ------------------
  481|  8.40k|          FDKreadBits(bs, 8); /* downmixing_levels_MPEG4 */
  482|  8.40k|          bitCnt += 8;
  483|  8.40k|        }
  484|       |        /* audio coding mode and compression status */
  485|  10.5k|        if (compressionPresent) {
  ------------------
  |  Branch (485:13): [True: 2.83k, False: 7.70k]
  ------------------
  486|  2.83k|          FDKreadBits(bs, 16); /* audio_coding_mode, Compression_value */
  487|  2.83k|          bitCnt += 16;
  488|  2.83k|        }
  489|       |        /* coarse grain timecode */
  490|  10.5k|        if (coarseGrainTcPresent) {
  ------------------
  |  Branch (490:13): [True: 5.93k, False: 4.59k]
  ------------------
  491|  5.93k|          FDKreadBits(bs, 16); /* coarse_grain_timecode */
  492|  5.93k|          bitCnt += 16;
  493|  5.93k|        }
  494|       |        /* fine grain timecode */
  495|  10.5k|        if (fineGrainTcPresent) {
  ------------------
  |  Branch (495:13): [True: 6.33k, False: 4.20k]
  ------------------
  496|  6.33k|          FDKreadBits(bs, 16); /* fine_grain_timecode */
  497|  6.33k|          bitCnt += 16;
  498|  6.33k|        }
  499|  10.5k|        if (!self->dvbAncDataAvailable && ((INT)FDKgetValidBits(bs) >= 0)) {
  ------------------
  |  Branch (499:13): [True: 2.43k, False: 8.10k]
  |  Branch (499:43): [True: 2.39k, False: 33]
  ------------------
  500|  2.39k|          self->dvbAncDataPosition = bsStartPos;
  501|  2.39k|          self->dvbAncDataAvailable = 1;
  502|  2.39k|        }
  503|  10.5k|      }
  504|  17.0k|      break;
  505|       |
  506|      0|    default:
  ------------------
  |  Branch (506:5): [True: 0, False: 101k]
  ------------------
  507|      0|      break;
  508|   101k|  }
  509|       |
  510|   101k|  return (bitCnt);
  511|   101k|}
_Z19aacDecoder_drcApplyP8CDrcInfoPvP22CAacDecoderChannelInfoP15CDrcChannelDataPiiii:
  847|   601k|                         int aacFrameSize, int bSbrPresent) {
  848|   601k|  int band, bin, numBands;
  849|   601k|  int bottom = 0;
  850|   601k|  int modifyBins = 0;
  851|       |
  852|   601k|  FIXP_DBL max_mantissa;
  853|   601k|  INT max_exponent;
  854|       |
  855|   601k|  FIXP_DBL norm_mantissa = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|   601k|  (FIXP_DBL)(                                                                \
  |  |  193|   601k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 601k, Folded]
  |  |  ------------------
  |  |  194|   601k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   601k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   601k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 601k]
  |  |  ------------------
  |  |  195|   601k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   601k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   601k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   601k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   601k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   601k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   601k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  856|   601k|  INT norm_exponent = 1;
  857|       |
  858|   601k|  FIXP_DBL fact_mantissa[MAX_DRC_BANDS];
  859|   601k|  INT fact_exponent[MAX_DRC_BANDS];
  860|       |
  861|   601k|  CDrcParams *pParams = &self->params;
  862|       |
  863|   601k|  FIXP_DBL *pSpectralCoefficient =
  864|   601k|      SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient);
  ------------------
  |  |  114|   601k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  865|   601k|  CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
  866|   601k|  SHORT *pSpecScale = pAacDecoderChannelInfo->specScale;
  867|       |
  868|   601k|  int winSeq = pIcsInfo->WindowSequence;
  869|       |
  870|       |  /* Increment and check expiry counter */
  871|   601k|  if ((pParams->expiryFrame > 0) &&
  ------------------
  |  Branch (871:7): [True: 0, False: 601k]
  ------------------
  872|      0|      (++pDrcChData->expiryCount >
  ------------------
  |  Branch (872:7): [True: 0, False: 0]
  ------------------
  873|      0|       pParams->expiryFrame)) { /* The DRC data is too old, so delete it. */
  874|      0|    aacDecoder_drcInitChannelData(pDrcChData);
  875|      0|  }
  876|       |
  877|   601k|  if (self->enable != ON) {
  ------------------
  |  |  135|   601k|#define ON 1
  ------------------
  |  Branch (877:7): [True: 296k, False: 305k]
  ------------------
  878|   296k|    sbrDecoder_drcDisable((HANDLE_SBRDECODER)pSbrDec, ch);
  879|   296k|    if (extGain != NULL) {
  ------------------
  |  Branch (879:9): [True: 296k, False: 0]
  ------------------
  880|   296k|      INT gainScale = (INT)*extGain;
  881|       |      /* The gain scaling must be passed to the function in the buffer pointed
  882|       |       * on by extGain. */
  883|   296k|      if (gainScale >= 0 && gainScale <= DFRACT_BITS) {
  ------------------
  |  |  113|   296k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (883:11): [True: 296k, False: 0]
  |  Branch (883:29): [True: 296k, False: 0]
  ------------------
  884|   296k|        *extGain = scaleValue(norm_mantissa, norm_exponent - gainScale);
  885|   296k|      } else {
  886|      0|        FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (886:9): [Folded, False: 0]
  ------------------
  887|      0|      }
  888|   296k|    }
  889|   296k|    return;
  890|   296k|  }
  891|       |
  892|   305k|  numBands = pDrcChData->numBands;
  893|       |
  894|       |  /* If program reference normalization is done in the digital domain,
  895|       |  modify factor to perform normalization.  prog_ref_level can
  896|       |  alternatively be passed to the system for modification of the level in
  897|       |  the analog domain.  Analog level modification avoids problems with
  898|       |  reduced DAC SNR (if signal is attenuated) or clipping (if signal is
  899|       |  boosted) */
  900|       |
  901|   305k|  if (pParams->targetRefLevel >= 0) {
  ------------------
  |  Branch (901:7): [True: 305k, False: 0]
  ------------------
  902|       |    /* 0.5^((targetRefLevel - progRefLevel)/24) */
  903|   305k|    norm_mantissa =
  904|   305k|        fLdPow(FL2FXCONST_DBL(-1.0), /* log2(0.5) */
  ------------------
  |  |  192|   305k|  (FIXP_DBL)(                                                                \
  |  |  193|   305k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 305k]
  |  |  ------------------
  |  |  194|   305k|          ? ((((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|   305k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   305k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 305k, Folded]
  |  |  ------------------
  |  |  199|   305k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   305k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   305k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   305k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|   305k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   305k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|   305k|                 : (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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  905|   305k|               0,
  906|   305k|               (FIXP_DBL)((INT)(FL2FXCONST_DBL(1.0f / 24.0) >> 3) *
  ------------------
  |  |  192|   305k|  (FIXP_DBL)(                                                                \
  |  |  193|   305k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 305k, Folded]
  |  |  ------------------
  |  |  194|   305k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   305k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 305k]
  |  |  ------------------
  |  |  195|   305k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   305k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   305k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   305k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   305k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   305k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  907|   305k|                          (INT)(pParams->targetRefLevel - self->progRefLevel)),
  908|   305k|               3, &norm_exponent);
  909|   305k|  }
  910|       |  /* Always export the normalization gain (if possible). */
  911|   305k|  if (extGain != NULL) {
  ------------------
  |  Branch (911:7): [True: 305k, False: 0]
  ------------------
  912|   305k|    INT gainScale = (INT)*extGain;
  913|       |    /* The gain scaling must be passed to the function in the buffer pointed on
  914|       |     * by extGain. */
  915|   305k|    if (gainScale >= 0 && gainScale <= DFRACT_BITS) {
  ------------------
  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (915:9): [True: 305k, False: 0]
  |  Branch (915:27): [True: 305k, False: 0]
  ------------------
  916|   305k|      *extGain = scaleValue(norm_mantissa, norm_exponent - gainScale);
  917|   305k|    } else {
  918|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (918:7): [Folded, False: 0]
  ------------------
  919|      0|    }
  920|   305k|  }
  921|       |  /* Reset normalization gain since this module must not apply it */
  922|   305k|  norm_mantissa = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|   305k|  (FIXP_DBL)(                                                                \
  |  |  193|   305k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 305k, Folded]
  |  |  ------------------
  |  |  194|   305k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   305k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 305k]
  |  |  ------------------
  |  |  195|   305k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   305k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   305k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   305k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   305k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   305k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  923|   305k|  norm_exponent = 1;
  924|       |
  925|       |  /* calc scale factors */
  926|   758k|  for (band = 0; band < numBands; band++) {
  ------------------
  |  Branch (926:18): [True: 453k, False: 305k]
  ------------------
  927|   453k|    UCHAR drcVal = pDrcChData->drcValue[band];
  928|       |
  929|   453k|    fact_mantissa[band] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|   453k|  (FIXP_DBL)(                                                                \
  |  |  193|   453k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 453k, Folded]
  |  |  ------------------
  |  |  194|   453k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   453k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   453k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 453k]
  |  |  ------------------
  |  |  195|   453k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   453k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   453k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   453k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   453k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   453k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   453k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  930|   453k|    fact_exponent[band] = 1;
  931|       |
  932|   453k|    if ((pParams->applyHeavyCompression == ON) &&
  ------------------
  |  |  135|   453k|#define ON 1
  ------------------
  |  Branch (932:9): [True: 4.29k, False: 449k]
  ------------------
  933|  4.29k|        ((AACDEC_DRC_PAYLOAD_TYPE)pDrcChData->drcDataType ==
  ------------------
  |  Branch (933:9): [True: 3.10k, False: 1.18k]
  ------------------
  934|  4.29k|         DVB_DRC_ANC_DATA)) {
  935|  3.10k|      INT compressionFactorVal_e;
  936|  3.10k|      int valX, valY;
  937|       |
  938|  3.10k|      valX = drcVal >> 4;
  939|  3.10k|      valY = drcVal & 0x0F;
  940|       |
  941|       |      /* calculate the unscaled heavy compression factor.
  942|       |         compressionFactor = 48.164 - 6.0206*valX - 0.4014*valY dB
  943|       |         range: -48.166 dB to 48.164 dB */
  944|  3.10k|      if (drcVal != 0x7F) {
  ------------------
  |  Branch (944:11): [True: 3.04k, False: 64]
  ------------------
  945|  3.04k|        fact_mantissa[band] = fPowInt(
  946|  3.04k|            FL2FXCONST_DBL(0.95483867181), /* -0.4014dB = 0.95483867181 */
  ------------------
  |  |  192|  3.04k|  (FIXP_DBL)(                                                                \
  |  |  193|  3.04k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.04k, Folded]
  |  |  ------------------
  |  |  194|  3.04k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.04k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.04k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.04k]
  |  |  ------------------
  |  |  195|  3.04k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.04k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.04k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.04k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.04k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.04k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.04k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  947|  3.04k|            0, valY, &compressionFactorVal_e);
  948|       |
  949|       |        /* -0.0008dB (48.164 - 6.0206*8 = -0.0008) */
  950|  3.04k|        fact_mantissa[band] =
  951|  3.04k|            fMult(FL2FXCONST_DBL(0.99990790084), fact_mantissa[band]);
  ------------------
  |  |  192|  3.04k|  (FIXP_DBL)(                                                                \
  |  |  193|  3.04k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.04k, Folded]
  |  |  ------------------
  |  |  194|  3.04k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.04k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.04k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.04k]
  |  |  ------------------
  |  |  195|  3.04k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.04k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.04k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.04k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.04k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.04k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.04k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  952|       |
  953|  3.04k|        fact_exponent[band] =
  954|  3.04k|            DVB_COMPRESSION_SCALE - valX + compressionFactorVal_e;
  ------------------
  |  |  595|  3.04k|#define DVB_COMPRESSION_SCALE (8) /* 48,164 dB */
  ------------------
  955|  3.04k|      }
  956|   450k|    } else if ((AACDEC_DRC_PAYLOAD_TYPE)pDrcChData->drcDataType ==
  ------------------
  |  Branch (956:16): [True: 199k, False: 250k]
  ------------------
  957|   450k|               MPEG_DRC_EXT_DATA) {
  958|       |      /* apply the scaled dynamic range control words to factor.
  959|       |       * if scaling drc_cut (or drc_boost), or control word drc_mantissa is 0
  960|       |       * then there is no dynamic range compression
  961|       |       *
  962|       |       * if pDrcChData->drcSgn[band] is
  963|       |       *  1 then gain is < 1 :  factor = 2^(-self->cut   *
  964|       |       * pDrcChData->drcMag[band] / 24) 0 then gain is > 1 :  factor = 2^(
  965|       |       * self->boost * pDrcChData->drcMag[band] / 24)
  966|       |       */
  967|       |
  968|   199k|      if ((drcVal & 0x7F) > 0) {
  ------------------
  |  Branch (968:11): [True: 138k, False: 61.3k]
  ------------------
  969|   138k|        FIXP_DBL tParamVal = (drcVal & 0x80) ? -pParams->cut : pParams->boost;
  ------------------
  |  Branch (969:30): [True: 57.9k, False: 80.6k]
  ------------------
  970|       |
  971|   138k|        fact_mantissa[band] = f2Pow(
  972|   138k|            (FIXP_DBL)((INT)fMult(FL2FXCONST_DBL(1.0f / 192.0f), tParamVal) *
  ------------------
  |  |  192|   138k|  (FIXP_DBL)(                                                                \
  |  |  193|   138k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 138k, Folded]
  |  |  ------------------
  |  |  194|   138k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   138k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   138k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 138k]
  |  |  ------------------
  |  |  195|   138k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   138k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   138k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   138k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   138k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   138k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   138k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  973|   138k|                       (drcVal & 0x7F)),
  974|   138k|            3 + DRC_PARAM_SCALE, &fact_exponent[band]);
  ------------------
  |  |  120|   138k|#define DRC_PARAM_SCALE (1)
  ------------------
  975|   138k|      }
  976|   199k|    }
  977|       |
  978|   453k|    fact_mantissa[band] = fMult(fact_mantissa[band], norm_mantissa);
  979|   453k|    fact_exponent[band] += norm_exponent;
  980|       |
  981|   453k|  } /* end loop over bands */
  982|       |
  983|       |  /* normalizations */
  984|   305k|  {
  985|   305k|    int res;
  986|       |
  987|   305k|    max_mantissa = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   305k|  (FIXP_DBL)(                                                                \
  |  |  193|   305k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 305k, Folded]
  |  |  ------------------
  |  |  194|   305k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   305k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 305k]
  |  |  ------------------
  |  |  195|   305k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   305k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   305k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   305k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   305k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   305k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   305k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  988|   305k|    max_exponent = 0;
  989|   758k|    for (band = 0; band < numBands; band++) {
  ------------------
  |  Branch (989:20): [True: 453k, False: 305k]
  ------------------
  990|   453k|      max_mantissa = fixMax(max_mantissa, fact_mantissa[band]);
  ------------------
  |  |  307|   453k|#define fixMax(a, b) fMax(a, b)
  ------------------
  991|   453k|      max_exponent = fixMax(max_exponent, fact_exponent[band]);
  ------------------
  |  |  307|   453k|#define fixMax(a, b) fMax(a, b)
  ------------------
  992|   453k|    }
  993|       |
  994|       |    /* left shift factors to gain accurancy */
  995|   305k|    res = CntLeadingZeros(max_mantissa) - 1;
  ------------------
  |  |  308|   305k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  996|       |
  997|       |    /* above topmost DRC band gain factor is 1 */
  998|   305k|    if (((pDrcChData->bandTop[fMax(0, numBands - 1)] + 1) << 2) < aacFrameSize)
  ------------------
  |  Branch (998:9): [True: 18.8k, False: 286k]
  ------------------
  999|  18.8k|      res = 0;
 1000|       |
 1001|   305k|    if (res > 0) {
  ------------------
  |  Branch (1001:9): [True: 286k, False: 18.8k]
  ------------------
 1002|   286k|      res = fixMin(res, max_exponent);
  ------------------
  |  |  306|   286k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1003|   286k|      max_exponent -= res;
 1004|       |
 1005|   579k|      for (band = 0; band < numBands; band++) {
  ------------------
  |  Branch (1005:22): [True: 292k, False: 286k]
  ------------------
 1006|   292k|        fact_mantissa[band] <<= res;
 1007|   292k|        fact_exponent[band] -= res;
 1008|   292k|      }
 1009|   286k|    }
 1010|       |
 1011|       |    /* normalize magnitudes to one scale factor */
 1012|   758k|    for (band = 0; band < numBands; band++) {
  ------------------
  |  Branch (1012:20): [True: 453k, False: 305k]
  ------------------
 1013|   453k|      if (fact_exponent[band] < max_exponent) {
  ------------------
  |  Branch (1013:11): [True: 749, False: 452k]
  ------------------
 1014|    749|        fact_mantissa[band] >>= max_exponent - fact_exponent[band];
 1015|    749|      }
 1016|   453k|      if (fact_mantissa[band] != FL2FXCONST_DBL(0.5f)) {
  ------------------
  |  |  192|   453k|  (FIXP_DBL)(                                                                \
  |  |  193|   453k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 453k, Folded]
  |  |  ------------------
  |  |  194|   453k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   453k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   453k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 453k]
  |  |  ------------------
  |  |  195|   453k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   453k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   453k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   453k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   453k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   453k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   453k|          : ((((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 (1016:11): [True: 163k, False: 289k]
  ------------------
 1017|   163k|        modifyBins = 1;
 1018|   163k|      }
 1019|   453k|    }
 1020|   305k|    if (max_exponent != 1) {
  ------------------
  |  Branch (1020:9): [True: 21.9k, False: 283k]
  ------------------
 1021|  21.9k|      modifyBins = 1;
 1022|  21.9k|    }
 1023|   305k|  }
 1024|       |
 1025|       |  /*  apply factor to spectral lines
 1026|       |   *  short blocks must take care that bands fall on
 1027|       |   *  block boundaries!
 1028|       |   */
 1029|   305k|  if (!bSbrPresent) {
  ------------------
  |  Branch (1029:7): [True: 132k, False: 173k]
  ------------------
 1030|   132k|    bottom = 0;
 1031|       |
 1032|   132k|    if (!modifyBins) {
  ------------------
  |  Branch (1032:9): [True: 121k, False: 10.9k]
  ------------------
 1033|       |      /* We don't have to modify the spectral bins because the fractional part
 1034|       |         of all factors is 0.5. In order to keep accurancy we don't apply the
 1035|       |         factor but decrease the exponent instead. */
 1036|   121k|      max_exponent -= 1;
 1037|   121k|    } else {
 1038|   127k|      for (band = 0; band < numBands; band++) {
  ------------------
  |  Branch (1038:22): [True: 116k, False: 10.9k]
  ------------------
 1039|   116k|        int top = fixMin((int)((pDrcChData->bandTop[band] + 1) << 2),
  ------------------
  |  |  306|   116k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1040|   116k|                         aacFrameSize); /* ... * DRC_BAND_MULT; */
 1041|       |
 1042|  6.95M|        for (bin = bottom; bin < top; bin++) {
  ------------------
  |  Branch (1042:28): [True: 6.84M, False: 116k]
  ------------------
 1043|  6.84M|          pSpectralCoefficient[bin] =
 1044|  6.84M|              fMult(pSpectralCoefficient[bin], fact_mantissa[band]);
 1045|  6.84M|        }
 1046|       |
 1047|   116k|        bottom = top;
 1048|   116k|      }
 1049|  10.9k|    }
 1050|       |
 1051|       |    /* above topmost DRC band gain factor is 1 */
 1052|   132k|    if (max_exponent > 0) {
  ------------------
  |  Branch (1052:9): [True: 10.9k, False: 121k]
  ------------------
 1053|  5.36M|      for (bin = bottom; bin < aacFrameSize; bin += 1) {
  ------------------
  |  Branch (1053:26): [True: 5.35M, False: 10.9k]
  ------------------
 1054|  5.35M|        pSpectralCoefficient[bin] >>= max_exponent;
 1055|  5.35M|      }
 1056|  10.9k|    }
 1057|       |
 1058|       |    /* adjust scaling */
 1059|   132k|    pSpecScale[0] += max_exponent;
 1060|       |
 1061|   132k|    if (winSeq == BLOCK_SHORT) {
  ------------------
  |  Branch (1061:9): [True: 28.7k, False: 103k]
  ------------------
 1062|  28.7k|      int win;
 1063|   230k|      for (win = 1; win < 8; win++) {
  ------------------
  |  Branch (1063:21): [True: 201k, False: 28.7k]
  ------------------
 1064|   201k|        pSpecScale[win] += max_exponent;
 1065|   201k|      }
 1066|  28.7k|    }
 1067|   173k|  } else {
 1068|   173k|    HANDLE_SBRDECODER hSbrDecoder = (HANDLE_SBRDECODER)pSbrDec;
 1069|   173k|    numBands = pDrcChData->numBands;
 1070|       |
 1071|       |    /* feed factors into SBR decoder for application in QMF domain. */
 1072|   173k|    sbrDecoder_drcFeedChannel(hSbrDecoder, ch, numBands, fact_mantissa,
 1073|   173k|                              max_exponent, pDrcChData->drcInterpolationScheme,
 1074|   173k|                              winSeq, pDrcChData->bandTop);
 1075|   173k|  }
 1076|       |
 1077|   305k|  return;
 1078|   305k|}
_Z20aacDecoder_drcPrologP8CDrcInfoP13FDK_BITSTREAMPP28CAacDecoderStaticChannelInfohPhi:
 1272|   347k|    int validChannels) {
 1273|   347k|  int result = 0;
 1274|       |
 1275|   347k|  if (self == NULL) {
  ------------------
  |  Branch (1275:7): [True: 0, False: 347k]
  ------------------
 1276|      0|    return -1;
 1277|      0|  }
 1278|       |
 1279|   347k|  if (!self->params.bsDelayEnable) {
  ------------------
  |  Branch (1279:7): [True: 309k, False: 37.9k]
  ------------------
 1280|       |    /* keep previous progRefLevel and presMode for update flag in
 1281|       |     * drcParameterHandling */
 1282|   309k|    INT prevPRL, prevPM = 0;
 1283|   309k|    prevPRL = self->progRefLevel;
 1284|   309k|    prevPM = self->presMode;
 1285|       |
 1286|   309k|    result = aacDecoder_drcExtractAndMap(
 1287|   309k|        self, hBs, pAacDecoderStaticChannelInfo, pceInstanceTag, channelMapping,
 1288|   309k|        validChannels);
 1289|       |
 1290|   309k|    if (result < 0) {
  ------------------
  |  Branch (1290:9): [True: 0, False: 309k]
  ------------------
 1291|      0|      return result;
 1292|      0|    }
 1293|       |
 1294|       |    /* Drc parameter handling */
 1295|   309k|    aacDecoder_drcParameterHandling(self, validChannels, prevPRL, prevPM);
 1296|   309k|  }
 1297|       |
 1298|   347k|  return result;
 1299|   347k|}
_Z20aacDecoder_drcEpilogP8CDrcInfoP13FDK_BITSTREAMPP28CAacDecoderStaticChannelInfohPhi:
 1314|   347k|    int validChannels) {
 1315|   347k|  int result = 0;
 1316|       |
 1317|   347k|  if (self == NULL) {
  ------------------
  |  Branch (1317:7): [True: 0, False: 347k]
  ------------------
 1318|      0|    return -1;
 1319|      0|  }
 1320|       |
 1321|   347k|  if (self->params.bsDelayEnable) {
  ------------------
  |  Branch (1321:7): [True: 37.8k, False: 309k]
  ------------------
 1322|       |    /* keep previous progRefLevel and presMode for update flag in
 1323|       |     * drcParameterHandling */
 1324|  37.8k|    INT prevPRL, prevPM = 0;
 1325|  37.8k|    prevPRL = self->progRefLevel;
 1326|  37.8k|    prevPM = self->presMode;
 1327|       |
 1328|  37.8k|    result = aacDecoder_drcExtractAndMap(
 1329|  37.8k|        self, hBs, pAacDecoderStaticChannelInfo, pceInstanceTag, channelMapping,
 1330|  37.8k|        validChannels);
 1331|       |
 1332|  37.8k|    if (result < 0) {
  ------------------
  |  Branch (1332:9): [True: 0, False: 37.8k]
  ------------------
 1333|      0|      return result;
 1334|      0|    }
 1335|       |
 1336|       |    /* Drc parameter handling */
 1337|  37.8k|    aacDecoder_drcParameterHandling(self, validChannels, prevPRL, prevPM);
 1338|  37.8k|  }
 1339|       |
 1340|   347k|  return result;
 1341|   347k|}
_Z21aacDecoder_drcGetInfoP8CDrcInfoPaS1_:
 1347|   347k|                           SCHAR *pProgRefLevel) {
 1348|   347k|  if (self != NULL) {
  ------------------
  |  Branch (1348:7): [True: 347k, False: 0]
  ------------------
 1349|   347k|    if (pPresMode != NULL) {
  ------------------
  |  Branch (1349:9): [True: 347k, False: 0]
  ------------------
 1350|   347k|      *pPresMode = self->presMode;
 1351|   347k|    }
 1352|   347k|    if (pProgRefLevel != NULL) {
  ------------------
  |  Branch (1352:9): [True: 347k, False: 0]
  ------------------
 1353|   347k|      if (self->progRefLevelPresent) {
  ------------------
  |  Branch (1353:11): [True: 16.1k, False: 331k]
  ------------------
 1354|  16.1k|        *pProgRefLevel = self->progRefLevel;
 1355|   331k|      } else {
 1356|   331k|        *pProgRefLevel = -1;
 1357|   331k|      }
 1358|   347k|    }
 1359|   347k|  }
 1360|   347k|}
_Z26applyDrcLevelNormalizationP8CDrcInfoPiS1_S1_ijjjjj:
 1401|  16.1k|                               const UINT stride, const UINT limiterEnabled) {
 1402|  16.1k|  UINT i;
 1403|  16.1k|  INT additionalGain_scaling;
 1404|  16.1k|  FIXP_DBL additionalGain;
 1405|       |
 1406|  16.1k|  FDK_ASSERT(gain_delay <= nSamples);
  ------------------
  |  |  221|  16.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1406:3): [True: 16.1k, False: 0]
  ------------------
 1407|       |
 1408|  16.1k|  FIXP_DBL additionalGainSmoothState = hDrcInfo->additionalGainFilterState;
 1409|  16.1k|  FIXP_DBL additionalGainSmoothState1 = hDrcInfo->additionalGainFilterState1;
 1410|       |
 1411|  16.1k|  if (!gain_delay) {
  ------------------
  |  Branch (1411:7): [True: 0, False: 16.1k]
  ------------------
 1412|      0|    additionalGain = pGain[0];
 1413|       |
 1414|       |    /* Apply the additional scaling gain_scale[0] that has no delay and no
 1415|       |     * smoothing */
 1416|      0|    additionalGain_scaling =
 1417|      0|        fMin(gain_scale, CntLeadingZeros(additionalGain) - 1);
  ------------------
  |  |  308|      0|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 1418|      0|    additionalGain = scaleValue(additionalGain, additionalGain_scaling);
 1419|       |
 1420|       |    /* if it's not possible to fully apply gain_scale to additionalGain, apply
 1421|       |     * it to the input signal */
 1422|      0|    additionalGain_scaling -= gain_scale;
 1423|       |
 1424|      0|    if (additionalGain_scaling) {
  ------------------
  |  Branch (1424:9): [True: 0, False: 0]
  ------------------
 1425|      0|      scaleValuesSaturate(samplesIn, channels * nSamples,
 1426|      0|                          -additionalGain_scaling);
 1427|      0|    }
 1428|       |
 1429|      0|    if (limiterEnabled) {
  ------------------
  |  Branch (1429:9): [True: 0, False: 0]
  ------------------
 1430|      0|      FDK_ASSERT(pGainPerSample != NULL);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1430:7): [True: 0, False: 0]
  ------------------
 1431|       |
 1432|      0|      for (i = 0; i < nSamples; i++) {
  ------------------
  |  Branch (1432:19): [True: 0, False: 0]
  ------------------
 1433|      0|        pGainPerSample[i] = additionalGain;
 1434|      0|      }
 1435|      0|    } else {
 1436|      0|      for (i = 0; i < channels * nSamples; i++) {
  ------------------
  |  Branch (1436:19): [True: 0, False: 0]
  ------------------
 1437|      0|        samplesIn[i] = FIXP_DBL2PCM_DEC(fMult(samplesIn[i], additionalGain));
  ------------------
  |  |  115|      0|#define FIXP_DBL2PCM_DEC(x) (x)
  ------------------
 1438|      0|      }
 1439|      0|    }
 1440|  16.1k|  } else {
 1441|  16.1k|    UINT inc;
 1442|  16.1k|    FIXP_DBL additionalGainUnfiltered;
 1443|       |
 1444|  16.1k|    inc = (stride == 1) ? channels : 1;
  ------------------
  |  Branch (1444:11): [True: 15.1k, False: 931]
  ------------------
 1445|       |
 1446|  21.1M|    for (i = 0; i < nSamples; i++) {
  ------------------
  |  Branch (1446:17): [True: 21.1M, False: 16.1k]
  ------------------
 1447|  21.1M|      if (i < gain_delay) {
  ------------------
  |  Branch (1447:11): [True: 12.4M, False: 8.73M]
  ------------------
 1448|  12.4M|        additionalGainUnfiltered = hDrcInfo->additionalGainPrev;
 1449|  12.4M|      } else {
 1450|  8.73M|        additionalGainUnfiltered = pGain[0];
 1451|  8.73M|      }
 1452|       |
 1453|       |      /* Smooth additionalGain */
 1454|       |
 1455|       |      /* [b,a] = butter(1, 0.01) */
 1456|  21.1M|      static const FIXP_SGL b[] = {FL2FXCONST_SGL(0.015466 * 2.0),
  ------------------
  |  |  180|  21.1M|  (FIXP_SGL)(                                                                \
  |  |  181|  21.1M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  ------------------
  |  |  182|  21.1M|          ? ((((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|  21.1M|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|  21.1M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 21.1M]
  |  |  ------------------
  |  |  187|  21.1M|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|  21.1M|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|  21.1M|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|  21.1M|                 ? (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|  21.1M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|  21.1M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1457|  21.1M|                                   FL2FXCONST_SGL(0.015466 * 2.0)};
  ------------------
  |  |  180|  21.1M|  (FIXP_SGL)(                                                                \
  |  |  181|  21.1M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  ------------------
  |  |  182|  21.1M|          ? ((((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|  21.1M|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|  21.1M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 21.1M]
  |  |  ------------------
  |  |  187|  21.1M|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|  21.1M|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|  21.1M|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|  21.1M|                 ? (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|  21.1M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|  21.1M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1458|  21.1M|      static const FIXP_SGL a[] = {(FIXP_SGL)MAXVAL_SGL,
  ------------------
  |  |  152|  21.1M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
 1459|  21.1M|                                   FL2FXCONST_SGL(-0.96907)};
  ------------------
  |  |  180|  21.1M|  (FIXP_SGL)(                                                                \
  |  |  181|  21.1M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [Folded, False: 21.1M]
  |  |  ------------------
  |  |  182|  21.1M|          ? ((((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|  21.1M|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|  21.1M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 21.1M]
  |  |  ------------------
  |  |  187|  21.1M|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|  21.1M|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|  21.1M|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|  21.1M|                 ? (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|  21.1M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|  21.1M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1460|       |
 1461|  21.1M|      additionalGain = -fMult(additionalGainSmoothState, a[1]) +
 1462|  21.1M|                       fMultDiv2(additionalGainUnfiltered, b[0]) +
 1463|  21.1M|                       fMultDiv2(additionalGainSmoothState1, b[1]);
 1464|  21.1M|      additionalGainSmoothState1 = additionalGainUnfiltered;
 1465|  21.1M|      additionalGainSmoothState = additionalGain;
 1466|       |
 1467|       |      /* Apply the additional scaling gain_scale[0] that has no delay and no
 1468|       |       * smoothing */
 1469|  21.1M|      additionalGain_scaling =
 1470|  21.1M|          fMin(gain_scale, CntLeadingZeros(additionalGain) - 1);
  ------------------
  |  |  308|  21.1M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 1471|  21.1M|      additionalGain = scaleValue(additionalGain, additionalGain_scaling);
 1472|       |
 1473|       |      /* if it's not possible to fully apply gain_scale[0] to additionalGain,
 1474|       |       * apply it to the input signal */
 1475|  21.1M|      additionalGain_scaling -= gain_scale;
 1476|       |
 1477|  21.1M|      if (limiterEnabled) {
  ------------------
  |  Branch (1477:11): [True: 18.1M, False: 2.97M]
  ------------------
 1478|  18.1M|        FDK_ASSERT(stride == 1);
  ------------------
  |  |  221|  18.1M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1478:9): [True: 18.1M, False: 0]
  ------------------
 1479|  18.1M|        FDK_ASSERT(pGainPerSample != NULL);
  ------------------
  |  |  221|  18.1M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1479:9): [True: 18.1M, False: 0]
  ------------------
 1480|       |
 1481|  18.1M|        if (additionalGain_scaling) {
  ------------------
  |  Branch (1481:13): [True: 53.3k, False: 18.1M]
  ------------------
 1482|  53.3k|          scaleValuesSaturate(samplesIn, channels, -additionalGain_scaling);
 1483|  53.3k|        }
 1484|       |
 1485|  18.1M|        pGainPerSample[i] = additionalGain;
 1486|  18.1M|      } else {
 1487|  2.97M|        if (additionalGain_scaling) {
  ------------------
  |  Branch (1487:13): [True: 8.98k, False: 2.96M]
  ------------------
 1488|  62.8k|          for (UINT k = 0; k < channels; k++) {
  ------------------
  |  Branch (1488:28): [True: 53.8k, False: 8.98k]
  ------------------
 1489|  53.8k|            scaleValuesSaturate(&samplesIn[k * stride], 1,
 1490|  53.8k|                                -additionalGain_scaling);
 1491|  53.8k|          }
 1492|  8.98k|        }
 1493|       |
 1494|  10.3M|        for (UINT k = 0; k < channels; k++) {
  ------------------
  |  Branch (1494:26): [True: 7.38M, False: 2.97M]
  ------------------
 1495|  7.38M|          samplesIn[k * stride] =
 1496|  7.38M|              FIXP_DBL2PCM_DEC(fMult(samplesIn[k * stride], additionalGain));
  ------------------
  |  |  115|  7.38M|#define FIXP_DBL2PCM_DEC(x) (x)
  ------------------
 1497|  7.38M|        }
 1498|  2.97M|      }
 1499|       |
 1500|  21.1M|      samplesIn += inc;
 1501|  21.1M|    }
 1502|  16.1k|  }
 1503|       |
 1504|  16.1k|  hDrcInfo->additionalGainPrev = pGain[0];
 1505|  16.1k|  hDrcInfo->additionalGainFilterState = additionalGainSmoothState;
 1506|  16.1k|  hDrcInfo->additionalGainFilterState1 = additionalGainSmoothState1;
 1507|       |
 1508|  16.1k|  return (AACDEC_DRC_GAIN_SCALING);
  ------------------
  |  |  112|  16.1k|#define AACDEC_DRC_GAIN_SCALING (11) /* Scaling of DRC gains */
  ------------------
 1509|  16.1k|}
aacdec_drc.cpp:_ZL27aacDecoder_drcExtractAndMapP8CDrcInfoP13FDK_BITSTREAMPP28CAacDecoderStaticChannelInfohPhi:
  690|   347k|    int validChannels) {
  691|   347k|  CDrcPayload threadBs[MAX_DRC_THREADS];
  692|   347k|  CDrcPayload *validThreadBs[MAX_DRC_THREADS];
  693|   347k|  CDrcParams *pParams;
  694|   347k|  UINT backupBsPosition;
  695|   347k|  int result = 0;
  696|   347k|  int i, thread, validThreads = 0;
  697|       |
  698|   347k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (698:3): [True: 347k, False: 0]
  ------------------
  699|   347k|  FDK_ASSERT(hBs != NULL);
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (699:3): [True: 347k, False: 0]
  ------------------
  700|   347k|  FDK_ASSERT(pAacDecoderStaticChannelInfo != NULL);
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (700:3): [True: 347k, False: 0]
  ------------------
  701|       |
  702|   347k|  pParams = &self->params;
  703|       |
  704|   347k|  self->numThreads = 0;
  705|   347k|  backupBsPosition = FDKgetValidBits(hBs);
  706|       |
  707|   371k|  for (i = 0; i < self->numPayloads && self->numThreads < MAX_DRC_THREADS;
  ------------------
  |  |  109|  23.7k|  ((8) + 1) /* Heavy compression value is handled just like MPEG DRC data */
  ------------------
  |  Branch (707:15): [True: 23.7k, False: 347k]
  |  Branch (707:40): [True: 23.7k, False: 0]
  ------------------
  708|   347k|       i++) {
  709|       |    /* Init payload data chunk. The memclear is very important because it
  710|       |       initializes the most values. Without it the module wouldn't work properly
  711|       |       or crash. */
  712|  23.7k|    FDKmemclear(&threadBs[self->numThreads], sizeof(CDrcPayload));
  713|  23.7k|    threadBs[self->numThreads].channelData.bandTop[0] =
  714|  23.7k|        DRC_BLOCK_LEN_DIV_BAND_MULT - 1;
  ------------------
  |  |  126|  23.7k|#define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  124|  23.7k|#define DRC_BLOCK_LEN (1024)
  |  |  ------------------
  |  |               #define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  125|  23.7k|#define DRC_BAND_MULT (4)
  |  |  ------------------
  ------------------
  715|       |
  716|       |    /* Extract payload */
  717|  23.7k|    self->numThreads += aacDecoder_drcParse(hBs, &threadBs[self->numThreads],
  718|  23.7k|                                            self->drcPayloadPosition[i]);
  719|  23.7k|  }
  720|   347k|  self->numPayloads = 0;
  721|       |
  722|   347k|  if (self->dvbAncDataAvailable &&
  ------------------
  |  Branch (722:7): [True: 2.33k, False: 345k]
  ------------------
  723|  2.33k|      self->numThreads < MAX_DRC_THREADS) { /* Append a DVB heavy compression
  ------------------
  |  |  109|  2.33k|  ((8) + 1) /* Heavy compression value is handled just like MPEG DRC data */
  ------------------
  |  Branch (723:7): [True: 2.33k, False: 0]
  ------------------
  724|       |                                               payload thread if available. */
  725|       |
  726|       |    /* Init payload data chunk. The memclear is very important because it
  727|       |       initializes the most values. Without it the module wouldn't work properly
  728|       |       or crash. */
  729|  2.33k|    FDKmemclear(&threadBs[self->numThreads], sizeof(CDrcPayload));
  730|  2.33k|    threadBs[self->numThreads].channelData.bandTop[0] =
  731|  2.33k|        DRC_BLOCK_LEN_DIV_BAND_MULT - 1;
  ------------------
  |  |  126|  2.33k|#define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  124|  2.33k|#define DRC_BLOCK_LEN (1024)
  |  |  ------------------
  |  |               #define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  125|  2.33k|#define DRC_BAND_MULT (4)
  |  |  ------------------
  ------------------
  732|       |
  733|       |    /* Extract payload */
  734|  2.33k|    self->numThreads += aacDecoder_drcReadCompression(
  735|  2.33k|        hBs, &threadBs[self->numThreads], self->dvbAncDataPosition);
  736|  2.33k|  }
  737|   347k|  self->dvbAncDataAvailable = 0;
  738|       |
  739|       |  /* Reset the bitbufffer */
  740|   347k|  FDKpushBiDirectional(hBs, (INT)FDKgetValidBits(hBs) - (INT)backupBsPosition);
  741|       |
  742|       |  /* calculate number of valid bits in excl_chn_mask */
  743|       |
  744|       |  /* coupling channels not supported */
  745|       |
  746|       |  /* check for valid threads */
  747|   372k|  for (thread = 0; thread < self->numThreads; thread++) {
  ------------------
  |  Branch (747:20): [True: 24.5k, False: 347k]
  ------------------
  748|  24.5k|    CDrcPayload *pThreadBs = &threadBs[thread];
  749|  24.5k|    int numExclChns = 0;
  750|       |
  751|  24.5k|    switch ((AACDEC_DRC_PAYLOAD_TYPE)pThreadBs->channelData.drcDataType) {
  752|      0|      default:
  ------------------
  |  Branch (752:7): [True: 0, False: 24.5k]
  ------------------
  753|      0|        continue;
  754|  23.7k|      case MPEG_DRC_EXT_DATA:
  ------------------
  |  Branch (754:7): [True: 23.7k, False: 832]
  ------------------
  755|  24.5k|      case DVB_DRC_ANC_DATA:
  ------------------
  |  Branch (755:7): [True: 832, False: 23.7k]
  ------------------
  756|  24.5k|        break;
  757|  24.5k|    }
  758|       |
  759|  24.5k|    if (pThreadBs->pceInstanceTag >= 0) { /* if PCE tag present */
  ------------------
  |  Branch (759:9): [True: 6.86k, False: 17.7k]
  ------------------
  760|  6.86k|      if (pThreadBs->pceInstanceTag != pceInstanceTag) {
  ------------------
  |  Branch (760:11): [True: 2.62k, False: 4.24k]
  ------------------
  761|  2.62k|        continue; /* don't accept */
  762|  2.62k|      }
  763|  6.86k|    }
  764|       |
  765|       |    /* calculate number of excluded channels */
  766|  21.9k|    if (pThreadBs->excludedChnsMask > 0) {
  ------------------
  |  Branch (766:9): [True: 16.3k, False: 5.60k]
  ------------------
  767|  16.3k|      INT exclMask = pThreadBs->excludedChnsMask;
  768|  16.3k|      int ch;
  769|  38.5k|      for (ch = 0; ch < validChannels; ch++) {
  ------------------
  |  Branch (769:20): [True: 22.2k, False: 16.3k]
  ------------------
  770|  22.2k|        numExclChns += exclMask & 0x1;
  771|  22.2k|        exclMask >>= 1;
  772|  22.2k|      }
  773|  16.3k|    }
  774|  21.9k|    if (numExclChns < validChannels) {
  ------------------
  |  Branch (774:9): [True: 9.86k, False: 12.0k]
  ------------------
  775|  9.86k|      validThreadBs[validThreads] = pThreadBs;
  776|  9.86k|      validThreads++;
  777|  9.86k|    }
  778|  21.9k|  }
  779|       |
  780|       |  /* map DRC bitstream information onto DRC channel information */
  781|   357k|  for (thread = 0; thread < validThreads; thread++) {
  ------------------
  |  Branch (781:20): [True: 9.86k, False: 347k]
  ------------------
  782|  9.86k|    CDrcPayload *pThreadBs = validThreadBs[thread];
  783|  9.86k|    INT exclMask = pThreadBs->excludedChnsMask;
  784|  9.86k|    AACDEC_DRC_PAYLOAD_TYPE drcPayloadType =
  785|  9.86k|        (AACDEC_DRC_PAYLOAD_TYPE)pThreadBs->channelData.drcDataType;
  786|  9.86k|    int ch;
  787|       |
  788|       |    /* last progRefLevel transmitted is the one that is used
  789|       |     * (but it should really only be transmitted once per block!)
  790|       |     */
  791|  9.86k|    if (pThreadBs->progRefLevel >= 0) {
  ------------------
  |  Branch (791:9): [True: 3.82k, False: 6.03k]
  ------------------
  792|  3.82k|      self->progRefLevel = pThreadBs->progRefLevel;
  793|  3.82k|      self->progRefLevelPresent = 1;
  794|  3.82k|      self->prlExpiryCount = 0; /* Got a new value -> Reset counter */
  795|  3.82k|    }
  796|       |
  797|  9.86k|    if (drcPayloadType == DVB_DRC_ANC_DATA) {
  ------------------
  |  Branch (797:9): [True: 832, False: 9.02k]
  ------------------
  798|       |      /* Announce the presentation mode of this valid thread. */
  799|    832|      self->presMode = pThreadBs->presMode;
  800|    832|    }
  801|       |
  802|       |    /* SCE, CPE and LFE */
  803|  35.6k|    for (ch = 0; ch < validChannels; ch++) {
  ------------------
  |  Branch (803:18): [True: 25.8k, False: 9.86k]
  ------------------
  804|  25.8k|      AACDEC_DRC_PAYLOAD_TYPE prvPayloadType = UNKNOWN_PAYLOAD;
  805|  25.8k|      int mapedChannel = channelMapping[ch];
  806|       |
  807|  25.8k|      if ((mapedChannel >= validChannels) ||
  ------------------
  |  Branch (807:11): [True: 40, False: 25.7k]
  ------------------
  808|  25.7k|          ((exclMask & (1 << mapedChannel)) != 0))
  ------------------
  |  Branch (808:11): [True: 2.87k, False: 22.8k]
  ------------------
  809|  2.91k|        continue;
  810|       |
  811|  22.8k|      if ((pParams->expiryFrame <= 0) ||
  ------------------
  |  Branch (811:11): [True: 22.8k, False: 0]
  ------------------
  812|      0|          (pAacDecoderStaticChannelInfo[ch]->drcData.expiryCount <
  ------------------
  |  Branch (812:11): [True: 0, False: 0]
  ------------------
  813|  22.8k|           pParams->expiryFrame)) {
  814|  22.8k|        prvPayloadType =
  815|  22.8k|            (AACDEC_DRC_PAYLOAD_TYPE)pAacDecoderStaticChannelInfo[ch]
  816|  22.8k|                ->drcData.drcDataType;
  817|  22.8k|      }
  818|  22.8k|      if (((drcPayloadType == MPEG_DRC_EXT_DATA) &&
  ------------------
  |  Branch (818:12): [True: 20.4k, False: 2.44k]
  ------------------
  819|  20.4k|           (prvPayloadType != DVB_DRC_ANC_DATA)) ||
  ------------------
  |  Branch (819:12): [True: 20.3k, False: 158]
  ------------------
  820|  2.59k|          ((drcPayloadType == DVB_DRC_ANC_DATA) &&
  ------------------
  |  Branch (820:12): [True: 2.44k, False: 158]
  ------------------
  821|  2.44k|           (pParams->applyHeavyCompression ==
  ------------------
  |  Branch (821:12): [True: 1.92k, False: 520]
  ------------------
  822|  22.2k|            ON))) { /* copy thread to channel */
  ------------------
  |  |  135|  2.44k|#define ON 1
  ------------------
  823|  22.2k|        pAacDecoderStaticChannelInfo[ch]->drcData = pThreadBs->channelData;
  824|  22.2k|        result = 1;
  825|  22.2k|      }
  826|  22.8k|    }
  827|       |    /* CCEs not supported by now */
  828|  9.86k|  }
  829|       |
  830|       |  /* Increment and check expiry counter for the program reference level: */
  831|   347k|  if ((pParams->expiryFrame > 0) &&
  ------------------
  |  Branch (831:7): [True: 0, False: 347k]
  ------------------
  832|      0|      (self->prlExpiryCount++ >
  ------------------
  |  Branch (832:7): [True: 0, False: 0]
  ------------------
  833|      0|       pParams->expiryFrame)) { /* The program reference level is too old, so
  834|       |                                   set it back to the target level. */
  835|      0|    self->progRefLevelPresent = 0;
  836|      0|    self->progRefLevel = pParams->targetRefLevel;
  837|      0|    self->prlExpiryCount = 0;
  838|      0|  }
  839|       |
  840|   347k|  return result;
  841|   347k|}
aacdec_drc.cpp:_ZL19aacDecoder_drcParseP13FDK_BITSTREAMP11CDrcPayloadj:
  523|  23.7k|                               UINT payloadPosition) {
  524|  23.7k|  int i, numBands;
  525|       |
  526|       |  /* Move to the beginning of the DRC payload field */
  527|  23.7k|  FDKpushBiDirectional(bs, (INT)FDKgetValidBits(bs) - (INT)payloadPosition);
  528|       |
  529|       |  /* pce_tag_present */
  530|  23.7k|  if (FDKreadBits(bs, 1)) {
  ------------------
  |  Branch (530:7): [True: 6.86k, False: 16.8k]
  ------------------
  531|  6.86k|    pDrcBs->pceInstanceTag = FDKreadBits(bs, 4); /* pce_instance_tag */
  532|       |    /* only one program supported */
  533|  6.86k|    FDKreadBits(bs, 4); /* drc_tag_reserved_bits */
  534|  16.8k|  } else {
  535|  16.8k|    pDrcBs->pceInstanceTag = -1; /* not present */
  536|  16.8k|  }
  537|       |
  538|  23.7k|  if (FDKreadBits(bs, 1)) { /* excluded_chns_present */
  ------------------
  |  Branch (538:7): [True: 18.5k, False: 5.19k]
  ------------------
  539|       |    /* get excluded_chn_mask */
  540|  18.5k|    parseExcludedChannels(&pDrcBs->excludedChnsMask, bs);
  541|  18.5k|  } else {
  542|  5.19k|    pDrcBs->excludedChnsMask = 0;
  543|  5.19k|  }
  544|       |
  545|  23.7k|  numBands = 1;
  546|  23.7k|  if (FDKreadBits(bs, 1)) /* drc_bands_present */
  ------------------
  |  Branch (546:7): [True: 17.7k, False: 5.97k]
  ------------------
  547|  17.7k|  {
  548|       |    /* get band_incr */
  549|  17.7k|    numBands += FDKreadBits(bs, 4); /* drc_band_incr */
  550|  17.7k|    pDrcBs->channelData.drcInterpolationScheme =
  551|  17.7k|        FDKreadBits(bs, 4); /* drc_interpolation_scheme */
  552|       |    /* band_top */
  553|   143k|    for (i = 0; i < numBands; i++) {
  ------------------
  |  Branch (553:17): [True: 125k, False: 17.7k]
  ------------------
  554|   125k|      pDrcBs->channelData.bandTop[i] = FDKreadBits(bs, 8); /* drc_band_top[i] */
  555|   125k|    }
  556|  17.7k|  } else {
  557|  5.97k|    pDrcBs->channelData.bandTop[0] = DRC_BLOCK_LEN_DIV_BAND_MULT -
  ------------------
  |  |  126|  5.97k|#define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  124|  5.97k|#define DRC_BLOCK_LEN (1024)
  |  |  ------------------
  |  |               #define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  125|  5.97k|#define DRC_BAND_MULT (4)
  |  |  ------------------
  ------------------
  558|  5.97k|                                     1; /* ... comprising the whole spectrum. */
  559|  5.97k|    ;
  560|  5.97k|  }
  561|       |
  562|  23.7k|  pDrcBs->channelData.numBands = numBands;
  563|       |
  564|  23.7k|  if (FDKreadBits(bs, 1)) /* prog_ref_level_present */
  ------------------
  |  Branch (564:7): [True: 17.6k, False: 6.09k]
  ------------------
  565|  17.6k|  {
  566|  17.6k|    pDrcBs->progRefLevel = FDKreadBits(bs, 7); /* prog_ref_level */
  567|  17.6k|    FDKreadBits(bs, 1); /* prog_ref_level_reserved_bits */
  568|  17.6k|  } else {
  569|  6.09k|    pDrcBs->progRefLevel = -1;
  570|  6.09k|  }
  571|       |
  572|   155k|  for (i = 0; i < numBands; i++) {
  ------------------
  |  Branch (572:15): [True: 131k, False: 23.7k]
  ------------------
  573|   131k|    pDrcBs->channelData.drcValue[i] = FDKreadBits(bs, 1)
  574|   131k|                                      << 7; /* dyn_rng_sgn[i] */
  575|   131k|    pDrcBs->channelData.drcValue[i] |=
  576|   131k|        FDKreadBits(bs, 7) & 0x7F; /* dyn_rng_ctl[i] */
  577|   131k|  }
  578|       |
  579|       |  /* Set DRC payload type */
  580|  23.7k|  pDrcBs->channelData.drcDataType = MPEG_DRC_EXT_DATA;
  581|       |
  582|  23.7k|  return (1);
  583|  23.7k|}
aacdec_drc.cpp:_ZL21parseExcludedChannelsPjP13FDK_BITSTREAM:
  363|  18.5k|                                 HANDLE_FDK_BITSTREAM bs) {
  364|  18.5k|  UINT excludeMask = 0;
  365|  18.5k|  UINT i, j;
  366|  18.5k|  int bitCnt = 9;
  367|       |
  368|   148k|  for (i = 0, j = 1; i < 7; i++, j <<= 1) {
  ------------------
  |  Branch (368:22): [True: 129k, False: 18.5k]
  ------------------
  369|   129k|    if (FDKreadBits(bs, 1)) {
  ------------------
  |  Branch (369:9): [True: 102k, False: 27.6k]
  ------------------
  370|   102k|      excludeMask |= j;
  371|   102k|    }
  372|   129k|  }
  373|       |
  374|       |  /* additional_excluded_chns */
  375|  37.3k|  while (FDKreadBits(bs, 1)) {
  ------------------
  |  Branch (375:10): [True: 18.7k, False: 18.5k]
  ------------------
  376|   150k|    for (i = 0; i < 7; i++, j <<= 1) {
  ------------------
  |  Branch (376:17): [True: 131k, False: 18.7k]
  ------------------
  377|   131k|      if (FDKreadBits(bs, 1)) {
  ------------------
  |  Branch (377:11): [True: 91.4k, False: 39.8k]
  ------------------
  378|  91.4k|        excludeMask |= j;
  379|  91.4k|      }
  380|   131k|    }
  381|  18.7k|    bitCnt += 9;
  382|  18.7k|    FDK_ASSERT(j < (UINT)-1);
  ------------------
  |  |  221|  18.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (382:5): [True: 18.7k, False: 0]
  ------------------
  383|  18.7k|  }
  384|       |
  385|  18.5k|  *excludedChnsMask = excludeMask;
  386|       |
  387|  18.5k|  return (bitCnt);
  388|  18.5k|}
aacdec_drc.cpp:_ZL29aacDecoder_drcReadCompressionP13FDK_BITSTREAMP11CDrcPayloadj:
  599|  2.33k|                                         UINT payloadPosition) {
  600|  2.33k|  int foundDrcData = 0;
  601|  2.33k|  int dmxLevelsPresent, compressionPresent;
  602|       |
  603|       |  /* Move to the beginning of the DRC payload field */
  604|  2.33k|  FDKpushBiDirectional(bs, (INT)FDKgetValidBits(bs) - (INT)payloadPosition);
  605|       |
  606|       |  /* Sanity checks */
  607|  2.33k|  if (FDKgetValidBits(bs) < 24) {
  ------------------
  |  Branch (607:7): [True: 0, False: 2.33k]
  ------------------
  608|      0|    return 0;
  609|      0|  }
  610|       |
  611|       |  /* Check sync word */
  612|  2.33k|  if (FDKreadBits(bs, 8) != DVB_ANC_DATA_SYNC_BYTE) {
  ------------------
  |  |  132|  2.33k|#define DVB_ANC_DATA_SYNC_BYTE (0xBC) /* DVB ancillary data sync byte. */
  ------------------
  |  Branch (612:7): [True: 0, False: 2.33k]
  ------------------
  613|      0|    return 0;
  614|      0|  }
  615|       |
  616|       |  /* Evaluate bs_info field */
  617|  2.33k|  if (FDKreadBits(bs, 2) != 3) { /* mpeg_audio_type */
  ------------------
  |  Branch (617:7): [True: 97, False: 2.24k]
  ------------------
  618|       |    /* No MPEG-4 audio data */
  619|     97|    return 0;
  620|     97|  }
  621|  2.24k|  FDKreadBits(bs, 2);                    /* dolby_surround_mode */
  622|  2.24k|  pDrcBs->presMode = FDKreadBits(bs, 2); /* presentation_mode */
  623|  2.24k|  FDKreadBits(bs, 1);                    /* stereo_downmix_mode */
  624|  2.24k|  if (FDKreadBits(bs, 1) != 0) {         /* reserved, set to 0 */
  ------------------
  |  Branch (624:7): [True: 636, False: 1.60k]
  ------------------
  625|    636|    return 0;
  626|    636|  }
  627|       |
  628|       |  /* Evaluate ancillary_data_status */
  629|  1.60k|  if (FDKreadBits(bs, 3) != 0) { /* reserved, set to 0 */
  ------------------
  |  Branch (629:7): [True: 98, False: 1.50k]
  ------------------
  630|     98|    return 0;
  631|     98|  }
  632|  1.50k|  dmxLevelsPresent = FDKreadBits(bs, 1); /* downmixing_levels_MPEG4_status */
  633|  1.50k|  /*extensionPresent =*/FDKreadBits(bs,
  634|  1.50k|                                    1); /* ancillary_data_extension_status; */
  635|  1.50k|  compressionPresent =
  636|  1.50k|      FDKreadBits(bs, 1); /* audio_coding_mode_and_compression status */
  637|  1.50k|  /*coarseGrainTcPresent =*/FDKreadBits(bs,
  638|  1.50k|                                        1); /* coarse_grain_timecode_status */
  639|  1.50k|  /*fineGrainTcPresent   =*/FDKreadBits(bs, 1); /* fine_grain_timecode_status */
  640|       |
  641|  1.50k|  if (dmxLevelsPresent) {
  ------------------
  |  Branch (641:7): [True: 266, False: 1.24k]
  ------------------
  642|    266|    FDKreadBits(bs, 8); /* downmixing_levels_MPEG4 */
  643|    266|  }
  644|       |
  645|       |  /* audio_coding_mode_and_compression_status */
  646|  1.50k|  if (compressionPresent) {
  ------------------
  |  Branch (646:7): [True: 1.41k, False: 97]
  ------------------
  647|  1.41k|    UCHAR compressionOn, compressionValue;
  648|       |
  649|       |    /* audio_coding_mode */
  650|  1.41k|    if (FDKreadBits(bs, 7) != 0) { /* The reserved bits shall be set to "0". */
  ------------------
  |  Branch (650:9): [True: 358, False: 1.05k]
  ------------------
  651|    358|      return 0;
  652|    358|    }
  653|  1.05k|    compressionOn = (UCHAR)FDKreadBits(bs, 1);    /* compression_on */
  654|  1.05k|    compressionValue = (UCHAR)FDKreadBits(bs, 8); /* Compression_value */
  655|       |
  656|  1.05k|    if (compressionOn) {
  ------------------
  |  Branch (656:9): [True: 832, False: 221]
  ------------------
  657|       |      /* A compression value is available so store the data just like MPEG DRC
  658|       |       * data */
  659|    832|      pDrcBs->channelData.numBands = 1; /* One band ... */
  660|    832|      pDrcBs->channelData.drcValue[0] =
  661|    832|          compressionValue; /* ... with one value ... */
  662|    832|      pDrcBs->channelData.bandTop[0] =
  663|    832|          DRC_BLOCK_LEN_DIV_BAND_MULT -
  ------------------
  |  |  126|    832|#define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  124|    832|#define DRC_BLOCK_LEN (1024)
  |  |  ------------------
  |  |               #define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  125|    832|#define DRC_BAND_MULT (4)
  |  |  ------------------
  ------------------
  664|    832|          1; /* ... comprising the whole spectrum. */
  665|    832|      ;
  666|    832|      pDrcBs->pceInstanceTag = -1; /* Not present */
  667|    832|      pDrcBs->progRefLevel = -1;   /* Not present */
  668|    832|      pDrcBs->channelData.drcDataType =
  669|    832|          DVB_DRC_ANC_DATA; /* Set DRC payload type to DVB. */
  670|    832|      foundDrcData = 1;
  671|    832|    }
  672|  1.05k|  }
  673|       |
  674|  1.15k|  return (foundDrcData);
  675|  1.50k|}
aacdec_drc.cpp:_ZL31aacDecoder_drcParameterHandlingP8CDrcInfoiaa:
 1086|   347k|                                            SCHAR prevDrcPresMode) {
 1087|   347k|  int isDownmix, isMonoDownmix, isStereoDownmix;
 1088|   347k|  int dDmx, dHr;
 1089|   347k|  AACDEC_DRC_PARAMETER_HANDLING drcParameterHandling;
 1090|   347k|  CDrcParams *p;
 1091|       |
 1092|   347k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1092:3): [True: 347k, False: 0]
  ------------------
 1093|       |
 1094|   347k|  p = &self->params;
 1095|       |
 1096|   347k|  if (self->progRefLevel != prevDrcProgRefLevel) self->update = 1;
  ------------------
  |  Branch (1096:7): [True: 1.44k, False: 346k]
  ------------------
 1097|       |
 1098|   347k|  if (self->presMode != prevDrcPresMode) self->update = 1;
  ------------------
  |  Branch (1098:7): [True: 284, False: 347k]
  ------------------
 1099|       |
 1100|   347k|  if (self->prevAacNumChannels != aacNumChannels) self->update = 1;
  ------------------
  |  Branch (1100:7): [True: 15.3k, False: 332k]
  ------------------
 1101|       |
 1102|       |  /* return if no relevant parameter has changed */
 1103|   347k|  if (!self->update) {
  ------------------
  |  Branch (1103:7): [True: 331k, False: 16.6k]
  ------------------
 1104|   331k|    return;
 1105|   331k|  }
 1106|       |
 1107|       |  /* derive downmix property. aacNumChannels: number of channels in aac stream,
 1108|       |   * numOutChannels: number of output channels */
 1109|  16.6k|  isDownmix = (aacNumChannels > self->numOutChannels);
 1110|  16.6k|  isDownmix = (isDownmix && (self->numOutChannels > 0));
  ------------------
  |  Branch (1110:16): [True: 16.6k, False: 0]
  |  Branch (1110:29): [True: 0, False: 16.6k]
  ------------------
 1111|  16.6k|  isMonoDownmix = (isDownmix && (self->numOutChannels == 1));
  ------------------
  |  Branch (1111:20): [True: 0, False: 16.6k]
  |  Branch (1111:33): [True: 0, False: 0]
  ------------------
 1112|  16.6k|  isStereoDownmix = (isDownmix && (self->numOutChannels == 2));
  ------------------
  |  Branch (1112:22): [True: 0, False: 16.6k]
  |  Branch (1112:35): [True: 0, False: 0]
  ------------------
 1113|       |
 1114|  16.6k|  if ((self->presMode == 1) || (self->presMode == 2)) {
  ------------------
  |  Branch (1114:7): [True: 760, False: 15.8k]
  |  Branch (1114:32): [True: 76, False: 15.8k]
  ------------------
 1115|    836|    drcParameterHandling = (AACDEC_DRC_PARAMETER_HANDLING)self->presMode;
 1116|  15.8k|  } else { /* no presentation mode -> use parameter handling specified by
 1117|       |              AAC_DRC_DEFAULT_PRESENTATION_MODE */
 1118|  15.8k|    drcParameterHandling = p->defaultPresentationMode;
 1119|  15.8k|  }
 1120|       |
 1121|       |  /* by default, do as desired */
 1122|  16.6k|  p->cut = p->usrCut;
 1123|  16.6k|  p->boost = p->usrBoost;
 1124|  16.6k|  p->applyHeavyCompression = p->usrApplyHeavyCompression;
 1125|       |
 1126|  16.6k|  switch (drcParameterHandling) {
 1127|  15.8k|    case DISABLED_PARAMETER_HANDLING:
  ------------------
  |  Branch (1127:5): [True: 15.8k, False: 836]
  ------------------
 1128|  15.8k|    default:
  ------------------
  |  Branch (1128:5): [True: 0, False: 16.6k]
  ------------------
 1129|       |      /* use drc parameters as requested */
 1130|  15.8k|      break;
 1131|       |
 1132|  15.8k|    case ENABLED_PARAMETER_HANDLING:
  ------------------
  |  Branch (1132:5): [True: 0, False: 16.6k]
  ------------------
 1133|       |      /* dDmx: estimated headroom reduction due to downmix, format: -1/4*dB
 1134|       |         dDmx = floor(-4*20*log10(aacNumChannels/numOutChannels)) */
 1135|      0|      if (isDownmix) {
  ------------------
  |  Branch (1135:11): [True: 0, False: 0]
  ------------------
 1136|      0|        FIXP_DBL dmxTmp;
 1137|      0|        int e_log, e_mult;
 1138|      0|        dmxTmp = fDivNorm(self->numOutChannels,
 1139|      0|                          aacNumChannels); /* inverse division ->
 1140|       |                                              negative sign after
 1141|       |                                              logarithm */
 1142|      0|        dmxTmp = fLog2(dmxTmp, 0, &e_log);
 1143|      0|        dmxTmp = fMultNorm(
 1144|      0|            dmxTmp, FL2FXCONST_DBL(4.0f * 20.0f * 0.30103f / (float)(1 << 5)),
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1145|      0|            &e_mult); /* e = e_log + e_mult + 5 */
 1146|      0|        dDmx = (int)scaleValue(dmxTmp, e_log + e_mult + 5 - (DFRACT_BITS - 1));
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1147|      0|      } else {
 1148|      0|        dDmx = 0;
 1149|      0|      }
 1150|       |
 1151|       |      /* dHr: Full estimated (decoder) headroom reduction due to loudness
 1152|       |       * normalisation (DTL - PRL) and downmix. Format: -1/4*dB */
 1153|      0|      if (p->targetRefLevel >= 0) { /* if target level is provided */
  ------------------
  |  Branch (1153:11): [True: 0, False: 0]
  ------------------
 1154|      0|        dHr = p->targetRefLevel + dDmx - self->progRefLevel;
 1155|      0|      } else {
 1156|      0|        dHr = dDmx;
 1157|      0|      }
 1158|       |
 1159|      0|      if (dHr < 0) { /* if headroom is reduced */
  ------------------
  |  Branch (1159:11): [True: 0, False: 0]
  ------------------
 1160|       |        /* Use compression, but as little as possible. */
 1161|       |        /* eHr: Headroom provided by encoder, format: -1/4 dB */
 1162|      0|        int eHr = fixMin(p->encoderTargetLevel - self->progRefLevel, 0);
  ------------------
  |  |  306|      0|#define fixMin(a, b) fMin(a, b)
  ------------------
 1163|      0|        if (eHr <
  ------------------
  |  Branch (1163:13): [True: 0, False: 0]
  ------------------
 1164|      0|            dHr) { /* if encoder provides more headroom than decoder needs */
 1165|       |          /* derive scaling of light DRC */
 1166|      0|          FIXP_DBL calcFactor_norm;
 1167|      0|          INT calcFactor; /* fraction of DRC gains that is minimally needed for
 1168|       |                             clipping prevention */
 1169|      0|          calcFactor_norm =
 1170|      0|              fDivNorm(-dHr, -eHr); /* 0.0 < calcFactor_norm < 1.0 */
 1171|      0|          calcFactor_norm = calcFactor_norm >> DRC_PARAM_SCALE;
  ------------------
  |  |  120|      0|#define DRC_PARAM_SCALE (1)
  ------------------
 1172|       |          /* quantize to 128 steps */
 1173|      0|          calcFactor = convert_drcParam(
 1174|      0|              calcFactor_norm); /* convert to integer value between 0 and 127 */
 1175|      0|          calcFactor_norm = (FIXP_DBL)(
 1176|      0|              (INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * calcFactor);
  ------------------
  |  |  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) * calcFactor);
  ------------------
  |  |  120|      0|#define DRC_PARAM_SCALE (1)
  ------------------
 1177|      0|          p->cut = (calcFactor_norm > p->cut)
  ------------------
  |  Branch (1177:20): [True: 0, False: 0]
  ------------------
 1178|      0|                       ? calcFactor_norm
 1179|      0|                       : p->cut; /* use calcFactor_norm as lower limit */
 1180|      0|        } else {
 1181|       |          /* encoder provides equal or less headroom than decoder needs */
 1182|       |          /* the time domain limiter must always be active in this case. It is
 1183|       |           * assumed that the framework activates it by default */
 1184|      0|          p->cut = DRC_SCALING_MAX;
  ------------------
  |  |  122|      0|  ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  120|      0|#define DRC_PARAM_SCALE (1)
  |  |  ------------------
  ------------------
 1185|      0|          if ((dHr - eHr) <=
  ------------------
  |  Branch (1185:15): [True: 0, False: 0]
  ------------------
 1186|      0|              -4 * DRC_HEAVY_THRESHOLD_DB) { /* use heavy compression if
  ------------------
  |  |  130|      0|#define DRC_HEAVY_THRESHOLD_DB (10)
  ------------------
 1187|       |                                                headroom deficit is equal or
 1188|       |                                                higher than
 1189|       |                                                DRC_HEAVY_THRESHOLD_DB */
 1190|      0|            p->applyHeavyCompression = ON;
  ------------------
  |  |  135|      0|#define ON 1
  ------------------
 1191|      0|          }
 1192|      0|        }
 1193|      0|      } else { /* dHr >= 0 */
 1194|       |        /* no restrictions required, as headroom is not reduced. */
 1195|       |        /* p->cut = p->usrCut; */
 1196|      0|      }
 1197|      0|      break;
 1198|       |
 1199|       |      /* presentation mode 1 and 2 according to ETSI TS 101 154:
 1200|       |         Digital Video Broadcasting (DVB); Specification for the use of Video
 1201|       |         and Audio Coding in Broadcasting Applications based on the MPEG-2
 1202|       |         Transport Stream, section C.5.4., "Decoding", and Table C.33. Also
 1203|       |         according to amendment 4 to ISO/IEC 14496-3, section 4.5.2.14.2.4, and
 1204|       |         Table AMD4.11. ISO DRC            -> applyHeavyCompression = OFF (Use
 1205|       |         light compression, MPEG-style) Compression_value  ->
 1206|       |         applyHeavyCompression = ON  (Use heavy compression, DVB-style) scaling
 1207|       |         restricted -> p->cut = DRC_SCALING_MAX */
 1208|       |
 1209|    760|    case DRC_PRESENTATION_MODE_1: /* presentation mode 1, Light:-31/Heavy:-23 */
  ------------------
  |  Branch (1209:5): [True: 760, False: 15.8k]
  ------------------
 1210|    760|      if ((p->targetRefLevel >= 0) &&
  ------------------
  |  Branch (1210:11): [True: 760, False: 0]
  ------------------
 1211|    760|          (p->targetRefLevel <
  ------------------
  |  Branch (1211:11): [True: 760, False: 0]
  ------------------
 1212|    760|           124)) { /* if target level is provided and > -31 dB */
 1213|       |        /* playback up to -23 dB */
 1214|    760|        p->applyHeavyCompression = ON;
  ------------------
  |  |  135|    760|#define ON 1
  ------------------
 1215|    760|      } else { /* target level <= -31 dB or not provided */
 1216|       |        /* playback -31 dB */
 1217|      0|        if (isMonoDownmix || isStereoDownmix) { /* stereo or mono downmixing */
  ------------------
  |  Branch (1217:13): [True: 0, False: 0]
  |  Branch (1217:30): [True: 0, False: 0]
  ------------------
 1218|      0|          p->cut = DRC_SCALING_MAX;
  ------------------
  |  |  122|      0|  ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  120|      0|#define DRC_PARAM_SCALE (1)
  |  |  ------------------
  ------------------
 1219|      0|        }
 1220|      0|      }
 1221|    760|      break;
 1222|       |
 1223|     76|    case DRC_PRESENTATION_MODE_2: /* presentation mode 2, Light:-23/Heavy:-23 */
  ------------------
  |  Branch (1223:5): [True: 76, False: 16.5k]
  ------------------
 1224|     76|      if ((p->targetRefLevel >= 0) &&
  ------------------
  |  Branch (1224:11): [True: 76, False: 0]
  ------------------
 1225|     76|          (p->targetRefLevel <
  ------------------
  |  Branch (1225:11): [True: 76, False: 0]
  ------------------
 1226|     76|           124)) { /* if target level is provided and > -31 dB */
 1227|       |        /* playback up to -23 dB */
 1228|     76|        if (isMonoDownmix) { /* if mono downmix */
  ------------------
  |  Branch (1228:13): [True: 0, False: 76]
  ------------------
 1229|      0|          p->applyHeavyCompression = ON;
  ------------------
  |  |  135|      0|#define ON 1
  ------------------
 1230|     76|        } else {
 1231|     76|          p->applyHeavyCompression = OFF;
  ------------------
  |  |  134|     76|#define OFF 0
  ------------------
 1232|     76|          p->cut = DRC_SCALING_MAX;
  ------------------
  |  |  122|     76|  ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  119|     76|  (FL2FXCONST_DBL(1.0f / (float)DRC_MAX_QUANT_FACTOR))
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|     76|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|     76|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 76, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|     76|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|     76|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|     76|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 76]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|     76|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|     76|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|     76|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|     76|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|     76|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|     76|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|     76|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  120|     76|#define DRC_PARAM_SCALE (1)
  |  |  ------------------
  ------------------
 1233|     76|        }
 1234|     76|      } else { /* target level <= -31 dB or not provided */
 1235|       |        /* playback -31 dB */
 1236|      0|        p->applyHeavyCompression = OFF;
  ------------------
  |  |  134|      0|#define OFF 0
  ------------------
 1237|      0|        if (isMonoDownmix || isStereoDownmix) { /* stereo or mono downmixing */
  ------------------
  |  Branch (1237:13): [True: 0, False: 0]
  |  Branch (1237:30): [True: 0, False: 0]
  ------------------
 1238|      0|          p->cut = DRC_SCALING_MAX;
  ------------------
  |  |  122|      0|  ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  120|      0|#define DRC_PARAM_SCALE (1)
  |  |  ------------------
  ------------------
 1239|      0|        }
 1240|      0|      }
 1241|     76|      break;
 1242|  16.6k|  } /*  switch (drcParameterHandling) */
 1243|       |
 1244|       |  /* With heavy compression, there is no scaling.
 1245|       |     Scaling factors are set for notification only. */
 1246|  16.6k|  if (p->applyHeavyCompression == ON) {
  ------------------
  |  |  135|  16.6k|#define ON 1
  ------------------
  |  Branch (1246:7): [True: 760, False: 15.8k]
  ------------------
 1247|    760|    p->boost = DRC_SCALING_MAX;
  ------------------
  |  |  122|    760|  ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  119|    760|  (FL2FXCONST_DBL(1.0f / (float)DRC_MAX_QUANT_FACTOR))
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|    760|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|    760|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 760, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|    760|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|    760|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|    760|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 760]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|    760|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|    760|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    760|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    760|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|    760|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|    760|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    760|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  120|    760|#define DRC_PARAM_SCALE (1)
  |  |  ------------------
  ------------------
 1248|    760|    p->cut = DRC_SCALING_MAX;
  ------------------
  |  |  122|    760|  ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  119|    760|  (FL2FXCONST_DBL(1.0f / (float)DRC_MAX_QUANT_FACTOR))
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|    760|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|    760|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 760, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|    760|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|    760|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|    760|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 760]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|    760|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|    760|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    760|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    760|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|    760|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|    760|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    760|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((FIXP_DBL)((INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)127))
  |  |  ------------------
  |  |  |  |  120|    760|#define DRC_PARAM_SCALE (1)
  |  |  ------------------
  ------------------
 1249|    760|  }
 1250|       |
 1251|       |  /* switch on/off processing */
 1252|  16.6k|  self->enable = ((p->boost > (FIXP_DBL)0) || (p->cut > (FIXP_DBL)0) ||
  ------------------
  |  Branch (1252:19): [True: 760, False: 15.8k]
  |  Branch (1252:47): [True: 76, False: 15.8k]
  ------------------
 1253|  15.8k|                  (p->applyHeavyCompression == ON) || (p->targetRefLevel >= 0));
  ------------------
  |  |  135|  15.8k|#define ON 1
  ------------------
  |  Branch (1253:19): [True: 0, False: 15.8k]
  |  Branch (1253:55): [True: 15.8k, False: 0]
  ------------------
 1254|       |
 1255|  16.6k|  self->prevAacNumChannels = aacNumChannels;
 1256|  16.6k|  self->update = 0;
 1257|  16.6k|}

_Z9CHcr_ReadP13FDK_BITSTREAMP22CAacDecoderChannelInfo14MP4_ELEMENT_ID:
  203|  8.74k|               const MP4_ELEMENT_ID globalHcrType) {
  204|  8.74k|  SHORT lengOfReorderedSpectralData;
  205|  8.74k|  SCHAR lengOfLongestCodeword;
  206|       |
  207|  8.74k|  pAacDecoderChannelInfo->pDynData->specificTo.aac.lenOfReorderedSpectralData =
  208|  8.74k|      0;
  209|  8.74k|  pAacDecoderChannelInfo->pDynData->specificTo.aac.lenOfLongestCodeword = 0;
  210|       |
  211|       |  /* ------- SI-Value No 1 ------- */
  212|  8.74k|  lengOfReorderedSpectralData = FDKreadBits(bs, 14) + ERROR_LORSD;
  ------------------
  |  |  181|  8.74k|#define ERROR_LORSD 0 /* offset: error if different from zero */
  ------------------
  213|  8.74k|  if (globalHcrType == ID_CPE) {
  ------------------
  |  Branch (213:7): [True: 7.48k, False: 1.26k]
  ------------------
  214|  7.48k|    if ((lengOfReorderedSpectralData >= 0) &&
  ------------------
  |  Branch (214:9): [True: 7.48k, False: 0]
  ------------------
  215|  7.48k|        (lengOfReorderedSpectralData <= CPE_TOP_LENGTH)) {
  ------------------
  |  |  154|  7.48k|#define CPE_TOP_LENGTH 12288
  ------------------
  |  Branch (215:9): [True: 7.42k, False: 60]
  ------------------
  216|  7.42k|      pAacDecoderChannelInfo->pDynData->specificTo.aac
  217|  7.42k|          .lenOfReorderedSpectralData =
  218|  7.42k|          lengOfReorderedSpectralData; /* the decoded value is within range */
  219|  7.42k|    } else {
  220|     60|      if (lengOfReorderedSpectralData > CPE_TOP_LENGTH) {
  ------------------
  |  |  154|     60|#define CPE_TOP_LENGTH 12288
  ------------------
  |  Branch (220:11): [True: 60, False: 0]
  ------------------
  221|     60|        pAacDecoderChannelInfo->pDynData->specificTo.aac
  222|     60|            .lenOfReorderedSpectralData =
  223|     60|            CPE_TOP_LENGTH; /* use valid maximum */
  ------------------
  |  |  154|     60|#define CPE_TOP_LENGTH 12288
  ------------------
  224|     60|      }
  225|     60|    }
  226|  7.48k|  } else if (globalHcrType == ID_SCE || globalHcrType == ID_LFE ||
  ------------------
  |  Branch (226:14): [True: 1.26k, False: 0]
  |  Branch (226:41): [True: 0, False: 0]
  ------------------
  227|  1.26k|             globalHcrType == ID_CCE) {
  ------------------
  |  Branch (227:14): [True: 0, False: 0]
  ------------------
  228|  1.26k|    if ((lengOfReorderedSpectralData >= 0) &&
  ------------------
  |  Branch (228:9): [True: 1.26k, False: 0]
  ------------------
  229|  1.26k|        (lengOfReorderedSpectralData <= SCE_TOP_LENGTH)) {
  ------------------
  |  |  155|  1.26k|#define SCE_TOP_LENGTH 6144
  ------------------
  |  Branch (229:9): [True: 1.16k, False: 94]
  ------------------
  230|  1.16k|      pAacDecoderChannelInfo->pDynData->specificTo.aac
  231|  1.16k|          .lenOfReorderedSpectralData =
  232|  1.16k|          lengOfReorderedSpectralData; /* the decoded value is within range */
  233|  1.16k|    } else {
  234|     94|      if (lengOfReorderedSpectralData > SCE_TOP_LENGTH) {
  ------------------
  |  |  155|     94|#define SCE_TOP_LENGTH 6144
  ------------------
  |  Branch (234:11): [True: 94, False: 0]
  ------------------
  235|     94|        pAacDecoderChannelInfo->pDynData->specificTo.aac
  236|     94|            .lenOfReorderedSpectralData =
  237|     94|            SCE_TOP_LENGTH; /* use valid maximum */
  ------------------
  |  |  155|     94|#define SCE_TOP_LENGTH 6144
  ------------------
  238|     94|      }
  239|     94|    }
  240|  1.26k|  }
  241|       |
  242|       |  /* ------- SI-Value No 2 ------- */
  243|  8.74k|  lengOfLongestCodeword = FDKreadBits(bs, 6) + ERROR_LOLC;
  ------------------
  |  |  182|  8.74k|#define ERROR_LOLC 0  /* offset: error if different from zero */
  ------------------
  244|  8.74k|  if ((lengOfLongestCodeword >= 0) &&
  ------------------
  |  Branch (244:7): [True: 8.74k, False: 0]
  ------------------
  245|  8.74k|      (lengOfLongestCodeword <= LEN_OF_LONGEST_CW_TOP_LENGTH)) {
  ------------------
  |  |  156|  8.74k|#define LEN_OF_LONGEST_CW_TOP_LENGTH 49
  ------------------
  |  Branch (245:7): [True: 3.79k, False: 4.94k]
  ------------------
  246|  3.79k|    pAacDecoderChannelInfo->pDynData->specificTo.aac.lenOfLongestCodeword =
  247|  3.79k|        lengOfLongestCodeword; /* the decoded value is within range */
  248|  4.94k|  } else {
  249|  4.94k|    if (lengOfLongestCodeword > LEN_OF_LONGEST_CW_TOP_LENGTH) {
  ------------------
  |  |  156|  4.94k|#define LEN_OF_LONGEST_CW_TOP_LENGTH 49
  ------------------
  |  Branch (249:9): [True: 4.94k, False: 0]
  ------------------
  250|  4.94k|      pAacDecoderChannelInfo->pDynData->specificTo.aac.lenOfLongestCodeword =
  251|  4.94k|          LEN_OF_LONGEST_CW_TOP_LENGTH; /* use valid maximum */
  ------------------
  |  |  156|  4.94k|#define LEN_OF_LONGEST_CW_TOP_LENGTH 49
  ------------------
  252|  4.94k|    }
  253|  4.94k|  }
  254|  8.74k|}
_Z7HcrInitP10CErHcrInfoP22CAacDecoderChannelInfoPK16SamplingRateInfoP13FDK_BITSTREAM:
  267|  8.49k|             HANDLE_FDK_BITSTREAM bs) {
  268|  8.49k|  CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
  269|  8.49k|  SHORT *pNumLinesInSec;
  270|  8.49k|  UCHAR *pCodeBk;
  271|  8.49k|  SHORT numSection;
  272|  8.49k|  SCHAR cb;
  273|  8.49k|  int numLine;
  274|  8.49k|  int i;
  275|       |
  276|  8.49k|  pHcr->decInOut.lengthOfReorderedSpectralData =
  277|  8.49k|      pAacDecoderChannelInfo->pDynData->specificTo.aac
  278|  8.49k|          .lenOfReorderedSpectralData;
  279|  8.49k|  pHcr->decInOut.lengthOfLongestCodeword =
  280|  8.49k|      pAacDecoderChannelInfo->pDynData->specificTo.aac.lenOfLongestCodeword;
  281|  8.49k|  pHcr->decInOut.pQuantizedSpectralCoefficientsBase =
  282|  8.49k|      pAacDecoderChannelInfo->pSpectralCoefficient;
  283|  8.49k|  pHcr->decInOut.quantizedSpectralCoefficientsIdx = 0;
  284|  8.49k|  pHcr->decInOut.pCodebook =
  285|  8.49k|      pAacDecoderChannelInfo->pDynData->specificTo.aac.aCodeBooks4Hcr;
  286|  8.49k|  pHcr->decInOut.pNumLineInSect =
  287|  8.49k|      pAacDecoderChannelInfo->pDynData->specificTo.aac.aNumLineInSec4Hcr;
  288|  8.49k|  pHcr->decInOut.numSection =
  289|  8.49k|      pAacDecoderChannelInfo->pDynData->specificTo.aac.numberSection;
  290|  8.49k|  pHcr->decInOut.errorLog = 0;
  291|  8.49k|  pHcr->nonPcwSideinfo.pResultBase =
  292|  8.49k|      SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient);
  ------------------
  |  |  114|  8.49k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  293|       |
  294|  8.49k|  FDKsyncCache(bs);
  295|  8.49k|  pHcr->decInOut.bitstreamAnchor = (INT)FDKgetValidBits(bs);
  296|       |
  297|  8.49k|  if (!IsLongBlock(&pAacDecoderChannelInfo->icsInfo)) /* short block */
  ------------------
  |  Branch (297:7): [True: 4.12k, False: 4.36k]
  ------------------
  298|  4.12k|  {
  299|  4.12k|    SHORT band;
  300|  4.12k|    SHORT maxBand;
  301|  4.12k|    SCHAR group;
  302|  4.12k|    SCHAR winGroupLen;
  303|  4.12k|    SCHAR window;
  304|  4.12k|    SCHAR numUnitInBand;
  305|  4.12k|    SCHAR cntUnitInBand;
  306|  4.12k|    SCHAR groupWin;
  307|  4.12k|    SCHAR cb_prev;
  308|       |
  309|  4.12k|    UCHAR *pCodeBook;
  310|  4.12k|    const SHORT *BandOffsets;
  311|  4.12k|    SCHAR numOfGroups;
  312|       |
  313|  4.12k|    pCodeBook = pAacDecoderChannelInfo->pDynData->aCodeBook; /* in */
  314|  4.12k|    pNumLinesInSec = pHcr->decInOut.pNumLineInSect;          /* out */
  315|  4.12k|    pCodeBk = pHcr->decInOut.pCodebook;                      /* out */
  316|  4.12k|    BandOffsets =
  317|  4.12k|        GetScaleFactorBandOffsets(pIcsInfo, pSamplingRateInfo); /* aux */
  318|  4.12k|    numOfGroups = GetWindowGroups(pIcsInfo);
  319|       |
  320|  4.12k|    numLine = 0;
  321|  4.12k|    numSection = 0;
  322|  4.12k|    cb = pCodeBook[0];
  323|  4.12k|    cb_prev = pCodeBook[0];
  324|       |
  325|       |    /* convert HCR-sideinfo into a unitwise manner: When the cb changes, a new
  326|       |     * section starts */
  327|       |
  328|  4.12k|    *pCodeBk++ = cb_prev;
  329|       |
  330|  4.12k|    maxBand = GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  331|  24.5k|    for (band = 0; band < maxBand;
  ------------------
  |  Branch (331:20): [True: 20.4k, False: 4.12k]
  ------------------
  332|  20.4k|         band++) { /* from low to high sfbs i.e. from low to high frequencies */
  333|  20.4k|      numUnitInBand =
  334|  20.4k|          ((BandOffsets[band + 1] - BandOffsets[band]) >>
  335|  20.4k|           FOUR_LOG_DIV_TWO_LOG); /* get the number of units in current sfb */
  ------------------
  |  |  151|  20.4k|#define FOUR_LOG_DIV_TWO_LOG 2
  ------------------
  336|  41.9k|      for (cntUnitInBand = numUnitInBand; cntUnitInBand != 0;
  ------------------
  |  Branch (336:43): [True: 21.5k, False: 20.4k]
  ------------------
  337|  21.5k|           cntUnitInBand--) { /* for every unit in the band */
  338|   103k|        for (window = 0, group = 0; group < numOfGroups; group++) {
  ------------------
  |  Branch (338:37): [True: 81.6k, False: 21.5k]
  ------------------
  339|  81.6k|          winGroupLen = (SCHAR)GetWindowGroupLength(
  340|  81.6k|              &pAacDecoderChannelInfo->icsInfo, group);
  341|   253k|          for (groupWin = winGroupLen; groupWin != 0; groupWin--, window++) {
  ------------------
  |  Branch (341:40): [True: 172k, False: 81.6k]
  ------------------
  342|   172k|            cb = pCodeBook[group * 16 + band];
  343|   172k|            if (cb != cb_prev) {
  ------------------
  |  Branch (343:17): [True: 75.9k, False: 96.0k]
  ------------------
  344|  75.9k|              errDetectorInHcrSideinfoShrt(cb, numLine,
  345|  75.9k|                                           &pHcr->decInOut.errorLog);
  346|  75.9k|              if (pHcr->decInOut.errorLog != 0) {
  ------------------
  |  Branch (346:19): [True: 0, False: 75.9k]
  ------------------
  347|      0|                return (pHcr->decInOut.errorLog);
  348|      0|              }
  349|  75.9k|              *pCodeBk++ = cb;
  350|  75.9k|              *pNumLinesInSec++ = numLine;
  351|  75.9k|              numSection++;
  352|       |
  353|  75.9k|              cb_prev = cb;
  354|  75.9k|              numLine = LINES_PER_UNIT;
  ------------------
  |  |  113|  75.9k|#define LINES_PER_UNIT 4
  ------------------
  355|  96.0k|            } else {
  356|  96.0k|              numLine += LINES_PER_UNIT;
  ------------------
  |  |  113|  96.0k|#define LINES_PER_UNIT 4
  ------------------
  357|  96.0k|            }
  358|   172k|          }
  359|  81.6k|        }
  360|  21.5k|      }
  361|  20.4k|    }
  362|       |
  363|  4.12k|    numSection++;
  364|       |
  365|  4.12k|    errDetectorInHcrSideinfoShrt(cb, numLine, &pHcr->decInOut.errorLog);
  366|  4.12k|    if (numSection <= 0 || numSection > 1024 / 2) {
  ------------------
  |  Branch (366:9): [True: 0, False: 4.12k]
  |  Branch (366:28): [True: 0, False: 4.12k]
  ------------------
  367|      0|      pHcr->decInOut.errorLog |= NUM_SECT_OUT_OF_RANGE_SHORT_BLOCK;
  ------------------
  |  |  316|      0|  0x00000080  //   7   yes   Init-Dec    The number of sections is not within
  ------------------
  368|      0|    }
  369|  4.12k|    errDetectorInHcrLengths(pHcr->decInOut.lengthOfLongestCodeword,
  370|  4.12k|                            pHcr->decInOut.lengthOfReorderedSpectralData,
  371|  4.12k|                            &pHcr->decInOut.errorLog);
  372|  4.12k|    if (pHcr->decInOut.errorLog != 0) {
  ------------------
  |  Branch (372:9): [True: 3, False: 4.12k]
  ------------------
  373|      3|      return (pHcr->decInOut.errorLog);
  374|      3|    }
  375|       |
  376|  4.12k|    *pCodeBk = cb;
  377|  4.12k|    *pNumLinesInSec = numLine;
  378|  4.12k|    pHcr->decInOut.numSection = numSection;
  379|       |
  380|  4.12k|  } else /* end short block prepare SI */
  381|  4.36k|  {      /* long block */
  382|  4.36k|    errDetectorInHcrLengths(pHcr->decInOut.lengthOfLongestCodeword,
  383|  4.36k|                            pHcr->decInOut.lengthOfReorderedSpectralData,
  384|  4.36k|                            &pHcr->decInOut.errorLog);
  385|  4.36k|    numSection = pHcr->decInOut.numSection;
  386|  4.36k|    pNumLinesInSec = pHcr->decInOut.pNumLineInSect;
  387|  4.36k|    pCodeBk = pHcr->decInOut.pCodebook;
  388|  4.36k|    if (numSection <= 0 || numSection > 64) {
  ------------------
  |  Branch (388:9): [True: 18, False: 4.34k]
  |  Branch (388:28): [True: 1, False: 4.34k]
  ------------------
  389|     19|      pHcr->decInOut.errorLog |= NUM_SECT_OUT_OF_RANGE_LONG_BLOCK;
  ------------------
  |  |  319|     19|  0x00000040  //   6   yes   Init-Dec    The number of sections is not within
  ------------------
  390|     19|      numSection = 0;
  391|     19|    }
  392|       |
  393|  9.11k|    for (i = numSection; i != 0; i--) {
  ------------------
  |  Branch (393:26): [True: 4.75k, False: 4.36k]
  ------------------
  394|  4.75k|      cb = *pCodeBk++;
  395|       |
  396|  4.75k|      if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == BOOKSCL) {
  ------------------
  |  |  143|  9.50k|  32 /* support for VCB11 available -- is more general, could therefore used \
  ------------------
  |  Branch (396:11): [True: 0, False: 4.75k]
  |  Branch (396:28): [True: 0, False: 4.75k]
  |  Branch (396:50): [True: 0, False: 4.75k]
  ------------------
  397|      0|        pHcr->decInOut.errorLog |= CB_OUT_OF_RANGE_LONG_BLOCK;
  ------------------
  |  |  331|      0|  0x00000004  //   2   yes   Init-Dec    The codebook is not within the allowed
  ------------------
  398|      0|      }
  399|       |
  400|  4.75k|      numLine = *pNumLinesInSec++;
  401|       |      /* FDK_ASSERT(numLine > 0); */
  402|       |
  403|  4.75k|      if ((numLine <= 0) || (numLine > 1024)) {
  ------------------
  |  Branch (403:11): [True: 85, False: 4.66k]
  |  Branch (403:29): [True: 0, False: 4.66k]
  ------------------
  404|     85|        pHcr->decInOut.errorLog |= LINE_IN_SECT_OUT_OF_RANGE_LONG_BLOCK;
  ------------------
  |  |  328|     85|  0x00000008  //   3   yes   Init-Dec    The number of lines per section is not
  ------------------
  405|     85|      }
  406|  4.75k|    }
  407|  4.36k|    if (pHcr->decInOut.errorLog != 0) {
  ------------------
  |  Branch (407:9): [True: 33, False: 4.33k]
  ------------------
  408|     33|      return (pHcr->decInOut.errorLog);
  409|     33|    }
  410|  4.36k|  }
  411|       |
  412|  8.45k|  pCodeBk = pHcr->decInOut.pCodebook;
  413|  93.1k|  for (i = 0; i < numSection; i++) {
  ------------------
  |  Branch (413:15): [True: 84.7k, False: 8.45k]
  ------------------
  414|  84.7k|    if ((*pCodeBk == NOISE_HCB) || (*pCodeBk == INTENSITY_HCB2) ||
  ------------------
  |  Branch (414:9): [True: 2.75k, False: 81.9k]
  |  Branch (414:36): [True: 328, False: 81.6k]
  ------------------
  415|  81.6k|        (*pCodeBk == INTENSITY_HCB)) {
  ------------------
  |  Branch (415:9): [True: 11.7k, False: 69.9k]
  ------------------
  416|  14.7k|      *pCodeBk = 0;
  417|  14.7k|    }
  418|  84.7k|    pCodeBk++;
  419|  84.7k|  }
  420|       |
  421|       |  /* HCR-sideinfo-input is complete and seems to be valid */
  422|       |
  423|  8.45k|  return (pHcr->decInOut.errorLog);
  424|  8.49k|}
_Z10HcrDecoderP10CErHcrInfoP22CAacDecoderChannelInfoPK16SamplingRateInfoP13FDK_BITSTREAM:
  435|  8.45k|                HANDLE_FDK_BITSTREAM bs) {
  436|  8.45k|  int pTmp1, pTmp2, pTmp3, pTmp4;
  437|  8.45k|  int pTmp5;
  438|       |
  439|  8.45k|  INT bitCntOffst;
  440|  8.45k|  INT saveBitCnt = (INT)FDKgetValidBits(bs); /* save bitstream position */
  441|       |
  442|  8.45k|  HcrCalcNumCodeword(pHcr);
  443|       |
  444|  8.45k|  HcrSortCodebookAndNumCodewordInSection(pHcr);
  445|       |
  446|  8.45k|  HcrPrepareSegmentationGrid(pHcr);
  447|       |
  448|  8.45k|  HcrExtendedSectionInfo(pHcr);
  449|       |
  450|  8.45k|  if ((pHcr->decInOut.errorLog & HCR_FATAL_PCW_ERROR_MASK) != 0) {
  ------------------
  |  |  341|  8.45k|#define HCR_FATAL_PCW_ERROR_MASK 0x100E01FC
  ------------------
  |  Branch (450:7): [True: 4, False: 8.45k]
  ------------------
  451|      4|    return (pHcr->decInOut.errorLog); /* sideinfo is massively corrupt, return
  452|       |                                         from HCR without having decoded
  453|       |                                         anything */
  454|      4|  }
  455|       |
  456|  8.45k|  DeriveNumberOfExtendedSortedSectionsInSets(
  457|  8.45k|      pHcr->segmentInfo.numSegment,
  458|  8.45k|      pHcr->sectionInfo.pNumExtendedSortedCodewordInSection,
  459|  8.45k|      pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx,
  460|  8.45k|      pHcr->sectionInfo.pNumExtendedSortedSectionsInSets,
  461|  8.45k|      pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx);
  462|       |
  463|       |  /* store */
  464|  8.45k|  pTmp1 = pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx;
  465|  8.45k|  pTmp2 = pHcr->sectionInfo.extendedSortedCodebookIdx;
  466|  8.45k|  pTmp3 = pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx;
  467|  8.45k|  pTmp4 = pHcr->decInOut.quantizedSpectralCoefficientsIdx;
  468|  8.45k|  pTmp5 = pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx;
  469|       |
  470|       |  /* ------- decode meaningful PCWs ------ */
  471|  8.45k|  DecodePCWs(bs, pHcr);
  472|       |
  473|  8.45k|  if ((pHcr->decInOut.errorLog & HCR_FATAL_PCW_ERROR_MASK) == 0) {
  ------------------
  |  |  341|  8.45k|#define HCR_FATAL_PCW_ERROR_MASK 0x100E01FC
  ------------------
  |  Branch (473:7): [True: 6.27k, False: 2.17k]
  ------------------
  474|       |    /* ------ decode the non-PCWs -------- */
  475|  6.27k|    DecodeNonPCWs(bs, pHcr);
  476|  6.27k|  }
  477|       |
  478|  8.45k|  errDetectWithinSegmentationFinal(pHcr);
  479|       |
  480|       |  /* restore */
  481|  8.45k|  pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx = pTmp1;
  482|  8.45k|  pHcr->sectionInfo.extendedSortedCodebookIdx = pTmp2;
  483|  8.45k|  pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx = pTmp3;
  484|  8.45k|  pHcr->decInOut.quantizedSpectralCoefficientsIdx = pTmp4;
  485|  8.45k|  pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx = pTmp5;
  486|       |
  487|  8.45k|  HcrReorderQuantizedSpectralCoefficients(pHcr, pAacDecoderChannelInfo,
  488|  8.45k|                                          pSamplingRateInfo);
  489|       |
  490|       |  /* restore bitstream position */
  491|  8.45k|  bitCntOffst = (INT)FDKgetValidBits(bs) - saveBitCnt;
  492|  8.45k|  if (bitCntOffst) {
  ------------------
  |  Branch (492:7): [True: 8.11k, False: 338]
  ------------------
  493|  8.11k|    FDKpushBiDirectional(bs, bitCntOffst);
  494|  8.11k|  }
  495|       |
  496|  8.45k|  return (pHcr->decInOut.errorLog);
  497|  8.45k|}
_Z21CarryBitToBranchValuehjPjS_:
 1315|  5.73M|                           UINT *branchNode) {
 1316|  5.73M|  if (carryBit == 0) {
  ------------------
  |  Branch (1316:7): [True: 4.04M, False: 1.69M]
  ------------------
 1317|  4.04M|    *branchNode =
 1318|  4.04M|        (treeNode & MASK_LEFT) >> LEFT_OFFSET; /* MASK_LEFT:  00FFF000 */
  ------------------
  |  |  164|  4.04M|#define MASK_LEFT 0xFFF000
  ------------------
                      (treeNode & MASK_LEFT) >> LEFT_OFFSET; /* MASK_LEFT:  00FFF000 */
  ------------------
  |  |  169|  4.04M|#define LEFT_OFFSET 12
  ------------------
 1319|  4.04M|  } else {
 1320|  1.69M|    *branchNode = treeNode & MASK_RIGHT; /* MASK_RIGHT: 00000FFF */
  ------------------
  |  |  165|  1.69M|#define MASK_RIGHT 0xFFF
  ------------------
 1321|  1.69M|  }
 1322|       |
 1323|  5.73M|  *branchValue = *branchNode & CLR_BIT_10; /* clear bit 10 (if set) */
  ------------------
  |  |  166|  5.73M|#define CLR_BIT_10 0x3FF
  ------------------
 1324|  5.73M|}
_Z21HcrMuteErroneousLinesP10CErHcrInfo:
 1497|  5.63k|void HcrMuteErroneousLines(H_HCR_INFO hHcr) {
 1498|  5.63k|  int c;
 1499|  5.63k|  FIXP_DBL *RESTRICT pLong =
 1500|  5.63k|      SPEC_LONG(hHcr->decInOut.pQuantizedSpectralCoefficientsBase);
  ------------------
  |  |  114|  5.63k|#define SPEC_LONG(ptr) (ptr)
  ------------------
 1501|       |
 1502|       |  /* if there is a line with value Q_VALUE_INVALID mute it */
 1503|  5.77M|  for (c = 0; c < 1024; c++) {
  ------------------
  |  Branch (1503:15): [True: 5.76M, False: 5.63k]
  ------------------
 1504|  5.76M|    if (pLong[c] == (FIXP_DBL)Q_VALUE_INVALID) {
  ------------------
  |  |  160|  5.76M|  8192 /* mark a invalid line with this value (to be concealed later on) */
  ------------------
  |  Branch (1504:9): [True: 6.28k, False: 5.75M]
  ------------------
 1505|  6.28k|      pLong[c] = FL2FXCONST_DBL(0.0f); /* muting */
  ------------------
  |  |  192|  6.28k|  (FIXP_DBL)(                                                                \
  |  |  193|  6.28k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.28k, Folded]
  |  |  ------------------
  |  |  194|  6.28k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.28k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.28k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.28k]
  |  |  ------------------
  |  |  195|  6.28k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.28k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.28k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.28k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.28k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.28k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.28k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1506|  6.28k|    }
 1507|  5.76M|  }
 1508|  5.63k|}
aacdec_hcr.cpp:_ZL28errDetectorInHcrSideinfoShrtasPj:
  174|  80.1k|                                         UINT *errorWord) {
  175|  80.1k|  if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == BOOKSCL) {
  ------------------
  |  |  143|   160k|  32 /* support for VCB11 available -- is more general, could therefore used \
  ------------------
  |  Branch (175:7): [True: 0, False: 80.1k]
  |  Branch (175:24): [True: 0, False: 80.1k]
  |  Branch (175:46): [True: 0, False: 80.1k]
  ------------------
  176|      0|    *errorWord |= CB_OUT_OF_RANGE_SHORT_BLOCK;
  ------------------
  |  |  325|      0|  0x00000010  //   4   yes   Init-Dec    The codebook is not within the allowed
  ------------------
  177|      0|  }
  178|  80.1k|  if (numLine < 0 || numLine > 1024) {
  ------------------
  |  Branch (178:7): [True: 0, False: 80.1k]
  |  Branch (178:22): [True: 0, False: 80.1k]
  ------------------
  179|      0|    *errorWord |= LINE_IN_SECT_OUT_OF_RANGE_SHORT_BLOCK;
  ------------------
  |  |  322|      0|  0x00000020  //   5   yes   Init-Dec    The number of lines per section is not
  ------------------
  180|      0|  }
  181|  80.1k|}
aacdec_hcr.cpp:_ZL23errDetectorInHcrLengthsasPj:
  189|  8.49k|                                    UINT *errorWord) {
  190|  8.49k|  if (lengthOfReorderedSpectralData < lengthOfLongestCodeword) {
  ------------------
  |  Branch (190:7): [True: 4, False: 8.48k]
  ------------------
  191|      4|    *errorWord |= HCR_SI_LENGTHS_FAILURE;
  ------------------
  |  |  313|      4|  0x00000100  //   8   yes   Init-Dec    LengthOfLongestCodeword must not be
  ------------------
  192|      4|  }
  193|  8.49k|}
aacdec_hcr.cpp:_ZL39HcrReorderQuantizedSpectralCoefficientsP10CErHcrInfoP22CAacDecoderChannelInfoPK16SamplingRateInfo:
  512|  8.45k|    const SamplingRateInfo *pSamplingRateInfo) {
  513|  8.45k|  INT qsc;
  514|  8.45k|  UINT abs_qsc;
  515|  8.45k|  UINT i, j;
  516|  8.45k|  USHORT numSpectralValuesInSection;
  517|  8.45k|  FIXP_DBL *pTeVa;
  518|  8.45k|  USHORT lavErrorCnt = 0;
  519|       |
  520|  8.45k|  UINT numSection = pHcr->decInOut.numSection;
  521|  8.45k|  SPECTRAL_PTR pQuantizedSpectralCoefficientsBase =
  522|  8.45k|      pHcr->decInOut.pQuantizedSpectralCoefficientsBase;
  523|  8.45k|  FIXP_DBL *pQuantizedSpectralCoefficients =
  524|  8.45k|      SPEC_LONG(pHcr->decInOut.pQuantizedSpectralCoefficientsBase);
  ------------------
  |  |  114|  8.45k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  525|  8.45k|  const UCHAR *pCbDimShift = aDimCbShift;
  526|  8.45k|  const USHORT *pLargestAbsVal = aLargestAbsoluteValue;
  527|  8.45k|  UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook;
  528|  8.45k|  USHORT *pNumSortedCodewordInSection =
  529|  8.45k|      pHcr->sectionInfo.pNumSortedCodewordInSection;
  530|  8.45k|  USHORT *pReorderOffset = pHcr->sectionInfo.pReorderOffset;
  531|  8.45k|  FIXP_DBL pTempValues[1024];
  532|  8.45k|  FIXP_DBL *pBak = pTempValues;
  533|       |
  534|  8.45k|  FDKmemclear(pTempValues, 1024 * sizeof(FIXP_DBL));
  535|       |
  536|       |  /* long and short: check if decoded huffman-values (quantized spectral
  537|       |   * coefficients) are within range */
  538|  92.9k|  for (i = numSection; i != 0; i--) {
  ------------------
  |  Branch (538:24): [True: 84.4k, False: 8.45k]
  ------------------
  539|  84.4k|    numSpectralValuesInSection = *pNumSortedCodewordInSection++
  540|  84.4k|                                 << pCbDimShift[*pSortedCodebook];
  541|  84.4k|    pTeVa = &pTempValues[*pReorderOffset++];
  542|  1.96M|    for (j = numSpectralValuesInSection; j != 0; j--) {
  ------------------
  |  Branch (542:42): [True: 1.87M, False: 84.4k]
  ------------------
  543|  1.87M|      qsc = *pQuantizedSpectralCoefficients++;
  544|  1.87M|      abs_qsc = fAbs(qsc);
  545|  1.87M|      if (abs_qsc <= pLargestAbsVal[*pSortedCodebook]) {
  ------------------
  |  Branch (545:11): [True: 1.87M, False: 6.28k]
  ------------------
  546|  1.87M|        *pTeVa++ = (FIXP_DBL)qsc; /* the qsc value is within range */
  547|  1.87M|      } else {                    /* line is too high .. */
  548|  6.28k|        if (abs_qsc ==
  ------------------
  |  Branch (548:13): [True: 5.03k, False: 1.24k]
  ------------------
  549|  6.28k|            Q_VALUE_INVALID) { /* .. because of previous marking --> dont set
  ------------------
  |  |  160|  6.28k|  8192 /* mark a invalid line with this value (to be concealed later on) */
  ------------------
  550|       |                                  LAV flag (would be confusing), just copy out
  551|       |                                  the already marked value */
  552|  5.03k|          *pTeVa++ = (FIXP_DBL)qsc;
  553|  5.03k|        } else { /* .. because a too high value was decoded for this cb --> set
  554|       |                    LAV flag */
  555|  1.24k|          *pTeVa++ = (FIXP_DBL)Q_VALUE_INVALID;
  ------------------
  |  |  160|  1.24k|  8192 /* mark a invalid line with this value (to be concealed later on) */
  ------------------
  556|  1.24k|          lavErrorCnt += 1;
  557|  1.24k|        }
  558|  6.28k|      }
  559|  1.87M|    }
  560|  84.4k|    pSortedCodebook++;
  561|  84.4k|  }
  562|       |
  563|  8.45k|  if (!IsLongBlock(&pAacDecoderChannelInfo->icsInfo)) {
  ------------------
  |  Branch (563:7): [True: 4.12k, False: 4.33k]
  ------------------
  564|  4.12k|    FIXP_DBL *pOut;
  565|  4.12k|    FIXP_DBL locMax;
  566|  4.12k|    FIXP_DBL tmp;
  567|  4.12k|    SCHAR groupoffset;
  568|  4.12k|    SCHAR group;
  569|  4.12k|    SCHAR band;
  570|  4.12k|    SCHAR groupwin;
  571|  4.12k|    SCHAR window;
  572|  4.12k|    SCHAR numWinGroup;
  573|  4.12k|    SHORT interm;
  574|  4.12k|    SCHAR numSfbTransm;
  575|  4.12k|    SCHAR winGroupLen;
  576|  4.12k|    SHORT index;
  577|  4.12k|    INT msb;
  578|  4.12k|    INT lsb;
  579|       |
  580|  4.12k|    SHORT *pScaleFacHcr = pAacDecoderChannelInfo->pDynData->aScaleFactor;
  581|  4.12k|    SHORT *pSfbSclHcr = pAacDecoderChannelInfo->pDynData->aSfbScale;
  582|  4.12k|    const SHORT *BandOffsets = GetScaleFactorBandOffsets(
  583|  4.12k|        &pAacDecoderChannelInfo->icsInfo, pSamplingRateInfo);
  584|       |
  585|  4.12k|    pBak = pTempValues;
  586|       |    /* deinterleave unitwise for short blocks */
  587|  37.0k|    for (window = 0; window < (8); window++) {
  ------------------
  |  Branch (587:22): [True: 32.9k, False: 4.12k]
  ------------------
  588|  32.9k|      pOut = SPEC(pQuantizedSpectralCoefficientsBase, window,
  ------------------
  |  |  115|  32.9k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  589|  32.9k|                  pAacDecoderChannelInfo->granuleLength);
  590|  1.08M|      for (i = 0; i < (LINES_PER_UNIT_GROUP); i++) {
  ------------------
  |  |  124|  1.08M|#define LINES_PER_UNIT_GROUP (1024 / NUMBER_OF_UNIT_GROUPS) /* 15 16 30 32 */
  |  |  ------------------
  |  |  |  |  123|  1.08M|#define NUMBER_OF_UNIT_GROUPS (LINES_PER_UNIT * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.08M|#define LINES_PER_UNIT 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (590:19): [True: 1.05M, False: 32.9k]
  ------------------
  591|  1.05M|        pTeVa = pBak + (window << FOUR_LOG_DIV_TWO_LOG) +
  ------------------
  |  |  151|  1.05M|#define FOUR_LOG_DIV_TWO_LOG 2
  ------------------
  592|  1.05M|                i * 32; /* distance of lines between unit groups has to be
  593|       |                           constant for every framelength (32)!  */
  594|  5.27M|        for (j = (LINES_PER_UNIT); j != 0; j--) {
  ------------------
  |  |  113|  1.05M|#define LINES_PER_UNIT 4
  ------------------
  |  Branch (594:36): [True: 4.21M, False: 1.05M]
  ------------------
  595|  4.21M|          *pOut++ = *pTeVa++;
  596|  4.21M|        }
  597|  1.05M|      }
  598|  32.9k|    }
  599|       |
  600|       |    /* short blocks only */
  601|       |    /* derive global scaling-value for every sfb and every window (as it is done
  602|       |     * in plain-huffman-decoder at short blocks) */
  603|  4.12k|    groupoffset = 0;
  604|       |
  605|  4.12k|    numWinGroup = GetWindowGroups(&pAacDecoderChannelInfo->icsInfo);
  606|  4.12k|    numSfbTransm =
  607|  4.12k|        GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  608|       |
  609|  20.6k|    for (group = 0; group < numWinGroup; group++) {
  ------------------
  |  Branch (609:21): [True: 16.4k, False: 4.12k]
  ------------------
  610|  16.4k|      winGroupLen =
  611|  16.4k|          GetWindowGroupLength(&pAacDecoderChannelInfo->icsInfo, group);
  612|  95.9k|      for (band = 0; band < numSfbTransm; band++) {
  ------------------
  |  Branch (612:22): [True: 79.4k, False: 16.4k]
  ------------------
  613|  79.4k|        interm = group * 16 + band;
  614|  79.4k|        msb = pScaleFacHcr[interm] >> 2;
  615|  79.4k|        lsb = pScaleFacHcr[interm] & 3;
  616|   242k|        for (groupwin = 0; groupwin < winGroupLen; groupwin++) {
  ------------------
  |  Branch (616:28): [True: 163k, False: 79.4k]
  ------------------
  617|   163k|          window = groupoffset + groupwin;
  618|   163k|          pBak = SPEC(pQuantizedSpectralCoefficientsBase, window,
  ------------------
  |  |  115|   163k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  619|   163k|                      pAacDecoderChannelInfo->granuleLength);
  620|   163k|          locMax = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   163k|  (FIXP_DBL)(                                                                \
  |  |  193|   163k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 163k, Folded]
  |  |  ------------------
  |  |  194|   163k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   163k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   163k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 163k]
  |  |  ------------------
  |  |  195|   163k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   163k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   163k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   163k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   163k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   163k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   163k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|   334k|          for (index = BandOffsets[band]; index < BandOffsets[band + 1];
  ------------------
  |  Branch (621:43): [True: 171k, False: 163k]
  ------------------
  622|   171k|               index += LINES_PER_UNIT) {
  ------------------
  |  |  113|   171k|#define LINES_PER_UNIT 4
  ------------------
  623|   171k|            pTeVa = &pBak[index];
  624|   857k|            for (i = LINES_PER_UNIT; i != 0; i--) {
  ------------------
  |  |  113|   171k|#define LINES_PER_UNIT 4
  ------------------
  |  Branch (624:38): [True: 686k, False: 171k]
  ------------------
  625|   686k|              tmp = (*pTeVa < FL2FXCONST_DBL(0.0f)) ? -*pTeVa++ : *pTeVa++;
  ------------------
  |  |  192|   686k|  (FIXP_DBL)(                                                                \
  |  |  193|   686k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 686k, Folded]
  |  |  ------------------
  |  |  194|   686k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   686k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   686k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 686k]
  |  |  ------------------
  |  |  195|   686k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   686k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   686k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   686k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   686k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   686k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   686k|          : ((((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 (625:21): [True: 32.1k, False: 654k]
  ------------------
  626|   686k|              locMax = fixMax(tmp, locMax);
  ------------------
  |  |  307|   686k|#define fixMax(a, b) fMax(a, b)
  ------------------
  627|   686k|            }
  628|   171k|          }
  629|   163k|          if (fixp_abs(locMax) > (FIXP_DBL)MAX_QUANTIZED_VALUE) {
  ------------------
  |  |  305|   163k|#define fixp_abs(x) fAbs(x)
  ------------------
  |  Branch (629:15): [True: 2.00k, False: 161k]
  ------------------
  630|  2.00k|            locMax = (FIXP_DBL)MAX_QUANTIZED_VALUE;
  631|  2.00k|          }
  632|   163k|          pSfbSclHcr[window * 16 + band] =
  633|   163k|              msb - GetScaleFromValue(
  634|   163k|                        locMax, lsb); /* save global scale maxima in this sfb */
  635|   163k|        }
  636|  79.4k|      }
  637|  16.4k|      groupoffset +=
  638|  16.4k|          GetWindowGroupLength(&pAacDecoderChannelInfo->icsInfo, group);
  639|  16.4k|    }
  640|  4.33k|  } else {
  641|       |    /* copy straight for long-blocks */
  642|  4.33k|    pQuantizedSpectralCoefficients =
  643|  4.33k|        SPEC_LONG(pQuantizedSpectralCoefficientsBase);
  ------------------
  |  |  114|  4.33k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  644|  4.43M|    for (i = 1024; i != 0; i--) {
  ------------------
  |  Branch (644:20): [True: 4.43M, False: 4.33k]
  ------------------
  645|  4.43M|      *pQuantizedSpectralCoefficients++ = *pBak++;
  646|  4.43M|    }
  647|  4.33k|  }
  648|       |
  649|  8.45k|  if (lavErrorCnt != 0) {
  ------------------
  |  Branch (649:7): [True: 186, False: 8.26k]
  ------------------
  650|    186|    pHcr->decInOut.errorLog |= LAV_VIOLATION;
  ------------------
  |  |  334|    186|  0x00000002  //   1   no    Final       The absolute value of at least one
  ------------------
  651|    186|  }
  652|  8.45k|}
aacdec_hcr.cpp:_ZL18HcrCalcNumCodewordP10CErHcrInfo:
  669|  8.45k|static void HcrCalcNumCodeword(H_HCR_INFO pHcr) {
  670|  8.45k|  int hcrSection;
  671|  8.45k|  UINT numCodeword;
  672|       |
  673|  8.45k|  UINT numSection = pHcr->decInOut.numSection;
  674|  8.45k|  UCHAR *pCodebook = pHcr->decInOut.pCodebook;
  675|  8.45k|  SHORT *pNumLineInSection = pHcr->decInOut.pNumLineInSect;
  676|  8.45k|  const UCHAR *pCbDimShift = aDimCbShift;
  677|       |
  678|  8.45k|  USHORT *pNumCodewordInSection = pHcr->sectionInfo.pNumCodewordInSection;
  679|       |
  680|  8.45k|  numCodeword = 0;
  681|  93.1k|  for (hcrSection = numSection; hcrSection != 0; hcrSection--) {
  ------------------
  |  Branch (681:33): [True: 84.7k, False: 8.45k]
  ------------------
  682|  84.7k|    *pNumCodewordInSection = *pNumLineInSection++ >> pCbDimShift[*pCodebook];
  683|  84.7k|    if (*pCodebook != 0) {
  ------------------
  |  Branch (683:9): [True: 59.0k, False: 25.6k]
  ------------------
  684|  59.0k|      numCodeword += *pNumCodewordInSection;
  685|  59.0k|    }
  686|  84.7k|    pNumCodewordInSection++;
  687|  84.7k|    pCodebook++;
  688|  84.7k|  }
  689|  8.45k|  pHcr->sectionInfo.numCodeword = numCodeword;
  690|  8.45k|}
aacdec_hcr.cpp:_ZL38HcrSortCodebookAndNumCodewordInSectionP10CErHcrInfo:
  699|  8.45k|static void HcrSortCodebookAndNumCodewordInSection(H_HCR_INFO pHcr) {
  700|  8.45k|  UINT i, j, k;
  701|  8.45k|  UCHAR temp;
  702|  8.45k|  UINT counter;
  703|  8.45k|  UINT startOffset;
  704|  8.45k|  UINT numZeroSection;
  705|  8.45k|  UCHAR *pDest;
  706|  8.45k|  UINT numSectionDec;
  707|       |
  708|  8.45k|  UINT numSection = pHcr->decInOut.numSection;
  709|  8.45k|  UCHAR *pCodebook = pHcr->decInOut.pCodebook;
  710|  8.45k|  UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook;
  711|  8.45k|  USHORT *pNumCodewordInSection = pHcr->sectionInfo.pNumCodewordInSection;
  712|  8.45k|  USHORT *pNumSortedCodewordInSection =
  713|  8.45k|      pHcr->sectionInfo.pNumSortedCodewordInSection;
  714|  8.45k|  UCHAR *pCodebookSwitch = pHcr->sectionInfo.pCodebookSwitch;
  715|  8.45k|  USHORT *pReorderOffset = pHcr->sectionInfo.pReorderOffset;
  716|  8.45k|  const UCHAR *pCbPriority = aCbPriority;
  717|  8.45k|  const UCHAR *pMinOfCbPair = aMinOfCbPair;
  718|  8.45k|  const UCHAR *pMaxOfCbPair = aMaxOfCbPair;
  719|  8.45k|  const UCHAR *pCbDimShift = aDimCbShift;
  720|       |
  721|  8.45k|  UINT searchStart = 0;
  722|       |
  723|       |  /* calculate *pNumSortedSection and store the priorities in array
  724|       |   * pSortedCdebook */
  725|  8.45k|  pDest = pSortedCodebook;
  726|  8.45k|  numZeroSection = 0;
  727|  93.1k|  for (i = numSection; i != 0; i--) {
  ------------------
  |  Branch (727:24): [True: 84.7k, False: 8.45k]
  ------------------
  728|  84.7k|    if (pCbPriority[*pCodebook] == 0) {
  ------------------
  |  Branch (728:9): [True: 25.6k, False: 59.0k]
  ------------------
  729|  25.6k|      numZeroSection += 1;
  730|  25.6k|    }
  731|  84.7k|    *pDest++ = pCbPriority[*pCodebook++];
  732|  84.7k|  }
  733|  8.45k|  pHcr->sectionInfo.numSortedSection =
  734|  8.45k|      numSection - numZeroSection; /* numSortedSection contains no zero or
  735|       |                                      intensity section */
  736|  8.45k|  pCodebook = pHcr->decInOut.pCodebook;
  737|       |
  738|       |  /* sort priorities of the codebooks in array pSortedCdebook[] */
  739|  8.45k|  numSectionDec = numSection - 1;
  740|  8.45k|  if (numSectionDec > 0) {
  ------------------
  |  Branch (740:7): [True: 4.19k, False: 4.26k]
  ------------------
  741|  4.19k|    counter = numSectionDec;
  742|  80.4k|    for (j = numSectionDec; j != 0; j--) {
  ------------------
  |  Branch (742:29): [True: 76.2k, False: 4.19k]
  ------------------
  743|   963k|      for (i = 0; i < counter; i++) {
  ------------------
  |  Branch (743:19): [True: 887k, False: 76.2k]
  ------------------
  744|       |        /* swap priorities */
  745|   887k|        if (pSortedCodebook[i + 1] > pSortedCodebook[i]) {
  ------------------
  |  Branch (745:13): [True: 346k, False: 540k]
  ------------------
  746|   346k|          temp = pSortedCodebook[i];
  747|   346k|          pSortedCodebook[i] = pSortedCodebook[i + 1];
  748|   346k|          pSortedCodebook[i + 1] = temp;
  749|   346k|        }
  750|   887k|      }
  751|  76.2k|      counter -= 1;
  752|  76.2k|    }
  753|  4.19k|  }
  754|       |
  755|       |  /* clear codebookSwitch array */
  756|  93.1k|  for (i = numSection; i != 0; i--) {
  ------------------
  |  Branch (756:24): [True: 84.7k, False: 8.45k]
  ------------------
  757|  84.7k|    *pCodebookSwitch++ = 0;
  758|  84.7k|  }
  759|  8.45k|  pCodebookSwitch = pHcr->sectionInfo.pCodebookSwitch;
  760|       |
  761|       |  /* sort sectionCodebooks and numCodwordsInSection and calculate
  762|       |   * pReorderOffst[j] */
  763|  93.1k|  for (j = 0; j < numSection; j++) {
  ------------------
  |  Branch (763:15): [True: 84.7k, False: 8.45k]
  ------------------
  764|   711k|    for (i = searchStart; i < numSection; i++) {
  ------------------
  |  Branch (764:27): [True: 711k, False: 0]
  ------------------
  765|   711k|      if (pCodebookSwitch[i] == 0 &&
  ------------------
  |  Branch (765:11): [True: 431k, False: 280k]
  ------------------
  766|   431k|          (pMinOfCbPair[pSortedCodebook[j]] == pCodebook[i] ||
  ------------------
  |  Branch (766:12): [True: 64.1k, False: 367k]
  ------------------
  767|   367k|           pMaxOfCbPair[pSortedCodebook[j]] == pCodebook[i])) {
  ------------------
  |  Branch (767:12): [True: 20.5k, False: 346k]
  ------------------
  768|  84.7k|        pCodebookSwitch[i] = 1;
  769|  84.7k|        pSortedCodebook[j] = pCodebook[i]; /* sort codebook */
  770|  84.7k|        pNumSortedCodewordInSection[j] =
  771|  84.7k|            pNumCodewordInSection[i]; /* sort NumCodewordInSection */
  772|       |
  773|  84.7k|        startOffset = 0;
  774|   971k|        for (k = 0; k < i; k++) { /* make entry in pReorderOffst */
  ------------------
  |  Branch (774:21): [True: 887k, False: 84.7k]
  ------------------
  775|   887k|          startOffset += pNumCodewordInSection[k] << pCbDimShift[pCodebook[k]];
  776|   887k|        }
  777|  84.7k|        pReorderOffset[j] =
  778|  84.7k|            startOffset; /* offset for reordering the codewords */
  779|       |
  780|  84.7k|        if (i == searchStart) {
  ------------------
  |  Branch (780:13): [True: 32.7k, False: 52.0k]
  ------------------
  781|  32.7k|          k = i;
  782|   118k|          while (pCodebookSwitch[k++] == 1) searchStart++;
  ------------------
  |  Branch (782:18): [True: 85.2k, False: 32.7k]
  ------------------
  783|  32.7k|        }
  784|  84.7k|        break;
  785|  84.7k|      }
  786|   711k|    }
  787|  84.7k|  }
  788|  8.45k|}
aacdec_hcr.cpp:_ZL26HcrPrepareSegmentationGridP10CErHcrInfo:
  799|  8.45k|static void HcrPrepareSegmentationGrid(H_HCR_INFO pHcr) {
  800|  8.45k|  USHORT i, j;
  801|  8.45k|  USHORT numSegment = 0;
  802|  8.45k|  INT segmentStart = 0;
  803|  8.45k|  UCHAR segmentWidth;
  804|  8.45k|  UCHAR lastSegmentWidth;
  805|  8.45k|  UCHAR sortedCodebook;
  806|  8.45k|  UCHAR endFlag = 0;
  807|  8.45k|  INT intermediateResult;
  808|       |
  809|  8.45k|  SCHAR lengthOfLongestCodeword = pHcr->decInOut.lengthOfLongestCodeword;
  810|  8.45k|  SHORT lengthOfReorderedSpectralData =
  811|  8.45k|      pHcr->decInOut.lengthOfReorderedSpectralData;
  812|  8.45k|  UINT numSortedSection = pHcr->sectionInfo.numSortedSection;
  813|  8.45k|  UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook;
  814|  8.45k|  USHORT *pNumSortedCodewordInSection =
  815|  8.45k|      pHcr->sectionInfo.pNumSortedCodewordInSection;
  816|  8.45k|  INT *pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
  817|  8.45k|  INT *pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
  818|  8.45k|  SCHAR *pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
  819|  8.45k|  const UCHAR *pMaxCwLength = aMaxCwLen;
  820|       |
  821|  39.1k|  for (i = numSortedSection; i != 0; i--) {
  ------------------
  |  Branch (821:30): [True: 36.9k, False: 2.17k]
  ------------------
  822|  36.9k|    sortedCodebook = *pSortedCodebook++;
  823|  36.9k|    segmentWidth =
  824|  36.9k|        fMin((INT)pMaxCwLength[sortedCodebook], (INT)lengthOfLongestCodeword);
  825|       |
  826|   377k|    for (j = *pNumSortedCodewordInSection; j != 0; j--) {
  ------------------
  |  Branch (826:44): [True: 346k, False: 30.6k]
  ------------------
  827|       |      /* width allows a new segment */
  828|   346k|      intermediateResult = segmentStart;
  829|   346k|      if ((segmentStart + segmentWidth) <= lengthOfReorderedSpectralData) {
  ------------------
  |  Branch (829:11): [True: 340k, False: 6.27k]
  ------------------
  830|       |        /* store segment start, segment length and increment the number of
  831|       |         * segments */
  832|   340k|        *pLeftStartOfSegment++ = intermediateResult;
  833|   340k|        *pRightStartOfSegment++ = intermediateResult + segmentWidth - 1;
  834|   340k|        *pRemainingBitsInSegment++ = segmentWidth;
  835|   340k|        segmentStart += segmentWidth;
  836|   340k|        numSegment += 1;
  837|   340k|      }
  838|       |      /* width does not allow a new segment */
  839|  6.27k|      else {
  840|       |        /* correct the last segment length */
  841|  6.27k|        pLeftStartOfSegment--;
  842|  6.27k|        pRightStartOfSegment--;
  843|  6.27k|        pRemainingBitsInSegment--;
  844|  6.27k|        segmentStart = *pLeftStartOfSegment;
  845|       |
  846|  6.27k|        lastSegmentWidth = lengthOfReorderedSpectralData - segmentStart;
  847|  6.27k|        *pRemainingBitsInSegment = lastSegmentWidth;
  848|  6.27k|        *pRightStartOfSegment = segmentStart + lastSegmentWidth - 1;
  849|  6.27k|        endFlag = 1;
  850|  6.27k|        break;
  851|  6.27k|      }
  852|   346k|    }
  853|  36.9k|    pNumSortedCodewordInSection++;
  854|  36.9k|    if (endFlag != 0) {
  ------------------
  |  Branch (854:9): [True: 6.27k, False: 30.6k]
  ------------------
  855|  6.27k|      break;
  856|  6.27k|    }
  857|  36.9k|  }
  858|  8.45k|  pHcr->segmentInfo.numSegment = numSegment;
  859|  8.45k|}
aacdec_hcr.cpp:_ZL22HcrExtendedSectionInfoP10CErHcrInfo:
  872|  8.45k|static void HcrExtendedSectionInfo(H_HCR_INFO pHcr) {
  873|  8.45k|  UINT srtSecCnt = 0; /* counter for sorted sections */
  874|  8.45k|  UINT xSrtScCnt = 0; /* counter for extended sorted sections */
  875|  8.45k|  UINT remainNumCwInSortSec;
  876|  8.45k|  UINT inSegmentRemainNumCW;
  877|       |
  878|  8.45k|  UINT numSortedSection = pHcr->sectionInfo.numSortedSection;
  879|  8.45k|  UCHAR *pSortedCodebook = pHcr->sectionInfo.pSortedCodebook;
  880|  8.45k|  USHORT *pNumSortedCodewordInSection =
  881|  8.45k|      pHcr->sectionInfo.pNumSortedCodewordInSection;
  882|  8.45k|  UCHAR *pExtendedSortedCoBo = pHcr->sectionInfo.pExtendedSortedCodebook;
  883|  8.45k|  USHORT *pNumExtSortCwInSect =
  884|  8.45k|      pHcr->sectionInfo.pNumExtendedSortedCodewordInSection;
  885|  8.45k|  UINT numSegment = pHcr->segmentInfo.numSegment;
  886|  8.45k|  UCHAR *pMaxLenOfCbInExtSrtSec = pHcr->sectionInfo.pMaxLenOfCbInExtSrtSec;
  887|  8.45k|  SCHAR lengthOfLongestCodeword = pHcr->decInOut.lengthOfLongestCodeword;
  888|  8.45k|  const UCHAR *pMaxCwLength = aMaxCwLen;
  889|       |
  890|  8.45k|  remainNumCwInSortSec = pNumSortedCodewordInSection[srtSecCnt];
  891|  8.45k|  inSegmentRemainNumCW = numSegment;
  892|       |
  893|   103k|  while (srtSecCnt < numSortedSection) {
  ------------------
  |  Branch (893:10): [True: 95.5k, False: 8.45k]
  ------------------
  894|  95.5k|    if (inSegmentRemainNumCW < remainNumCwInSortSec) {
  ------------------
  |  Branch (894:9): [True: 36.5k, False: 59.0k]
  ------------------
  895|  36.5k|      pNumExtSortCwInSect[xSrtScCnt] = inSegmentRemainNumCW;
  896|  36.5k|      pExtendedSortedCoBo[xSrtScCnt] = pSortedCodebook[srtSecCnt];
  897|       |
  898|  36.5k|      remainNumCwInSortSec -= inSegmentRemainNumCW;
  899|  36.5k|      inSegmentRemainNumCW = numSegment;
  900|       |      /* data of a sorted section was not integrated in extended sorted section
  901|       |       */
  902|  59.0k|    } else if (inSegmentRemainNumCW == remainNumCwInSortSec) {
  ------------------
  |  Branch (902:16): [True: 5.02k, False: 54.0k]
  ------------------
  903|  5.02k|      pNumExtSortCwInSect[xSrtScCnt] = inSegmentRemainNumCW;
  904|  5.02k|      pExtendedSortedCoBo[xSrtScCnt] = pSortedCodebook[srtSecCnt];
  905|       |
  906|  5.02k|      srtSecCnt++;
  907|  5.02k|      remainNumCwInSortSec = pNumSortedCodewordInSection[srtSecCnt];
  908|  5.02k|      inSegmentRemainNumCW = numSegment;
  909|       |      /* data of a sorted section was integrated in extended sorted section */
  910|  54.0k|    } else { /* inSegmentRemainNumCW > remainNumCwInSortSec */
  911|  54.0k|      pNumExtSortCwInSect[xSrtScCnt] = remainNumCwInSortSec;
  912|  54.0k|      pExtendedSortedCoBo[xSrtScCnt] = pSortedCodebook[srtSecCnt];
  913|       |
  914|  54.0k|      inSegmentRemainNumCW -= remainNumCwInSortSec;
  915|  54.0k|      srtSecCnt++;
  916|  54.0k|      remainNumCwInSortSec = pNumSortedCodewordInSection[srtSecCnt];
  917|       |      /* data of a sorted section was integrated in extended sorted section */
  918|  54.0k|    }
  919|  95.5k|    pMaxLenOfCbInExtSrtSec[xSrtScCnt] =
  920|  95.5k|        fMin((INT)pMaxCwLength[pExtendedSortedCoBo[xSrtScCnt]],
  921|  95.5k|             (INT)lengthOfLongestCodeword);
  922|       |
  923|  95.5k|    xSrtScCnt += 1;
  924|       |
  925|  95.5k|    if (xSrtScCnt >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  120|  95.5k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  95.5k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (xSrtScCnt >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  134|  95.5k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (925:9): [True: 4, False: 95.5k]
  ------------------
  926|      4|      pHcr->decInOut.errorLog |= EXTENDED_SORTED_COUNTER_OVERFLOW;
  ------------------
  |  |  273|      4|  0x10000000  //  28   yes   Init-Dec    Error during extending sideinfo
  ------------------
  927|      4|      return;
  928|      4|    }
  929|  95.5k|  }
  930|  8.45k|  pNumExtSortCwInSect[xSrtScCnt] = 0;
  931|  8.45k|}
aacdec_hcr.cpp:_ZL42DeriveNumberOfExtendedSortedSectionsInSetsjPtiS_i:
  950|  8.45k|    int numExtendedSortedSectionsInSetsIdx) {
  951|  8.45k|  USHORT counter = 0;
  952|  8.45k|  UINT cwSum = 0;
  953|  8.45k|  USHORT *pNumExSortCwInSec = pNumExtendedSortedCodewordInSection;
  954|  8.45k|  USHORT *pNumExSortSecInSets = pNumExtendedSortedSectionsInSets;
  955|       |
  956|  98.4k|  while (pNumExSortCwInSec[numExtendedSortedCodewordInSectionIdx] != 0) {
  ------------------
  |  Branch (956:10): [True: 91.1k, False: 7.28k]
  ------------------
  957|  91.1k|    cwSum += pNumExSortCwInSec[numExtendedSortedCodewordInSectionIdx];
  958|  91.1k|    numExtendedSortedCodewordInSectionIdx++;
  959|  91.1k|    if (numExtendedSortedCodewordInSectionIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  120|  91.1k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  91.1k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (numExtendedSortedCodewordInSectionIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  134|  91.1k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (959:9): [True: 0, False: 91.1k]
  ------------------
  960|      0|      return;
  961|      0|    }
  962|  91.1k|    if (cwSum > numSegment) {
  ------------------
  |  Branch (962:9): [True: 0, False: 91.1k]
  ------------------
  963|      0|      return;
  964|      0|    }
  965|  91.1k|    counter++;
  966|  91.1k|    if (counter > 1024 / 4) {
  ------------------
  |  Branch (966:9): [True: 0, False: 91.1k]
  ------------------
  967|      0|      return;
  968|      0|    }
  969|  91.1k|    if (cwSum == numSegment) {
  ------------------
  |  Branch (969:9): [True: 38.2k, False: 52.8k]
  ------------------
  970|  38.2k|      pNumExSortSecInSets[numExtendedSortedSectionsInSetsIdx] = counter;
  971|  38.2k|      numExtendedSortedSectionsInSetsIdx++;
  972|  38.2k|      if (numExtendedSortedSectionsInSetsIdx >= MAX_HCR_SETS) {
  ------------------
  |  |  134|  38.2k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (972:11): [True: 1.17k, False: 37.1k]
  ------------------
  973|  1.17k|        return;
  974|  1.17k|      }
  975|  37.1k|      counter = 0;
  976|  37.1k|      cwSum = 0;
  977|  37.1k|    }
  978|  91.1k|  }
  979|  7.28k|  pNumExSortSecInSets[numExtendedSortedSectionsInSetsIdx] =
  980|  7.28k|      counter; /* save last entry for the last - probably shorter - set */
  981|  7.28k|}
aacdec_hcr.cpp:_ZL10DecodePCWsP13FDK_BITSTREAMP10CErHcrInfo:
  997|  8.45k|static void DecodePCWs(HANDLE_FDK_BITSTREAM bs, H_HCR_INFO pHcr) {
  998|  8.45k|  UINT i;
  999|  8.45k|  USHORT extSortSec;
 1000|  8.45k|  USHORT curExtSortCwInSec;
 1001|  8.45k|  UCHAR codebook;
 1002|  8.45k|  UCHAR dimension;
 1003|  8.45k|  const UINT *pCurrentTree;
 1004|  8.45k|  const SCHAR *pQuantValBase;
 1005|  8.45k|  const SCHAR *pQuantVal;
 1006|       |
 1007|  8.45k|  USHORT *pNumExtendedSortedCodewordInSection =
 1008|  8.45k|      pHcr->sectionInfo.pNumExtendedSortedCodewordInSection;
 1009|  8.45k|  int numExtendedSortedCodewordInSectionIdx =
 1010|  8.45k|      pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx;
 1011|  8.45k|  UCHAR *pExtendedSortedCodebook = pHcr->sectionInfo.pExtendedSortedCodebook;
 1012|  8.45k|  int extendedSortedCodebookIdx = pHcr->sectionInfo.extendedSortedCodebookIdx;
 1013|  8.45k|  USHORT *pNumExtendedSortedSectionsInSets =
 1014|  8.45k|      pHcr->sectionInfo.pNumExtendedSortedSectionsInSets;
 1015|  8.45k|  int numExtendedSortedSectionsInSetsIdx =
 1016|  8.45k|      pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx;
 1017|  8.45k|  FIXP_DBL *pQuantizedSpectralCoefficients =
 1018|  8.45k|      SPEC_LONG(pHcr->decInOut.pQuantizedSpectralCoefficientsBase);
  ------------------
  |  |  114|  8.45k|#define SPEC_LONG(ptr) (ptr)
  ------------------
 1019|  8.45k|  int quantizedSpectralCoefficientsIdx =
 1020|  8.45k|      pHcr->decInOut.quantizedSpectralCoefficientsIdx;
 1021|  8.45k|  INT *pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
 1022|  8.45k|  SCHAR *pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
 1023|  8.45k|  UCHAR *pMaxLenOfCbInExtSrtSec = pHcr->sectionInfo.pMaxLenOfCbInExtSrtSec;
 1024|  8.45k|  int maxLenOfCbInExtSrtSecIdx = pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx;
 1025|  8.45k|  UCHAR maxAllowedCwLen;
 1026|  8.45k|  int numDecodedBits;
 1027|  8.45k|  const UCHAR *pCbDimension = aDimCb;
 1028|  8.45k|  const UCHAR *pCbSign = aSignCb;
 1029|       |
 1030|       |  /* clear result array */
 1031|  8.45k|  FDKmemclear(pQuantizedSpectralCoefficients + quantizedSpectralCoefficientsIdx,
 1032|  8.45k|              1024 * sizeof(FIXP_DBL));
 1033|       |
 1034|       |  /* decode all PCWs in the extended sorted section(s) belonging to set 0 */
 1035|  8.45k|  for (extSortSec =
 1036|  8.45k|           pNumExtendedSortedSectionsInSets[numExtendedSortedSectionsInSetsIdx];
 1037|  26.8k|       extSortSec != 0; extSortSec--) {
  ------------------
  |  Branch (1037:8): [True: 22.0k, False: 4.83k]
  ------------------
 1038|  22.0k|    codebook =
 1039|  22.0k|        pExtendedSortedCodebook[extendedSortedCodebookIdx]; /* get codebook for
 1040|       |                                                               this extended
 1041|       |                                                               sorted section
 1042|       |                                                               and increment ptr
 1043|       |                                                               to cb of next
 1044|       |                                                               ext. sort sec */
 1045|  22.0k|    extendedSortedCodebookIdx++;
 1046|  22.0k|    if (extendedSortedCodebookIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  120|  22.0k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  22.0k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (extendedSortedCodebookIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  134|  22.0k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1046:9): [True: 0, False: 22.0k]
  ------------------
 1047|      0|      return;
 1048|      0|    }
 1049|  22.0k|    dimension = pCbDimension[codebook]; /* get dimension of codebook of this
 1050|       |                                           extended sort. sec. */
 1051|  22.0k|    pCurrentTree =
 1052|  22.0k|        aHuffTable[codebook]; /* convert codebook to pointer to QSCs */
 1053|  22.0k|    pQuantValBase =
 1054|  22.0k|        aQuantTable[codebook]; /* convert codebook to index to table of QSCs */
 1055|  22.0k|    maxAllowedCwLen = pMaxLenOfCbInExtSrtSec[maxLenOfCbInExtSrtSecIdx];
 1056|  22.0k|    maxLenOfCbInExtSrtSecIdx++;
 1057|  22.0k|    if (maxLenOfCbInExtSrtSecIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  120|  22.0k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  22.0k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (maxLenOfCbInExtSrtSecIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  134|  22.0k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1057:9): [True: 0, False: 22.0k]
  ------------------
 1058|      0|      return;
 1059|      0|    }
 1060|       |
 1061|       |    /* switch for decoding with different codebooks: */
 1062|  22.0k|    if (pCbSign[codebook] ==
  ------------------
  |  Branch (1062:9): [True: 942, False: 21.0k]
  ------------------
 1063|  22.0k|        0) { /* no sign bits follow after the codeword-body */
 1064|       |      /* PCW_BodyONLY */
 1065|       |      /*==============*/
 1066|       |
 1067|    942|      for (curExtSortCwInSec = pNumExtendedSortedCodewordInSection
 1068|    942|               [numExtendedSortedCodewordInSectionIdx];
 1069|  5.72k|           curExtSortCwInSec != 0; curExtSortCwInSec--) {
  ------------------
  |  Branch (1069:12): [True: 5.13k, False: 588]
  ------------------
 1070|  5.13k|        numDecodedBits = 0;
 1071|       |
 1072|       |        /* decode PCW_BODY */
 1073|  5.13k|        pQuantVal = DecodePCW_Body(
 1074|  5.13k|            bs, pHcr->decInOut.bitstreamAnchor, pCurrentTree, pQuantValBase,
 1075|  5.13k|            pLeftStartOfSegment, pRemainingBitsInSegment, &numDecodedBits);
 1076|       |
 1077|       |        /* result is written out here because NO sign bits follow the body */
 1078|  20.5k|        for (i = dimension; i != 0; i--) {
  ------------------
  |  Branch (1078:29): [True: 15.4k, False: 5.13k]
  ------------------
 1079|  15.4k|          pQuantizedSpectralCoefficients[quantizedSpectralCoefficientsIdx] =
 1080|  15.4k|              (FIXP_DBL)*pQuantVal++; /* write quant. spec. coef. into
 1081|       |                                         spectrum; sign is already valid */
 1082|  15.4k|          quantizedSpectralCoefficientsIdx++;
 1083|  15.4k|          if (quantizedSpectralCoefficientsIdx >= 1024) {
  ------------------
  |  Branch (1083:15): [True: 3, False: 15.4k]
  ------------------
 1084|      3|            return;
 1085|      3|          }
 1086|  15.4k|        }
 1087|       |
 1088|       |        /* one more PCW should be decoded */
 1089|       |
 1090|  5.13k|        if (maxAllowedCwLen < (numDecodedBits + ERROR_PCW_BODY_ONLY_TOO_LONG)) {
  ------------------
  |  |  198|  5.13k|  0 /* set a positive values to trigger the error */
  ------------------
  |  Branch (1090:13): [True: 351, False: 4.78k]
  ------------------
 1091|    351|          pHcr->decInOut.errorLog |= TOO_MANY_PCW_BODY_BITS_DECODED;
  ------------------
  |  |  286|    351|  0x00080000  //  19   yes   PCW-Dec     During PCW-body-decoding too many bits
  ------------------
 1092|    351|        }
 1093|       |
 1094|  5.13k|        if (1 == errDetectPcwSegmentation(
  ------------------
  |  Branch (1094:13): [True: 351, False: 4.78k]
  ------------------
 1095|  5.13k|                     *pRemainingBitsInSegment - ERROR_PCW_BODY, pHcr, PCW_BODY,
  ------------------
  |  |  186|  5.13k|  0 /* set a positive values to trigger the error (make segments earlyer \
  ------------------
 1096|  5.13k|                     pQuantizedSpectralCoefficients +
 1097|  5.13k|                         quantizedSpectralCoefficientsIdx - dimension,
 1098|  5.13k|                     dimension)) {
 1099|    351|          return;
 1100|    351|        }
 1101|  4.78k|        pLeftStartOfSegment++; /* update pointer for decoding the next PCW */
 1102|  4.78k|        pRemainingBitsInSegment++; /* update pointer for decoding the next PCW
 1103|       |                                    */
 1104|  4.78k|      }
 1105|  21.0k|    } else if ((codebook < 11) && (pCbSign[codebook] ==
  ------------------
  |  Branch (1105:16): [True: 6.85k, False: 14.2k]
  |  Branch (1105:35): [True: 6.85k, False: 0]
  ------------------
 1106|  6.85k|                                   1)) { /* possibly there follow 1,2,3 or 4
 1107|       |                                            sign bits after the codeword-body */
 1108|       |      /* PCW_Body and PCW_Sign */
 1109|       |      /*=======================*/
 1110|       |
 1111|  6.85k|      for (curExtSortCwInSec = pNumExtendedSortedCodewordInSection
 1112|  6.85k|               [numExtendedSortedCodewordInSectionIdx];
 1113|   118k|           curExtSortCwInSec != 0; curExtSortCwInSec--) {
  ------------------
  |  Branch (1113:12): [True: 112k, False: 6.58k]
  ------------------
 1114|   112k|        int err;
 1115|   112k|        numDecodedBits = 0;
 1116|       |
 1117|   112k|        pQuantVal = DecodePCW_Body(
 1118|   112k|            bs, pHcr->decInOut.bitstreamAnchor, pCurrentTree, pQuantValBase,
 1119|   112k|            pLeftStartOfSegment, pRemainingBitsInSegment, &numDecodedBits);
 1120|       |
 1121|   112k|        err = DecodePCW_Sign(
 1122|   112k|            bs, pHcr->decInOut.bitstreamAnchor, dimension, pQuantVal,
 1123|   112k|            pQuantizedSpectralCoefficients, &quantizedSpectralCoefficientsIdx,
 1124|   112k|            pLeftStartOfSegment, pRemainingBitsInSegment, &numDecodedBits);
 1125|   112k|        if (err != 0) {
  ------------------
  |  Branch (1125:13): [True: 265, False: 111k]
  ------------------
 1126|    265|          return;
 1127|    265|        }
 1128|       |        /* one more PCW should be decoded */
 1129|       |
 1130|   111k|        if (maxAllowedCwLen < (numDecodedBits + ERROR_PCW_BODY_SIGN_TOO_LONG)) {
  ------------------
  |  |  200|   111k|  0 /* set a positive values to trigger the error */
  ------------------
  |  Branch (1130:13): [True: 13, False: 111k]
  ------------------
 1131|     13|          pHcr->decInOut.errorLog |= TOO_MANY_PCW_BODY_SIGN_BITS_DECODED;
  ------------------
  |  |  289|     13|  0x00040000  //  18   yes   PCW-Dec     During PCW-body-sign-decoding too many
  ------------------
 1132|     13|        }
 1133|       |
 1134|   111k|        if (1 == errDetectPcwSegmentation(
  ------------------
  |  Branch (1134:13): [True: 12, False: 111k]
  ------------------
 1135|   111k|                     *pRemainingBitsInSegment - ERROR_PCW_BODY_SIGN, pHcr,
  ------------------
  |  |  189|   111k|  0 /* set a positive values to trigger the error (make segments earlyer \
  ------------------
 1136|   111k|                     PCW_BODY_SIGN,
 1137|   111k|                     pQuantizedSpectralCoefficients +
 1138|   111k|                         quantizedSpectralCoefficientsIdx - dimension,
 1139|   111k|                     dimension)) {
 1140|     12|          return;
 1141|     12|        }
 1142|   111k|        pLeftStartOfSegment++;
 1143|   111k|        pRemainingBitsInSegment++;
 1144|   111k|      }
 1145|  14.2k|    } else if ((pCbSign[codebook] == 1) &&
  ------------------
  |  Branch (1145:16): [True: 14.2k, False: 0]
  ------------------
 1146|  14.2k|               (codebook >= 11)) { /* possibly there follow some sign bits and
  ------------------
  |  Branch (1146:16): [True: 14.2k, False: 0]
  ------------------
 1147|       |                                      maybe one or two escape sequences after
 1148|       |                                      the cw-body */
 1149|       |      /* PCW_Body, PCW_Sign and maybe PCW_Escape */
 1150|       |      /*=========================================*/
 1151|       |
 1152|  14.2k|      for (curExtSortCwInSec = pNumExtendedSortedCodewordInSection
 1153|  14.2k|               [numExtendedSortedCodewordInSectionIdx];
 1154|  64.8k|           curExtSortCwInSec != 0; curExtSortCwInSec--) {
  ------------------
  |  Branch (1154:12): [True: 53.6k, False: 11.2k]
  ------------------
 1155|  53.6k|        int err;
 1156|  53.6k|        numDecodedBits = 0;
 1157|       |
 1158|       |        /* decode PCW_BODY */
 1159|  53.6k|        pQuantVal = DecodePCW_Body(
 1160|  53.6k|            bs, pHcr->decInOut.bitstreamAnchor, pCurrentTree, pQuantValBase,
 1161|  53.6k|            pLeftStartOfSegment, pRemainingBitsInSegment, &numDecodedBits);
 1162|       |
 1163|  53.6k|        err = DecodePCW_Sign(
 1164|  53.6k|            bs, pHcr->decInOut.bitstreamAnchor, dimension, pQuantVal,
 1165|  53.6k|            pQuantizedSpectralCoefficients, &quantizedSpectralCoefficientsIdx,
 1166|  53.6k|            pLeftStartOfSegment, pRemainingBitsInSegment, &numDecodedBits);
 1167|  53.6k|        if (err != 0) {
  ------------------
  |  Branch (1167:13): [True: 1.18k, False: 52.4k]
  ------------------
 1168|  1.18k|          return;
 1169|  1.18k|        }
 1170|       |
 1171|       |        /* decode PCW_ESCAPE if present */
 1172|  52.4k|        quantizedSpectralCoefficientsIdx -= DIMENSION_OF_ESCAPE_CODEBOOK;
  ------------------
  |  |  153|  52.4k|#define DIMENSION_OF_ESCAPE_CODEBOOK 2 /* for cb >= 11 is dimension 2 */
  ------------------
 1173|       |
 1174|  52.4k|        if (fixp_abs(pQuantizedSpectralCoefficients
  ------------------
  |  |  305|  52.4k|#define fixp_abs(x) fAbs(x)
  ------------------
  |  Branch (1174:13): [True: 1.58k, False: 50.8k]
  ------------------
 1175|  52.4k|                         [quantizedSpectralCoefficientsIdx]) ==
 1176|  52.4k|            (FIXP_DBL)ESCAPE_VALUE) {
  ------------------
  |  |  136|  52.4k|#define ESCAPE_VALUE 16
  ------------------
 1177|  1.58k|          pQuantizedSpectralCoefficients[quantizedSpectralCoefficientsIdx] =
 1178|  1.58k|              (FIXP_DBL)DecodeEscapeSequence(
 1179|  1.58k|                  bs, pHcr->decInOut.bitstreamAnchor,
 1180|  1.58k|                  pQuantizedSpectralCoefficients
 1181|  1.58k|                      [quantizedSpectralCoefficientsIdx],
 1182|  1.58k|                  pLeftStartOfSegment, pRemainingBitsInSegment, &numDecodedBits,
 1183|  1.58k|                  &pHcr->decInOut.errorLog);
 1184|  1.58k|        }
 1185|  52.4k|        quantizedSpectralCoefficientsIdx++;
 1186|  52.4k|        if (quantizedSpectralCoefficientsIdx >= 1024) {
  ------------------
  |  Branch (1186:13): [True: 0, False: 52.4k]
  ------------------
 1187|      0|          return;
 1188|      0|        }
 1189|       |
 1190|  52.4k|        if (fixp_abs(pQuantizedSpectralCoefficients
  ------------------
  |  |  305|  52.4k|#define fixp_abs(x) fAbs(x)
  ------------------
  |  Branch (1190:13): [True: 2.54k, False: 49.9k]
  ------------------
 1191|  52.4k|                         [quantizedSpectralCoefficientsIdx]) ==
 1192|  52.4k|            (FIXP_DBL)ESCAPE_VALUE) {
  ------------------
  |  |  136|  52.4k|#define ESCAPE_VALUE 16
  ------------------
 1193|  2.54k|          pQuantizedSpectralCoefficients[quantizedSpectralCoefficientsIdx] =
 1194|  2.54k|              (FIXP_DBL)DecodeEscapeSequence(
 1195|  2.54k|                  bs, pHcr->decInOut.bitstreamAnchor,
 1196|  2.54k|                  pQuantizedSpectralCoefficients
 1197|  2.54k|                      [quantizedSpectralCoefficientsIdx],
 1198|  2.54k|                  pLeftStartOfSegment, pRemainingBitsInSegment, &numDecodedBits,
 1199|  2.54k|                  &pHcr->decInOut.errorLog);
 1200|  2.54k|        }
 1201|  52.4k|        quantizedSpectralCoefficientsIdx++;
 1202|  52.4k|        if (quantizedSpectralCoefficientsIdx >= 1024) {
  ------------------
  |  Branch (1202:13): [True: 0, False: 52.4k]
  ------------------
 1203|      0|          return;
 1204|      0|        }
 1205|       |
 1206|       |        /* one more PCW should be decoded */
 1207|       |
 1208|  52.4k|        if (maxAllowedCwLen <
  ------------------
  |  Branch (1208:13): [True: 1.80k, False: 50.6k]
  ------------------
 1209|  52.4k|            (numDecodedBits + ERROR_PCW_BODY_SIGN_ESC_TOO_LONG)) {
  ------------------
  |  |  202|  52.4k|  0 /* set a positive values to trigger the error */
  ------------------
 1210|  1.80k|          pHcr->decInOut.errorLog |= TOO_MANY_PCW_BODY_SIGN_ESC_BITS_DECODED;
  ------------------
  |  |  293|  1.80k|  0x00020000  //  17   yes   PCW-Dec     During PCW-body-sign-esc-decoding too
  ------------------
 1211|  1.80k|        }
 1212|       |
 1213|  52.4k|        if (1 == errDetectPcwSegmentation(
  ------------------
  |  Branch (1213:13): [True: 1.80k, False: 50.6k]
  ------------------
 1214|  52.4k|                     *pRemainingBitsInSegment - ERROR_PCW_BODY_SIGN_ESC, pHcr,
  ------------------
  |  |  192|  52.4k|  0 /* set a positive values to trigger the error (make segments earlyer \
  ------------------
 1215|  52.4k|                     PCW_BODY_SIGN_ESC,
 1216|  52.4k|                     pQuantizedSpectralCoefficients +
 1217|  52.4k|                         quantizedSpectralCoefficientsIdx -
 1218|  52.4k|                         DIMENSION_OF_ESCAPE_CODEBOOK,
  ------------------
  |  |  153|  52.4k|#define DIMENSION_OF_ESCAPE_CODEBOOK 2 /* for cb >= 11 is dimension 2 */
  ------------------
 1219|  52.4k|                     DIMENSION_OF_ESCAPE_CODEBOOK)) {
  ------------------
  |  |  153|  52.4k|#define DIMENSION_OF_ESCAPE_CODEBOOK 2 /* for cb >= 11 is dimension 2 */
  ------------------
 1220|  1.80k|          return;
 1221|  1.80k|        }
 1222|  50.6k|        pLeftStartOfSegment++;
 1223|  50.6k|        pRemainingBitsInSegment++;
 1224|  50.6k|      }
 1225|  14.2k|    }
 1226|       |
 1227|       |    /* all PCWs belonging to this extended section should be decoded */
 1228|  18.4k|    numExtendedSortedCodewordInSectionIdx++;
 1229|  18.4k|    if (numExtendedSortedCodewordInSectionIdx >= MAX_SFB_HCR + MAX_HCR_SETS) {
  ------------------
  |  |  120|  18.4k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  18.4k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (numExtendedSortedCodewordInSectionIdx >= MAX_SFB_HCR + MAX_HCR_SETS) {
  ------------------
  |  |  134|  18.4k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1229:9): [True: 0, False: 18.4k]
  ------------------
 1230|      0|      return;
 1231|      0|    }
 1232|  18.4k|  }
 1233|       |  /* all PCWs should be decoded */
 1234|       |
 1235|  4.83k|  numExtendedSortedSectionsInSetsIdx++;
 1236|  4.83k|  if (numExtendedSortedSectionsInSetsIdx >= MAX_HCR_SETS) {
  ------------------
  |  |  134|  4.83k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1236:7): [True: 0, False: 4.83k]
  ------------------
 1237|      0|    return;
 1238|      0|  }
 1239|       |
 1240|       |  /* Write back indexes into structure */
 1241|  4.83k|  pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx =
 1242|  4.83k|      numExtendedSortedCodewordInSectionIdx;
 1243|  4.83k|  pHcr->sectionInfo.extendedSortedCodebookIdx = extendedSortedCodebookIdx;
 1244|  4.83k|  pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx =
 1245|  4.83k|      numExtendedSortedSectionsInSetsIdx;
 1246|  4.83k|  pHcr->decInOut.quantizedSpectralCoefficientsIdx =
 1247|  4.83k|      quantizedSpectralCoefficientsIdx;
 1248|  4.83k|  pHcr->sectionInfo.maxLenOfCbInExtSrtSecIdx = maxLenOfCbInExtSrtSecIdx;
 1249|  4.83k|}
aacdec_hcr.cpp:_ZL14DecodePCW_BodyP13FDK_BITSTREAMiPKjPKaPiPaS5_:
 1338|   170k|                                   int *pNumDecodedBits) {
 1339|   170k|  UCHAR carryBit;
 1340|   170k|  UINT branchNode;
 1341|   170k|  UINT treeNode;
 1342|   170k|  UINT branchValue;
 1343|   170k|  const SCHAR *pQuantVal;
 1344|       |
 1345|       |  /* decode PCW_BODY */
 1346|   170k|  treeNode = *pCurrentTree; /* get first node of current tree belonging to
 1347|       |                               current codebook */
 1348|       |
 1349|       |  /* decode whole PCW-codeword-body */
 1350|   758k|  while (1) {
  ------------------
  |  Branch (1350:10): [True: 758k, Folded]
  ------------------
 1351|   758k|    carryBit = HcrGetABitFromBitstream(bs, bsAnchor, pLeftStartOfSegment,
 1352|   758k|                                       pLeftStartOfSegment, /* dummy */
 1353|   758k|                                       FROM_LEFT_TO_RIGHT);
  ------------------
  |  |  130|   758k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
 1354|   758k|    *pRemainingBitsInSegment -= 1;
 1355|   758k|    *pNumDecodedBits += 1;
 1356|       |
 1357|   758k|    CarryBitToBranchValue(carryBit, treeNode, &branchValue, &branchNode);
 1358|       |
 1359|   758k|    if ((branchNode & TEST_BIT_10) ==
  ------------------
  |  |  167|   758k|#define TEST_BIT_10 0x400
  ------------------
  |  Branch (1359:9): [True: 170k, False: 587k]
  ------------------
 1360|   758k|        TEST_BIT_10) { /* test bit 10 ; if set --> codeword-body is complete */
  ------------------
  |  |  167|   758k|#define TEST_BIT_10 0x400
  ------------------
 1361|   170k|      break; /* end of branch in tree reached  i.e. a whole PCW-Body is decoded
 1362|       |              */
 1363|   587k|    } else {
 1364|   587k|      treeNode = *(
 1365|   587k|          pCurrentTree +
 1366|   587k|          branchValue); /* update treeNode for further step in decoding tree */
 1367|   587k|    }
 1368|   758k|  }
 1369|       |
 1370|   170k|  pQuantVal =
 1371|   170k|      pQuantValBase + branchValue; /* update pointer to valid first of 2 or 4
 1372|       |                                      quantized values */
 1373|       |
 1374|   170k|  return pQuantVal;
 1375|   170k|}
aacdec_hcr.cpp:_ZL24errDetectPcwSegmentationaP10CErHcrInfo8PCW_TYPEPih:
 1263|   169k|                                      UCHAR dimension) {
 1264|   169k|  SCHAR i;
 1265|   169k|  if (remainingBitsInSegment < 0) {
  ------------------
  |  Branch (1265:7): [True: 2.16k, False: 167k]
  ------------------
 1266|       |    /* log the error */
 1267|  2.16k|    switch (kind) {
  ------------------
  |  Branch (1267:13): [True: 2.16k, False: 0]
  ------------------
 1268|    351|      case PCW_BODY:
  ------------------
  |  Branch (1268:7): [True: 351, False: 1.81k]
  ------------------
 1269|    351|        pHcr->decInOut.errorLog |= SEGMENT_OVERRIDE_ERR_PCW_BODY;
  ------------------
  |  |  261|    351|  0x80000000  //  31   no    PCW-Dec     During PCW decoding it is checked after
  ------------------
 1270|    351|        break;
 1271|     12|      case PCW_BODY_SIGN:
  ------------------
  |  Branch (1271:7): [True: 12, False: 2.15k]
  ------------------
 1272|     12|        pHcr->decInOut.errorLog |= SEGMENT_OVERRIDE_ERR_PCW_BODY_SIGN;
  ------------------
  |  |  265|     12|  0x40000000  //  30   no    PCW-Dec     During PCW decoding it is checked after
  ------------------
 1273|     12|        break;
 1274|  1.80k|      case PCW_BODY_SIGN_ESC:
  ------------------
  |  Branch (1274:7): [True: 1.80k, False: 363]
  ------------------
 1275|  1.80k|        pHcr->decInOut.errorLog |= SEGMENT_OVERRIDE_ERR_PCW_BODY_SIGN_ESC;
  ------------------
  |  |  269|  1.80k|  0x20000000  //  29   no    PCW-Dec     During PCW decoding it is checked after
  ------------------
 1276|  1.80k|        break;
 1277|  2.16k|    }
 1278|       |    /* mark the erred lines */
 1279|  7.18k|    for (i = dimension; i != 0; i--) {
  ------------------
  |  Branch (1279:25): [True: 5.02k, False: 2.16k]
  ------------------
 1280|  5.02k|      *qsc_base_of_cw++ = (FIXP_DBL)Q_VALUE_INVALID;
  ------------------
  |  |  160|  5.02k|  8192 /* mark a invalid line with this value (to be concealed later on) */
  ------------------
 1281|  5.02k|    }
 1282|  2.16k|    return 1;
 1283|  2.16k|  }
 1284|   167k|  return 0;
 1285|   169k|}
aacdec_hcr.cpp:_ZL14DecodePCW_SignP13FDK_BITSTREAMijPKaPiS3_S3_PaS3_:
 1458|   165k|                          int *pNumDecodedBits) {
 1459|   165k|  UINT i;
 1460|   165k|  UINT carryBit;
 1461|   165k|  INT quantSpecCoef;
 1462|       |
 1463|   499k|  for (i = codebookDim; i != 0; i--) {
  ------------------
  |  Branch (1463:25): [True: 335k, False: 164k]
  ------------------
 1464|   335k|    quantSpecCoef = *pQuantVal++;
 1465|   335k|    if (quantSpecCoef != 0) {
  ------------------
  |  Branch (1465:9): [True: 246k, False: 88.1k]
  ------------------
 1466|   246k|      carryBit = HcrGetABitFromBitstream(bs, bsAnchor, pLeftStartOfSegment,
 1467|   246k|                                         pLeftStartOfSegment, /* dummy */
 1468|   246k|                                         FROM_LEFT_TO_RIGHT);
  ------------------
  |  |  130|   246k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
 1469|   246k|      *pRemainingBitsInSegment -= 1;
 1470|   246k|      *pNumDecodedBits += 1;
 1471|   246k|      if (*pRemainingBitsInSegment < 0 || *pNumDecodedBits >= (1024 >> 1)) {
  ------------------
  |  Branch (1471:11): [True: 1.44k, False: 245k]
  |  Branch (1471:43): [True: 0, False: 245k]
  ------------------
 1472|  1.44k|        return -1;
 1473|  1.44k|      }
 1474|       |
 1475|       |      /* adapt sign of values according to the decoded sign bit */
 1476|   245k|      if (carryBit != 0) {
  ------------------
  |  Branch (1476:11): [True: 64.5k, False: 180k]
  ------------------
 1477|  64.5k|        pQuantSpecCoef[*quantSpecCoefIdx] = -(FIXP_DBL)quantSpecCoef;
 1478|   180k|      } else {
 1479|   180k|        pQuantSpecCoef[*quantSpecCoefIdx] = (FIXP_DBL)quantSpecCoef;
 1480|   180k|      }
 1481|   245k|    } else {
 1482|  88.1k|      pQuantSpecCoef[*quantSpecCoefIdx] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  88.1k|  (FIXP_DBL)(                                                                \
  |  |  193|  88.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 88.1k, Folded]
  |  |  ------------------
  |  |  194|  88.1k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  88.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  88.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 88.1k]
  |  |  ------------------
  |  |  195|  88.1k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  88.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  88.1k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  88.1k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  88.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  88.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  88.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1483|  88.1k|    }
 1484|   333k|    *quantSpecCoefIdx += 1;
 1485|   333k|    if (*quantSpecCoefIdx >= 1024) {
  ------------------
  |  Branch (1485:9): [True: 5, False: 333k]
  ------------------
 1486|      5|      return -1;
 1487|      5|    }
 1488|   333k|  }
 1489|   164k|  return 0;
 1490|   165k|}
aacdec_hcr.cpp:_ZL20DecodeEscapeSequenceP13FDK_BITSTREAMiiPiPaS1_Pj:
 1389|  4.12k|                                int *pNumDecodedBits, UINT *errorWord) {
 1390|  4.12k|  UINT i;
 1391|  4.12k|  INT sign;
 1392|  4.12k|  UINT escapeOnesCounter = 0;
 1393|  4.12k|  UINT carryBit;
 1394|  4.12k|  INT escape_word = 0;
 1395|       |
 1396|       |  /* decode escape prefix */
 1397|  6.27k|  while (1) {
  ------------------
  |  Branch (1397:10): [True: 6.27k, Folded]
  ------------------
 1398|  6.27k|    carryBit = HcrGetABitFromBitstream(bs, bsAnchor, pLeftStartOfSegment,
 1399|  6.27k|                                       pLeftStartOfSegment, /* dummy */
 1400|  6.27k|                                       FROM_LEFT_TO_RIGHT);
  ------------------
  |  |  130|  6.27k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
 1401|  6.27k|    *pRemainingBitsInSegment -= 1;
 1402|  6.27k|    *pNumDecodedBits += 1;
 1403|  6.27k|    if (*pRemainingBitsInSegment < 0) {
  ------------------
  |  Branch (1403:9): [True: 245, False: 6.03k]
  ------------------
 1404|    245|      return Q_VALUE_INVALID;
  ------------------
  |  |  160|    245|  8192 /* mark a invalid line with this value (to be concealed later on) */
  ------------------
 1405|    245|    }
 1406|       |
 1407|  6.03k|    if (carryBit != 0) {
  ------------------
  |  Branch (1407:9): [True: 2.15k, False: 3.88k]
  ------------------
 1408|  2.15k|      escapeOnesCounter += 1;
 1409|  3.88k|    } else {
 1410|  3.88k|      escapeOnesCounter += 4;
 1411|  3.88k|      break;
 1412|  3.88k|    }
 1413|  6.03k|  }
 1414|       |
 1415|       |  /* decode escape word */
 1416|  19.5k|  for (i = escapeOnesCounter; i != 0; i--) {
  ------------------
  |  Branch (1416:31): [True: 17.1k, False: 2.37k]
  ------------------
 1417|  17.1k|    carryBit = HcrGetABitFromBitstream(bs, bsAnchor, pLeftStartOfSegment,
 1418|  17.1k|                                       pLeftStartOfSegment, /* dummy */
 1419|  17.1k|                                       FROM_LEFT_TO_RIGHT);
  ------------------
  |  |  130|  17.1k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
 1420|  17.1k|    *pRemainingBitsInSegment -= 1;
 1421|  17.1k|    *pNumDecodedBits += 1;
 1422|  17.1k|    if (*pRemainingBitsInSegment < 0) {
  ------------------
  |  Branch (1422:9): [True: 1.50k, False: 15.6k]
  ------------------
 1423|  1.50k|      return Q_VALUE_INVALID;
  ------------------
  |  |  160|  1.50k|  8192 /* mark a invalid line with this value (to be concealed later on) */
  ------------------
 1424|  1.50k|    }
 1425|       |
 1426|  15.6k|    escape_word <<= 1;
 1427|  15.6k|    escape_word = escape_word | carryBit;
 1428|  15.6k|  }
 1429|       |
 1430|  2.37k|  sign = (quantSpecCoef >= 0) ? 1 : -1;
  ------------------
  |  Branch (1430:10): [True: 1.49k, False: 883]
  ------------------
 1431|       |
 1432|  2.37k|  if (escapeOnesCounter < 13) {
  ------------------
  |  Branch (1432:7): [True: 2.35k, False: 19]
  ------------------
 1433|  2.35k|    quantSpecCoef = sign * (((INT)1 << escapeOnesCounter) + escape_word);
 1434|  2.35k|  } else {
 1435|     19|    *errorWord |= TOO_MANY_PCW_BODY_SIGN_ESC_BITS_DECODED;
  ------------------
  |  |  293|     19|  0x00020000  //  17   yes   PCW-Dec     During PCW-body-sign-esc-decoding too
  ------------------
 1436|     19|    quantSpecCoef = Q_VALUE_INVALID;
  ------------------
  |  |  160|     19|  8192 /* mark a invalid line with this value (to be concealed later on) */
  ------------------
 1437|     19|  }
 1438|  2.37k|  return quantSpecCoef;
 1439|  3.88k|}
aacdec_hcr.cpp:_ZL32errDetectWithinSegmentationFinalP10CErHcrInfo:
 1293|  8.45k|static void errDetectWithinSegmentationFinal(H_HCR_INFO pHcr) {
 1294|  8.45k|  UCHAR segmentationErrorFlag = 0;
 1295|  8.45k|  USHORT i;
 1296|  8.45k|  SCHAR *pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
 1297|  8.45k|  UINT numSegment = pHcr->segmentInfo.numSegment;
 1298|       |
 1299|   348k|  for (i = numSegment; i != 0; i--) {
  ------------------
  |  Branch (1299:24): [True: 340k, False: 8.45k]
  ------------------
 1300|   340k|    if (*pRemainingBitsInSegment++ != 0) {
  ------------------
  |  Branch (1300:9): [True: 195k, False: 144k]
  ------------------
 1301|   195k|      segmentationErrorFlag = 1;
 1302|   195k|    }
 1303|   340k|  }
 1304|  8.45k|  if (segmentationErrorFlag == 1) {
  ------------------
  |  Branch (1304:7): [True: 5.61k, False: 2.83k]
  ------------------
 1305|  5.61k|    pHcr->decInOut.errorLog |= BIT_IN_SEGMENTATION_ERROR;
  ------------------
  |  |  337|  5.61k|  0x00000001  //   0   no    Final       After PCW and non-PWC-decoding at least
  ------------------
 1306|  5.61k|  }
 1307|  8.45k|}

_Z19ToggleReadDirectionh:
  113|  32.4k|UCHAR ToggleReadDirection(UCHAR readDirection) {
  114|  32.4k|  if (readDirection == FROM_LEFT_TO_RIGHT) {
  ------------------
  |  |  130|  32.4k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
  |  Branch (114:7): [True: 14.4k, False: 18.0k]
  ------------------
  115|  14.4k|    return FROM_RIGHT_TO_LEFT;
  ------------------
  |  |  131|  14.4k|#define FROM_RIGHT_TO_LEFT 1
  ------------------
  116|  18.0k|  } else {
  117|  18.0k|    return FROM_LEFT_TO_RIGHT;
  ------------------
  |  |  130|  18.0k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
  118|  18.0k|  }
  119|  32.4k|}
_Z23HcrGetABitFromBitstreamP13FDK_BITSTREAMiPiS1_h:
  137|  1.97M|                             INT *pRightStartOfSegment, UCHAR readDirection) {
  138|  1.97M|  UINT bit;
  139|  1.97M|  INT readBitOffset;
  140|       |
  141|  1.97M|  if (readDirection == FROM_LEFT_TO_RIGHT) {
  ------------------
  |  |  130|  1.97M|#define FROM_LEFT_TO_RIGHT 0
  ------------------
  |  Branch (141:7): [True: 1.18M, False: 785k]
  ------------------
  142|  1.18M|    readBitOffset = (INT)FDKgetValidBits(bs) - bsAnchor + *pLeftStartOfSegment;
  143|  1.18M|    if (readBitOffset) {
  ------------------
  |  Branch (143:9): [True: 205k, False: 979k]
  ------------------
  144|   205k|      FDKpushBiDirectional(bs, readBitOffset);
  145|   205k|    }
  146|       |
  147|  1.18M|    bit = FDKreadBits(bs, 1);
  148|       |
  149|  1.18M|    *pLeftStartOfSegment += 1;
  150|  1.18M|  } else {
  151|   785k|    readBitOffset = (INT)FDKgetValidBits(bs) - bsAnchor + *pRightStartOfSegment;
  152|   785k|    if (readBitOffset) {
  ------------------
  |  Branch (152:9): [True: 196k, False: 588k]
  ------------------
  153|   196k|      FDKpushBiDirectional(bs, readBitOffset);
  154|   196k|    }
  155|       |
  156|       |    /* to be replaced with a brother function of FDKreadBits() */
  157|   785k|    bit = FDKreadBits(bs, 1);
  158|   785k|    FDKpushBack(bs, 2);
  159|       |
  160|   785k|    *pRightStartOfSegment -= 1;
  161|   785k|  }
  162|       |
  163|  1.97M|  return (bit);
  164|  1.97M|}

_Z13DecodeNonPCWsP13FDK_BITSTREAMP10CErHcrInfo:
  130|  6.27k|void DecodeNonPCWs(HANDLE_FDK_BITSTREAM bs, H_HCR_INFO pHcr) {
  131|  6.27k|  UINT numValidSegment;
  132|  6.27k|  INT segmentOffset;
  133|  6.27k|  INT codewordOffsetBase;
  134|  6.27k|  INT codewordOffset;
  135|  6.27k|  UINT trial;
  136|       |
  137|  6.27k|  UINT *pNumSegment;
  138|  6.27k|  SCHAR *pRemainingBitsInSegment;
  139|  6.27k|  UINT *pSegmentBitfield;
  140|  6.27k|  UCHAR *pNumWordForBitfield;
  141|  6.27k|  USHORT *pNumBitValidInLastWord;
  142|  6.27k|  UINT *pCodewordBitfield;
  143|  6.27k|  INT bitfieldWord;
  144|  6.27k|  INT bitInWord;
  145|  6.27k|  UINT tempWord;
  146|  6.27k|  UINT interMediateWord;
  147|  6.27k|  INT tempBit;
  148|  6.27k|  INT carry;
  149|       |
  150|  6.27k|  UINT numCodeword;
  151|  6.27k|  UCHAR numSet;
  152|  6.27k|  UCHAR currentSet;
  153|  6.27k|  UINT codewordInSet;
  154|  6.27k|  UINT remainingCodewordsInSet;
  155|  6.27k|  SCHAR *pSta;
  156|  6.27k|  UINT ret;
  157|       |
  158|  6.27k|  pNumSegment = &(pHcr->segmentInfo.numSegment);
  159|  6.27k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
  160|  6.27k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
  161|  6.27k|  pNumWordForBitfield = &(pHcr->segmentInfo.numWordForBitfield);
  162|  6.27k|  pNumBitValidInLastWord = &(pHcr->segmentInfo.pNumBitValidInLastWord);
  163|  6.27k|  pSta = pHcr->nonPcwSideinfo.pSta;
  164|       |
  165|  6.27k|  numValidSegment = InitSegmentBitfield(pNumSegment, pRemainingBitsInSegment,
  166|  6.27k|                                        pSegmentBitfield, pNumWordForBitfield,
  167|  6.27k|                                        pNumBitValidInLastWord);
  168|       |
  169|  6.27k|  if (numValidSegment != 0) {
  ------------------
  |  Branch (169:7): [True: 5.93k, False: 340]
  ------------------
  170|  5.93k|    numCodeword = pHcr->sectionInfo.numCodeword;
  171|  5.93k|    numSet = ((numCodeword - 1) / *pNumSegment) + 1;
  172|       |
  173|  5.93k|    pHcr->segmentInfo.readDirection = FROM_RIGHT_TO_LEFT;
  ------------------
  |  |  131|  5.93k|#define FROM_RIGHT_TO_LEFT 1
  ------------------
  174|       |
  175|       |    /* Process sets subsequently */
  176|  5.93k|    numSet = fMin(numSet, (UCHAR)MAX_HCR_SETS);
  ------------------
  |  |  134|  5.93k|#define MAX_HCR_SETS 14
  ------------------
  177|  38.3k|    for (currentSet = 1; currentSet < numSet; currentSet++) {
  ------------------
  |  Branch (177:26): [True: 33.2k, False: 5.10k]
  ------------------
  178|       |
  179|       |      /* step 1 */
  180|  33.2k|      numCodeword -=
  181|  33.2k|          *pNumSegment; /* number of remaining non PCWs [for all sets] */
  182|  33.2k|      if (numCodeword < *pNumSegment) {
  ------------------
  |  Branch (182:11): [True: 3.62k, False: 29.6k]
  ------------------
  183|  3.62k|        codewordInSet = numCodeword; /* for last set */
  184|  29.6k|      } else {
  185|  29.6k|        codewordInSet = *pNumSegment; /* for all sets except last set */
  186|  29.6k|      }
  187|       |
  188|       |      /* step 2 */
  189|       |      /* prepare array 'CodewordBitfield'; as much ones are written from left in
  190|       |       * all words, as much decodedCodewordInSetCounter nonPCWs exist in this
  191|       |       * set */
  192|  33.2k|      tempWord = 0xFFFFFFFF;
  193|  33.2k|      pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
  194|       |
  195|  74.0k|      for (bitfieldWord = *pNumWordForBitfield; bitfieldWord != 0;
  ------------------
  |  Branch (195:49): [True: 40.7k, False: 33.2k]
  ------------------
  196|  40.7k|           bitfieldWord--) { /* loop over all used words */
  197|  40.7k|        if (codewordInSet > NUMBER_OF_BIT_IN_WORD) { /* more codewords than
  ------------------
  |  |  146|  40.7k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  |  Branch (197:13): [True: 4.09k, False: 36.6k]
  ------------------
  198|       |                                                        number of bits => fill
  199|       |                                                        ones */
  200|       |          /* fill a whole word with ones */
  201|  4.09k|          *pCodewordBitfield++ = tempWord;
  202|  4.09k|          codewordInSet -= NUMBER_OF_BIT_IN_WORD; /* subtract number of bits */
  ------------------
  |  |  146|  4.09k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  203|  36.6k|        } else {
  204|       |          /* prepare last tempWord */
  205|  36.6k|          for (remainingCodewordsInSet = codewordInSet;
  206|   875k|               remainingCodewordsInSet < NUMBER_OF_BIT_IN_WORD;
  ------------------
  |  |  146|   875k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  |  Branch (206:16): [True: 838k, False: 36.6k]
  ------------------
  207|   838k|               remainingCodewordsInSet++) {
  208|   838k|            tempWord =
  209|   838k|                tempWord &
  210|   838k|                ~(1
  211|   838k|                  << (NUMBER_OF_BIT_IN_WORD - 1 -
  ------------------
  |  |  146|   838k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  212|   838k|                      remainingCodewordsInSet)); /* set a zero at bit number
  213|       |                                                    (NUMBER_OF_BIT_IN_WORD-1-i)
  214|       |                                                    in tempWord */
  215|   838k|          }
  216|  36.6k|          *pCodewordBitfield++ = tempWord;
  217|  36.6k|          tempWord = 0x00000000;
  218|  36.6k|        }
  219|  40.7k|      }
  220|  33.2k|      pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
  221|       |
  222|       |      /* step 3 */
  223|       |      /* build non-PCW sideinfo for each non-PCW of the current set */
  224|  33.2k|      InitNonPCWSideInformationForCurrentSet(pHcr);
  225|       |
  226|       |      /* step 4 */
  227|       |      /* decode all non-PCWs belonging to this set */
  228|       |
  229|       |      /* loop over trials */
  230|  33.2k|      codewordOffsetBase = 0;
  231|   452k|      for (trial = *pNumSegment; trial > 0; trial--) {
  ------------------
  |  Branch (231:34): [True: 419k, False: 32.4k]
  ------------------
  232|       |        /* loop over number of words in bitfields */
  233|   419k|        segmentOffset = 0; /* start at zero in every segment */
  234|   419k|        pHcr->segmentInfo.segmentOffset =
  235|   419k|            segmentOffset; /* store in structure for states */
  236|   419k|        codewordOffset = codewordOffsetBase;
  237|   419k|        pHcr->nonPcwSideinfo.codewordOffset =
  238|   419k|            codewordOffset; /* store in structure for states */
  239|       |
  240|  1.89M|        for (bitfieldWord = 0; bitfieldWord < *pNumWordForBitfield;
  ------------------
  |  Branch (240:32): [True: 1.47M, False: 418k]
  ------------------
  241|  1.47M|             bitfieldWord++) {
  242|       |          /* derive tempWord with bitwise and */
  243|  1.47M|          tempWord =
  244|  1.47M|              pSegmentBitfield[bitfieldWord] & pCodewordBitfield[bitfieldWord];
  245|       |
  246|       |          /* if tempWord is not zero, decode something */
  247|  1.47M|          if (tempWord != 0) {
  ------------------
  |  Branch (247:15): [True: 64.4k, False: 1.41M]
  ------------------
  248|       |            /* loop over all bits in tempWord; start state machine if & is true
  249|       |             */
  250|  2.10M|            for (bitInWord = NUMBER_OF_BIT_IN_WORD; bitInWord > 0;
  ------------------
  |  |  146|  64.4k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  |  Branch (250:53): [True: 2.03M, False: 63.5k]
  ------------------
  251|  2.03M|                 bitInWord--) {
  252|  2.03M|              interMediateWord = ((UINT)1 << (bitInWord - 1));
  253|  2.03M|              if ((tempWord & interMediateWord) == interMediateWord) {
  ------------------
  |  Branch (253:19): [True: 253k, False: 1.78M]
  ------------------
  254|       |                /* get state and start state machine */
  255|   253k|                pHcr->nonPcwSideinfo.pState =
  256|   253k|                    aStateConstant2State[pSta[codewordOffset]];
  257|       |
  258|   608k|                while (pHcr->nonPcwSideinfo.pState) {
  ------------------
  |  Branch (258:24): [True: 355k, False: 252k]
  ------------------
  259|   355k|                  ret = ((STATEFUNC)pHcr->nonPcwSideinfo.pState)(bs, pHcr);
  260|   355k|                  if (ret != 0) {
  ------------------
  |  Branch (260:23): [True: 836, False: 355k]
  ------------------
  261|    836|                    return;
  262|    836|                  }
  263|   355k|                }
  264|   253k|              }
  265|       |
  266|       |              /* update both offsets */
  267|  2.03M|              segmentOffset += 1; /* add NUMBER_OF_BIT_IN_WORD times one */
  268|  2.03M|              pHcr->segmentInfo.segmentOffset = segmentOffset;
  269|  2.03M|              codewordOffset += 1; /* add NUMBER_OF_BIT_IN_WORD times one */
  270|  2.03M|              codewordOffset =
  271|  2.03M|                  ModuloValue(codewordOffset,
  272|  2.03M|                              *pNumSegment); /* index of the current codeword
  273|       |                                                lies within modulo range */
  274|  2.03M|              pHcr->nonPcwSideinfo.codewordOffset = codewordOffset;
  275|  2.03M|            }
  276|  1.41M|          } else {
  277|  1.41M|            segmentOffset +=
  278|  1.41M|                NUMBER_OF_BIT_IN_WORD; /* add NUMBER_OF_BIT_IN_WORD at once */
  ------------------
  |  |  146|  1.41M|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  279|  1.41M|            pHcr->segmentInfo.segmentOffset = segmentOffset;
  280|  1.41M|            codewordOffset +=
  281|  1.41M|                NUMBER_OF_BIT_IN_WORD; /* add NUMBER_OF_BIT_IN_WORD at once */
  ------------------
  |  |  146|  1.41M|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  282|  1.41M|            codewordOffset = ModuloValue(
  283|  1.41M|                codewordOffset,
  284|  1.41M|                *pNumSegment); /* index of the current codeword lies within
  285|       |                                  modulo range */
  286|  1.41M|            pHcr->nonPcwSideinfo.codewordOffset = codewordOffset;
  287|  1.41M|          }
  288|  1.47M|        } /* end of bitfield word loop */
  289|       |
  290|       |        /* decrement codeword - pointer */
  291|   418k|        codewordOffsetBase -= 1;
  292|   418k|        codewordOffsetBase =
  293|   418k|            ModuloValue(codewordOffsetBase, *pNumSegment); /* index of the
  294|       |                                                              current codeword
  295|       |                                                              base lies within
  296|       |                                                              modulo range */
  297|       |
  298|       |        /* rotate numSegment bits in codewordBitfield */
  299|       |        /* rotation of *numSegment bits in bitfield of codewords
  300|       |         * (circle-rotation) */
  301|       |        /* get last valid bit */
  302|   418k|        tempBit = pCodewordBitfield[*pNumWordForBitfield - 1] &
  303|   418k|                  (1 << (NUMBER_OF_BIT_IN_WORD - *pNumBitValidInLastWord));
  ------------------
  |  |  146|   418k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  304|   418k|        tempBit = tempBit >> (NUMBER_OF_BIT_IN_WORD - *pNumBitValidInLastWord);
  ------------------
  |  |  146|   418k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  305|       |
  306|       |        /* write zero into place where tempBit was fetched from */
  307|   418k|        pCodewordBitfield[*pNumWordForBitfield - 1] =
  308|   418k|            pCodewordBitfield[*pNumWordForBitfield - 1] &
  309|   418k|            ~(1 << (NUMBER_OF_BIT_IN_WORD - *pNumBitValidInLastWord));
  ------------------
  |  |  146|   418k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  310|       |
  311|       |        /* rotate last valid word */
  312|   418k|        pCodewordBitfield[*pNumWordForBitfield - 1] =
  313|   418k|            pCodewordBitfield[*pNumWordForBitfield - 1] >> 1;
  314|       |
  315|       |        /* transfare carry bit 0 from current word into bitposition 31 from next
  316|       |         * word and rotate current word */
  317|  1.47M|        for (bitfieldWord = *pNumWordForBitfield - 2; bitfieldWord > -1;
  ------------------
  |  Branch (317:55): [True: 1.05M, False: 418k]
  ------------------
  318|  1.05M|             bitfieldWord--) {
  319|       |          /* get carry (=bit at position 0) from current word */
  320|  1.05M|          carry = pCodewordBitfield[bitfieldWord] & 1;
  321|       |
  322|       |          /* put the carry bit at position 31 into word right from current word
  323|       |           */
  324|  1.05M|          pCodewordBitfield[bitfieldWord + 1] =
  325|  1.05M|              pCodewordBitfield[bitfieldWord + 1] |
  326|  1.05M|              (carry << (NUMBER_OF_BIT_IN_WORD - 1));
  ------------------
  |  |  146|  1.05M|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  327|       |
  328|       |          /* shift current word */
  329|  1.05M|          pCodewordBitfield[bitfieldWord] =
  330|  1.05M|              pCodewordBitfield[bitfieldWord] >> 1;
  331|  1.05M|        }
  332|       |
  333|       |        /* put tempBit into free bit-position 31 from first word */
  334|   418k|        pCodewordBitfield[0] =
  335|   418k|            pCodewordBitfield[0] | (tempBit << (NUMBER_OF_BIT_IN_WORD - 1));
  ------------------
  |  |  146|   418k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  336|       |
  337|   418k|      } /* end of trial loop */
  338|       |
  339|       |      /* toggle read direction */
  340|  32.4k|      pHcr->segmentInfo.readDirection =
  341|  32.4k|          ToggleReadDirection(pHcr->segmentInfo.readDirection);
  342|  32.4k|    }
  343|       |    /* end of set loop */
  344|       |
  345|       |    /* all non-PCWs of this spectrum are decoded */
  346|  5.93k|  }
  347|       |
  348|       |  /* all PCWs and all non PCWs are decoded. They are unbacksorted in output
  349|       |   * buffer. Here is the Interface with comparing QSCs to asm decoding */
  350|  6.27k|}
_Z19Hcr_State_BODY_ONLYP13FDK_BITSTREAMPv:
  577|  46.9k|UINT Hcr_State_BODY_ONLY(HANDLE_FDK_BITSTREAM bs, void *ptr) {
  578|  46.9k|  H_HCR_INFO pHcr = (H_HCR_INFO)ptr;
  579|  46.9k|  UINT *pSegmentBitfield;
  580|  46.9k|  UINT *pCodewordBitfield;
  581|  46.9k|  UINT segmentOffset;
  582|  46.9k|  FIXP_DBL *pResultBase;
  583|  46.9k|  UINT *iNode;
  584|  46.9k|  USHORT *iResultPointer;
  585|  46.9k|  UINT codewordOffset;
  586|  46.9k|  UINT branchNode;
  587|  46.9k|  UINT branchValue;
  588|  46.9k|  UINT iQSC;
  589|  46.9k|  UINT treeNode;
  590|  46.9k|  UCHAR carryBit;
  591|  46.9k|  INT *pLeftStartOfSegment;
  592|  46.9k|  INT *pRightStartOfSegment;
  593|  46.9k|  SCHAR *pRemainingBitsInSegment;
  594|  46.9k|  UCHAR readDirection;
  595|  46.9k|  UCHAR *pCodebook;
  596|  46.9k|  UCHAR dimCntr;
  597|  46.9k|  const UINT *pCurrentTree;
  598|  46.9k|  const UCHAR *pCbDimension;
  599|  46.9k|  const SCHAR *pQuantVal;
  600|  46.9k|  const SCHAR *pQuantValBase;
  601|       |
  602|  46.9k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
  603|  46.9k|  pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
  604|  46.9k|  pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
  605|  46.9k|  readDirection = pHcr->segmentInfo.readDirection;
  606|  46.9k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
  607|  46.9k|  pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
  608|  46.9k|  segmentOffset = pHcr->segmentInfo.segmentOffset;
  609|       |
  610|  46.9k|  pCodebook = pHcr->nonPcwSideinfo.pCodebook;
  611|  46.9k|  iNode = pHcr->nonPcwSideinfo.iNode;
  612|  46.9k|  pResultBase = pHcr->nonPcwSideinfo.pResultBase;
  613|  46.9k|  iResultPointer = pHcr->nonPcwSideinfo.iResultPointer;
  614|  46.9k|  codewordOffset = pHcr->nonPcwSideinfo.codewordOffset;
  615|       |
  616|  46.9k|  pCbDimension = aDimCb;
  617|       |
  618|  46.9k|  treeNode = iNode[codewordOffset];
  619|  46.9k|  pCurrentTree = aHuffTable[pCodebook[codewordOffset]];
  620|       |
  621|   104k|  for (; pRemainingBitsInSegment[segmentOffset] > 0;
  ------------------
  |  Branch (621:10): [True: 100k, False: 4.00k]
  ------------------
  622|   100k|       pRemainingBitsInSegment[segmentOffset] -= 1) {
  623|   100k|    carryBit = HcrGetABitFromBitstream(
  624|   100k|        bs, pHcr->decInOut.bitstreamAnchor, &pLeftStartOfSegment[segmentOffset],
  625|   100k|        &pRightStartOfSegment[segmentOffset], readDirection);
  626|       |
  627|   100k|    CarryBitToBranchValue(carryBit, /* make a step in decoding tree */
  628|   100k|                          treeNode, &branchValue, &branchNode);
  629|       |
  630|       |    /* if end of branch reached write out lines and count bits needed for sign,
  631|       |     * otherwise store node in codeword sideinfo */
  632|   100k|    if ((branchNode & TEST_BIT_10) ==
  ------------------
  |  |  167|   100k|#define TEST_BIT_10 0x400
  ------------------
  |  Branch (632:9): [True: 42.9k, False: 57.4k]
  ------------------
  633|   100k|        TEST_BIT_10) { /* test bit 10 ; ==> body is complete */
  ------------------
  |  |  167|   100k|#define TEST_BIT_10 0x400
  ------------------
  634|  42.9k|      pQuantValBase = aQuantTable[pCodebook[codewordOffset]]; /* get base
  635|       |                                                                 address of
  636|       |                                                                 quantized
  637|       |                                                                 values
  638|       |                                                                 belonging to
  639|       |                                                                 current
  640|       |                                                                 codebook */
  641|  42.9k|      pQuantVal = pQuantValBase + branchValue; /* set pointer to first valid
  642|       |                                                  line [of 2 or 4 quantized
  643|       |                                                  values] */
  644|       |
  645|  42.9k|      iQSC = iResultPointer[codewordOffset]; /* get position of first line for
  646|       |                                                writing out result */
  647|       |
  648|   130k|      for (dimCntr = pCbDimension[pCodebook[codewordOffset]]; dimCntr != 0;
  ------------------
  |  Branch (648:63): [True: 87.8k, False: 42.9k]
  ------------------
  649|  87.8k|           dimCntr--) {
  650|  87.8k|        pResultBase[iQSC++] =
  651|  87.8k|            (FIXP_DBL)*pQuantVal++; /* write out 2 or 4 lines into
  652|       |                                       spectrum; no Sign bits
  653|       |                                       available in this state */
  654|  87.8k|      }
  655|       |
  656|  42.9k|      ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
  657|  42.9k|                           pCodewordBitfield); /* clear a bit in bitfield and
  658|       |                                                  switch off statemachine */
  659|  42.9k|      pRemainingBitsInSegment[segmentOffset] -= 1; /* last reinitialzation of
  660|       |                                                      for loop counter (see
  661|       |                                                      above) is done here */
  662|  42.9k|      break; /* end of branch in tree reached  i.e. a whole nonPCW-Body is
  663|       |                decoded */
  664|  57.4k|    } else { /* body is not decoded completely: */
  665|  57.4k|      treeNode = *(
  666|  57.4k|          pCurrentTree +
  667|  57.4k|          branchValue); /* update treeNode for further step in decoding tree */
  668|  57.4k|    }
  669|   100k|  }
  670|  46.9k|  iNode[codewordOffset] = treeNode; /* store updated treeNode because maybe
  671|       |                                       decoding of codeword body not finished
  672|       |                                       yet */
  673|       |
  674|  46.9k|  if (pRemainingBitsInSegment[segmentOffset] <= 0) {
  ------------------
  |  Branch (674:7): [True: 5.66k, False: 41.2k]
  ------------------
  675|  5.66k|    ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
  676|  5.66k|                         pSegmentBitfield); /* clear a bit in bitfield and
  677|       |                                               switch off statemachine */
  678|       |
  679|  5.66k|    if (pRemainingBitsInSegment[segmentOffset] < 0) {
  ------------------
  |  Branch (679:9): [True: 1, False: 5.66k]
  ------------------
  680|      1|      pHcr->decInOut.errorLog |= STATE_ERROR_BODY_ONLY;
  ------------------
  |  |  299|      1|  0x00008000  //  15   no    NonPCW-Dec  State machine returned with error
  ------------------
  681|      1|      return BODY_ONLY;
  ------------------
  |  |  115|      1|  1 /*   X          X                X                                      */
  ------------------
  682|      1|    }
  683|  5.66k|  }
  684|       |
  685|  46.9k|  return STOP_THIS_STATE;
  ------------------
  |  |  113|  46.9k|  0 /*                                                                      */
  ------------------
  686|  46.9k|}
_Z25Hcr_State_BODY_SIGN__BODYP13FDK_BITSTREAMPv:
  704|   140k|UINT Hcr_State_BODY_SIGN__BODY(HANDLE_FDK_BITSTREAM bs, void *ptr) {
  705|   140k|  H_HCR_INFO pHcr = (H_HCR_INFO)ptr;
  706|   140k|  SCHAR *pRemainingBitsInSegment;
  707|   140k|  INT *pLeftStartOfSegment;
  708|   140k|  INT *pRightStartOfSegment;
  709|   140k|  UCHAR readDirection;
  710|   140k|  UINT *pSegmentBitfield;
  711|   140k|  UINT *pCodewordBitfield;
  712|   140k|  UINT segmentOffset;
  713|       |
  714|   140k|  UCHAR *pCodebook;
  715|   140k|  UINT *iNode;
  716|   140k|  UCHAR *pCntSign;
  717|   140k|  FIXP_DBL *pResultBase;
  718|   140k|  USHORT *iResultPointer;
  719|   140k|  UINT codewordOffset;
  720|       |
  721|   140k|  UINT iQSC;
  722|   140k|  UINT cntSign;
  723|   140k|  UCHAR dimCntr;
  724|   140k|  UCHAR carryBit;
  725|   140k|  SCHAR *pSta;
  726|   140k|  UINT treeNode;
  727|   140k|  UINT branchValue;
  728|   140k|  UINT branchNode;
  729|   140k|  const UCHAR *pCbDimension;
  730|   140k|  const UINT *pCurrentTree;
  731|   140k|  const SCHAR *pQuantValBase;
  732|   140k|  const SCHAR *pQuantVal;
  733|       |
  734|   140k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
  735|   140k|  pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
  736|   140k|  pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
  737|   140k|  readDirection = pHcr->segmentInfo.readDirection;
  738|   140k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
  739|   140k|  pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
  740|   140k|  segmentOffset = pHcr->segmentInfo.segmentOffset;
  741|       |
  742|   140k|  pCodebook = pHcr->nonPcwSideinfo.pCodebook;
  743|   140k|  iNode = pHcr->nonPcwSideinfo.iNode;
  744|   140k|  pCntSign = pHcr->nonPcwSideinfo.pCntSign;
  745|   140k|  pResultBase = pHcr->nonPcwSideinfo.pResultBase;
  746|   140k|  iResultPointer = pHcr->nonPcwSideinfo.iResultPointer;
  747|   140k|  codewordOffset = pHcr->nonPcwSideinfo.codewordOffset;
  748|   140k|  pSta = pHcr->nonPcwSideinfo.pSta;
  749|       |
  750|   140k|  pCbDimension = aDimCb;
  751|       |
  752|   140k|  treeNode = iNode[codewordOffset];
  753|   140k|  pCurrentTree = aHuffTable[pCodebook[codewordOffset]];
  754|       |
  755|   519k|  for (; pRemainingBitsInSegment[segmentOffset] > 0;
  ------------------
  |  Branch (755:10): [True: 492k, False: 27.5k]
  ------------------
  756|   492k|       pRemainingBitsInSegment[segmentOffset] -= 1) {
  757|   492k|    carryBit = HcrGetABitFromBitstream(
  758|   492k|        bs, pHcr->decInOut.bitstreamAnchor, &pLeftStartOfSegment[segmentOffset],
  759|   492k|        &pRightStartOfSegment[segmentOffset], readDirection);
  760|       |
  761|   492k|    CarryBitToBranchValue(carryBit, /* make a step in decoding tree */
  762|   492k|                          treeNode, &branchValue, &branchNode);
  763|       |
  764|       |    /* if end of branch reached write out lines and count bits needed for sign,
  765|       |     * otherwise store node in codeword sideinfo */
  766|   492k|    if ((branchNode & TEST_BIT_10) ==
  ------------------
  |  |  167|   492k|#define TEST_BIT_10 0x400
  ------------------
  |  Branch (766:9): [True: 113k, False: 379k]
  ------------------
  767|   492k|        TEST_BIT_10) { /* test bit 10 ; if set body complete */
  ------------------
  |  |  167|   492k|#define TEST_BIT_10 0x400
  ------------------
  768|       |      /* body completely decoded; branchValue is valid, set pQuantVal to first
  769|       |       * (of two or four) quantized spectral coefficients */
  770|   113k|      pQuantValBase = aQuantTable[pCodebook[codewordOffset]]; /* get base
  771|       |                                                                 address of
  772|       |                                                                 quantized
  773|       |                                                                 values
  774|       |                                                                 belonging to
  775|       |                                                                 current
  776|       |                                                                 codebook */
  777|   113k|      pQuantVal = pQuantValBase + branchValue; /* set pointer to first valid
  778|       |                                                  line [of 2 or 4 quantized
  779|       |                                                  values] */
  780|       |
  781|   113k|      iQSC = iResultPointer[codewordOffset]; /* get position of first line for
  782|       |                                                writing result */
  783|       |
  784|       |      /* codeword decoding result is written out here: Write out 2 or 4
  785|       |       * quantized spectral values with probably */
  786|       |      /* wrong sign and count number of values which are different from zero for
  787|       |       * sign bit decoding [which happens in next state] */
  788|   113k|      cntSign = 0;
  789|   342k|      for (dimCntr = pCbDimension[pCodebook[codewordOffset]]; dimCntr != 0;
  ------------------
  |  Branch (789:63): [True: 229k, False: 113k]
  ------------------
  790|   229k|           dimCntr--) {
  791|   229k|        pResultBase[iQSC++] =
  792|   229k|            (FIXP_DBL)*pQuantVal; /* write quant. spec. coef. into spectrum */
  793|   229k|        if (*pQuantVal++ != 0) {
  ------------------
  |  Branch (793:13): [True: 193k, False: 36.0k]
  ------------------
  794|   193k|          cntSign += 1;
  795|   193k|        }
  796|   229k|      }
  797|       |
  798|   113k|      if (cntSign == 0) {
  ------------------
  |  Branch (798:11): [True: 8.98k, False: 104k]
  ------------------
  799|  8.98k|        ClearBitFromBitfield(
  800|  8.98k|            &(pHcr->nonPcwSideinfo.pState), segmentOffset,
  801|  8.98k|            pCodewordBitfield); /* clear a bit in bitfield and switch off
  802|       |                                   statemachine */
  803|   104k|      } else {
  804|   104k|        pCntSign[codewordOffset] = cntSign;     /* write sign count result into
  805|       |                                                   codewordsideinfo of current
  806|       |                                                   codeword */
  807|   104k|        pSta[codewordOffset] = BODY_SIGN__SIGN; /* change state */
  ------------------
  |  |  119|   104k|  3 /*              X                X [stop if sign bits decoded]          */
  ------------------
  808|   104k|        pHcr->nonPcwSideinfo.pState =
  809|   104k|            aStateConstant2State[pSta[codewordOffset]]; /* get state from
  810|       |                                                           separate array of
  811|       |                                                           cw-sideinfo */
  812|   104k|      }
  813|   113k|      pRemainingBitsInSegment[segmentOffset] -= 1; /* last reinitialzation of
  814|       |                                                      for loop counter (see
  815|       |                                                      above) is done here */
  816|   113k|      break; /* end of branch in tree reached  i.e. a whole nonPCW-Body is
  817|       |                decoded */
  818|   379k|    } else { /* body is not decoded completely: */
  819|   379k|      treeNode = *(
  820|   379k|          pCurrentTree +
  821|   379k|          branchValue); /* update treeNode for further step in decoding tree */
  822|   379k|    }
  823|   492k|  }
  824|   140k|  iNode[codewordOffset] = treeNode; /* store updated treeNode because maybe
  825|       |                                       decoding of codeword body not finished
  826|       |                                       yet */
  827|       |
  828|   140k|  if (pRemainingBitsInSegment[segmentOffset] <= 0) {
  ------------------
  |  Branch (828:7): [True: 43.6k, False: 97.0k]
  ------------------
  829|  43.6k|    ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
  830|  43.6k|                         pSegmentBitfield); /* clear a bit in bitfield and
  831|       |                                               switch off statemachine */
  832|       |
  833|  43.6k|    if (pRemainingBitsInSegment[segmentOffset] < 0) {
  ------------------
  |  Branch (833:9): [True: 240, False: 43.4k]
  ------------------
  834|    240|      pHcr->decInOut.errorLog |= STATE_ERROR_BODY_SIGN__BODY;
  ------------------
  |  |  301|    240|  0x00004000  //  14   no    NonPCW-Dec  State machine returned with error
  ------------------
  835|    240|      return BODY_SIGN__BODY;
  ------------------
  |  |  117|    240|  2 /*   X          X         X      X [stop if no sign]                    */
  ------------------
  836|    240|    }
  837|  43.6k|  }
  838|       |
  839|   140k|  return STOP_THIS_STATE;
  ------------------
  |  |  113|   140k|  0 /*                                                                      */
  ------------------
  840|   140k|}
_Z25Hcr_State_BODY_SIGN__SIGNP13FDK_BITSTREAMPv:
  853|   124k|UINT Hcr_State_BODY_SIGN__SIGN(HANDLE_FDK_BITSTREAM bs, void *ptr) {
  854|   124k|  H_HCR_INFO pHcr = (H_HCR_INFO)ptr;
  855|   124k|  SCHAR *pRemainingBitsInSegment;
  856|   124k|  INT *pLeftStartOfSegment;
  857|   124k|  INT *pRightStartOfSegment;
  858|   124k|  UCHAR readDirection;
  859|   124k|  UINT *pSegmentBitfield;
  860|   124k|  UINT *pCodewordBitfield;
  861|   124k|  UINT segmentOffset;
  862|       |
  863|   124k|  UCHAR *pCntSign;
  864|   124k|  FIXP_DBL *pResultBase;
  865|   124k|  USHORT *iResultPointer;
  866|   124k|  UINT codewordOffset;
  867|       |
  868|   124k|  UCHAR carryBit;
  869|   124k|  UINT iQSC;
  870|   124k|  UCHAR cntSign;
  871|       |
  872|   124k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
  873|   124k|  pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
  874|   124k|  pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
  875|   124k|  readDirection = pHcr->segmentInfo.readDirection;
  876|   124k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
  877|   124k|  pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
  878|   124k|  segmentOffset = pHcr->segmentInfo.segmentOffset;
  879|       |
  880|       |  /*pCodebook               = */
  881|   124k|  pCntSign = pHcr->nonPcwSideinfo.pCntSign;
  882|   124k|  pResultBase = pHcr->nonPcwSideinfo.pResultBase;
  883|   124k|  iResultPointer = pHcr->nonPcwSideinfo.iResultPointer;
  884|   124k|  codewordOffset = pHcr->nonPcwSideinfo.codewordOffset;
  885|       |
  886|   124k|  iQSC = iResultPointer[codewordOffset];
  887|   124k|  cntSign = pCntSign[codewordOffset];
  888|       |
  889|       |  /* loop for sign bit decoding */
  890|   213k|  for (; pRemainingBitsInSegment[segmentOffset] > 0;
  ------------------
  |  Branch (890:10): [True: 192k, False: 20.9k]
  ------------------
  891|   192k|       pRemainingBitsInSegment[segmentOffset] -= 1) {
  892|   192k|    carryBit = HcrGetABitFromBitstream(
  893|   192k|        bs, pHcr->decInOut.bitstreamAnchor, &pLeftStartOfSegment[segmentOffset],
  894|   192k|        &pRightStartOfSegment[segmentOffset], readDirection);
  895|   192k|    cntSign -=
  896|   192k|        1; /* decrement sign counter because one sign bit has been read */
  897|       |
  898|       |    /* search for a line (which was decoded in previous state) which is not
  899|       |     * zero. [This value will get a sign] */
  900|   204k|    while (pResultBase[iQSC] == (FIXP_DBL)0) {
  ------------------
  |  Branch (900:12): [True: 12.3k, False: 192k]
  ------------------
  901|  12.3k|      if (++iQSC >= 1024) { /* points to current value different from zero */
  ------------------
  |  Branch (901:11): [True: 0, False: 12.3k]
  ------------------
  902|      0|        return BODY_SIGN__SIGN;
  ------------------
  |  |  119|      0|  3 /*              X                X [stop if sign bits decoded]          */
  ------------------
  903|      0|      }
  904|  12.3k|    }
  905|       |
  906|       |    /* put sign together with line; if carryBit is zero, the sign is ok already;
  907|       |     * no write operation necessary in this case */
  908|   192k|    if (carryBit != 0) {
  ------------------
  |  Branch (908:9): [True: 43.1k, False: 149k]
  ------------------
  909|  43.1k|      pResultBase[iQSC] = -pResultBase[iQSC]; /* carryBit = 1 --> minus */
  910|  43.1k|    }
  911|       |
  912|   192k|    iQSC++; /* update pointer to next (maybe valid) value */
  913|       |
  914|   192k|    if (cntSign == 0) { /* if (cntSign==0)  ==>  set state CODEWORD_DECODED */
  ------------------
  |  Branch (914:9): [True: 103k, False: 88.8k]
  ------------------
  915|   103k|      ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
  916|   103k|                           pCodewordBitfield); /* clear a bit in bitfield and
  917|       |                                                  switch off statemachine */
  918|   103k|      pRemainingBitsInSegment[segmentOffset] -= 1; /* last reinitialzation of
  919|       |                                                      for loop counter (see
  920|       |                                                      above) is done here */
  921|   103k|      break; /* whole nonPCW-Body and according sign bits are decoded */
  922|   103k|    }
  923|   192k|  }
  924|   124k|  pCntSign[codewordOffset] = cntSign;
  925|   124k|  iResultPointer[codewordOffset] = iQSC; /* store updated pResultPointer */
  926|       |
  927|   124k|  if (pRemainingBitsInSegment[segmentOffset] <= 0) {
  ------------------
  |  Branch (927:7): [True: 49.5k, False: 75.1k]
  ------------------
  928|  49.5k|    ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
  929|  49.5k|                         pSegmentBitfield); /* clear a bit in bitfield and
  930|       |                                               switch off statemachine */
  931|       |
  932|  49.5k|    if (pRemainingBitsInSegment[segmentOffset] < 0) {
  ------------------
  |  Branch (932:9): [True: 4, False: 49.5k]
  ------------------
  933|      4|      pHcr->decInOut.errorLog |= STATE_ERROR_BODY_SIGN__SIGN;
  ------------------
  |  |  303|      4|  0x00002000  //  13   no    NonPCW-Dec  State machine returned with error
  ------------------
  934|      4|      return BODY_SIGN__SIGN;
  ------------------
  |  |  119|      4|  3 /*              X                X [stop if sign bits decoded]          */
  ------------------
  935|      4|    }
  936|  49.5k|  }
  937|       |
  938|   124k|  return STOP_THIS_STATE;
  ------------------
  |  |  113|   124k|  0 /*                                                                      */
  ------------------
  939|   124k|}
_Z29Hcr_State_BODY_SIGN_ESC__BODYP13FDK_BITSTREAMPv:
  957|  26.1k|UINT Hcr_State_BODY_SIGN_ESC__BODY(HANDLE_FDK_BITSTREAM bs, void *ptr) {
  958|  26.1k|  H_HCR_INFO pHcr = (H_HCR_INFO)ptr;
  959|  26.1k|  SCHAR *pRemainingBitsInSegment;
  960|  26.1k|  INT *pLeftStartOfSegment;
  961|  26.1k|  INT *pRightStartOfSegment;
  962|  26.1k|  UCHAR readDirection;
  963|  26.1k|  UINT *pSegmentBitfield;
  964|  26.1k|  UINT *pCodewordBitfield;
  965|  26.1k|  UINT segmentOffset;
  966|       |
  967|  26.1k|  UINT *iNode;
  968|  26.1k|  UCHAR *pCntSign;
  969|  26.1k|  FIXP_DBL *pResultBase;
  970|  26.1k|  USHORT *iResultPointer;
  971|  26.1k|  UINT codewordOffset;
  972|       |
  973|  26.1k|  UCHAR carryBit;
  974|  26.1k|  UINT iQSC;
  975|  26.1k|  UINT cntSign;
  976|  26.1k|  UINT dimCntr;
  977|  26.1k|  UINT treeNode;
  978|  26.1k|  SCHAR *pSta;
  979|  26.1k|  UINT branchNode;
  980|  26.1k|  UINT branchValue;
  981|  26.1k|  const UINT *pCurrentTree;
  982|  26.1k|  const SCHAR *pQuantValBase;
  983|  26.1k|  const SCHAR *pQuantVal;
  984|       |
  985|  26.1k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
  986|  26.1k|  pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
  987|  26.1k|  pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
  988|  26.1k|  readDirection = pHcr->segmentInfo.readDirection;
  989|  26.1k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
  990|  26.1k|  pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
  991|  26.1k|  segmentOffset = pHcr->segmentInfo.segmentOffset;
  992|       |
  993|  26.1k|  iNode = pHcr->nonPcwSideinfo.iNode;
  994|  26.1k|  pCntSign = pHcr->nonPcwSideinfo.pCntSign;
  995|  26.1k|  pResultBase = pHcr->nonPcwSideinfo.pResultBase;
  996|  26.1k|  iResultPointer = pHcr->nonPcwSideinfo.iResultPointer;
  997|  26.1k|  codewordOffset = pHcr->nonPcwSideinfo.codewordOffset;
  998|  26.1k|  pSta = pHcr->nonPcwSideinfo.pSta;
  999|       |
 1000|  26.1k|  treeNode = iNode[codewordOffset];
 1001|  26.1k|  pCurrentTree = aHuffTable[ESCAPE_CODEBOOK];
  ------------------
  |  |  154|  26.1k|#define ESCAPE_CODEBOOK 11
  ------------------
 1002|       |
 1003|   121k|  for (; pRemainingBitsInSegment[segmentOffset] > 0;
  ------------------
  |  Branch (1003:10): [True: 118k, False: 2.91k]
  ------------------
 1004|   118k|       pRemainingBitsInSegment[segmentOffset] -= 1) {
 1005|   118k|    carryBit = HcrGetABitFromBitstream(
 1006|   118k|        bs, pHcr->decInOut.bitstreamAnchor, &pLeftStartOfSegment[segmentOffset],
 1007|   118k|        &pRightStartOfSegment[segmentOffset], readDirection);
 1008|       |
 1009|       |    /* make a step in tree */
 1010|   118k|    CarryBitToBranchValue(carryBit, treeNode, &branchValue, &branchNode);
 1011|       |
 1012|       |    /* if end of branch reached write out lines and count bits needed for sign,
 1013|       |     * otherwise store node in codeword sideinfo */
 1014|   118k|    if ((branchNode & TEST_BIT_10) ==
  ------------------
  |  |  167|   118k|#define TEST_BIT_10 0x400
  ------------------
  |  Branch (1014:9): [True: 23.2k, False: 95.0k]
  ------------------
 1015|   118k|        TEST_BIT_10) { /* test bit 10 ; if set body complete */
  ------------------
  |  |  167|   118k|#define TEST_BIT_10 0x400
  ------------------
 1016|       |
 1017|       |      /* body completely decoded; branchValue is valid */
 1018|       |      /* set pQuantVol to first (of two or four) quantized spectral coefficients
 1019|       |       */
 1020|  23.2k|      pQuantValBase = aQuantTable[ESCAPE_CODEBOOK]; /* get base address of
  ------------------
  |  |  154|  23.2k|#define ESCAPE_CODEBOOK 11
  ------------------
 1021|       |                                                       quantized values
 1022|       |                                                       belonging to current
 1023|       |                                                       codebook */
 1024|  23.2k|      pQuantVal = pQuantValBase + branchValue; /* set pointer to first valid
 1025|       |                                                  line [of 2 or 4 quantized
 1026|       |                                                  values] */
 1027|       |
 1028|       |      /* make backup from original resultPointer in node storage for state
 1029|       |       * BODY_SIGN_ESC__SIGN */
 1030|  23.2k|      iNode[codewordOffset] = iResultPointer[codewordOffset];
 1031|       |
 1032|       |      /* get position of first line for writing result */
 1033|  23.2k|      iQSC = iResultPointer[codewordOffset];
 1034|       |
 1035|       |      /* codeword decoding result is written out here: Write out 2 or 4
 1036|       |       * quantized spectral values with probably */
 1037|       |      /* wrong sign and count number of values which are different from zero for
 1038|       |       * sign bit decoding [which happens in next state] */
 1039|  23.2k|      cntSign = 0;
 1040|       |
 1041|  69.6k|      for (dimCntr = DIMENSION_OF_ESCAPE_CODEBOOK; dimCntr != 0; dimCntr--) {
  ------------------
  |  |  153|  23.2k|#define DIMENSION_OF_ESCAPE_CODEBOOK 2 /* for cb >= 11 is dimension 2 */
  ------------------
  |  Branch (1041:52): [True: 46.4k, False: 23.2k]
  ------------------
 1042|  46.4k|        pResultBase[iQSC++] =
 1043|  46.4k|            (FIXP_DBL)*pQuantVal; /* write quant. spec. coef. into spectrum */
 1044|  46.4k|        if (*pQuantVal++ != 0) {
  ------------------
  |  Branch (1044:13): [True: 15.8k, False: 30.6k]
  ------------------
 1045|  15.8k|          cntSign += 1;
 1046|  15.8k|        }
 1047|  46.4k|      }
 1048|       |
 1049|  23.2k|      if (cntSign == 0) {
  ------------------
  |  Branch (1049:11): [True: 14.8k, False: 8.40k]
  ------------------
 1050|  14.8k|        ClearBitFromBitfield(
 1051|  14.8k|            &(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1052|  14.8k|            pCodewordBitfield); /* clear a bit in bitfield and switch off
 1053|       |                                   statemachine */
 1054|       |        /* codeword decoded */
 1055|  14.8k|      } else {
 1056|       |        /* write sign count result into codewordsideinfo of current codeword */
 1057|  8.40k|        pCntSign[codewordOffset] = cntSign;
 1058|  8.40k|        pSta[codewordOffset] = BODY_SIGN_ESC__SIGN; /* change state */
  ------------------
  |  |  123|  8.40k|  5 /*              X         X      X [stop if no escape sequence]         */
  ------------------
 1059|  8.40k|        pHcr->nonPcwSideinfo.pState =
 1060|  8.40k|            aStateConstant2State[pSta[codewordOffset]]; /* get state from
 1061|       |                                                           separate array of
 1062|       |                                                           cw-sideinfo */
 1063|  8.40k|      }
 1064|  23.2k|      pRemainingBitsInSegment[segmentOffset] -= 1; /* the last reinitialzation
 1065|       |                                                      of for loop counter (see
 1066|       |                                                      above) is done here */
 1067|  23.2k|      break; /* end of branch in tree reached  i.e. a whole nonPCW-Body is
 1068|       |                decoded */
 1069|  95.0k|    } else { /* body is not decoded completely: */
 1070|       |      /* update treeNode for further step in decoding tree and store updated
 1071|       |       * treeNode because maybe no more bits left in segment */
 1072|  95.0k|      treeNode = *(pCurrentTree + branchValue);
 1073|  95.0k|      iNode[codewordOffset] = treeNode;
 1074|  95.0k|    }
 1075|   118k|  }
 1076|       |
 1077|  26.1k|  if (pRemainingBitsInSegment[segmentOffset] <= 0) {
  ------------------
  |  Branch (1077:7): [True: 4.08k, False: 22.0k]
  ------------------
 1078|  4.08k|    ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1079|  4.08k|                         pSegmentBitfield); /* clear a bit in bitfield and
 1080|       |                                               switch off statemachine */
 1081|       |
 1082|  4.08k|    if (pRemainingBitsInSegment[segmentOffset] < 0) {
  ------------------
  |  Branch (1082:9): [True: 559, False: 3.52k]
  ------------------
 1083|    559|      pHcr->decInOut.errorLog |= STATE_ERROR_BODY_SIGN_ESC__BODY;
  ------------------
  |  |  305|    559|  0x00001000  //  12   no    NonPCW-Dec  State machine returned with error
  ------------------
 1084|    559|      return BODY_SIGN_ESC__BODY;
  ------------------
  |  |  121|    559|  4 /*   X          X         X      X [stop if no sign]                    */
  ------------------
 1085|    559|    }
 1086|  4.08k|  }
 1087|       |
 1088|  25.5k|  return STOP_THIS_STATE;
  ------------------
  |  |  113|  25.5k|  0 /*                                                                      */
  ------------------
 1089|  26.1k|}
_Z29Hcr_State_BODY_SIGN_ESC__SIGNP13FDK_BITSTREAMPv:
 1120|  8.93k|UINT Hcr_State_BODY_SIGN_ESC__SIGN(HANDLE_FDK_BITSTREAM bs, void *ptr) {
 1121|  8.93k|  H_HCR_INFO pHcr = (H_HCR_INFO)ptr;
 1122|  8.93k|  SCHAR *pRemainingBitsInSegment;
 1123|  8.93k|  INT *pLeftStartOfSegment;
 1124|  8.93k|  INT *pRightStartOfSegment;
 1125|  8.93k|  UCHAR readDirection;
 1126|  8.93k|  UINT *pSegmentBitfield;
 1127|  8.93k|  UINT *pCodewordBitfield;
 1128|  8.93k|  UINT segmentOffset;
 1129|       |
 1130|  8.93k|  UINT *iNode;
 1131|  8.93k|  UCHAR *pCntSign;
 1132|  8.93k|  FIXP_DBL *pResultBase;
 1133|  8.93k|  USHORT *iResultPointer;
 1134|  8.93k|  UINT *pEscapeSequenceInfo;
 1135|  8.93k|  UINT codewordOffset;
 1136|       |
 1137|  8.93k|  UINT iQSC;
 1138|  8.93k|  UCHAR cntSign;
 1139|  8.93k|  UINT flagA;
 1140|  8.93k|  UINT flagB;
 1141|  8.93k|  UINT flags;
 1142|  8.93k|  UCHAR carryBit;
 1143|  8.93k|  SCHAR *pSta;
 1144|       |
 1145|  8.93k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
 1146|  8.93k|  pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
 1147|  8.93k|  pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
 1148|  8.93k|  readDirection = pHcr->segmentInfo.readDirection;
 1149|  8.93k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
 1150|  8.93k|  pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
 1151|  8.93k|  segmentOffset = pHcr->segmentInfo.segmentOffset;
 1152|       |
 1153|  8.93k|  iNode = pHcr->nonPcwSideinfo.iNode;
 1154|  8.93k|  pCntSign = pHcr->nonPcwSideinfo.pCntSign;
 1155|  8.93k|  pResultBase = pHcr->nonPcwSideinfo.pResultBase;
 1156|  8.93k|  iResultPointer = pHcr->nonPcwSideinfo.iResultPointer;
 1157|  8.93k|  pEscapeSequenceInfo = pHcr->nonPcwSideinfo.pEscapeSequenceInfo;
 1158|  8.93k|  codewordOffset = pHcr->nonPcwSideinfo.codewordOffset;
 1159|  8.93k|  pSta = pHcr->nonPcwSideinfo.pSta;
 1160|       |
 1161|  8.93k|  iQSC = iResultPointer[codewordOffset];
 1162|  8.93k|  cntSign = pCntSign[codewordOffset];
 1163|       |
 1164|       |  /* loop for sign bit decoding */
 1165|  16.3k|  for (; pRemainingBitsInSegment[segmentOffset] > 0;
  ------------------
  |  Branch (1165:10): [True: 15.7k, False: 566]
  ------------------
 1166|  15.7k|       pRemainingBitsInSegment[segmentOffset] -= 1) {
 1167|  15.7k|    carryBit = HcrGetABitFromBitstream(
 1168|  15.7k|        bs, pHcr->decInOut.bitstreamAnchor, &pLeftStartOfSegment[segmentOffset],
 1169|  15.7k|        &pRightStartOfSegment[segmentOffset], readDirection);
 1170|       |
 1171|       |    /* decrement sign counter because one sign bit has been read */
 1172|  15.7k|    cntSign -= 1;
 1173|  15.7k|    pCntSign[codewordOffset] = cntSign;
 1174|       |
 1175|       |    /* get a quantized spectral value (which was decoded in previous state)
 1176|       |     * which is not zero. [This value will get a sign] */
 1177|  16.3k|    while (pResultBase[iQSC] == (FIXP_DBL)0) {
  ------------------
  |  Branch (1177:12): [True: 592, False: 15.7k]
  ------------------
 1178|    592|      if (++iQSC >= 1024) {
  ------------------
  |  Branch (1178:11): [True: 0, False: 592]
  ------------------
 1179|      0|        return BODY_SIGN_ESC__SIGN;
  ------------------
  |  |  123|      0|  5 /*              X         X      X [stop if no escape sequence]         */
  ------------------
 1180|      0|      }
 1181|    592|    }
 1182|  15.7k|    iResultPointer[codewordOffset] = iQSC;
 1183|       |
 1184|       |    /* put negative sign together with quantized spectral value; if carryBit is
 1185|       |     * zero, the sign is ok already; no write operation necessary in this case
 1186|       |     */
 1187|  15.7k|    if (carryBit != 0) {
  ------------------
  |  Branch (1187:9): [True: 5.81k, False: 9.95k]
  ------------------
 1188|  5.81k|      pResultBase[iQSC] = -pResultBase[iQSC]; /* carryBit = 1 --> minus */
 1189|  5.81k|    }
 1190|  15.7k|    iQSC++; /* update index to next (maybe valid) value */
 1191|  15.7k|    iResultPointer[codewordOffset] = iQSC;
 1192|       |
 1193|  15.7k|    if (cntSign == 0) {
  ------------------
  |  Branch (1193:9): [True: 8.36k, False: 7.40k]
  ------------------
 1194|       |      /* all sign bits are decoded now */
 1195|  8.36k|      pRemainingBitsInSegment[segmentOffset] -= 1; /* last reinitialzation of
 1196|       |                                                      for loop counter (see
 1197|       |                                                      above) is done here */
 1198|       |
 1199|       |      /* check decoded values if codeword is decoded: Check if one or two escape
 1200|       |       * sequences 16 follow */
 1201|       |
 1202|       |      /* step 0 */
 1203|       |      /* restore pointer to first decoded quantized value [ = original
 1204|       |       * pResultPointr] from index iNode prepared in State_BODY_SIGN_ESC__BODY
 1205|       |       */
 1206|  8.36k|      iQSC = iNode[codewordOffset];
 1207|       |
 1208|       |      /* step 1 */
 1209|       |      /* test first value if escape sequence follows */
 1210|  8.36k|      flagA = 0; /* for first possible escape sequence */
 1211|  8.36k|      if (fixp_abs(pResultBase[iQSC++]) == (FIXP_DBL)ESCAPE_VALUE) {
  ------------------
  |  |  305|  8.36k|#define fixp_abs(x) fAbs(x)
  ------------------
                    if (fixp_abs(pResultBase[iQSC++]) == (FIXP_DBL)ESCAPE_VALUE) {
  ------------------
  |  |  136|  8.36k|#define ESCAPE_VALUE 16
  ------------------
  |  Branch (1211:11): [True: 1.76k, False: 6.60k]
  ------------------
 1212|  1.76k|        flagA = 1;
 1213|  1.76k|      }
 1214|       |
 1215|       |      /* step 2 */
 1216|       |      /* test second value if escape sequence follows */
 1217|  8.36k|      flagB = 0; /* for second possible escape sequence */
 1218|  8.36k|      if (fixp_abs(pResultBase[iQSC]) == (FIXP_DBL)ESCAPE_VALUE) {
  ------------------
  |  |  305|  8.36k|#define fixp_abs(x) fAbs(x)
  ------------------
                    if (fixp_abs(pResultBase[iQSC]) == (FIXP_DBL)ESCAPE_VALUE) {
  ------------------
  |  |  136|  8.36k|#define ESCAPE_VALUE 16
  ------------------
  |  Branch (1218:11): [True: 1.85k, False: 6.51k]
  ------------------
 1219|  1.85k|        flagB = 1;
 1220|  1.85k|      }
 1221|       |
 1222|       |      /* step 3 */
 1223|       |      /* evaluate flag result and go on if necessary */
 1224|  8.36k|      if (!flagA && !flagB) {
  ------------------
  |  Branch (1224:11): [True: 6.60k, False: 1.76k]
  |  Branch (1224:21): [True: 5.80k, False: 801]
  ------------------
 1225|  5.80k|        ClearBitFromBitfield(
 1226|  5.80k|            &(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1227|  5.80k|            pCodewordBitfield); /* clear a bit in bitfield and switch off
 1228|       |                                   statemachine */
 1229|  5.80k|      } else {
 1230|       |        /* at least one of two lines is 16 */
 1231|       |        /* store both flags at correct positions in non PCW codeword sideinfo
 1232|       |         * pEscapeSequenceInfo[codewordOffset] */
 1233|  2.56k|        flags = flagA << POSITION_OF_FLAG_A;
  ------------------
  |  |  137|  2.56k|#define POSITION_OF_FLAG_A 21
  ------------------
 1234|  2.56k|        flags |= (flagB << POSITION_OF_FLAG_B);
  ------------------
  |  |  138|  2.56k|#define POSITION_OF_FLAG_B 20
  ------------------
 1235|  2.56k|        pEscapeSequenceInfo[codewordOffset] = flags;
 1236|       |
 1237|       |        /* set next state */
 1238|  2.56k|        pSta[codewordOffset] = BODY_SIGN_ESC__ESC_PREFIX;
  ------------------
  |  |  125|  2.56k|  6 /*              X         X                                             */
  ------------------
 1239|  2.56k|        pHcr->nonPcwSideinfo.pState =
 1240|  2.56k|            aStateConstant2State[pSta[codewordOffset]]; /* get state from
 1241|       |                                                           separate array of
 1242|       |                                                           cw-sideinfo */
 1243|       |
 1244|       |        /* set result pointer to the first line of the two decoded lines */
 1245|  2.56k|        iResultPointer[codewordOffset] = iNode[codewordOffset];
 1246|       |
 1247|  2.56k|        if (!flagA && flagB) {
  ------------------
  |  Branch (1247:13): [True: 801, False: 1.76k]
  |  Branch (1247:23): [True: 801, False: 0]
  ------------------
 1248|       |          /* update pResultPointr ==> state Stat_BODY_SIGN_ESC__ESC_WORD writes
 1249|       |           * to correct position. Second value is the one and only escape value
 1250|       |           */
 1251|    801|          iQSC = iResultPointer[codewordOffset];
 1252|    801|          iQSC++;
 1253|    801|          iResultPointer[codewordOffset] = iQSC;
 1254|    801|        }
 1255|       |
 1256|  2.56k|      }      /* at least one of two lines is 16 */
 1257|  8.36k|      break; /* nonPCW-Body at cb 11 and according sign bits are decoded */
 1258|       |
 1259|  8.36k|    } /* if ( cntSign == 0 ) */
 1260|  15.7k|  }   /* loop over remaining Bits in segment */
 1261|       |
 1262|  8.93k|  if (pRemainingBitsInSegment[segmentOffset] <= 0) {
  ------------------
  |  Branch (1262:7): [True: 981, False: 7.95k]
  ------------------
 1263|    981|    ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1264|    981|                         pSegmentBitfield); /* clear a bit in bitfield and
 1265|       |                                               switch off statemachine */
 1266|       |
 1267|    981|    if (pRemainingBitsInSegment[segmentOffset] < 0) {
  ------------------
  |  Branch (1267:9): [True: 6, False: 975]
  ------------------
 1268|      6|      pHcr->decInOut.errorLog |= STATE_ERROR_BODY_SIGN_ESC__SIGN;
  ------------------
  |  |  307|      6|  0x00000800  //  11   no    NonPCW-Dec  State machine returned with error
  ------------------
 1269|      6|      return BODY_SIGN_ESC__SIGN;
  ------------------
  |  |  123|      6|  5 /*              X         X      X [stop if no escape sequence]         */
  ------------------
 1270|      6|    }
 1271|    981|  }
 1272|  8.92k|  return STOP_THIS_STATE;
  ------------------
  |  |  113|  8.92k|  0 /*                                                                      */
  ------------------
 1273|  8.93k|}
_Z35Hcr_State_BODY_SIGN_ESC__ESC_PREFIXP13FDK_BITSTREAMPv:
 1291|  3.93k|UINT Hcr_State_BODY_SIGN_ESC__ESC_PREFIX(HANDLE_FDK_BITSTREAM bs, void *ptr) {
 1292|  3.93k|  H_HCR_INFO pHcr = (H_HCR_INFO)ptr;
 1293|  3.93k|  SCHAR *pRemainingBitsInSegment;
 1294|  3.93k|  INT *pLeftStartOfSegment;
 1295|  3.93k|  INT *pRightStartOfSegment;
 1296|  3.93k|  UCHAR readDirection;
 1297|  3.93k|  UINT *pSegmentBitfield;
 1298|  3.93k|  UINT segmentOffset;
 1299|  3.93k|  UINT *pEscapeSequenceInfo;
 1300|  3.93k|  UINT codewordOffset;
 1301|  3.93k|  UCHAR carryBit;
 1302|  3.93k|  UINT escapePrefixUp;
 1303|  3.93k|  SCHAR *pSta;
 1304|       |
 1305|  3.93k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
 1306|  3.93k|  pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
 1307|  3.93k|  pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
 1308|  3.93k|  readDirection = pHcr->segmentInfo.readDirection;
 1309|  3.93k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
 1310|  3.93k|  segmentOffset = pHcr->segmentInfo.segmentOffset;
 1311|  3.93k|  pEscapeSequenceInfo = pHcr->nonPcwSideinfo.pEscapeSequenceInfo;
 1312|  3.93k|  codewordOffset = pHcr->nonPcwSideinfo.codewordOffset;
 1313|  3.93k|  pSta = pHcr->nonPcwSideinfo.pSta;
 1314|       |
 1315|  3.93k|  escapePrefixUp =
 1316|  3.93k|      (pEscapeSequenceInfo[codewordOffset] & MASK_ESCAPE_PREFIX_UP) >>
  ------------------
  |  |  156|  3.93k|#define MASK_ESCAPE_PREFIX_UP 0x000F0000
  ------------------
 1317|  3.93k|      LSB_ESCAPE_PREFIX_UP;
  ------------------
  |  |  157|  3.93k|#define LSB_ESCAPE_PREFIX_UP 16
  ------------------
 1318|       |
 1319|       |  /* decode escape prefix */
 1320|  6.51k|  for (; pRemainingBitsInSegment[segmentOffset] > 0;
  ------------------
  |  Branch (1320:10): [True: 6.16k, False: 346]
  ------------------
 1321|  6.16k|       pRemainingBitsInSegment[segmentOffset] -= 1) {
 1322|  6.16k|    carryBit = HcrGetABitFromBitstream(
 1323|  6.16k|        bs, pHcr->decInOut.bitstreamAnchor, &pLeftStartOfSegment[segmentOffset],
 1324|  6.16k|        &pRightStartOfSegment[segmentOffset], readDirection);
 1325|       |
 1326|       |    /* count ones and store sum in escapePrefixUp */
 1327|  6.16k|    if (carryBit == 1) {
  ------------------
  |  Branch (1327:9): [True: 2.59k, False: 3.57k]
  ------------------
 1328|  2.59k|      escapePrefixUp += 1; /* update conter for ones */
 1329|  2.59k|      if (escapePrefixUp > 8) {
  ------------------
  |  Branch (1329:11): [True: 15, False: 2.58k]
  ------------------
 1330|     15|        pHcr->decInOut.errorLog |= STATE_ERROR_BODY_SIGN_ESC__ESC_PREFIX;
  ------------------
  |  |  309|     15|  0x00000400  //  10   no    NonPCW-Dec  State machine returned with error
  ------------------
 1331|     15|        return BODY_SIGN_ESC__ESC_PREFIX;
  ------------------
  |  |  125|     15|  6 /*              X         X                                             */
  ------------------
 1332|     15|      }
 1333|       |
 1334|       |      /* store updated counter in sideinfo of current codeword */
 1335|  2.58k|      pEscapeSequenceInfo[codewordOffset] &=
 1336|  2.58k|          ~MASK_ESCAPE_PREFIX_UP;              /* delete old escapePrefixUp */
  ------------------
  |  |  156|  2.58k|#define MASK_ESCAPE_PREFIX_UP 0x000F0000
  ------------------
 1337|  2.58k|      escapePrefixUp <<= LSB_ESCAPE_PREFIX_UP; /* shift to correct position */
  ------------------
  |  |  157|  2.58k|#define LSB_ESCAPE_PREFIX_UP 16
  ------------------
 1338|  2.58k|      pEscapeSequenceInfo[codewordOffset] |=
 1339|  2.58k|          escapePrefixUp;                      /* insert new escapePrefixUp */
 1340|  2.58k|      escapePrefixUp >>= LSB_ESCAPE_PREFIX_UP; /* shift back down */
  ------------------
  |  |  157|  2.58k|#define LSB_ESCAPE_PREFIX_UP 16
  ------------------
 1341|  3.57k|    } else {                                   /* separator [zero] reached */
 1342|  3.57k|      pRemainingBitsInSegment[segmentOffset] -= 1; /* last reinitialzation of
 1343|       |                                                      for loop counter (see
 1344|       |                                                      above) is done here */
 1345|  3.57k|      escapePrefixUp +=
 1346|  3.57k|          4; /* if escape_separator '0' appears, add 4 and ==> break */
 1347|       |
 1348|       |      /* store escapePrefixUp in pEscapeSequenceInfo[codewordOffset] at bit
 1349|       |       * position escapePrefixUp */
 1350|  3.57k|      pEscapeSequenceInfo[codewordOffset] &=
 1351|  3.57k|          ~MASK_ESCAPE_PREFIX_UP;              /* delete old escapePrefixUp */
  ------------------
  |  |  156|  3.57k|#define MASK_ESCAPE_PREFIX_UP 0x000F0000
  ------------------
 1352|  3.57k|      escapePrefixUp <<= LSB_ESCAPE_PREFIX_UP; /* shift to correct position */
  ------------------
  |  |  157|  3.57k|#define LSB_ESCAPE_PREFIX_UP 16
  ------------------
 1353|  3.57k|      pEscapeSequenceInfo[codewordOffset] |=
 1354|  3.57k|          escapePrefixUp;                      /* insert new escapePrefixUp */
 1355|  3.57k|      escapePrefixUp >>= LSB_ESCAPE_PREFIX_UP; /* shift back down */
  ------------------
  |  |  157|  3.57k|#define LSB_ESCAPE_PREFIX_UP 16
  ------------------
 1356|       |
 1357|       |      /* store escapePrefixUp in pEscapeSequenceInfo[codewordOffset] at bit
 1358|       |       * position escapePrefixDown */
 1359|  3.57k|      pEscapeSequenceInfo[codewordOffset] &=
 1360|  3.57k|          ~MASK_ESCAPE_PREFIX_DOWN; /* delete old escapePrefixDown */
  ------------------
  |  |  159|  3.57k|#define MASK_ESCAPE_PREFIX_DOWN 0x0000F000
  ------------------
 1361|  3.57k|      escapePrefixUp <<= LSB_ESCAPE_PREFIX_DOWN; /* shift to correct position */
  ------------------
  |  |  160|  3.57k|#define LSB_ESCAPE_PREFIX_DOWN 12
  ------------------
 1362|  3.57k|      pEscapeSequenceInfo[codewordOffset] |=
 1363|  3.57k|          escapePrefixUp; /* insert new escapePrefixDown */
 1364|       |
 1365|  3.57k|      pSta[codewordOffset] = BODY_SIGN_ESC__ESC_WORD; /* set next state */
  ------------------
  |  |  127|  3.57k|  7 /*              X         X      X [stop if abs(second qsc) != 16]      */
  ------------------
 1366|  3.57k|      pHcr->nonPcwSideinfo.pState =
 1367|  3.57k|          aStateConstant2State[pSta[codewordOffset]]; /* get state from separate
 1368|       |                                                         array of cw-sideinfo */
 1369|  3.57k|      break;
 1370|  3.57k|    }
 1371|  6.16k|  }
 1372|       |
 1373|  3.91k|  if (pRemainingBitsInSegment[segmentOffset] <= 0) {
  ------------------
  |  Branch (1373:7): [True: 719, False: 3.19k]
  ------------------
 1374|    719|    ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1375|    719|                         pSegmentBitfield); /* clear a bit in bitfield and
 1376|       |                                               switch off statemachine */
 1377|       |
 1378|    719|    if (pRemainingBitsInSegment[segmentOffset] < 0) {
  ------------------
  |  Branch (1378:9): [True: 2, False: 717]
  ------------------
 1379|      2|      pHcr->decInOut.errorLog |= STATE_ERROR_BODY_SIGN_ESC__ESC_PREFIX;
  ------------------
  |  |  309|      2|  0x00000400  //  10   no    NonPCW-Dec  State machine returned with error
  ------------------
 1380|      2|      return BODY_SIGN_ESC__ESC_PREFIX;
  ------------------
  |  |  125|      2|  6 /*              X         X                                             */
  ------------------
 1381|      2|    }
 1382|    719|  }
 1383|       |
 1384|  3.91k|  return STOP_THIS_STATE;
  ------------------
  |  |  113|  3.91k|  0 /*                                                                      */
  ------------------
 1385|  3.91k|}
_Z33Hcr_State_BODY_SIGN_ESC__ESC_WORDP13FDK_BITSTREAMPv:
 1400|  4.67k|UINT Hcr_State_BODY_SIGN_ESC__ESC_WORD(HANDLE_FDK_BITSTREAM bs, void *ptr) {
 1401|  4.67k|  H_HCR_INFO pHcr = (H_HCR_INFO)ptr;
 1402|  4.67k|  SCHAR *pRemainingBitsInSegment;
 1403|  4.67k|  INT *pLeftStartOfSegment;
 1404|  4.67k|  INT *pRightStartOfSegment;
 1405|  4.67k|  UCHAR readDirection;
 1406|  4.67k|  UINT *pSegmentBitfield;
 1407|  4.67k|  UINT *pCodewordBitfield;
 1408|  4.67k|  UINT segmentOffset;
 1409|       |
 1410|  4.67k|  FIXP_DBL *pResultBase;
 1411|  4.67k|  USHORT *iResultPointer;
 1412|  4.67k|  UINT *pEscapeSequenceInfo;
 1413|  4.67k|  UINT codewordOffset;
 1414|       |
 1415|  4.67k|  UINT escapeWord;
 1416|  4.67k|  UINT escapePrefixDown;
 1417|  4.67k|  UINT escapePrefixUp;
 1418|  4.67k|  UCHAR carryBit;
 1419|  4.67k|  UINT iQSC;
 1420|  4.67k|  INT sign;
 1421|  4.67k|  UINT flagA;
 1422|  4.67k|  UINT flagB;
 1423|  4.67k|  SCHAR *pSta;
 1424|       |
 1425|  4.67k|  pRemainingBitsInSegment = pHcr->segmentInfo.pRemainingBitsInSegment;
 1426|  4.67k|  pLeftStartOfSegment = pHcr->segmentInfo.pLeftStartOfSegment;
 1427|  4.67k|  pRightStartOfSegment = pHcr->segmentInfo.pRightStartOfSegment;
 1428|  4.67k|  readDirection = pHcr->segmentInfo.readDirection;
 1429|  4.67k|  pSegmentBitfield = pHcr->segmentInfo.pSegmentBitfield;
 1430|  4.67k|  pCodewordBitfield = pHcr->segmentInfo.pCodewordBitfield;
 1431|  4.67k|  segmentOffset = pHcr->segmentInfo.segmentOffset;
 1432|       |
 1433|  4.67k|  pResultBase = pHcr->nonPcwSideinfo.pResultBase;
 1434|  4.67k|  iResultPointer = pHcr->nonPcwSideinfo.iResultPointer;
 1435|  4.67k|  pEscapeSequenceInfo = pHcr->nonPcwSideinfo.pEscapeSequenceInfo;
 1436|  4.67k|  codewordOffset = pHcr->nonPcwSideinfo.codewordOffset;
 1437|  4.67k|  pSta = pHcr->nonPcwSideinfo.pSta;
 1438|       |
 1439|  4.67k|  escapeWord = pEscapeSequenceInfo[codewordOffset] & MASK_ESCAPE_WORD;
  ------------------
  |  |  162|  4.67k|#define MASK_ESCAPE_WORD 0x00000FFF
  ------------------
 1440|  4.67k|  escapePrefixDown =
 1441|  4.67k|      (pEscapeSequenceInfo[codewordOffset] & MASK_ESCAPE_PREFIX_DOWN) >>
  ------------------
  |  |  159|  4.67k|#define MASK_ESCAPE_PREFIX_DOWN 0x0000F000
  ------------------
 1442|  4.67k|      LSB_ESCAPE_PREFIX_DOWN;
  ------------------
  |  |  160|  4.67k|#define LSB_ESCAPE_PREFIX_DOWN 12
  ------------------
 1443|       |
 1444|       |  /* decode escape word */
 1445|  17.5k|  for (; pRemainingBitsInSegment[segmentOffset] > 0;
  ------------------
  |  Branch (1445:10): [True: 16.3k, False: 1.18k]
  ------------------
 1446|  16.3k|       pRemainingBitsInSegment[segmentOffset] -= 1) {
 1447|  16.3k|    carryBit = HcrGetABitFromBitstream(
 1448|  16.3k|        bs, pHcr->decInOut.bitstreamAnchor, &pLeftStartOfSegment[segmentOffset],
 1449|  16.3k|        &pRightStartOfSegment[segmentOffset], readDirection);
 1450|       |
 1451|       |    /* build escape word */
 1452|  16.3k|    escapeWord <<=
 1453|  16.3k|        1; /* left shift previous decoded part of escapeWord by on bit */
 1454|  16.3k|    escapeWord = escapeWord | carryBit; /* assemble escape word by bitwise or */
 1455|       |
 1456|       |    /* decrement counter for length of escape word because one more bit was
 1457|       |     * decoded */
 1458|  16.3k|    escapePrefixDown -= 1;
 1459|       |
 1460|       |    /* store updated escapePrefixDown */
 1461|  16.3k|    pEscapeSequenceInfo[codewordOffset] &=
 1462|  16.3k|        ~MASK_ESCAPE_PREFIX_DOWN; /* delete old escapePrefixDown */
  ------------------
  |  |  159|  16.3k|#define MASK_ESCAPE_PREFIX_DOWN 0x0000F000
  ------------------
 1463|  16.3k|    escapePrefixDown <<= LSB_ESCAPE_PREFIX_DOWN; /* shift to correct position */
  ------------------
  |  |  160|  16.3k|#define LSB_ESCAPE_PREFIX_DOWN 12
  ------------------
 1464|  16.3k|    pEscapeSequenceInfo[codewordOffset] |=
 1465|  16.3k|        escapePrefixDown; /* insert new escapePrefixDown */
 1466|  16.3k|    escapePrefixDown >>= LSB_ESCAPE_PREFIX_DOWN; /* shift back */
  ------------------
  |  |  160|  16.3k|#define LSB_ESCAPE_PREFIX_DOWN 12
  ------------------
 1467|       |
 1468|       |    /* store updated escapeWord */
 1469|  16.3k|    pEscapeSequenceInfo[codewordOffset] &=
 1470|  16.3k|        ~MASK_ESCAPE_WORD; /* delete old escapeWord */
  ------------------
  |  |  162|  16.3k|#define MASK_ESCAPE_WORD 0x00000FFF
  ------------------
 1471|  16.3k|    pEscapeSequenceInfo[codewordOffset] |=
 1472|  16.3k|        escapeWord; /* insert new escapeWord */
 1473|       |
 1474|  16.3k|    if (escapePrefixDown == 0) {
  ------------------
  |  Branch (1474:9): [True: 3.49k, False: 12.8k]
  ------------------
 1475|  3.49k|      pRemainingBitsInSegment[segmentOffset] -= 1; /* last reinitialzation of
 1476|       |                                                      for loop counter (see
 1477|       |                                                      above) is done here */
 1478|       |
 1479|       |      /* escape sequence decoded. Assemble escape-line and replace original line
 1480|       |       */
 1481|       |
 1482|       |      /* step 0 */
 1483|       |      /* derive sign */
 1484|  3.49k|      iQSC = iResultPointer[codewordOffset];
 1485|  3.49k|      sign = (pResultBase[iQSC] >= (FIXP_DBL)0)
  ------------------
  |  Branch (1485:14): [True: 2.14k, False: 1.34k]
  ------------------
 1486|  3.49k|                 ? 1
 1487|  3.49k|                 : -1; /* get sign of escape value 16 */
 1488|       |
 1489|       |      /* step 1 */
 1490|       |      /* get escapePrefixUp */
 1491|  3.49k|      escapePrefixUp =
 1492|  3.49k|          (pEscapeSequenceInfo[codewordOffset] & MASK_ESCAPE_PREFIX_UP) >>
  ------------------
  |  |  156|  3.49k|#define MASK_ESCAPE_PREFIX_UP 0x000F0000
  ------------------
 1493|  3.49k|          LSB_ESCAPE_PREFIX_UP;
  ------------------
  |  |  157|  3.49k|#define LSB_ESCAPE_PREFIX_UP 16
  ------------------
 1494|       |
 1495|       |      /* step 2 */
 1496|       |      /* calculate escape value */
 1497|  3.49k|      pResultBase[iQSC] =
 1498|  3.49k|          (FIXP_DBL)(sign * (((INT)1 << escapePrefixUp) + (INT)escapeWord));
 1499|       |
 1500|       |      /* get both flags from sideinfo (flags are not shifted to the
 1501|       |       * lsb-position) */
 1502|  3.49k|      flagA = pEscapeSequenceInfo[codewordOffset] & MASK_FLAG_A;
  ------------------
  |  |  163|  3.49k|#define MASK_FLAG_A 0x00200000
  ------------------
 1503|  3.49k|      flagB = pEscapeSequenceInfo[codewordOffset] & MASK_FLAG_B;
  ------------------
  |  |  164|  3.49k|#define MASK_FLAG_B 0x00100000
  ------------------
 1504|       |
 1505|       |      /* step 3 */
 1506|       |      /* clear the whole escape sideinfo word */
 1507|  3.49k|      pEscapeSequenceInfo[codewordOffset] = 0;
 1508|       |
 1509|       |      /* change state in dependence of flag flagB */
 1510|  3.49k|      if (flagA != 0) {
  ------------------
  |  Branch (1510:11): [True: 1.70k, False: 1.78k]
  ------------------
 1511|       |        /* first escape sequence decoded; previous decoded 16 has been replaced
 1512|       |         * by valid line */
 1513|       |
 1514|       |        /* clear flagA in sideinfo word because this escape sequence has already
 1515|       |         * beed decoded */
 1516|  1.70k|        pEscapeSequenceInfo[codewordOffset] &= ~MASK_FLAG_A;
  ------------------
  |  |  163|  1.70k|#define MASK_FLAG_A 0x00200000
  ------------------
 1517|       |
 1518|  1.70k|        if (flagB == 0) {
  ------------------
  |  Branch (1518:13): [True: 677, False: 1.02k]
  ------------------
 1519|    677|          ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1520|    677|                               pCodewordBitfield); /* clear a bit in bitfield
 1521|       |                                                      and switch off
 1522|       |                                                      statemachine */
 1523|  1.02k|        } else {
 1524|       |          /* updated pointer to next and last 16 */
 1525|  1.02k|          iQSC++;
 1526|  1.02k|          iResultPointer[codewordOffset] = iQSC;
 1527|       |
 1528|       |          /* change state */
 1529|  1.02k|          pSta[codewordOffset] = BODY_SIGN_ESC__ESC_PREFIX;
  ------------------
  |  |  125|  1.02k|  6 /*              X         X                                             */
  ------------------
 1530|  1.02k|          pHcr->nonPcwSideinfo.pState =
 1531|  1.02k|              aStateConstant2State[pSta[codewordOffset]]; /* get state from
 1532|       |                                                             separate array of
 1533|       |                                                             cw-sideinfo */
 1534|  1.02k|        }
 1535|  1.78k|      } else {
 1536|  1.78k|        ClearBitFromBitfield(
 1537|  1.78k|            &(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1538|  1.78k|            pCodewordBitfield); /* clear a bit in bitfield and switch off
 1539|       |                                   statemachine */
 1540|  1.78k|      }
 1541|  3.49k|      break;
 1542|  3.49k|    }
 1543|  16.3k|  }
 1544|       |
 1545|  4.67k|  if (pRemainingBitsInSegment[segmentOffset] <= 0) {
  ------------------
  |  Branch (1545:7): [True: 1.35k, False: 3.32k]
  ------------------
 1546|  1.35k|    ClearBitFromBitfield(&(pHcr->nonPcwSideinfo.pState), segmentOffset,
 1547|  1.35k|                         pSegmentBitfield); /* clear a bit in bitfield and
 1548|       |                                               switch off statemachine */
 1549|       |
 1550|  1.35k|    if (pRemainingBitsInSegment[segmentOffset] < 0) {
  ------------------
  |  Branch (1550:9): [True: 9, False: 1.34k]
  ------------------
 1551|      9|      pHcr->decInOut.errorLog |= STATE_ERROR_BODY_SIGN_ESC__ESC_WORD;
  ------------------
  |  |  311|      9|  0x00000200  //   9   no    NonPCW-Dec  State machine returned with error
  ------------------
 1552|      9|      return BODY_SIGN_ESC__ESC_WORD;
  ------------------
  |  |  127|      9|  7 /*              X         X      X [stop if abs(second qsc) != 16]      */
  ------------------
 1553|      9|    }
 1554|  1.35k|  }
 1555|       |
 1556|  4.66k|  return STOP_THIS_STATE;
  ------------------
  |  |  113|  4.66k|  0 /*                                                                      */
  ------------------
 1557|  4.67k|}
aacdec_hcrs.cpp:_ZL19InitSegmentBitfieldPjPaS_PhPt:
  365|  6.27k|                                USHORT *pNumBitValidInLastWord) {
  366|  6.27k|  SHORT i;
  367|  6.27k|  USHORT r;
  368|  6.27k|  UCHAR bitfieldWord;
  369|  6.27k|  UINT tempWord;
  370|  6.27k|  USHORT numValidSegment;
  371|       |
  372|  6.27k|  *pNumWordForBitfield =
  373|  6.27k|      (*pNumSegment == 0)
  ------------------
  |  Branch (373:7): [True: 337, False: 5.94k]
  ------------------
  374|  6.27k|          ? 0
  375|  6.27k|          : ((*pNumSegment - 1) >> THIRTYTWO_LOG_DIV_TWO_LOG) + 1;
  ------------------
  |  |  149|  5.94k|#define THIRTYTWO_LOG_DIV_TWO_LOG 5
  ------------------
  376|       |
  377|       |  /* loop over all words, which are completely used or only partial */
  378|       |  /* bit in pSegmentBitfield is zero if segment is empty; bit in
  379|       |   * pSegmentBitfield is one if segment is not empty */
  380|  6.27k|  numValidSegment = 0;
  381|  6.27k|  *pNumBitValidInLastWord = *pNumSegment;
  382|       |
  383|       |  /* loop over words */
  384|  12.6k|  for (bitfieldWord = 0; bitfieldWord < *pNumWordForBitfield - 1;
  ------------------
  |  Branch (384:26): [True: 6.38k, False: 6.27k]
  ------------------
  385|  6.38k|       bitfieldWord++) {
  386|  6.38k|    tempWord = 0xFFFFFFFF; /* set ones */
  387|  6.38k|    r = bitfieldWord << THIRTYTWO_LOG_DIV_TWO_LOG;
  ------------------
  |  |  149|  6.38k|#define THIRTYTWO_LOG_DIV_TWO_LOG 5
  ------------------
  388|   210k|    for (i = 0; i < NUMBER_OF_BIT_IN_WORD; i++) {
  ------------------
  |  |  146|   210k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  |  Branch (388:17): [True: 204k, False: 6.38k]
  ------------------
  389|   204k|      if (pRemainingBitsInSegment[r + i] == 0) {
  ------------------
  |  Branch (389:11): [True: 21.6k, False: 182k]
  ------------------
  390|  21.6k|        tempWord = tempWord & ~(1 << (NUMBER_OF_BIT_IN_WORD - 1 -
  ------------------
  |  |  146|  21.6k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  391|  21.6k|                                      i)); /* set a zero at bit number
  392|       |                                              (NUMBER_OF_BIT_IN_WORD-1-i) in
  393|       |                                              tempWord */
  394|   182k|      } else {
  395|   182k|        numValidSegment += 1; /* count segments which are not empty */
  396|   182k|      }
  397|   204k|    }
  398|  6.38k|    pSegmentBitfield[bitfieldWord] = tempWord;        /* store result */
  399|  6.38k|    *pNumBitValidInLastWord -= NUMBER_OF_BIT_IN_WORD; /* calculate number of
  ------------------
  |  |  146|  6.38k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  400|       |                                                         zeros on LSB side in
  401|       |                                                         the last word */
  402|  6.38k|  }
  403|       |
  404|       |  /* calculate last word: prepare special tempWord */
  405|  6.27k|  tempWord = 0xFFFFFFFF;
  406|   120k|  for (i = 0; i < (NUMBER_OF_BIT_IN_WORD - *pNumBitValidInLastWord); i++) {
  ------------------
  |  |  146|   120k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  |  Branch (406:15): [True: 114k, False: 6.27k]
  ------------------
  407|   114k|    tempWord = tempWord & ~(1 << i); /* clear bit i in tempWord */
  408|   114k|  }
  409|       |
  410|       |  /* calculate last word */
  411|  6.27k|  r = bitfieldWord << THIRTYTWO_LOG_DIV_TWO_LOG;
  ------------------
  |  |  149|  6.27k|#define THIRTYTWO_LOG_DIV_TWO_LOG 5
  ------------------
  412|  93.1k|  for (i = 0; i < *pNumBitValidInLastWord; i++) {
  ------------------
  |  Branch (412:15): [True: 86.8k, False: 6.27k]
  ------------------
  413|  86.8k|    if (pRemainingBitsInSegment[r + i] == 0) {
  ------------------
  |  Branch (413:9): [True: 8.15k, False: 78.7k]
  ------------------
  414|  8.15k|      tempWord = tempWord & ~(1 << (NUMBER_OF_BIT_IN_WORD - 1 -
  ------------------
  |  |  146|  8.15k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  415|  8.15k|                                    i)); /* set a zero at bit number
  416|       |                                            (NUMBER_OF_BIT_IN_WORD-1-i) in
  417|       |                                            tempWord */
  418|  78.7k|    } else {
  419|  78.7k|      numValidSegment += 1; /* count segments which are not empty */
  420|  78.7k|    }
  421|  86.8k|  }
  422|  6.27k|  pSegmentBitfield[bitfieldWord] = tempWord; /* store result */
  423|       |
  424|  6.27k|  return numValidSegment;
  425|  6.27k|}
aacdec_hcrs.cpp:_ZL38InitNonPCWSideInformationForCurrentSetP10CErHcrInfo:
  431|  33.2k|static void InitNonPCWSideInformationForCurrentSet(H_HCR_INFO pHcr) {
  432|  33.2k|  USHORT i, k;
  433|  33.2k|  UCHAR codebookDim;
  434|  33.2k|  UINT startNode;
  435|       |
  436|  33.2k|  UCHAR *pCodebook = pHcr->nonPcwSideinfo.pCodebook;
  437|  33.2k|  UINT *iNode = pHcr->nonPcwSideinfo.iNode;
  438|  33.2k|  UCHAR *pCntSign = pHcr->nonPcwSideinfo.pCntSign;
  439|  33.2k|  USHORT *iResultPointer = pHcr->nonPcwSideinfo.iResultPointer;
  440|  33.2k|  UINT *pEscapeSequenceInfo = pHcr->nonPcwSideinfo.pEscapeSequenceInfo;
  441|  33.2k|  SCHAR *pSta = pHcr->nonPcwSideinfo.pSta;
  442|  33.2k|  USHORT *pNumExtendedSortedCodewordInSection =
  443|  33.2k|      pHcr->sectionInfo.pNumExtendedSortedCodewordInSection;
  444|  33.2k|  int numExtendedSortedCodewordInSectionIdx =
  445|  33.2k|      pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx;
  446|  33.2k|  UCHAR *pExtendedSortedCodebook = pHcr->sectionInfo.pExtendedSortedCodebook;
  447|  33.2k|  int extendedSortedCodebookIdx = pHcr->sectionInfo.extendedSortedCodebookIdx;
  448|  33.2k|  USHORT *pNumExtendedSortedSectionsInSets =
  449|  33.2k|      pHcr->sectionInfo.pNumExtendedSortedSectionsInSets;
  450|  33.2k|  int numExtendedSortedSectionsInSetsIdx =
  451|  33.2k|      pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx;
  452|  33.2k|  int quantizedSpectralCoefficientsIdx =
  453|  33.2k|      pHcr->decInOut.quantizedSpectralCoefficientsIdx;
  454|  33.2k|  const UCHAR *pCbDimension = aDimCb;
  455|  33.2k|  int iterationCounter = 0;
  456|       |
  457|       |  /* loop over number of extended sorted sections in the current set so all
  458|       |   * codewords sideinfo variables within this set can be prepared for decoding
  459|       |   */
  460|  33.2k|  for (i = pNumExtendedSortedSectionsInSets[numExtendedSortedSectionsInSetsIdx];
  461|  74.4k|       i != 0; i--) {
  ------------------
  |  Branch (461:8): [True: 41.5k, False: 32.8k]
  ------------------
  462|  41.5k|    codebookDim =
  463|  41.5k|        pCbDimension[pExtendedSortedCodebook[extendedSortedCodebookIdx]];
  464|  41.5k|    startNode = *aHuffTable[pExtendedSortedCodebook[extendedSortedCodebookIdx]];
  465|       |
  466|  41.5k|    for (k = pNumExtendedSortedCodewordInSection
  467|  41.5k|             [numExtendedSortedCodewordInSectionIdx];
  468|   486k|         k != 0; k--) {
  ------------------
  |  Branch (468:10): [True: 445k, False: 41.1k]
  ------------------
  469|   445k|      iterationCounter++;
  470|   445k|      if (iterationCounter > (1024 >> 2)) {
  ------------------
  |  Branch (470:11): [True: 7, False: 445k]
  ------------------
  471|      7|        return;
  472|      7|      }
  473|   445k|      *pSta++ = aCodebook2StartInt
  474|   445k|          [pExtendedSortedCodebook[extendedSortedCodebookIdx]];
  475|   445k|      *pCodebook++ = pExtendedSortedCodebook[extendedSortedCodebookIdx];
  476|   445k|      *iNode++ = startNode;
  477|   445k|      *pCntSign++ = 0;
  478|   445k|      *iResultPointer++ = quantizedSpectralCoefficientsIdx;
  479|   445k|      *pEscapeSequenceInfo++ = 0;
  480|   445k|      quantizedSpectralCoefficientsIdx +=
  481|   445k|          codebookDim; /* update pointer by codebookDim --> point to next
  482|       |                          starting value for writing out */
  483|   445k|      if (quantizedSpectralCoefficientsIdx >= 1024) {
  ------------------
  |  Branch (483:11): [True: 377, False: 444k]
  ------------------
  484|    377|        return;
  485|    377|      }
  486|   445k|    }
  487|  41.1k|    numExtendedSortedCodewordInSectionIdx++; /* inc ptr for next ext sort sec in
  488|       |                                                current set */
  489|  41.1k|    extendedSortedCodebookIdx++; /* inc ptr for next ext sort sec in current set
  490|       |                                  */
  491|  41.1k|    if (numExtendedSortedCodewordInSectionIdx >= (MAX_SFB_HCR + MAX_HCR_SETS) ||
  ------------------
  |  |  120|  41.1k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  41.1k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (numExtendedSortedCodewordInSectionIdx >= (MAX_SFB_HCR + MAX_HCR_SETS) ||
  ------------------
  |  |  134|  41.1k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (491:9): [True: 0, False: 41.1k]
  ------------------
  492|  41.1k|        extendedSortedCodebookIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  120|  41.1k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  41.1k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                      extendedSortedCodebookIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  134|  41.1k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (492:9): [True: 0, False: 41.1k]
  ------------------
  493|      0|      return;
  494|      0|    }
  495|  41.1k|  }
  496|  32.8k|  numExtendedSortedSectionsInSetsIdx++; /* inc ptr for next set of non-PCWs */
  497|  32.8k|  if (numExtendedSortedCodewordInSectionIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  120|  32.8k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|  32.8k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                if (numExtendedSortedCodewordInSectionIdx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  134|  32.8k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (497:7): [True: 0, False: 32.8k]
  ------------------
  498|      0|    return;
  499|      0|  }
  500|       |
  501|       |  /* Write back indexes */
  502|  32.8k|  pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx =
  503|  32.8k|      numExtendedSortedCodewordInSectionIdx;
  504|  32.8k|  pHcr->sectionInfo.extendedSortedCodebookIdx = extendedSortedCodebookIdx;
  505|  32.8k|  pHcr->sectionInfo.numExtendedSortedSectionsInSetsIdx =
  506|  32.8k|      numExtendedSortedSectionsInSetsIdx;
  507|  32.8k|  pHcr->sectionInfo.numExtendedSortedCodewordInSectionIdx =
  508|  32.8k|      numExtendedSortedCodewordInSectionIdx;
  509|  32.8k|  pHcr->decInOut.quantizedSpectralCoefficientsIdx =
  510|  32.8k|      quantizedSpectralCoefficientsIdx;
  511|  32.8k|}
aacdec_hcrs.cpp:_ZL11ModuloValueii:
  521|  3.86M|static INT ModuloValue(INT input, INT bufferlength) {
  522|  3.86M|  if (input > (bufferlength - 1)) {
  ------------------
  |  Branch (522:7): [True: 507k, False: 3.36M]
  ------------------
  523|   507k|    return (input - bufferlength);
  524|   507k|  }
  525|  3.36M|  if (input < 0) {
  ------------------
  |  Branch (525:7): [True: 32.4k, False: 3.32M]
  ------------------
  526|  32.4k|    return (input + bufferlength);
  527|  32.4k|  }
  528|  3.32M|  return input;
  529|  3.36M|}
aacdec_hcrs.cpp:_ZL20ClearBitFromBitfieldPPFjP13FDK_BITSTREAMPvEjPj:
  542|   284k|                                 UINT *pBitfield) {
  543|   284k|  UINT numBitfieldWord;
  544|   284k|  UINT numBitfieldBit;
  545|       |
  546|       |  /* get both values needed for clearing the bit */
  547|   284k|  numBitfieldWord = offset >> THIRTYTWO_LOG_DIV_TWO_LOG; /* int   = wordNr */
  ------------------
  |  |  149|   284k|#define THIRTYTWO_LOG_DIV_TWO_LOG 5
  ------------------
  548|   284k|  numBitfieldBit = offset - (numBitfieldWord
  549|   284k|                             << THIRTYTWO_LOG_DIV_TWO_LOG); /* fract = bitNr  */
  ------------------
  |  |  149|   284k|#define THIRTYTWO_LOG_DIV_TWO_LOG 5
  ------------------
  550|       |
  551|       |  /* clear a bit in bitfield */
  552|   284k|  pBitfield[numBitfieldWord] =
  553|   284k|      pBitfield[numBitfieldWord] &
  554|   284k|      ~(1 << (NUMBER_OF_BIT_IN_WORD - 1 - numBitfieldBit));
  ------------------
  |  |  146|   284k|#define NUMBER_OF_BIT_IN_WORD 32
  ------------------
  555|       |
  556|       |  /* switch off state machine because codeword is decoded and/or because segment
  557|       |   * is empty */
  558|       |  *ptrState = NULL;
  559|   284k|}

_Z14CPns_ResetDataP8CPnsDataP20CPnsInterChannelData:
  121|   316k|                    CPnsInterChannelData *pPnsInterChannelData) {
  122|   316k|  FDK_ASSERT(pPnsData != NULL);
  ------------------
  |  |  221|   316k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 316k, False: 0]
  ------------------
  123|   316k|  FDK_ASSERT(pPnsInterChannelData != NULL);
  ------------------
  |  |  221|   316k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (123:3): [True: 316k, False: 0]
  ------------------
  124|       |  /* Assign pointer always, since pPnsData is not persistent data */
  125|   316k|  pPnsData->pPnsInterChannelData = pPnsInterChannelData;
  126|   316k|  pPnsData->PnsActive = 0;
  127|   316k|  pPnsData->CurrentEnergy = 0;
  128|       |
  129|   316k|  FDKmemclear(pPnsData->pnsUsed, (8 * 16) * sizeof(UCHAR));
  130|   316k|  FDKmemclear(pPnsInterChannelData->correlated, (8 * 16) * sizeof(UCHAR));
  131|   316k|}
_Z21CPns_UpdateNoiseStateP8CPnsDataPiS1_:
  140|  2.21M|                           INT *randomSeed) {
  141|       |  /* use pointer because seed has to be
  142|       |     same, left and right channel ! */
  143|  2.21M|  pPnsData->currentSeed = currentSeed;
  144|  2.21M|  pPnsData->randomSeed = randomSeed;
  145|  2.21M|}
_Z14CPns_IsPnsUsedPK8CPnsDataii:
  155|   388k|int CPns_IsPnsUsed(const CPnsData *pPnsData, const int group, const int band) {
  156|   388k|  unsigned pns_band = group * 16 + band;
  157|       |
  158|   388k|  return pPnsData->pnsUsed[pns_band] & (UCHAR)1;
  159|   388k|}
_Z19CPns_SetCorrelationP8CPnsDataiii:
  167|  12.2k|                         const int outofphase) {
  168|  12.2k|  CPnsInterChannelData *pInterChannelData = pPnsData->pPnsInterChannelData;
  169|  12.2k|  unsigned pns_band = group * 16 + band;
  170|       |
  171|  12.2k|  pInterChannelData->correlated[pns_band] = (outofphase) ? 3 : 1;
  ------------------
  |  Branch (171:45): [True: 0, False: 12.2k]
  ------------------
  172|  12.2k|}
_Z9CPns_ReadP8CPnsDataP13FDK_BITSTREAMPK19CodeBookDescriptionPshii:
  213|  15.4k|               UCHAR global_gain, int band, int group /* = 0 */) {
  214|  15.4k|  int delta;
  215|  15.4k|  UINT pns_band = group * 16 + band;
  216|       |
  217|  15.4k|  if (pPnsData->PnsActive) {
  ------------------
  |  Branch (217:7): [True: 11.2k, False: 4.16k]
  ------------------
  218|       |    /* Next PNS band case */
  219|  11.2k|    delta = CBlock_DecodeHuffmanWord(bs, hcb) - 60;
  220|  11.2k|  } else {
  221|       |    /* First PNS band case */
  222|  4.16k|    int noiseStartValue = FDKreadBits(bs, 9);
  223|       |
  224|  4.16k|    delta = noiseStartValue - 256;
  225|  4.16k|    pPnsData->PnsActive = 1;
  226|  4.16k|    pPnsData->CurrentEnergy = global_gain - NOISE_OFFSET;
  ------------------
  |  |  113|  4.16k|#define NOISE_OFFSET 90 /* cf. ISO 14496-3 p. 175 */
  ------------------
  227|  4.16k|  }
  228|       |
  229|  15.4k|  pPnsData->CurrentEnergy += delta;
  230|  15.4k|  pScaleFactor[pns_band] = pPnsData->CurrentEnergy;
  231|       |
  232|  15.4k|  pPnsData->pnsUsed[pns_band] = 1;
  233|  15.4k|}
_Z10CPns_ApplyPK8CPnsDataPK8CIcsInfoPiPKsS7_PK16SamplingRateInfoii:
  318|   306k|                const INT granuleLength, const int channel) {
  319|   306k|  if (pPnsData->PnsActive) {
  ------------------
  |  Branch (319:7): [True: 18.5k, False: 287k]
  ------------------
  320|  18.5k|    const short *BandOffsets =
  321|  18.5k|        GetScaleFactorBandOffsets(pIcsInfo, pSamplingRateInfo);
  322|       |
  323|  18.5k|    int ScaleFactorBandsTransmitted = GetScaleFactorBandsTransmitted(pIcsInfo);
  324|       |
  325|  97.1k|    for (int window = 0, group = 0; group < GetWindowGroups(pIcsInfo);
  ------------------
  |  Branch (325:37): [True: 78.6k, False: 18.5k]
  ------------------
  326|  78.6k|         group++) {
  327|   198k|      for (int groupwin = 0; groupwin < GetWindowGroupLength(pIcsInfo, group);
  ------------------
  |  Branch (327:30): [True: 119k, False: 78.6k]
  ------------------
  328|   119k|           groupwin++, window++) {
  329|   119k|        FIXP_DBL *spectrum = SPEC(pSpectrum, window, granuleLength);
  ------------------
  |  |  115|   119k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  330|       |
  331|   493k|        for (int band = 0; band < ScaleFactorBandsTransmitted; band++) {
  ------------------
  |  Branch (331:28): [True: 373k, False: 119k]
  ------------------
  332|   373k|          if (CPns_IsPnsUsed(pPnsData, group, band)) {
  ------------------
  |  Branch (332:15): [True: 64.7k, False: 308k]
  ------------------
  333|  64.7k|            UINT pns_band = window * 16 + band;
  334|       |
  335|  64.7k|            int bandWidth = BandOffsets[band + 1] - BandOffsets[band];
  336|  64.7k|            int noise_e;
  337|       |
  338|  64.7k|            FDK_ASSERT(bandWidth >= 0);
  ------------------
  |  |  221|  64.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (338:13): [True: 64.7k, False: 0]
  ------------------
  339|       |
  340|  64.7k|            if (channel > 0 && CPns_IsCorrelated(pPnsData, group, band)) {
  ------------------
  |  Branch (340:17): [True: 25.4k, False: 39.2k]
  |  Branch (340:32): [True: 8.73k, False: 16.7k]
  ------------------
  341|  8.73k|              noise_e =
  342|  8.73k|                  GenerateRandomVector(spectrum + BandOffsets[band], bandWidth,
  343|  8.73k|                                       &pPnsData->randomSeed[pns_band]);
  344|  55.9k|            } else {
  345|  55.9k|              pPnsData->randomSeed[pns_band] = *pPnsData->currentSeed;
  346|       |
  347|  55.9k|              noise_e = GenerateRandomVector(spectrum + BandOffsets[band],
  348|  55.9k|                                             bandWidth, pPnsData->currentSeed);
  349|  55.9k|            }
  350|       |
  351|  64.7k|            int outOfPhase = CPns_IsOutOfPhase(pPnsData, group, band);
  352|       |
  353|  64.7k|            ScaleBand(spectrum + BandOffsets[band], bandWidth,
  354|  64.7k|                      pScaleFactor[group * 16 + band], pSpecScale[window],
  355|  64.7k|                      noise_e, outOfPhase);
  356|  64.7k|          }
  357|   373k|        }
  358|   119k|      }
  359|  78.6k|    }
  360|  18.5k|  }
  361|   306k|}
aacdec_pns.cpp:_ZL17CPns_IsCorrelatedPK8CPnsDataii:
  183|  25.4k|                             const int band) {
  184|  25.4k|  CPnsInterChannelData *pInterChannelData = pPnsData->pPnsInterChannelData;
  185|  25.4k|  unsigned pns_band = group * 16 + band;
  186|       |
  187|  25.4k|  return (pInterChannelData->correlated[pns_band] & 0x01) ? 1 : 0;
  ------------------
  |  Branch (187:10): [True: 8.73k, False: 16.7k]
  ------------------
  188|  25.4k|}
aacdec_pns.cpp:_ZL20GenerateRandomVectorPiiS_:
  244|  64.7k|                                int *pRandomState) {
  245|  64.7k|  int i, invNrg_e = 0, nrg_e = 0;
  246|  64.7k|  FIXP_DBL invNrg_m, nrg_m = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  64.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  64.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 64.7k, Folded]
  |  |  ------------------
  |  |  194|  64.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  64.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  64.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 64.7k]
  |  |  ------------------
  |  |  195|  64.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  64.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  64.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  64.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  64.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  64.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  64.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|  64.7k|  FIXP_DBL *RESTRICT ptr = spec;
  248|  64.7k|  int randomState = *pRandomState;
  249|       |
  250|  64.7k|#define GEN_NOISE_NRG_SCALE 7
  251|       |
  252|       |  /* Generate noise and calculate energy. */
  253|   352k|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (253:15): [True: 287k, False: 64.7k]
  ------------------
  254|   287k|    randomState =
  255|   287k|        (((INT64)1664525 * randomState) + (INT64)1013904223) & 0xFFFFFFFF;
  256|   287k|    nrg_m = fPow2AddDiv2(nrg_m, (FIXP_DBL)randomState >> GEN_NOISE_NRG_SCALE);
  ------------------
  |  |  250|   287k|#define GEN_NOISE_NRG_SCALE 7
  ------------------
  257|   287k|    *ptr++ = (FIXP_DBL)randomState;
  258|   287k|  }
  259|  64.7k|  nrg_e = GEN_NOISE_NRG_SCALE * 2 + 1;
  ------------------
  |  |  250|  64.7k|#define GEN_NOISE_NRG_SCALE 7
  ------------------
  260|       |
  261|       |  /* weight noise with = 1 / sqrt_nrg; */
  262|  64.7k|  invNrg_m = invSqrtNorm2(nrg_m << 1, &invNrg_e);
  263|  64.7k|  invNrg_e += -((nrg_e - 1) >> 1);
  264|       |
  265|   352k|  for (i = size; i--;) {
  ------------------
  |  Branch (265:18): [True: 287k, False: 64.7k]
  ------------------
  266|   287k|    spec[i] = fMult(spec[i], invNrg_m);
  267|   287k|  }
  268|       |
  269|       |  /* Store random state */
  270|  64.7k|  *pRandomState = randomState;
  271|       |
  272|  64.7k|  return invNrg_e;
  273|  64.7k|}
aacdec_pns.cpp:_ZL17CPns_IsOutOfPhasePK8CPnsDataii:
  199|  64.7k|                             const int band) {
  200|  64.7k|  CPnsInterChannelData *pInterChannelData = pPnsData->pPnsInterChannelData;
  201|  64.7k|  unsigned pns_band = group * 16 + band;
  202|       |
  203|  64.7k|  return (pInterChannelData->correlated[pns_band] & 0x02) ? 1 : 0;
  ------------------
  |  Branch (203:10): [True: 0, False: 64.7k]
  ------------------
  204|  64.7k|}
aacdec_pns.cpp:_ZL9ScaleBandPiiiiii:
  276|  64.7k|                      int specScale, int noise_e, int out_of_phase) {
  277|  64.7k|  int i, shift, sfExponent;
  278|  64.7k|  FIXP_DBL sfMatissa;
  279|       |
  280|       |  /* Get gain from scale factor value = 2^(scaleFactor * 0.25) */
  281|  64.7k|  sfMatissa = MantissaTable[scaleFactor & 0x03][0];
  282|       |  /* sfExponent = (scaleFactor >> 2) + ExponentTable[scaleFactor & 0x03][0]; */
  283|       |  /* Note:  ExponentTable[scaleFactor & 0x03][0] is always 1. */
  284|  64.7k|  sfExponent = (scaleFactor >> 2) + 1;
  285|       |
  286|  64.7k|  if (out_of_phase != 0) {
  ------------------
  |  Branch (286:7): [True: 0, False: 64.7k]
  ------------------
  287|      0|    sfMatissa = -sfMatissa;
  288|      0|  }
  289|       |
  290|       |  /* +1 because of fMultDiv2 below. */
  291|  64.7k|  shift = sfExponent - specScale + 1 + noise_e;
  292|       |
  293|       |  /* Apply gain to noise values */
  294|  64.7k|  if (shift >= 0) {
  ------------------
  |  Branch (294:7): [True: 38.7k, False: 26.0k]
  ------------------
  295|  38.7k|    shift = fixMin(shift, DFRACT_BITS - 1);
  ------------------
  |  |  306|  38.7k|#define fixMin(a, b) fMin(a, b)
  ------------------
  296|   202k|    for (i = size; i-- != 0;) {
  ------------------
  |  Branch (296:20): [True: 164k, False: 38.7k]
  ------------------
  297|   164k|      spec[i] = fMultDiv2(spec[i], sfMatissa) << shift;
  298|   164k|    }
  299|  38.7k|  } else {
  300|  26.0k|    shift = fixMin(-shift, DFRACT_BITS - 1);
  ------------------
  |  |  306|  26.0k|#define fixMin(a, b) fMin(a, b)
  ------------------
  301|   149k|    for (i = size; i-- != 0;) {
  ------------------
  |  Branch (301:20): [True: 123k, False: 26.0k]
  ------------------
  302|   123k|      spec[i] = fMultDiv2(spec[i], sfMatissa) >> shift;
  303|   123k|    }
  304|  26.0k|  }
  305|  64.7k|}

_Z10CTns_ResetP8CTnsData:
  119|   604k|void CTns_Reset(CTnsData *pTnsData) {
  120|       |  /* Note: the following FDKmemclear should not be required. */
  121|   604k|  FDKmemclear(pTnsData->Filter,
  122|   604k|              TNS_MAX_WINDOWS * TNS_MAXIMUM_FILTERS * sizeof(CFilter));
  123|   604k|  FDKmemclear(pTnsData->NumberOfFilters, TNS_MAX_WINDOWS * sizeof(UCHAR));
  124|   604k|  pTnsData->DataPresent = 0;
  125|   604k|  pTnsData->Active = 0;
  126|   604k|}
_Z24CTns_ReadDataPresentFlagP13FDK_BITSTREAMP8CTnsData:
  131|   445k|{
  132|   445k|  pTnsData->DataPresent = (UCHAR)FDKreadBits(bs, 1);
  133|   445k|}
_Z9CTns_ReadP13FDK_BITSTREAMP8CTnsDataPK8CIcsInfoj:
  144|   583k|                            const CIcsInfo *pIcsInfo, const UINT flags) {
  145|   583k|  UCHAR n_filt, order;
  146|   583k|  UCHAR length, coef_res, coef_compress;
  147|   583k|  UCHAR window;
  148|   583k|  UCHAR wins_per_frame;
  149|   583k|  UCHAR isLongFlag;
  150|   583k|  UCHAR start_window;
  151|   583k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
  152|       |
  153|   583k|  if (!pTnsData->DataPresent) {
  ------------------
  |  Branch (153:7): [True: 486k, False: 96.8k]
  ------------------
  154|   486k|    return ErrorStatus;
  155|   486k|  }
  156|       |
  157|  96.8k|  {
  158|  96.8k|    start_window = 0;
  159|  96.8k|    wins_per_frame = GetWindowsPerFrame(pIcsInfo);
  160|  96.8k|    isLongFlag = IsLongBlock(pIcsInfo);
  161|  96.8k|  }
  162|       |
  163|  96.8k|  pTnsData->GainLd = 0;
  164|       |
  165|   438k|  for (window = start_window; window < wins_per_frame; window++) {
  ------------------
  |  Branch (165:31): [True: 341k, False: 96.8k]
  ------------------
  166|   341k|    pTnsData->NumberOfFilters[window] = n_filt =
  167|   341k|        (UCHAR)FDKreadBits(bs, isLongFlag ? 2 : 1);
  ------------------
  |  Branch (167:32): [True: 61.9k, False: 279k]
  ------------------
  168|       |
  169|   341k|    if (n_filt) {
  ------------------
  |  Branch (169:9): [True: 136k, False: 205k]
  ------------------
  170|   136k|      int index;
  171|   136k|      UCHAR nextstopband;
  172|       |
  173|   136k|      coef_res = (UCHAR)FDKreadBits(bs, 1);
  174|       |
  175|   136k|      nextstopband = GetScaleFactorBandsTotal(pIcsInfo);
  176|       |
  177|   289k|      for (index = 0; index < n_filt; index++) {
  ------------------
  |  Branch (177:23): [True: 152k, False: 136k]
  ------------------
  178|   152k|        CFilter *filter = &pTnsData->Filter[window][index];
  179|       |
  180|   152k|        length = (UCHAR)FDKreadBits(bs, isLongFlag ? 6 : 4);
  ------------------
  |  Branch (180:41): [True: 39.7k, False: 113k]
  ------------------
  181|       |
  182|   152k|        if (length > nextstopband) {
  ------------------
  |  Branch (182:13): [True: 34.1k, False: 118k]
  ------------------
  183|  34.1k|          length = nextstopband;
  184|  34.1k|        }
  185|       |
  186|   152k|        filter->StartBand = nextstopband - length;
  187|   152k|        filter->StopBand = nextstopband;
  188|   152k|        nextstopband = filter->StartBand;
  189|       |
  190|   152k|        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  307|   152k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  310|   152k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                      if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  308|   152k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (190:13): [True: 81.1k, False: 71.6k]
  ------------------
  191|       |          /* max(Order) = 15 (long), 7 (short) */
  192|  81.1k|          filter->Order = order = (UCHAR)FDKreadBits(bs, isLongFlag ? 4 : 3);
  ------------------
  |  Branch (192:58): [True: 5.12k, False: 76.0k]
  ------------------
  193|  81.1k|        } else {
  194|  71.6k|          filter->Order = order = (UCHAR)FDKreadBits(bs, isLongFlag ? 5 : 3);
  ------------------
  |  Branch (194:58): [True: 34.5k, False: 37.0k]
  ------------------
  195|       |
  196|  71.6k|          if (filter->Order > TNS_MAXIMUM_ORDER) {
  ------------------
  |  |  117|  71.6k|#define TNS_MAXIMUM_ORDER (20)
  ------------------
  |  Branch (196:15): [True: 52, False: 71.6k]
  ------------------
  197|     52|            ErrorStatus = AAC_DEC_TNS_READ_ERROR;
  198|     52|            return ErrorStatus;
  199|     52|          }
  200|  71.6k|        }
  201|       |
  202|   152k|        FDK_ASSERT(order <=
  ------------------
  |  |  221|   152k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (202:9): [True: 152k, False: 0]
  ------------------
  203|   152k|                   TNS_MAXIMUM_ORDER); /* avoid illegal memory access */
  204|   152k|        if (order) {
  ------------------
  |  Branch (204:13): [True: 83.3k, False: 69.4k]
  ------------------
  205|  83.3k|          UCHAR coef, s_mask;
  206|  83.3k|          UCHAR i;
  207|  83.3k|          SCHAR n_mask;
  208|       |
  209|  83.3k|          static const UCHAR sgn_mask[] = {0x2, 0x4, 0x8};
  210|  83.3k|          static const SCHAR neg_mask[] = {~0x3, ~0x7, ~0xF};
  211|       |
  212|  83.3k|          filter->Direction = FDKreadBits(bs, 1) ? -1 : 1;
  ------------------
  |  Branch (212:31): [True: 43.1k, False: 40.1k]
  ------------------
  213|       |
  214|  83.3k|          coef_compress = (UCHAR)FDKreadBits(bs, 1);
  215|       |
  216|  83.3k|          filter->Resolution = coef_res + 3;
  217|       |
  218|  83.3k|          s_mask = sgn_mask[coef_res + 1 - coef_compress];
  219|  83.3k|          n_mask = neg_mask[coef_res + 1 - coef_compress];
  220|       |
  221|   556k|          for (i = 0; i < order; i++) {
  ------------------
  |  Branch (221:23): [True: 473k, False: 83.3k]
  ------------------
  222|   473k|            coef = (UCHAR)FDKreadBits(bs, filter->Resolution - coef_compress);
  223|   473k|            filter->Coeff[i] = (coef & s_mask) ? (coef | n_mask) : coef;
  ------------------
  |  Branch (223:32): [True: 195k, False: 278k]
  ------------------
  224|   473k|          }
  225|  83.3k|          pTnsData->GainLd = 4;
  226|  83.3k|        }
  227|   152k|      }
  228|   136k|    }
  229|   341k|  }
  230|       |
  231|  96.8k|  pTnsData->Active = 1;
  232|       |
  233|  96.8k|  return ErrorStatus;
  234|  96.8k|}
_Z24CTns_ReadDataPresentUsacP13FDK_BITSTREAMP8CTnsDataS2_PhPK8CIcsInfojji:
  239|  34.1k|                              const UINT elFlags, const int fCommonWindow) {
  240|  34.1k|  int common_tns = 0;
  241|       |
  242|  34.1k|  if (fCommonWindow) {
  ------------------
  |  Branch (242:7): [True: 33.7k, False: 391]
  ------------------
  243|  33.7k|    common_tns = FDKreadBit(hBs);
  244|  33.7k|  }
  245|  34.1k|  { *ptns_on_lr = FDKreadBit(hBs); }
  246|  34.1k|  if (common_tns) {
  ------------------
  |  Branch (246:7): [True: 23.6k, False: 10.4k]
  ------------------
  247|  23.6k|    pTnsData0->DataPresent = 1;
  248|  23.6k|    CTns_Read(hBs, pTnsData0, pIcsInfo, flags);
  249|       |
  250|  23.6k|    pTnsData0->DataPresent = 0;
  251|  23.6k|    pTnsData0->Active = 1;
  252|  23.6k|    *pTnsData1 = *pTnsData0;
  253|  23.6k|  } else {
  254|  10.4k|    int tns_present_both;
  255|       |
  256|  10.4k|    tns_present_both = FDKreadBit(hBs);
  257|  10.4k|    if (tns_present_both) {
  ------------------
  |  Branch (257:9): [True: 1.50k, False: 8.99k]
  ------------------
  258|  1.50k|      pTnsData0->DataPresent = 1;
  259|  1.50k|      pTnsData1->DataPresent = 1;
  260|  8.99k|    } else {
  261|  8.99k|      pTnsData1->DataPresent = FDKreadBit(hBs);
  262|  8.99k|      pTnsData0->DataPresent = !pTnsData1->DataPresent;
  263|  8.99k|    }
  264|  10.4k|  }
  265|  34.1k|}
_Z10CTns_ApplyP8CTnsDataPK8CIcsInfoPiPK16SamplingRateInfoihhj:
  278|   504k|                const UCHAR igf_active, const UINT flags) {
  279|   504k|  int window, index, start, stop, size, start_window, wins_per_frame;
  280|       |
  281|   504k|  if (pTnsData->Active) {
  ------------------
  |  Branch (281:7): [True: 119k, False: 385k]
  ------------------
  282|   119k|    C_AALLOC_SCRATCH_START(coeff, FIXP_TCC, TNS_MAXIMUM_ORDER)
  ------------------
  |  |  319|   119k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|   119k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|   119k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|   119k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   119k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|   119k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   119k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|   119k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   119k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|   119k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  283|       |
  284|   119k|    {
  285|   119k|      start_window = 0;
  286|   119k|      wins_per_frame = GetWindowsPerFrame(pIcsInfo);
  287|   119k|    }
  288|       |
  289|   595k|    for (window = start_window; window < wins_per_frame; window++) {
  ------------------
  |  Branch (289:33): [True: 475k, False: 119k]
  ------------------
  290|   475k|      FIXP_DBL *pSpectrum;
  291|       |
  292|   475k|      { pSpectrum = SPEC(pSpectralCoefficient, window, granuleLength); }
  ------------------
  |  |  115|   475k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  293|       |
  294|   695k|      for (index = 0; index < pTnsData->NumberOfFilters[window]; index++) {
  ------------------
  |  Branch (294:23): [True: 219k, False: 475k]
  ------------------
  295|   219k|        CFilter *filter = &pTnsData->Filter[window][index];
  296|       |
  297|   219k|        if (filter->Order > 0) {
  ------------------
  |  Branch (297:13): [True: 117k, False: 102k]
  ------------------
  298|   117k|          FIXP_TCC *pCoeff;
  ------------------
  |  |  195|   117k|#define FIXP_TCC FIXP_DBL
  ------------------
  299|   117k|          UCHAR tns_max_bands;
  300|       |
  301|   117k|          pCoeff = coeff;
  302|   117k|          if (filter->Resolution == 3) {
  ------------------
  |  Branch (302:15): [True: 30.6k, False: 87.1k]
  ------------------
  303|  30.6k|            int i;
  304|   224k|            for (i = 0; i < filter->Order; i++)
  ------------------
  |  Branch (304:25): [True: 194k, False: 30.6k]
  ------------------
  305|   194k|              *pCoeff++ = FDKaacDec_tnsCoeff3[filter->Coeff[i] + 4];
  306|  87.1k|          } else {
  307|  87.1k|            int i;
  308|   507k|            for (i = 0; i < filter->Order; i++)
  ------------------
  |  Branch (308:25): [True: 420k, False: 87.1k]
  ------------------
  309|   420k|              *pCoeff++ = FDKaacDec_tnsCoeff4[filter->Coeff[i] + 8];
  310|  87.1k|          }
  311|       |
  312|   117k|          switch (granuleLength) {
  313|  14.1k|            case 480:
  ------------------
  |  Branch (313:13): [True: 14.1k, False: 103k]
  ------------------
  314|  14.1k|              tns_max_bands =
  315|  14.1k|                  tns_max_bands_tbl_480[pSamplingRateInfo->samplingRateIndex];
  316|  14.1k|              break;
  317|  5.78k|            case 512:
  ------------------
  |  Branch (317:13): [True: 5.78k, False: 112k]
  ------------------
  318|  5.78k|              tns_max_bands =
  319|  5.78k|                  tns_max_bands_tbl_512[pSamplingRateInfo->samplingRateIndex];
  320|  5.78k|              break;
  321|  97.9k|            default:
  ------------------
  |  Branch (321:13): [True: 97.9k, False: 19.8k]
  ------------------
  322|  97.9k|              tns_max_bands = GetMaximumTnsBands(
  323|  97.9k|                  pIcsInfo, pSamplingRateInfo->samplingRateIndex);
  324|       |              /* See redefinition of TNS_MAX_BANDS table */
  325|  97.9k|              if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  307|  97.9k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                            if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  310|  97.9k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                            if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  308|  97.9k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (325:19): [True: 75.9k, False: 21.9k]
  ------------------
  326|  75.9k|                  (pSamplingRateInfo->samplingRateIndex > 5)) {
  ------------------
  |  Branch (326:19): [True: 75.5k, False: 430]
  ------------------
  327|  75.5k|                tns_max_bands += 1;
  328|  75.5k|              }
  329|  97.9k|              break;
  330|   117k|          }
  331|       |
  332|   117k|          start = fixMin(fixMin(filter->StartBand, tns_max_bands), nbands);
  ------------------
  |  |  306|   117k|#define fixMin(a, b) fMin(a, b)
  ------------------
  333|       |
  334|   117k|          start = GetScaleFactorBandOffsets(pIcsInfo, pSamplingRateInfo)[start];
  335|       |
  336|   117k|          if (igf_active) {
  ------------------
  |  Branch (336:15): [True: 0, False: 117k]
  ------------------
  337|      0|            stop = fixMin(filter->StopBand, nbands);
  ------------------
  |  |  306|      0|#define fixMin(a, b) fMin(a, b)
  ------------------
  338|   117k|          } else {
  339|   117k|            stop = fixMin(fixMin(filter->StopBand, tns_max_bands), nbands);
  ------------------
  |  |  306|   117k|#define fixMin(a, b) fMin(a, b)
  ------------------
  340|   117k|          }
  341|       |
  342|   117k|          stop = GetScaleFactorBandOffsets(pIcsInfo, pSamplingRateInfo)[stop];
  343|       |
  344|   117k|          size = stop - start;
  345|       |
  346|   117k|          if (size) {
  ------------------
  |  Branch (346:15): [True: 7.02k, False: 110k]
  ------------------
  347|  7.02k|            C_ALLOC_SCRATCH_START(state, FIXP_DBL, TNS_MAXIMUM_ORDER)
  ------------------
  |  |  324|  7.02k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  348|       |
  349|  7.02k|            FDKmemclear(state, TNS_MAXIMUM_ORDER * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  7.02k|#define TNS_MAXIMUM_ORDER (20)
  ------------------
  350|  7.02k|            CLpc_SynthesisLattice(pSpectrum + start, size, 0, 0,
  351|  7.02k|                                  filter->Direction, coeff, filter->Order,
  352|  7.02k|                                  state);
  353|       |
  354|  7.02k|            C_ALLOC_SCRATCH_END(state, FIXP_DBL, TNS_MAXIMUM_ORDER)
  355|  7.02k|          }
  356|   117k|        }
  357|   219k|      }
  358|   475k|    }
  359|   119k|    C_AALLOC_SCRATCH_END(coeff, FIXP_TCC, TNS_MAXIMUM_ORDER)
  ------------------
  |  |  327|   119k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
  360|   119k|  }
  361|   504k|}

_Z23CAacDecoder_SyncQmfModeP20AAC_DECODER_INSTANCE:
  187|   382k|void CAacDecoder_SyncQmfMode(HANDLE_AACDECODER self) {
  188|   382k|  FDK_ASSERT(
  ------------------
  |  |  221|   382k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (188:3): [True: 160k, False: 222k]
  |  Branch (188:3): [True: 0, False: 160k]
  |  Branch (188:3): [True: 382k, False: 0]
  ------------------
  189|   382k|      !((self->flags[0] & AC_MPS_PRESENT) && (self->flags[0] & AC_PS_PRESENT)));
  190|       |
  191|       |  /* Assign user requested mode */
  192|   382k|  self->qmfModeCurr = self->qmfModeUser;
  193|       |
  194|   382k|  if (IS_USAC(self->streamInfo.aot)) {
  ------------------
  |  |  226|   382k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 221k, False: 161k]
  |  |  ------------------
  ------------------
  195|   221k|    self->qmfModeCurr = MODE_HQ;
  196|   221k|  }
  197|       |
  198|   382k|  if (self->qmfModeCurr == NOT_DEFINED) {
  ------------------
  |  Branch (198:7): [True: 161k, False: 221k]
  ------------------
  199|   161k|    if ((IS_LOWDELAY(self->streamInfo.aot) &&
  ------------------
  |  |  228|   323k|#define IS_LOWDELAY(aot) ((aot) == AOT_ER_AAC_LD || (aot) == AOT_ER_AAC_ELD)
  |  |  ------------------
  |  |  |  Branch (228:27): [True: 790, False: 160k]
  |  |  |  Branch (228:53): [True: 81.3k, False: 79.4k]
  |  |  ------------------
  ------------------
  200|  82.1k|         (self->flags[0] & AC_MPS_PRESENT)) ||
  ------------------
  |  |  316|  82.1k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
  |  Branch (200:10): [True: 39.7k, False: 42.4k]
  ------------------
  201|   121k|        ((self->streamInfo.aacNumChannels == 1) &&
  ------------------
  |  Branch (201:10): [True: 30.5k, False: 91.3k]
  ------------------
  202|  30.5k|         ((CAN_DO_PS(self->streamInfo.aot) &&
  ------------------
  |  |  223|  61.1k|  ((aot) == AOT_AAC_LC || (aot) == AOT_SBR || (aot) == AOT_PS || \
  |  |  ------------------
  |  |  |  Branch (223:4): [True: 10.5k, False: 20.0k]
  |  |  |  Branch (223:27): [True: 0, False: 20.0k]
  |  |  |  Branch (223:47): [True: 0, False: 20.0k]
  |  |  ------------------
  |  |  224|  30.5k|   (aot) == AOT_ER_BSAC || (aot) == AOT_DRM_AAC)
  |  |  ------------------
  |  |  |  Branch (224:4): [True: 0, False: 20.0k]
  |  |  |  Branch (224:28): [True: 0, False: 20.0k]
  |  |  ------------------
  ------------------
  203|  10.5k|           !(self->flags[0] & AC_MPS_PRESENT)) ||
  ------------------
  |  |  316|  10.5k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
  |  Branch (203:12): [True: 10.5k, False: 0]
  ------------------
  204|  50.2k|          (IS_USAC(self->streamInfo.aot))))) {
  ------------------
  |  |  226|  20.0k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  ------------------
  |  Branch (204:11): [True: 0, False: 20.0k]
  ------------------
  205|  50.2k|      self->qmfModeCurr = MODE_HQ;
  206|   111k|    } else {
  207|   111k|      self->qmfModeCurr = MODE_LP;
  208|   111k|    }
  209|   161k|  }
  210|       |
  211|   382k|  if (self->mpsEnableCurr) {
  ------------------
  |  Branch (211:7): [True: 159k, False: 223k]
  ------------------
  212|   159k|    if (IS_LOWDELAY(self->streamInfo.aot) &&
  ------------------
  |  |  228|   318k|#define IS_LOWDELAY(aot) ((aot) == AOT_ER_AAC_LD || (aot) == AOT_ER_AAC_ELD)
  |  |  ------------------
  |  |  |  Branch (228:27): [True: 222, False: 159k]
  |  |  |  Branch (228:53): [True: 37.4k, False: 121k]
  |  |  ------------------
  ------------------
  213|  37.6k|        (self->qmfModeCurr == MODE_LP)) { /* Overrule user requested QMF mode */
  ------------------
  |  Branch (213:9): [True: 222, False: 37.4k]
  ------------------
  214|    222|      self->qmfModeCurr = MODE_HQ;
  215|    222|    }
  216|       |    /* Set and check if MPS decoder allows the current mode */
  217|   159k|    switch (mpegSurroundDecoder_SetParam(
  218|   159k|        (CMpegSurroundDecoder *)self->pMpegSurroundDecoder,
  219|   159k|        SACDEC_PARTIALLY_COMPLEX, self->qmfModeCurr == MODE_LP)) {
  220|      0|      case MPS_OK:
  ------------------
  |  Branch (220:7): [True: 0, False: 159k]
  ------------------
  221|      0|        break;
  222|   159k|      case MPS_INVALID_PARAMETER: { /* Only one mode supported. Find out which
  ------------------
  |  Branch (222:7): [True: 159k, False: 0]
  ------------------
  223|       |                                       one: */
  224|   159k|        LIB_INFO libInfo[FDK_MODULE_LAST];
  225|   159k|        UINT mpsCaps;
  226|       |
  227|   159k|        FDKinitLibInfo(libInfo);
  228|   159k|        mpegSurroundDecoder_GetLibInfo(libInfo);
  229|   159k|        mpsCaps = FDKlibInfo_getCapabilities(libInfo, FDK_MPSDEC);
  230|       |
  231|   159k|        if (((mpsCaps & CAPF_MPS_LP) && (self->qmfModeCurr == MODE_LP)) ||
  ------------------
  |  |  669|   159k|  0x00000020 /**< Support flag indicating if partially complex (low power) \
  ------------------
  |  Branch (231:14): [True: 0, False: 159k]
  |  Branch (231:41): [True: 0, False: 0]
  ------------------
  232|   159k|            ((mpsCaps & CAPF_MPS_HQ) &&
  ------------------
  |  |  666|   159k|  0x00000010 /**< Support flag indicating if high quality processing is \
  ------------------
  |  Branch (232:14): [True: 159k, False: 0]
  ------------------
  233|   159k|             (self->qmfModeCurr ==
  ------------------
  |  Branch (233:14): [True: 159k, False: 361]
  ------------------
  234|   159k|              MODE_HQ))) { /* MPS decoder does support the requested mode. */
  235|   159k|          break;
  236|   159k|        }
  237|   159k|      }
  238|    361|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|    361|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  239|    361|      default:
  ------------------
  |  Branch (239:7): [True: 0, False: 159k]
  ------------------
  240|    361|        if (self->qmfModeUser == NOT_DEFINED) {
  ------------------
  |  Branch (240:13): [True: 361, False: 0]
  ------------------
  241|       |          /* Revert in case mpegSurroundDecoder_SetParam() fails. */
  242|    361|          self->qmfModeCurr =
  243|    361|              (self->qmfModeCurr == MODE_LP) ? MODE_HQ : MODE_LP;
  ------------------
  |  Branch (243:15): [True: 361, False: 0]
  ------------------
  244|    361|        } else {
  245|       |          /* in case specific mode was requested we disable MPS and playout the
  246|       |           * downmix */
  247|      0|          self->mpsEnableCurr = 0;
  248|      0|        }
  249|   159k|    }
  250|   159k|  }
  251|       |
  252|       |  /* Set SBR to current QMF mode. Error does not matter. */
  253|   382k|  sbrDecoder_SetParam(self->hSbrDecoder, SBR_QMF_MODE,
  254|   382k|                      (self->qmfModeCurr == MODE_LP));
  255|   382k|  self->psPossible =
  256|   382k|      ((CAN_DO_PS(self->streamInfo.aot) &&
  ------------------
  |  |  223|   765k|  ((aot) == AOT_AAC_LC || (aot) == AOT_SBR || (aot) == AOT_PS || \
  |  |  ------------------
  |  |  |  Branch (223:4): [True: 15.0k, False: 367k]
  |  |  |  Branch (223:27): [True: 0, False: 367k]
  |  |  |  Branch (223:47): [True: 0, False: 367k]
  |  |  ------------------
  |  |  224|   382k|   (aot) == AOT_ER_BSAC || (aot) == AOT_DRM_AAC)
  |  |  ------------------
  |  |  |  Branch (224:4): [True: 0, False: 367k]
  |  |  |  Branch (224:28): [True: 0, False: 367k]
  |  |  ------------------
  ------------------
  257|  15.0k|        !PS_IS_EXPLICITLY_DISABLED(self->streamInfo.aot, self->flags[0]) &&
  ------------------
  |  |  181|   397k|  (((aot) == AOT_DRM_AAC) && !(flags & AC_PS_PRESENT))
  |  |  ------------------
  |  |  |  |  314|      0|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  |  |  ------------------
  |  |  |  Branch (181:4): [True: 0, False: 15.0k]
  |  |  |  Branch (181:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  258|  15.0k|        self->streamInfo.aacNumChannels == 1 &&
  ------------------
  |  Branch (258:9): [True: 10.5k, False: 4.48k]
  ------------------
  259|  10.5k|        !(self->flags[0] & AC_MPS_PRESENT))) &&
  ------------------
  |  |  316|  10.5k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
  |  Branch (259:9): [True: 10.5k, False: 0]
  ------------------
  260|  10.5k|      self->qmfModeCurr == MODE_HQ;
  ------------------
  |  Branch (260:7): [True: 10.5k, False: 0]
  ------------------
  261|       |  FDK_ASSERT(!((self->flags[0] & AC_MPS_PRESENT) && self->psPossible));
  ------------------
  |  |  221|   382k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (261:3): [True: 160k, False: 222k]
  |  Branch (261:3): [True: 0, False: 160k]
  |  Branch (261:3): [True: 382k, False: 0]
  ------------------
  262|   382k|}
_Z30CAacDecoder_SignalInterruptionP20AAC_DECODER_INSTANCE:
  264|  6.41k|void CAacDecoder_SignalInterruption(HANDLE_AACDECODER self) {
  265|  6.41k|  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  307|  6.41k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  310|  6.41k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  308|  6.41k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (265:7): [True: 4.29k, False: 2.11k]
  ------------------
  266|  4.29k|    int i;
  267|       |
  268|  9.79k|    for (i = 0; i < fMin(self->aacChannels, (8)); i++) {
  ------------------
  |  Branch (268:17): [True: 5.49k, False: 4.29k]
  ------------------
  269|  5.49k|      if (self->pAacDecoderStaticChannelInfo
  ------------------
  |  Branch (269:11): [True: 5.49k, False: 0]
  ------------------
  270|  5.49k|              [i]) { /* number of active channels can be smaller */
  271|  5.49k|        self->pAacDecoderStaticChannelInfo[i]->hArCo->m_numberLinesPrev = 0;
  272|  5.49k|      }
  273|  5.49k|    }
  274|  4.29k|  }
  275|  6.41k|}
_Z23CAacDecoder_AncDataInitP8CAncDataPhi:
  341|  21.8k|                                          unsigned char *buffer, int size) {
  342|  21.8k|  if (size >= 0) {
  ------------------
  |  Branch (342:7): [True: 21.8k, False: 0]
  ------------------
  343|  21.8k|    ancData->buffer = buffer;
  344|  21.8k|    ancData->bufferSize = size;
  345|       |
  346|  21.8k|    CAacDecoder_AncDataReset(ancData);
  347|       |
  348|  21.8k|    return AAC_DEC_OK;
  349|  21.8k|  }
  350|       |
  351|      0|  return AAC_DEC_ANC_DATA_ERROR;
  352|  21.8k|}
_Z28CAacDecoder_PrepareCrossFadePKiPPiiii:
  641|     24|    const INT frameSize, const INT interleaved) {
  642|     24|  int i, ch, s1, s2;
  643|     24|  AAC_DECODER_ERROR ErrorStatus;
  644|       |
  645|     24|  ErrorStatus = AAC_DEC_OK;
  646|       |
  647|     24|  if (interleaved) {
  ------------------
  |  Branch (647:7): [True: 24, False: 0]
  ------------------
  648|     24|    s1 = 1;
  649|     24|    s2 = numChannels;
  650|     24|  } else {
  651|      0|    s1 = frameSize;
  652|      0|    s2 = 1;
  653|      0|  }
  654|       |
  655|     48|  for (ch = 0; ch < numChannels; ch++) {
  ------------------
  |  Branch (655:16): [True: 24, False: 24]
  ------------------
  656|     24|    const PCM_DEC *pIn = &pTimeData[ch * s1];
  657|  3.09k|    for (i = 0; i < TIME_DATA_FLUSH_SIZE; i++) {
  ------------------
  |  |  133|  3.09k|#define TIME_DATA_FLUSH_SIZE (128)
  ------------------
  |  Branch (657:17): [True: 3.07k, False: 24]
  ------------------
  658|  3.07k|      pTimeDataFlush[ch][i] = *pIn;
  659|  3.07k|      pIn += s2;
  660|  3.07k|    }
  661|     24|  }
  662|       |
  663|     24|  return ErrorStatus;
  664|     24|}
_Z26CAacDecoder_ApplyCrossFadePiPS_iii:
  679|    173|    const INT frameSize, const INT interleaved) {
  680|    173|  int i, ch, s1, s2;
  681|    173|  AAC_DECODER_ERROR ErrorStatus;
  682|       |
  683|    173|  ErrorStatus = AAC_DEC_OK;
  684|       |
  685|    173|  if (interleaved) {
  ------------------
  |  Branch (685:7): [True: 169, False: 4]
  ------------------
  686|    169|    s1 = 1;
  687|    169|    s2 = numChannels;
  688|    169|  } else {
  689|      4|    s1 = frameSize;
  690|      4|    s2 = 1;
  691|      4|  }
  692|       |
  693|    372|  for (ch = 0; ch < numChannels; ch++) {
  ------------------
  |  Branch (693:16): [True: 199, False: 173]
  ------------------
  694|    199|    PCM_DEC *pIn = &pTimeData[ch * s1];
  ------------------
  |  |  112|    199|#define PCM_DEC FIXP_DBL
  ------------------
  695|  25.6k|    for (i = 0; i < TIME_DATA_FLUSH_SIZE; i++) {
  ------------------
  |  |  133|  25.6k|#define TIME_DATA_FLUSH_SIZE (128)
  ------------------
  |  Branch (695:17): [True: 25.4k, False: 199]
  ------------------
  696|  25.4k|      FIXP_SGL alpha = (FIXP_SGL)i
  697|  25.4k|                       << (FRACT_BITS - 1 - TIME_DATA_FLUSH_SIZE_SF);
  ------------------
  |  |  112|  25.4k|#define FRACT_BITS 16  /* single precision */
  ------------------
                                     << (FRACT_BITS - 1 - TIME_DATA_FLUSH_SIZE_SF);
  ------------------
  |  |  134|  25.4k|#define TIME_DATA_FLUSH_SIZE_SF (7)
  ------------------
  698|  25.4k|      FIXP_DBL time = PCM_DEC2FIXP_DBL(*pIn);
  ------------------
  |  |  116|  25.4k|#define PCM_DEC2FIXP_DBL(x) (x)
  ------------------
  699|  25.4k|      FIXP_DBL timeFlush = PCM_DEC2FIXP_DBL(pTimeDataFlush[ch][i]);
  ------------------
  |  |  116|  25.4k|#define PCM_DEC2FIXP_DBL(x) (x)
  ------------------
  700|       |
  701|  25.4k|      *pIn = FIXP_DBL2PCM_DEC(timeFlush - fMult(timeFlush, alpha) +
  ------------------
  |  |  115|  25.4k|#define FIXP_DBL2PCM_DEC(x) (x)
  ------------------
  702|  25.4k|                              fMult(time, alpha));
  703|  25.4k|      pIn += s2;
  704|  25.4k|    }
  705|    199|  }
  706|       |
  707|    173|  return ErrorStatus;
  708|    173|}
_Z40CAacDecoder_PreRollExtensionPayloadParseP20AAC_DECODER_INSTANCEPjS1_S1_:
  722|  2.78k|    UINT *prerollAULength) {
  723|  2.78k|  FDK_BITSTREAM bs;
  724|  2.78k|  HANDLE_FDK_BITSTREAM hBs;
  725|  2.78k|  AAC_DECODER_ERROR ErrorStatus;
  726|       |
  727|  2.78k|  INT auStartAnchor;
  728|  2.78k|  UINT independencyFlag;
  729|  2.78k|  UINT extPayloadPresentFlag;
  730|  2.78k|  UINT useDefaultLengthFlag;
  731|  2.78k|  UINT configLength = 0;
  732|  2.78k|  UINT preRollPossible = 1;
  733|  2.78k|  UINT i;
  734|  2.78k|  UCHAR configChanged = 0;
  735|  2.78k|  UCHAR config[TP_USAC_MAX_CONFIG_LEN] = {0};
  736|  2.78k|  UCHAR
  737|  2.78k|  implicitExplicitCfgDiff = 0; /* in case implicit and explicit config is
  738|       |                                  equal preroll AU's should be processed
  739|       |                                  after decoder reset */
  740|       |
  741|  2.78k|  ErrorStatus = AAC_DEC_OK;
  742|       |
  743|  2.78k|  hBs = transportDec_GetBitstream(self->hInput, 0);
  744|  2.78k|  bs = *hBs;
  745|       |
  746|  2.78k|  auStartAnchor = (INT)FDKgetValidBits(hBs);
  747|  2.78k|  if (auStartAnchor <= 0) {
  ------------------
  |  Branch (747:7): [True: 3, False: 2.77k]
  ------------------
  748|      3|    ErrorStatus = AAC_DEC_NOT_ENOUGH_BITS;
  749|      3|    goto bail;
  750|      3|  }
  751|       |
  752|       |  /* Independency flag */
  753|  2.77k|  FDKreadBit(hBs);
  754|       |
  755|       |  /* Payload present flag of extension ID_EXT_ELE_AUDIOPREROLL must be one */
  756|  2.77k|  extPayloadPresentFlag = FDKreadBits(hBs, 1);
  757|  2.77k|  if (!extPayloadPresentFlag) {
  ------------------
  |  Branch (757:7): [True: 625, False: 2.15k]
  ------------------
  758|    625|    preRollPossible = 0;
  759|    625|  }
  760|       |
  761|       |  /* Default length flag of extension ID_EXT_ELE_AUDIOPREROLL must be zero */
  762|  2.77k|  useDefaultLengthFlag = FDKreadBits(hBs, 1);
  763|  2.77k|  if (useDefaultLengthFlag) {
  ------------------
  |  Branch (763:7): [True: 119, False: 2.65k]
  ------------------
  764|    119|    preRollPossible = 0;
  765|    119|  }
  766|       |
  767|  2.77k|  if (preRollPossible) { /* extPayloadPresentFlag && !useDefaultLengthFlag */
  ------------------
  |  Branch (767:7): [True: 2.10k, False: 669]
  ------------------
  768|       |    /* Read overall ext payload length, useDefaultLengthFlag must be zero.  */
  769|  2.10k|    escapedValue(hBs, 8, 16, 0);
  770|       |
  771|       |    /* Read RSVD60 Config size */
  772|  2.10k|    configLength = escapedValue(hBs, 4, 4, 8);
  773|       |
  774|       |    /* Avoid decoding pre roll frames if there was no config change and no
  775|       |     * config is included in the pre roll ext payload. */
  776|  2.10k|  }
  777|       |
  778|       |  /* If pre roll not possible then exit. */
  779|  2.77k|  if (preRollPossible == 0) {
  ------------------
  |  Branch (779:7): [True: 669, False: 2.10k]
  ------------------
  780|       |    /* Sanity check: if flushing is switched on, preRollPossible must be 1 */
  781|    669|    if (self->flushStatus != AACDEC_FLUSH_OFF) {
  ------------------
  |  Branch (781:9): [True: 0, False: 669]
  ------------------
  782|       |      /* Mismatch of current payload and flushing status */
  783|      0|      self->flushStatus = AACDEC_FLUSH_OFF;
  784|      0|      ErrorStatus = AAC_DEC_PARSE_ERROR;
  785|      0|    }
  786|    669|    goto bail;
  787|    669|  }
  788|       |
  789|  2.10k|  if (self->flags[0] & AC_USAC) {
  ------------------
  |  |  307|  2.10k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (789:7): [True: 1.21k, False: 895]
  ------------------
  790|  1.21k|    if (configLength > 0) {
  ------------------
  |  Branch (790:9): [True: 100, False: 1.11k]
  ------------------
  791|       |      /* DASH IPF USAC Config Change: Read new config and compare with current
  792|       |       * config. Apply reconfiguration if config's are different. */
  793|  1.58k|      for (i = 0; i < configLength; i++) {
  ------------------
  |  Branch (793:19): [True: 1.48k, False: 100]
  ------------------
  794|  1.48k|        config[i] = FDKreadBits(hBs, 8);
  795|  1.48k|      }
  796|    100|      TRANSPORTDEC_ERROR terr;
  797|    100|      terr = transportDec_InBandConfig(self->hInput, config, configLength,
  798|    100|                                       self->buildUpStatus, &configChanged, 0,
  799|    100|                                       &implicitExplicitCfgDiff);
  800|    100|      if (terr != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (800:11): [True: 42, False: 58]
  ------------------
  801|     42|        ErrorStatus = AAC_DEC_PARSE_ERROR;
  802|     42|        goto bail;
  803|     42|      }
  804|    100|    }
  805|  1.21k|  }
  806|       |
  807|       |  /* For the first frame buildUpStatus is not set and no flushing is performed
  808|       |   * but preroll AU's should processed. */
  809|       |  /* For USAC there is no idle state. */
  810|  2.06k|  if ((self->streamInfo.numChannels == 0) && !implicitExplicitCfgDiff &&
  ------------------
  |  Branch (810:7): [True: 1.00k, False: 1.06k]
  |  Branch (810:46): [True: 1.00k, False: 0]
  ------------------
  811|  1.00k|      (self->flags[0] & AC_USAC)) {
  ------------------
  |  |  307|  1.00k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (811:7): [True: 984, False: 23]
  ------------------
  812|    984|    self->buildUpStatus = AACDEC_USAC_BUILD_UP_ON;
  813|       |    /* sanity check: if buildUp status on -> flushing must be off */
  814|    984|    if (self->flushStatus != AACDEC_FLUSH_OFF) {
  ------------------
  |  Branch (814:9): [True: 1, False: 983]
  ------------------
  815|      1|      self->flushStatus = AACDEC_FLUSH_OFF;
  816|      1|      ErrorStatus = AAC_DEC_PARSE_ERROR;
  817|      1|      goto bail;
  818|      1|    }
  819|    984|  }
  820|       |
  821|  2.06k|  if (self->flags[0] & AC_USAC) {
  ------------------
  |  |  307|  2.06k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (821:7): [True: 1.17k, False: 895]
  ------------------
  822|       |    /* We are interested in preroll AUs if an explicit or an implicit config
  823|       |     * change is signalized in other words if the build up status is set. */
  824|  1.17k|    if (self->buildUpStatus == AACDEC_USAC_BUILD_UP_ON) {
  ------------------
  |  Branch (824:9): [True: 1.00k, False: 164]
  ------------------
  825|  1.00k|      UCHAR applyCrossfade = FDKreadBit(hBs);
  826|  1.00k|      if (applyCrossfade) {
  ------------------
  |  Branch (826:11): [True: 175, False: 832]
  ------------------
  827|    175|        self->applyCrossfade |= AACDEC_CROSSFADE_BITMASK_PREROLL;
  ------------------
  |  |  179|    175|  ((UCHAR)1 << 1) /*!< applyCrossfade is signaled in AudioPreRoll */
  ------------------
  828|    832|      } else {
  829|    832|        self->applyCrossfade &= ~AACDEC_CROSSFADE_BITMASK_PREROLL;
  ------------------
  |  |  179|    832|  ((UCHAR)1 << 1) /*!< applyCrossfade is signaled in AudioPreRoll */
  ------------------
  830|    832|      }
  831|  1.00k|      FDKreadBit(hBs); /* reserved */
  832|       |      /* Read num preroll AU's */
  833|  1.00k|      *numPrerollAU = escapedValue(hBs, 2, 4, 0);
  834|       |      /* check limits for USAC */
  835|  1.00k|      if (*numPrerollAU > AACDEC_MAX_NUM_PREROLL_AU_USAC) {
  ------------------
  |  |  136|  1.00k|#define AACDEC_MAX_NUM_PREROLL_AU_USAC (3)
  ------------------
  |  Branch (835:11): [True: 1, False: 1.00k]
  ------------------
  836|      1|        *numPrerollAU = 0;
  837|      1|        ErrorStatus = AAC_DEC_PARSE_ERROR;
  838|      1|        goto bail;
  839|      1|      }
  840|  1.00k|    }
  841|  1.17k|  }
  842|       |
  843|  4.14k|  for (i = 0; i < *numPrerollAU; i++) {
  ------------------
  |  Branch (843:15): [True: 2.08k, False: 2.05k]
  ------------------
  844|       |    /* For every AU get length and offset in the bitstream */
  845|  2.08k|    prerollAULength[i] = escapedValue(hBs, 16, 16, 0);
  846|  2.08k|    if (prerollAULength[i] > 0) {
  ------------------
  |  Branch (846:9): [True: 2.07k, False: 4]
  ------------------
  847|  2.07k|      prerollAUOffset[i] = auStartAnchor - (INT)FDKgetValidBits(hBs);
  848|  2.07k|      independencyFlag = FDKreadBit(hBs);
  849|  2.07k|      if (i == 0 && !independencyFlag) {
  ------------------
  |  Branch (849:11): [True: 983, False: 1.09k]
  |  Branch (849:21): [True: 2, False: 981]
  ------------------
  850|      2|        *numPrerollAU = 0;
  851|      2|        ErrorStatus = AAC_DEC_PARSE_ERROR;
  852|      2|        goto bail;
  853|      2|      }
  854|  2.07k|      FDKpushFor(hBs, prerollAULength[i] * 8 - 1);
  855|  2.07k|      self->prerollAULength[i] = (prerollAULength[i] * 8) + prerollAUOffset[i];
  856|  2.07k|    } else {
  857|      4|      *numPrerollAU = 0;
  858|      4|      ErrorStatus = AAC_DEC_PARSE_ERROR; /* Something is wrong */
  859|      4|      goto bail;
  860|      4|    }
  861|  2.08k|  }
  862|       |
  863|  2.78k|bail:
  864|       |
  865|  2.78k|  *hBs = bs;
  866|       |
  867|  2.78k|  return ErrorStatus;
  868|  2.06k|}
_Z16CAacDecoder_Open14TRANSPORT_TYPE:
 1282|  21.8k|{
 1283|  21.8k|  HANDLE_AACDECODER self;
 1284|       |
 1285|  21.8k|  self = GetAacDecoder();
 1286|  21.8k|  if (self == NULL) {
  ------------------
  |  Branch (1286:7): [True: 0, False: 21.8k]
  ------------------
 1287|      0|    goto bail;
 1288|      0|  }
 1289|       |
 1290|  21.8k|  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|  21.8k|  self->streamInfo.pChannelIndices = self->channelIndices;
 1295|  21.8k|  self->streamInfo.pChannelType = self->channelType;
 1296|  21.8k|  self->downscaleFactor = 1;
 1297|  21.8k|  self->downscaleFactorInBS = 1;
 1298|       |
 1299|       |  /* initialize anc data */
 1300|  21.8k|  CAacDecoder_AncDataInit(&self->ancData, NULL, 0);
 1301|       |
 1302|       |  /* initialize stream info */
 1303|  21.8k|  CStreamInfoInit(&self->streamInfo);
 1304|       |
 1305|       |  /* initialize progam config */
 1306|  21.8k|  CProgramConfig_Init(&self->pce);
 1307|       |
 1308|       |  /* initialize error concealment common data */
 1309|  21.8k|  CConcealment_InitCommonData(&self->concealCommonData);
 1310|  21.8k|  self->concealMethodUser = ConcealMethodNone; /* undefined -> auto mode */
 1311|       |
 1312|  21.8k|  self->hDrcInfo = GetDrcInfo();
 1313|  21.8k|  if (self->hDrcInfo == NULL) {
  ------------------
  |  Branch (1313:7): [True: 0, False: 21.8k]
  ------------------
 1314|      0|    goto bail;
 1315|      0|  }
 1316|       |  /* Init common DRC structure */
 1317|  21.8k|  aacDecoder_drcInit(self->hDrcInfo);
 1318|       |  /* Set default frame delay */
 1319|  21.8k|  aacDecoder_drcSetParam(self->hDrcInfo, DRC_BS_DELAY,
 1320|  21.8k|                         CConcealment_GetDelay(&self->concealCommonData));
 1321|  21.8k|  self->workBufferCore1 = (FIXP_DBL *)GetWorkBufferCore1();
 1322|       |
 1323|  21.8k|  self->workBufferCore2 = GetWorkBufferCore2();
 1324|  21.8k|  if (self->workBufferCore2 == NULL) goto bail;
  ------------------
  |  Branch (1324:7): [True: 0, False: 21.8k]
  ------------------
 1325|       |
 1326|       |  /* When RSVD60 is active use dedicated memory for core decoding */
 1327|  21.8k|  self->pTimeData2 = GetWorkBufferCore5();
 1328|  21.8k|  self->timeData2Size = GetRequiredMemWorkBufferCore5();
 1329|  21.8k|  if (self->pTimeData2 == NULL) {
  ------------------
  |  Branch (1329:7): [True: 0, False: 21.8k]
  ------------------
 1330|      0|    goto bail;
 1331|      0|  }
 1332|       |
 1333|  21.8k|  return self;
 1334|       |
 1335|      0|bail:
 1336|      0|  CAacDecoder_Close(self);
 1337|       |
 1338|       |  return NULL;
 1339|  21.8k|}
_Z25CAacDecoder_CtrlCFGChangeP20AAC_DECODER_INSTANCEhaha:
 1472|     91|                                                         SCHAR buildUpCnt) {
 1473|     91|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1474|       |
 1475|     91|  self->flushStatus = flushStatus;
 1476|     91|  self->flushCnt = flushCnt;
 1477|     91|  self->buildUpStatus = buildUpStatus;
 1478|     91|  self->buildUpCnt = buildUpCnt;
 1479|       |
 1480|     91|  return (err);
 1481|     91|}
_Z19CAacDecoder_FreeMemP20AAC_DECODER_INSTANCEi:
 1491|   311k|                                                   const int subStreamIndex) {
 1492|   311k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1493|       |
 1494|   311k|  CAacDecoder_DeInit(self, subStreamIndex);
 1495|       |
 1496|   311k|  return (err);
 1497|   311k|}
_Z17CAacDecoder_CloseP20AAC_DECODER_INSTANCE:
 1500|  21.8k|LINKSPEC_CPP void CAacDecoder_Close(HANDLE_AACDECODER self) {
 1501|  21.8k|  if (self == NULL) return;
  ------------------
  |  Branch (1501:7): [True: 0, False: 21.8k]
  ------------------
 1502|       |
 1503|  21.8k|  CAacDecoder_DeInit(self, 0);
 1504|       |
 1505|  21.8k|  {
 1506|  21.8k|    int ch;
 1507|   196k|    for (ch = 0; ch < (8); ch++) {
  ------------------
  |  Branch (1507:18): [True: 174k, False: 21.8k]
  ------------------
 1508|   174k|      if (self->pTimeDataFlush[ch] != NULL) {
  ------------------
  |  Branch (1508:11): [True: 15.5k, False: 159k]
  ------------------
 1509|  15.5k|        FreeTimeDataFlush(&self->pTimeDataFlush[ch]);
 1510|  15.5k|      }
 1511|   174k|    }
 1512|  21.8k|  }
 1513|       |
 1514|  21.8k|  if (self->hDrcInfo) {
  ------------------
  |  Branch (1514:7): [True: 21.8k, False: 0]
  ------------------
 1515|  21.8k|    FreeDrcInfo(&self->hDrcInfo);
 1516|  21.8k|  }
 1517|       |
 1518|  21.8k|  if (self->workBufferCore1 != NULL) {
  ------------------
  |  Branch (1518:7): [True: 21.8k, False: 0]
  ------------------
 1519|  21.8k|    FreeWorkBufferCore1((CWorkBufferCore1 **)&self->workBufferCore1);
 1520|  21.8k|  }
 1521|       |
 1522|       |  /* Free WorkBufferCore2 */
 1523|  21.8k|  if (self->workBufferCore2 != NULL) {
  ------------------
  |  Branch (1523:7): [True: 21.8k, False: 0]
  ------------------
 1524|  21.8k|    FreeWorkBufferCore2(&self->workBufferCore2);
 1525|  21.8k|  }
 1526|  21.8k|  if (self->pTimeData2 != NULL) {
  ------------------
  |  Branch (1526:7): [True: 21.8k, False: 0]
  ------------------
 1527|  21.8k|    FreeWorkBufferCore5(&self->pTimeData2);
 1528|  21.8k|  }
 1529|       |
 1530|  21.8k|  FDK_QmfDomain_Close(&self->qmfDomain);
 1531|       |
 1532|  21.8k|  FreeAacDecoder(&self);
 1533|  21.8k|}
_Z16CAacDecoder_InitP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfighPh:
 1544|   836k|                 UCHAR configMode, UCHAR *configChanged) {
 1545|   836k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1546|   836k|  INT ascChannels, ascChanged = 0;
 1547|   836k|  AACDEC_RENDER_MODE initRenderMode = AACDEC_RENDER_INVALID;
 1548|   836k|  SCHAR usacStereoConfigIndex = -1;
 1549|   836k|  int usacResidualDelayCompSamples = 0;
 1550|   836k|  int elementOffset, aacChannelsOffset, aacChannelsOffsetIdx;
 1551|   836k|  const int streamIndex = 0;
 1552|   836k|  INT flushChannels = 0;
 1553|       |
 1554|   836k|  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|   836k|  UINT elFlags[(3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)];
 1558|       |
 1559|   836k|  UCHAR sbrEnabled = self->sbrEnabled;
 1560|   836k|  UCHAR sbrEnabledPrev = self->sbrEnabledPrev;
 1561|   836k|  UCHAR mpsEnableCurr = self->mpsEnableCurr;
 1562|       |
 1563|   836k|  if (!self) return AAC_DEC_INVALID_HANDLE;
  ------------------
  |  Branch (1563:7): [True: 0, False: 836k]
  ------------------
 1564|       |
 1565|   836k|  UCHAR downscaleFactor = self->downscaleFactor;
 1566|   836k|  UCHAR downscaleFactorInBS = self->downscaleFactorInBS;
 1567|       |
 1568|   836k|  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|   836k|  switch (asc->m_aot) {
 1574|   539k|    case AOT_AAC_LC:
  ------------------
  |  Branch (1574:5): [True: 539k, False: 296k]
  ------------------
 1575|   539k|      self->streamInfo.profile = 1;
 1576|   539k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   539k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1577|   576k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (1577:5): [True: 37.5k, False: 798k]
  ------------------
 1578|   576k|      if (asc->m_sc.m_gaSpecificConfig.m_layer > 0) {
  ------------------
  |  Branch (1578:11): [True: 519, False: 576k]
  ------------------
 1579|       |        /* aac_scalable_extension_element() currently not supported. */
 1580|    519|        return AAC_DEC_UNSUPPORTED_FORMAT;
 1581|    519|      }
 1582|   576k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   576k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1583|   576k|    case AOT_SBR:
  ------------------
  |  Branch (1583:5): [True: 0, False: 836k]
  ------------------
 1584|   576k|    case AOT_PS:
  ------------------
  |  Branch (1584:5): [True: 0, False: 836k]
  ------------------
 1585|   577k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (1585:5): [True: 944, False: 835k]
  ------------------
 1586|   587k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1586:5): [True: 10.1k, False: 825k]
  ------------------
 1587|   587k|    case AOT_DRM_AAC:
  ------------------
  |  Branch (1587:5): [True: 0, False: 836k]
  ------------------
 1588|   587k|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (1588:5): [True: 0, False: 836k]
  ------------------
 1589|   587k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1590|   587k|      break;
 1591|   105k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1591:5): [True: 105k, False: 730k]
  ------------------
 1592|   105k|      initRenderMode = AACDEC_RENDER_ELDFB;
 1593|   105k|      break;
 1594|   141k|    case AOT_USAC:
  ------------------
  |  Branch (1594:5): [True: 141k, False: 694k]
  ------------------
 1595|   141k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1596|   141k|      break;
 1597|  1.71k|    default:
  ------------------
  |  Branch (1597:5): [True: 1.71k, False: 834k]
  ------------------
 1598|  1.71k|      return AAC_DEC_UNSUPPORTED_AOT;
 1599|   836k|  }
 1600|       |
 1601|   833k|  if (CProgramConfig_IsValid(&self->pce) && (asc->m_channelConfiguration > 0)) {
  ------------------
  |  Branch (1601:7): [True: 191k, False: 642k]
  |  Branch (1601:45): [True: 89.9k, False: 101k]
  ------------------
 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|  89.9k|    int pceCmpResult;
 1606|  89.9k|    C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|  89.9k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1607|       |
 1608|  89.9k|    CProgramConfig_GetDefault(tmpPce, asc->m_channelConfiguration);
 1609|  89.9k|    pceCmpResult = CProgramConfig_Compare(&self->pce, tmpPce);
 1610|  89.9k|    if ((pceCmpResult < 0) /* Reset if PCEs are completely different ... */
  ------------------
  |  Branch (1610:9): [True: 1.23k, False: 88.7k]
  ------------------
 1611|  88.7k|        ||
 1612|  89.3k|        (pceCmpResult > 1)) { /*            ... or have a different layout. */
  ------------------
  |  Branch (1612:9): [True: 88.1k, False: 623]
  ------------------
 1613|  89.3k|      CProgramConfig_Init(&self->pce);
 1614|  89.3k|    } /* Otherwise keep the PCE (and its metadata). */
 1615|  89.9k|    C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1616|   743k|  } else {
 1617|   743k|    CProgramConfig_Init(&self->pce);
 1618|   743k|  }
 1619|       |
 1620|       |  /* set channels */
 1621|   833k|  switch (asc->m_channelConfiguration) {
 1622|   209k|    case 0:
  ------------------
  |  Branch (1622:5): [True: 209k, False: 624k]
  ------------------
 1623|   209k|      switch (asc->m_aot) {
 1624|      0|        case AOT_USAC:
  ------------------
  |  Branch (1624:9): [True: 0, False: 209k]
  ------------------
 1625|      0|          self->chMapIndex = 0;
 1626|      0|          ascChannels = asc->m_sc.m_usacConfig.m_nUsacChannels;
 1627|      0|          break;
 1628|   209k|        default:
  ------------------
  |  Branch (1628:9): [True: 209k, False: 0]
  ------------------
 1629|       |          /* get channels from program config (ASC) */
 1630|   209k|          if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
  ------------------
  |  Branch (1630:15): [True: 191k, False: 17.9k]
  ------------------
 1631|   191k|            ascChannels = asc->m_progrConfigElement.NumChannels;
 1632|   191k|            if (ascChannels > 0) {
  ------------------
  |  Branch (1632:17): [True: 190k, False: 632]
  ------------------
 1633|   190k|              int el_tmp;
 1634|       |              /* valid number of channels -> copy program config element (PCE)
 1635|       |               * from ASC */
 1636|   190k|              FDKmemcpy(&self->pce, &asc->m_progrConfigElement,
 1637|   190k|                        sizeof(CProgramConfig));
 1638|       |              /* Built element table */
 1639|   190k|              el_tmp = CProgramConfig_GetElementTable(
 1640|   190k|                  &asc->m_progrConfigElement, self->elements, (((8)) + (8)),
 1641|   190k|                  &self->chMapIndex);
 1642|  10.8M|              for (; el_tmp < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1);
  ------------------
  |  Branch (1642:22): [True: 10.7M, False: 190k]
  ------------------
 1643|  10.7M|                   el_tmp++) {
 1644|  10.7M|                self->elements[el_tmp] = ID_NONE;
 1645|  10.7M|              }
 1646|   190k|            } else {
 1647|    632|              return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1648|    632|            }
 1649|   191k|          } else {
 1650|  17.9k|            self->chMapIndex = 0;
 1651|  17.9k|            return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1652|  17.9k|          }
 1653|   190k|          break;
 1654|   209k|      }
 1655|   190k|      break;
 1656|   190k|    case 1:
  ------------------
  |  Branch (1656:5): [True: 81.8k, False: 752k]
  ------------------
 1657|   234k|    case 2:
  ------------------
  |  Branch (1657:5): [True: 152k, False: 681k]
  ------------------
 1658|   236k|    case 3:
  ------------------
  |  Branch (1658:5): [True: 1.95k, False: 831k]
  ------------------
 1659|   241k|    case 4:
  ------------------
  |  Branch (1659:5): [True: 5.85k, False: 828k]
  ------------------
 1660|   243k|    case 5:
  ------------------
  |  Branch (1660:5): [True: 1.87k, False: 831k]
  ------------------
 1661|   245k|    case 6:
  ------------------
  |  Branch (1661:5): [True: 1.90k, False: 831k]
  ------------------
 1662|   245k|      ascChannels = asc->m_channelConfiguration;
 1663|   245k|      break;
 1664|  8.67k|    case 11:
  ------------------
  |  Branch (1664:5): [True: 8.67k, False: 825k]
  ------------------
 1665|  8.67k|      ascChannels = 7;
 1666|  8.67k|      break;
 1667|   219k|    case 7:
  ------------------
  |  Branch (1667:5): [True: 219k, False: 613k]
  ------------------
 1668|   226k|    case 12:
  ------------------
  |  Branch (1668:5): [True: 7.05k, False: 826k]
  ------------------
 1669|   367k|    case 14:
  ------------------
  |  Branch (1669:5): [True: 140k, False: 693k]
  ------------------
 1670|   367k|      ascChannels = 8;
 1671|   367k|      break;
 1672|  2.81k|    default:
  ------------------
  |  Branch (1672:5): [True: 2.81k, False: 831k]
  ------------------
 1673|  2.81k|      return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1674|   833k|  }
 1675|       |
 1676|   812k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1676:7): [True: 141k, False: 671k]
  ------------------
 1677|   141k|    flushChannels = fMin(ascChannels, (8));
 1678|   141k|    INT numChannel;
 1679|   141k|    pcmDmx_GetParam(self->hPcmUtils, MIN_NUMBER_OF_OUTPUT_CHANNELS,
 1680|   141k|                    &numChannel);
 1681|   141k|    flushChannels = fMin(fMax(numChannel, flushChannels), (8));
 1682|   141k|  }
 1683|       |
 1684|   812k|  if (IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|   812k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 141k, False: 671k]
  |  |  ------------------
  ------------------
 1685|   307k|    for (int el = 0; el < (INT)asc->m_sc.m_usacConfig.m_usacNumElements; el++) {
  ------------------
  |  Branch (1685:22): [True: 166k, False: 141k]
  ------------------
 1686|       |      /* fix number of core channels aka ascChannels for stereoConfigIndex = 1
 1687|       |       * cases */
 1688|   166k|      if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 1) {
  ------------------
  |  Branch (1688:11): [True: 29.7k, False: 136k]
  ------------------
 1689|  29.7k|        ascChannels--; /* stereoConfigIndex == 1 stereo cases do actually
 1690|       |                          contain only a mono core channel. */
 1691|   136k|      } else if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 2) {
  ------------------
  |  Branch (1691:18): [True: 5.77k, False: 130k]
  ------------------
 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|  5.77k|        if (asc->m_sc.m_usacConfig.element[el].m_harmonicSBR) {
  ------------------
  |  Branch (1697:13): [True: 1.22k, False: 4.55k]
  ------------------
 1698|  1.22k|          usacResidualDelayCompSamples += asc->m_samplesPerFrame;
 1699|  1.22k|        }
 1700|  5.77k|        if (asc->m_sc.m_usacConfig.m_coreSbrFrameLengthIndex == 4) {
  ------------------
  |  Branch (1700:13): [True: 2.83k, False: 2.93k]
  ------------------
 1701|  2.83k|          usacResidualDelayCompSamples +=
 1702|  2.83k|              6 * 16; /* difference between 12 SBR
 1703|       |                         overlap slots from SBR and 6
 1704|       |                         slots delayed in MPS212 */
 1705|  2.83k|        }
 1706|  5.77k|      }
 1707|   166k|    }
 1708|   141k|  }
 1709|       |
 1710|   812k|  aacChannelsOffset = 0;
 1711|   812k|  aacChannelsOffsetIdx = 0;
 1712|   812k|  elementOffset = 0;
 1713|   812k|  if ((ascChannels <= 0) || (ascChannels > (8)) ||
  ------------------
  |  Branch (1713:7): [True: 0, False: 812k]
  |  Branch (1713:29): [True: 441, False: 812k]
  ------------------
 1714|   812k|      (asc->m_channelConfiguration > AACDEC_MAX_CH_CONF)) {
  ------------------
  |  |  121|   812k|#define AACDEC_MAX_CH_CONF 14
  ------------------
  |  Branch (1714:7): [True: 0, False: 812k]
  ------------------
 1715|    441|    return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1716|    441|  }
 1717|       |
 1718|       |  /* Set syntax flags */
 1719|   812k|  flags = 0;
 1720|   812k|  { FDKmemclear(elFlags, sizeof(elFlags)); }
 1721|       |
 1722|   812k|  if ((asc->m_channelConfiguration > 0) || IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|   190k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 0, False: 190k]
  |  |  ------------------
  ------------------
  |  Branch (1722:7): [True: 621k, False: 190k]
  ------------------
 1723|   621k|    if (IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|   621k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 141k, False: 480k]
  |  |  ------------------
  ------------------
 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|   141k|      self->pUsacConfig[streamIndex] = &asc->m_sc.m_usacConfig;
 1729|       |
 1730|       |      /* copy list of elements */
 1731|   141k|      if (self->pUsacConfig[streamIndex]->m_usacNumElements >
  ------------------
  |  Branch (1731:11): [True: 0, False: 141k]
  ------------------
 1732|   141k|          (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)) {
 1733|      0|        goto bail;
 1734|      0|      }
 1735|       |
 1736|   141k|      if (self->numUsacElements[streamIndex] !=
  ------------------
  |  Branch (1736:11): [True: 27.5k, False: 113k]
  ------------------
 1737|   141k|          asc->m_sc.m_usacConfig.m_usacNumElements) {
 1738|  27.5k|        ascChanged = 1;
 1739|  27.5k|      }
 1740|       |
 1741|   141k|      if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   141k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1741:11): [True: 68.7k, False: 72.4k]
  ------------------
 1742|  68.7k|        self->numUsacElements[streamIndex] =
 1743|  68.7k|            asc->m_sc.m_usacConfig.m_usacNumElements;
 1744|  68.7k|      }
 1745|       |
 1746|   141k|      mpsEnableCurr = 0;
 1747|   141k|      for (int _el = 0;
 1748|   307k|           _el < (int)self->pUsacConfig[streamIndex]->m_usacNumElements;
  ------------------
  |  Branch (1748:12): [True: 166k, False: 141k]
  ------------------
 1749|   166k|           _el++) {
 1750|   166k|        int el = _el + elementOffset;
 1751|   166k|        if (self->elements[el] !=
  ------------------
  |  Branch (1751:13): [True: 64.6k, False: 101k]
  ------------------
 1752|   166k|            self->pUsacConfig[streamIndex]->element[_el].usacElementType) {
 1753|  64.6k|          ascChanged = 1;
 1754|  64.6k|        }
 1755|   166k|        if (self->usacStereoConfigIndex[el] !=
  ------------------
  |  Branch (1755:13): [True: 16.3k, False: 149k]
  ------------------
 1756|   166k|            asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex) {
 1757|  16.3k|          ascChanged = 1;
 1758|  16.3k|        }
 1759|   166k|        if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   166k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1759:13): [True: 80.7k, False: 85.2k]
  ------------------
 1760|  80.7k|          self->elements[el] =
 1761|  80.7k|              self->pUsacConfig[streamIndex]->element[_el].usacElementType;
 1762|       |          /* for Unified Stereo Coding */
 1763|  80.7k|          self->usacStereoConfigIndex[el] =
 1764|  80.7k|              asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex;
 1765|  80.7k|          if (self->elements[el] == ID_USAC_CPE) {
  ------------------
  |  Branch (1765:15): [True: 51.2k, False: 29.5k]
  ------------------
 1766|  51.2k|            mpsEnableCurr |= self->usacStereoConfigIndex[el] ? 1 : 0;
  ------------------
  |  Branch (1766:30): [True: 29.6k, False: 21.6k]
  ------------------
 1767|  51.2k|          }
 1768|  80.7k|        }
 1769|       |
 1770|   166k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_noiseFilling)
  ------------------
  |  Branch (1770:24): [True: 33.9k, False: 132k]
  ------------------
 1771|   166k|                           ? AC_EL_USAC_NOISE
  ------------------
  |  |  344|  33.9k|#define AC_EL_USAC_NOISE 0x000002 /*!< USAC noise filling is active */
  ------------------
 1772|   166k|                           : 0;
 1773|   166k|        elFlags[el] |=
 1774|   166k|            (asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex > 0)
  ------------------
  |  Branch (1774:13): [True: 59.4k, False: 106k]
  ------------------
 1775|   166k|                ? AC_EL_USAC_MPS212
  ------------------
  |  |  348|  59.4k|#define AC_EL_USAC_MPS212 0x000010 /*!< USAC MPS212 tool is active */
  ------------------
 1776|   166k|                : 0;
 1777|   166k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_interTes)
  ------------------
  |  Branch (1777:24): [True: 34.6k, False: 131k]
  ------------------
 1778|   166k|                           ? AC_EL_USAC_ITES
  ------------------
  |  |  345|  34.6k|#define AC_EL_USAC_ITES 0x000004  /*!< USAC SBR inter-TES tool is active */
  ------------------
 1779|   166k|                           : 0;
 1780|   166k|        elFlags[el] |=
 1781|   166k|            (asc->m_sc.m_usacConfig.element[_el].m_pvc) ? AC_EL_USAC_PVC : 0;
  ------------------
  |  |  347|  49.0k|  0x000008 /*!< USAC SBR predictive vector coding tool is active */
  ------------------
  |  Branch (1781:13): [True: 49.0k, False: 117k]
  ------------------
 1782|   166k|        elFlags[el] |=
 1783|   166k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1783:13): [True: 0, False: 166k]
  ------------------
 1784|   166k|                ? AC_EL_USAC_LFE
  ------------------
  |  |  349|      0|#define AC_EL_USAC_LFE 0x000020    /*!< USAC element is LFE */
  ------------------
 1785|   166k|                : 0;
 1786|   166k|        elFlags[el] |=
 1787|   166k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1787:13): [True: 0, False: 166k]
  ------------------
 1788|   166k|                ? AC_EL_LFE
  ------------------
  |  |  359|      0|#define AC_EL_LFE 0x002000              /*!< The element is of type LFE. */
  ------------------
 1789|   166k|                : 0;
 1790|   166k|        if ((asc->m_sc.m_usacConfig.element[_el].usacElementType ==
  ------------------
  |  Branch (1790:13): [True: 105k, False: 60.1k]
  ------------------
 1791|   166k|             ID_USAC_CPE) &&
 1792|   105k|            ((self->usacStereoConfigIndex[el] == 0))) {
  ------------------
  |  Branch (1792:13): [True: 47.7k, False: 58.2k]
  ------------------
 1793|  47.7k|          elFlags[el] |= AC_EL_USAC_CP_POSSIBLE;
  ------------------
  |  |  351|  47.7k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
 1794|  47.7k|        }
 1795|   166k|      }
 1796|       |
 1797|   141k|      self->hasAudioPreRoll = 0;
 1798|   141k|      if (self->pUsacConfig[streamIndex]->m_usacNumElements) {
  ------------------
  |  Branch (1798:11): [True: 141k, False: 0]
  ------------------
 1799|   141k|        self->hasAudioPreRoll = asc->m_sc.m_usacConfig.element[0]
 1800|   141k|                                    .extElement.usacExtElementHasAudioPreRoll;
 1801|   141k|      }
 1802|   141k|      if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   141k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1802:11): [True: 68.7k, False: 72.4k]
  ------------------
 1803|  68.7k|        self->elements[elementOffset +
 1804|  68.7k|                       self->pUsacConfig[streamIndex]->m_usacNumElements] =
 1805|  68.7k|            ID_END;
 1806|  68.7k|      }
 1807|   480k|    } else {
 1808|       |      /* Initialize constant mappings for channel config 1-7 */
 1809|   480k|      int i;
 1810|  3.84M|      for (i = 0; i < AACDEC_CH_ELEMENTS_TAB_SIZE; i++) {
  ------------------
  |  |  122|  3.84M|#define AACDEC_CH_ELEMENTS_TAB_SIZE 7 /*!< Size of element tables */
  ------------------
  |  Branch (1810:19): [True: 3.36M, False: 480k]
  ------------------
 1811|  3.36M|        self->elements[i] = elementsTab[asc->m_channelConfiguration - 1][i];
 1812|  3.36M|      }
 1813|  26.4M|      for (; i < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1); i++) {
  ------------------
  |  Branch (1813:14): [True: 25.9M, False: 480k]
  ------------------
 1814|  25.9M|        self->elements[i] = ID_NONE;
 1815|  25.9M|      }
 1816|   480k|    }
 1817|       |
 1818|   621k|    {
 1819|   621k|      int ch;
 1820|       |
 1821|  4.02M|      for (ch = 0; ch < ascChannels; ch++) {
  ------------------
  |  Branch (1821:20): [True: 3.40M, False: 621k]
  ------------------
 1822|  3.40M|        self->chMapping[ch] = ch;
 1823|  3.40M|      }
 1824|  2.18M|      for (; ch < (8); ch++) {
  ------------------
  |  Branch (1824:14): [True: 1.56M, False: 621k]
  ------------------
 1825|  1.56M|        self->chMapping[ch] = 255;
 1826|  1.56M|      }
 1827|   621k|    }
 1828|       |
 1829|   621k|    self->chMapIndex = asc->m_channelConfiguration;
 1830|   621k|  } else {
 1831|   190k|    if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
  ------------------
  |  Branch (1831:9): [True: 190k, False: 0]
  ------------------
 1832|       |      /* Set matrix mixdown infos if available from PCE. */
 1833|   190k|      pcmDmx_SetMatrixMixdownFromPce(
 1834|   190k|          self->hPcmUtils, asc->m_progrConfigElement.MatrixMixdownIndexPresent,
 1835|   190k|          asc->m_progrConfigElement.MatrixMixdownIndex,
 1836|   190k|          asc->m_progrConfigElement.PseudoSurroundEnable);
 1837|   190k|    }
 1838|   190k|  }
 1839|       |
 1840|   812k|  self->streamInfo.channelConfig = asc->m_channelConfiguration;
 1841|       |
 1842|   812k|  if (self->streamInfo.aot != asc->m_aot) {
  ------------------
  |  Branch (1842:7): [True: 53.6k, False: 758k]
  ------------------
 1843|  53.6k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  53.6k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1843:9): [True: 23.6k, False: 30.0k]
  ------------------
 1844|  23.6k|      self->streamInfo.aot = asc->m_aot;
 1845|  23.6k|    }
 1846|  53.6k|    ascChanged = 1;
 1847|  53.6k|  }
 1848|       |
 1849|   812k|  if (asc->m_aot == AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1849:7): [True: 104k, False: 707k]
  ------------------
 1850|   104k|      asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1850:7): [True: 104k, False: 0]
  ------------------
 1851|   104k|    if (self->samplingRateInfo[0].samplingRate !=
  ------------------
  |  Branch (1851:9): [True: 44.1k, False: 60.8k]
  ------------------
 1852|   104k|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency ||
 1853|  60.8k|        self->samplingRateInfo[0].samplingRate * self->downscaleFactor !=
  ------------------
  |  Branch (1853:9): [True: 439, False: 60.3k]
  ------------------
 1854|  60.8k|            asc->m_samplingFrequency) {
 1855|       |      /* get downscaledSamplingFrequency from ESC and compute the downscale
 1856|       |       * factor */
 1857|  44.5k|      downscaleFactorInBS =
 1858|  44.5k|          asc->m_samplingFrequency /
 1859|  44.5k|          asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency;
 1860|  44.5k|      if ((downscaleFactorInBS == 1 || downscaleFactorInBS == 2 ||
  ------------------
  |  Branch (1860:12): [True: 29.8k, False: 14.6k]
  |  Branch (1860:40): [True: 7.95k, False: 6.70k]
  ------------------
 1861|  6.70k|           (downscaleFactorInBS == 3 &&
  ------------------
  |  Branch (1861:13): [True: 1.25k, False: 5.45k]
  ------------------
 1862|  1.25k|            asc->m_sc.m_eldSpecificConfig.m_frameLengthFlag) ||
  ------------------
  |  Branch (1862:13): [True: 1.08k, False: 166]
  ------------------
 1863|  5.61k|           downscaleFactorInBS == 4) &&
  ------------------
  |  Branch (1863:12): [True: 1.08k, False: 4.53k]
  ------------------
 1864|  40.0k|          ((asc->m_samplingFrequency %
  ------------------
  |  Branch (1864:11): [True: 39.8k, False: 204]
  ------------------
 1865|  40.0k|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency) ==
 1866|  40.0k|           0)) {
 1867|  39.8k|        downscaleFactor = downscaleFactorInBS;
 1868|  39.8k|      } else {
 1869|  4.73k|        downscaleFactorInBS = 1;
 1870|  4.73k|        downscaleFactor = 1;
 1871|  4.73k|      }
 1872|  44.5k|    }
 1873|   707k|  } else {
 1874|   707k|    downscaleFactorInBS = 1;
 1875|   707k|    downscaleFactor = 1;
 1876|   707k|  }
 1877|       |
 1878|   812k|  if (self->downscaleFactorInBS != downscaleFactorInBS) {
  ------------------
  |  Branch (1878:7): [True: 2.11k, False: 809k]
  ------------------
 1879|  2.11k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  2.11k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1879:9): [True: 1.03k, False: 1.07k]
  ------------------
 1880|  1.03k|      self->downscaleFactorInBS = downscaleFactorInBS;
 1881|  1.03k|      self->downscaleFactor = downscaleFactor;
 1882|  1.03k|    }
 1883|  2.11k|    ascChanged = 1;
 1884|  2.11k|  }
 1885|       |
 1886|   812k|  if ((INT)asc->m_samplesPerFrame % downscaleFactor != 0) {
  ------------------
  |  Branch (1886:7): [True: 0, False: 812k]
  ------------------
 1887|      0|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* frameSize/dsf must be an integer
 1888|       |                                                number */
 1889|      0|  }
 1890|       |
 1891|   812k|  self->streamInfo.bitRate = 0;
 1892|       |
 1893|   812k|  if (asc->m_aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1893:7): [True: 104k, False: 707k]
  ------------------
 1894|   104k|    if (self->useLdQmfTimeAlign !=
  ------------------
  |  Branch (1894:9): [True: 12.4k, False: 92.5k]
  ------------------
 1895|   104k|        asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
 1896|  12.4k|      ascChanged = 1;
 1897|  12.4k|    }
 1898|   104k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   104k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1898:9): [True: 47.3k, False: 57.5k]
  ------------------
 1899|  47.3k|      self->useLdQmfTimeAlign =
 1900|  47.3k|          asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1901|  47.3k|    }
 1902|   104k|    if (sbrEnabled != asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1902:9): [True: 11.9k, False: 93.0k]
  ------------------
 1903|  11.9k|      ascChanged = 1;
 1904|  11.9k|    }
 1905|   104k|  }
 1906|       |
 1907|   812k|  self->streamInfo.extAot = asc->m_extensionAudioObjectType;
 1908|   812k|  if (self->streamInfo.extSamplingRate !=
  ------------------
  |  Branch (1908:7): [True: 95.1k, False: 716k]
  ------------------
 1909|   812k|      (INT)asc->m_extensionSamplingFrequency) {
 1910|  95.1k|    ascChanged = 1;
 1911|  95.1k|  }
 1912|   812k|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   812k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1912:7): [True: 398k, False: 413k]
  ------------------
 1913|   398k|    self->streamInfo.extSamplingRate = asc->m_extensionSamplingFrequency;
 1914|   398k|  }
 1915|   812k|  flags |= (asc->m_sbrPresentFlag) ? AC_SBR_PRESENT : 0;
  ------------------
  |  |  311|   186k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
  |  Branch (1915:12): [True: 186k, False: 625k]
  ------------------
 1916|   812k|  flags |= (asc->m_psPresentFlag) ? AC_PS_PRESENT : 0;
  ------------------
  |  |  314|    902|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  ------------------
  |  Branch (1916:12): [True: 902, False: 811k]
  ------------------
 1917|   812k|  if (asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1917:7): [True: 186k, False: 625k]
  ------------------
 1918|   186k|    sbrEnabled = 1;
 1919|   186k|    sbrEnabledPrev = 1;
 1920|   625k|  } else {
 1921|   625k|    sbrEnabled = 0;
 1922|   625k|    sbrEnabledPrev = 0;
 1923|   625k|  }
 1924|   812k|  if (sbrEnabled && asc->m_extensionSamplingFrequency) {
  ------------------
  |  Branch (1924:7): [True: 186k, False: 625k]
  |  Branch (1924:21): [True: 186k, False: 0]
  ------------------
 1925|   186k|    if (downscaleFactor != 1 && (downscaleFactor)&1) {
  ------------------
  |  Branch (1925:9): [True: 8.68k, False: 177k]
  |  Branch (1925:33): [True: 0, False: 8.68k]
  ------------------
 1926|      0|      return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* SBR needs an even downscale
 1927|       |                                                  factor */
 1928|      0|    }
 1929|   186k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   186k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1929:9): [True: 86.5k, False: 100k]
  ------------------
 1930|  86.5k|      self->streamInfo.extSamplingRate =
 1931|  86.5k|          self->streamInfo.extSamplingRate / self->downscaleFactor;
 1932|  86.5k|    }
 1933|   186k|  }
 1934|   812k|  if ((asc->m_aot == AOT_AAC_LC) && (asc->m_sbrPresentFlag == 1) &&
  ------------------
  |  Branch (1934:7): [True: 517k, False: 294k]
  |  Branch (1934:37): [True: 3.97k, False: 513k]
  ------------------
 1935|  3.97k|      (asc->m_extensionSamplingFrequency > (2 * asc->m_samplingFrequency))) {
  ------------------
  |  Branch (1935:7): [True: 342, False: 3.63k]
  ------------------
 1936|    342|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* Core decoder supports at most a
 1937|       |                                                1:2 upsampling for HE-AAC and
 1938|       |                                                HE-AACv2 */
 1939|    342|  }
 1940|       |
 1941|       |  /* --------- vcb11 ------------ */
 1942|   811k|  flags |= (asc->m_vcb11Flag) ? AC_ER_VCB11 : 0;
  ------------------
  |  |  294|  77.5k|  0x000001 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1942:12): [True: 77.5k, False: 734k]
  ------------------
 1943|       |
 1944|       |  /* ---------- rvlc ------------ */
 1945|   811k|  flags |= (asc->m_rvlcFlag) ? AC_ER_RVLC : 0;
  ------------------
  |  |  297|  71.8k|  0x000002 /*!< aacSpectralDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1945:12): [True: 71.8k, False: 739k]
  ------------------
 1946|       |
 1947|       |  /* ----------- hcr ------------ */
 1948|   811k|  flags |= (asc->m_hcrFlag) ? AC_ER_HCR : 0;
  ------------------
  |  |  300|  29.9k|  0x000004 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1948:12): [True: 29.9k, False: 781k]
  ------------------
 1949|       |
 1950|   811k|  if (asc->m_aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1950:7): [True: 104k, False: 706k]
  ------------------
 1951|   104k|    mpsEnableCurr = 0;
 1952|   104k|    flags |= AC_ELD;
  ------------------
  |  |  303|   104k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
 1953|   104k|    flags |= (asc->m_sbrPresentFlag)
  ------------------
  |  Branch (1953:14): [True: 57.5k, False: 47.4k]
  ------------------
 1954|   104k|                 ? AC_SBR_PRESENT
  ------------------
  |  |  311|  57.5k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
 1955|   104k|                 : 0; /* Need to set the SBR flag for backward-compatibility
 1956|       |                               reasons. Even if SBR is not supported. */
 1957|   104k|    flags |= (asc->m_sc.m_eldSpecificConfig.m_sbrCrcFlag) ? AC_SBRCRC : 0;
  ------------------
  |  |  313|  40.4k|  0x010000 /*!< SBR CRC present flag. Only relevant for AAC-ELD for now. */
  ------------------
  |  Branch (1957:14): [True: 40.4k, False: 64.5k]
  ------------------
 1958|   104k|    flags |= (asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign)
  ------------------
  |  Branch (1958:14): [True: 24.4k, False: 80.5k]
  ------------------
 1959|   104k|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|  24.4k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1960|   104k|                 : 0;
 1961|   104k|    if (self->mpsApplicable) {
  ------------------
  |  Branch (1961:9): [True: 23.0k, False: 81.8k]
  ------------------
 1962|  23.0k|      mpsEnableCurr = asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1963|  23.0k|    }
 1964|   104k|  }
 1965|   811k|  flags |= (asc->m_aot == AOT_ER_AAC_LD) ? AC_LD : 0;
  ------------------
  |  |  304|  10.1k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
  |  Branch (1965:12): [True: 10.1k, False: 801k]
  ------------------
 1966|   811k|  flags |= (asc->m_epConfig >= 0) ? AC_ER : 0;
  ------------------
  |  |  305|   153k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
  |  Branch (1966:12): [True: 153k, False: 658k]
  ------------------
 1967|       |
 1968|   811k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1968:7): [True: 141k, False: 670k]
  ------------------
 1969|   141k|    flags |= AC_USAC;
  ------------------
  |  |  307|   141k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
 1970|   141k|    flags |= (asc->m_sc.m_usacConfig.element[0].m_stereoConfigIndex > 0)
  ------------------
  |  Branch (1970:14): [True: 59.4k, False: 81.7k]
  ------------------
 1971|   141k|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|  59.4k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1972|   141k|                 : 0;
 1973|   141k|  }
 1974|   811k|  if (asc->m_aot == AOT_DRM_AAC) {
  ------------------
  |  Branch (1974:7): [True: 0, False: 811k]
  ------------------
 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|   811k|  if (asc->m_aot == AOT_DRM_SURROUND) {
  ------------------
  |  Branch (1977:7): [True: 0, False: 811k]
  ------------------
 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|   811k|  if ((asc->m_aot == AOT_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_SCAL)) {
  ------------------
  |  Branch (1981:7): [True: 0, False: 811k]
  |  Branch (1981:39): [True: 37.0k, False: 774k]
  ------------------
 1982|  37.0k|    flags |= AC_SCALABLE;
  ------------------
  |  |  302|  37.0k|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
 1983|  37.0k|  }
 1984|       |
 1985|   811k|  if ((asc->m_epConfig >= 0) && (asc->m_channelConfiguration <= 0)) {
  ------------------
  |  Branch (1985:7): [True: 153k, False: 658k]
  |  Branch (1985:33): [True: 0, False: 153k]
  ------------------
 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|   811k|  self->streamInfo.epConfig = asc->m_epConfig;
 1992|       |  /* self->hInput->asc.m_epConfig = asc->m_epConfig; */
 1993|       |
 1994|   811k|  if (asc->m_epConfig > 1) return AAC_DEC_UNSUPPORTED_ER_FORMAT;
  ------------------
  |  Branch (1994:7): [True: 0, False: 811k]
  ------------------
 1995|       |
 1996|       |  /* Check if samplerate changed. */
 1997|   811k|  if ((self->samplingRateInfo[streamIndex].samplingRate !=
  ------------------
  |  Branch (1997:7): [True: 410k, False: 400k]
  ------------------
 1998|   811k|       asc->m_samplingFrequency) ||
 1999|   400k|      (self->streamInfo.aacSamplesPerFrame !=
  ------------------
  |  Branch (1999:7): [True: 185k, False: 215k]
  ------------------
 2000|   596k|       (INT)asc->m_samplesPerFrame / downscaleFactor)) {
 2001|   596k|    AAC_DECODER_ERROR error;
 2002|       |
 2003|   596k|    ascChanged = 1;
 2004|       |
 2005|   596k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   596k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (2005:9): [True: 299k, False: 297k]
  ------------------
 2006|       |      /* Update samplerate info. */
 2007|   299k|      error = getSamplingRateInfo(
 2008|   299k|          &self->samplingRateInfo[streamIndex], asc->m_samplesPerFrame,
 2009|   299k|          asc->m_samplingFrequencyIndex, asc->m_samplingFrequency);
 2010|   299k|      if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (2010:11): [True: 0, False: 299k]
  ------------------
 2011|      0|        return error;
 2012|      0|      }
 2013|   299k|      self->streamInfo.aacSampleRate =
 2014|   299k|          self->samplingRateInfo[0].samplingRate / self->downscaleFactor;
 2015|   299k|      self->streamInfo.aacSamplesPerFrame =
 2016|   299k|          asc->m_samplesPerFrame / self->downscaleFactor;
 2017|   299k|      if (self->streamInfo.aacSampleRate <= 0) {
  ------------------
  |  Branch (2017:11): [True: 0, False: 299k]
  ------------------
 2018|      0|        return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
 2019|      0|      }
 2020|   299k|    }
 2021|   596k|  }
 2022|       |
 2023|       |  /* Check if amount of channels has changed. */
 2024|   811k|  if (self->ascChannels[streamIndex] != ascChannels) {
  ------------------
  |  Branch (2024:7): [True: 342k, False: 468k]
  ------------------
 2025|   342k|    ascChanged = 1;
 2026|   342k|  }
 2027|       |
 2028|       |  /* detect config change */
 2029|   811k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   811k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (2029:7): [True: 412k, False: 398k]
  ------------------
 2030|   412k|    if (ascChanged != 0) {
  ------------------
  |  Branch (2030:9): [True: 307k, False: 105k]
  ------------------
 2031|   307k|      *configChanged = 1;
 2032|   307k|    }
 2033|       |
 2034|   412k|    CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2035|   412k|                            elementOffset);
 2036|       |
 2037|   412k|    return err;
 2038|   412k|  }
 2039|       |
 2040|       |  /* set AC_USAC_SCFGI3 globally if any usac element uses */
 2041|   398k|  switch (asc->m_aot) {
 2042|  68.7k|    case AOT_USAC:
  ------------------
  |  Branch (2042:5): [True: 68.7k, False: 330k]
  ------------------
 2043|  68.7k|      if (sbrEnabled) {
  ------------------
  |  Branch (2043:11): [True: 60.7k, False: 8.06k]
  ------------------
 2044|  60.7k|        for (int _el = 0;
 2045|   131k|             _el < (int)self->pUsacConfig[streamIndex]->m_usacNumElements;
  ------------------
  |  Branch (2045:14): [True: 71.0k, False: 60.7k]
  ------------------
 2046|  71.0k|             _el++) {
 2047|  71.0k|          int el = elementOffset + _el;
 2048|  71.0k|          if (IS_USAC_CHANNEL_ELEMENT(self->elements[el])) {
  ------------------
  |  |  484|  71.0k|  ((elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE || \
  |  |  ------------------
  |  |  |  Branch (484:4): [True: 11.6k, False: 59.3k]
  |  |  |  Branch (484:34): [True: 49.0k, False: 10.2k]
  |  |  ------------------
  |  |  485|  71.0k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (485:4): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
 2049|  60.7k|            if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2049:17): [True: 60.7k, False: 0]
  ------------------
 2050|  60.7k|              usacStereoConfigIndex = self->usacStereoConfigIndex[el];
 2051|  60.7k|            } 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|  60.7k|          }
 2058|  71.0k|        }
 2059|       |
 2060|  60.7k|        if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2060:13): [True: 0, False: 60.7k]
  ------------------
 2061|      0|          goto bail;
 2062|      0|        }
 2063|       |
 2064|  60.7k|        if (usacStereoConfigIndex == 3) {
  ------------------
  |  Branch (2064:13): [True: 11.9k, False: 48.7k]
  ------------------
 2065|  11.9k|          flags |= AC_USAC_SCFGI3;
  ------------------
  |  |  329|  11.9k|  0x8000000 /*!< USAC flag: If stereoConfigIndex is 3 the flag is set. */
  ------------------
 2066|  11.9k|        }
 2067|  60.7k|      }
 2068|  68.7k|      break;
 2069|   330k|    default:
  ------------------
  |  Branch (2069:5): [True: 330k, False: 68.7k]
  ------------------
 2070|   330k|      break;
 2071|   398k|  }
 2072|       |
 2073|   398k|  if (*configChanged) {
  ------------------
  |  Branch (2073:7): [True: 299k, False: 99.7k]
  ------------------
 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|   299k|    switch (asc->m_aot) {
 2079|  39.4k|      case AOT_USAC:
  ------------------
  |  Branch (2079:7): [True: 39.4k, False: 259k]
  ------------------
 2080|  39.4k|        if (sbrEnabled) {
  ------------------
  |  Branch (2080:13): [True: 34.4k, False: 4.96k]
  ------------------
 2081|  34.4k|          const UCHAR map_sbrRatio_2_nAnaBands[] = {16, 24, 32};
 2082|       |
 2083|  34.4k|          FDK_ASSERT(asc->m_sc.m_usacConfig.m_sbrRatioIndex > 0);
  ------------------
  |  |  221|  34.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2083:11): [True: 34.4k, False: 0]
  ------------------
 2084|  34.4k|          FDK_ASSERT(streamIndex == 0);
  ------------------
  |  |  221|  34.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2084:11): [True: 34.4k, Folded]
  ------------------
 2085|       |
 2086|  34.4k|          self->qmfDomain.globalConf.nInputChannels_requested = ascChannels;
 2087|  34.4k|          self->qmfDomain.globalConf.nOutputChannels_requested =
 2088|  34.4k|              (usacStereoConfigIndex == 1) ? 2 : ascChannels;
  ------------------
  |  Branch (2088:15): [True: 4.29k, False: 30.1k]
  ------------------
 2089|  34.4k|          self->qmfDomain.globalConf.flags_requested = 0;
 2090|  34.4k|          self->qmfDomain.globalConf.nBandsAnalysis_requested =
 2091|  34.4k|              map_sbrRatio_2_nAnaBands[asc->m_sc.m_usacConfig.m_sbrRatioIndex -
 2092|  34.4k|                                       1];
 2093|  34.4k|          self->qmfDomain.globalConf.nBandsSynthesis_requested = 64;
 2094|  34.4k|          self->qmfDomain.globalConf.nQmfTimeSlots_requested =
 2095|  34.4k|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 64 : 32;
  ------------------
  |  Branch (2095:15): [True: 8.34k, False: 26.0k]
  ------------------
 2096|  34.4k|          self->qmfDomain.globalConf.nQmfOvTimeSlots_requested =
 2097|  34.4k|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 12 : 6;
  ------------------
  |  Branch (2097:15): [True: 8.34k, False: 26.0k]
  ------------------
 2098|  34.4k|          self->qmfDomain.globalConf.nQmfProcBands_requested = 64;
 2099|  34.4k|          self->qmfDomain.globalConf.nQmfProcChannels_requested = 1;
 2100|  34.4k|          self->qmfDomain.globalConf.parkChannel =
 2101|  34.4k|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2101:15): [True: 9.98k, False: 24.4k]
  ------------------
 2102|  34.4k|          self->qmfDomain.globalConf.parkChannel_requested =
 2103|  34.4k|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2103:15): [True: 9.98k, False: 24.4k]
  ------------------
 2104|  34.4k|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2105|  34.4k|        }
 2106|  39.4k|        break;
 2107|  39.4k|      case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2107:7): [True: 22.3k, False: 276k]
  ------------------
 2108|  22.3k|        if (mpsEnableCurr &&
  ------------------
  |  Branch (2108:13): [True: 3.68k, False: 18.6k]
  ------------------
 2109|  3.68k|            asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
  ------------------
  |  Branch (2109:13): [True: 3.68k, False: 0]
  ------------------
 2110|  3.68k|          SAC_INPUT_CONFIG sac_interface = (sbrEnabled && self->hSbrDecoder)
  ------------------
  |  Branch (2110:45): [True: 551, False: 3.13k]
  |  Branch (2110:59): [True: 551, False: 0]
  ------------------
 2111|  3.68k|                                               ? SAC_INTERFACE_QMF
 2112|  3.68k|                                               : SAC_INTERFACE_TIME;
 2113|  3.68k|          mpegSurroundDecoder_ConfigureQmfDomain(
 2114|  3.68k|              (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, sac_interface,
 2115|  3.68k|              (UINT)self->streamInfo.aacSampleRate, asc->m_aot);
 2116|  3.68k|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2117|  3.68k|        }
 2118|  22.3k|        break;
 2119|   237k|      default:
  ------------------
  |  Branch (2119:7): [True: 237k, False: 61.7k]
  ------------------
 2120|   237k|        self->qmfDomain.globalConf.qmfDomainExplicitConfig =
 2121|   237k|            0; /* qmfDomain is initialized by SBR and MPS init functions if
 2122|       |                  required */
 2123|   237k|        break;
 2124|   299k|    }
 2125|       |
 2126|       |    /* Allocate all memory structures for each channel */
 2127|   299k|    {
 2128|   299k|      int ch = aacChannelsOffset;
 2129|  2.26M|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2129:25): [True: 1.97M, False: 299k]
  ------------------
 2130|  1.97M|        if (ch >= (8)) {
  ------------------
  |  Branch (2130:13): [True: 0, False: 1.97M]
  ------------------
 2131|      0|          goto bail;
 2132|      0|        }
 2133|  1.97M|        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|  1.97M|        if (self->pAacDecoderChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2136:13): [True: 0, False: 1.97M]
  ------------------
 2137|      0|          goto bail;
 2138|      0|        }
 2139|  1.97M|        ch++;
 2140|  1.97M|      }
 2141|       |
 2142|   299k|      int chIdx = aacChannelsOffsetIdx;
 2143|   299k|      ch = aacChannelsOffset;
 2144|   299k|      int _numElements;
 2145|   299k|      _numElements = (((8)) + (8));
 2146|   299k|      if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  308|   299k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                    if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  307|   299k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2146:11): [True: 39.4k, False: 259k]
  ------------------
 2147|  39.4k|        _numElements = (int)asc->m_sc.m_usacConfig.m_usacNumElements;
 2148|  39.4k|      }
 2149|  2.67M|      for (int _el = 0; _el < _numElements; _el++) {
  ------------------
  |  Branch (2149:25): [True: 2.55M, False: 122k]
  ------------------
 2150|  2.55M|        int el_channels = 0;
 2151|  2.55M|        int el = elementOffset + _el;
 2152|       |
 2153|  2.55M|        if (flags &
  ------------------
  |  Branch (2153:13): [True: 148k, False: 2.40M]
  ------------------
 2154|  2.55M|            (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  305|  2.55M|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  304|  2.55M|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  303|  2.55M|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  308|  2.55M|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  307|  2.55M|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  310|  2.55M|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
 2155|   148k|          if (ch >= ascChannels) {
  ------------------
  |  Branch (2155:15): [True: 38.3k, False: 109k]
  ------------------
 2156|  38.3k|            break;
 2157|  38.3k|          }
 2158|   148k|        }
 2159|       |
 2160|  2.51M|        switch (self->elements[el]) {
 2161|   256k|          case ID_SCE:
  ------------------
  |  Branch (2161:11): [True: 256k, False: 2.25M]
  ------------------
 2162|   965k|          case ID_CPE:
  ------------------
  |  Branch (2162:11): [True: 708k, False: 1.80M]
  ------------------
 2163|  1.20M|          case ID_LFE:
  ------------------
  |  Branch (2163:11): [True: 234k, False: 2.28M]
  ------------------
 2164|  1.21M|          case ID_USAC_SCE:
  ------------------
  |  Branch (2164:11): [True: 13.5k, False: 2.50M]
  ------------------
 2165|  1.23M|          case ID_USAC_CPE:
  ------------------
  |  Branch (2165:11): [True: 25.8k, False: 2.48M]
  ------------------
 2166|  1.23M|          case ID_USAC_LFE:
  ------------------
  |  Branch (2166:11): [True: 0, False: 2.51M]
  ------------------
 2167|       |
 2168|  1.23M|            el_channels = CAacDecoder_GetELChannels(
 2169|  1.23M|                self->elements[el], self->usacStereoConfigIndex[el]);
 2170|       |
 2171|  1.23M|            {
 2172|  1.23M|              self->pAacDecoderChannelInfo[ch]->pComStaticData =
 2173|  1.23M|                  (CAacDecoderCommonStaticData *)FDKcalloc(
 2174|  1.23M|                      1, sizeof(CAacDecoderCommonStaticData));
 2175|  1.23M|              if (self->pAacDecoderChannelInfo[ch]->pComStaticData == NULL) {
  ------------------
  |  Branch (2175:19): [True: 0, False: 1.23M]
  ------------------
 2176|      0|                goto bail;
 2177|      0|              }
 2178|  1.23M|              if (ch == aacChannelsOffset) {
  ------------------
  |  Branch (2178:19): [True: 299k, False: 940k]
  ------------------
 2179|   299k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2180|   299k|                    (CAacDecoderCommonData *)GetWorkBufferCore6();
 2181|   299k|                self->pAacDecoderChannelInfo[ch]
 2182|   299k|                    ->pComStaticData->pWorkBufferCore1 = GetWorkBufferCore1();
 2183|   940k|              } else {
 2184|   940k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2185|   940k|                    (CAacDecoderCommonData *)FDKaalloc(
 2186|   940k|                        sizeof(CAacDecoderCommonData), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|   940k|#define ALIGNMENT_DEFAULT 8
  ------------------
 2187|   940k|                self->pAacDecoderChannelInfo[ch]
 2188|   940k|                    ->pComStaticData->pWorkBufferCore1 =
 2189|   940k|                    self->pAacDecoderChannelInfo[aacChannelsOffset]
 2190|   940k|                        ->pComStaticData->pWorkBufferCore1;
 2191|   940k|              }
 2192|  1.23M|              if ((self->pAacDecoderChannelInfo[ch]->pComData == NULL) ||
  ------------------
  |  Branch (2192:19): [True: 0, False: 1.23M]
  ------------------
 2193|  1.23M|                  (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (2193:19): [True: 0, False: 1.23M]
  ------------------
 2194|  1.23M|                       ->pComStaticData->pWorkBufferCore1 == NULL)) {
 2195|      0|                goto bail;
 2196|      0|              }
 2197|  1.23M|              self->pAacDecoderChannelInfo[ch]->pDynData =
 2198|  1.23M|                  &(self->pAacDecoderChannelInfo[ch]
 2199|  1.23M|                        ->pComData->pAacDecoderDynamicData[0]);
 2200|  1.23M|              self->pAacDecoderChannelInfo[ch]->pSpectralCoefficient =
 2201|  1.23M|                  (SPECTRAL_PTR)&self->workBufferCore2[ch * 1024];
 2202|       |
 2203|  1.23M|              if (el_channels == 2) {
  ------------------
  |  Branch (2203:19): [True: 730k, False: 509k]
  ------------------
 2204|   730k|                if (ch >= (8) - 1) {
  ------------------
  |  Branch (2204:21): [True: 0, False: 730k]
  ------------------
 2205|      0|                  return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 2206|      0|                }
 2207|   730k|                self->pAacDecoderChannelInfo[ch + 1]->pComData =
 2208|   730k|                    self->pAacDecoderChannelInfo[ch]->pComData;
 2209|   730k|                self->pAacDecoderChannelInfo[ch + 1]->pComStaticData =
 2210|   730k|                    self->pAacDecoderChannelInfo[ch]->pComStaticData;
 2211|   730k|                self->pAacDecoderChannelInfo[ch + 1]
 2212|   730k|                    ->pComStaticData->pWorkBufferCore1 =
 2213|   730k|                    self->pAacDecoderChannelInfo[ch]
 2214|   730k|                        ->pComStaticData->pWorkBufferCore1;
 2215|   730k|                self->pAacDecoderChannelInfo[ch + 1]->pDynData =
 2216|   730k|                    &(self->pAacDecoderChannelInfo[ch]
 2217|   730k|                          ->pComData->pAacDecoderDynamicData[1]);
 2218|   730k|                self->pAacDecoderChannelInfo[ch + 1]->pSpectralCoefficient =
 2219|   730k|                    (SPECTRAL_PTR)&self->workBufferCore2[(ch + 1) * 1024];
 2220|   730k|              }
 2221|       |
 2222|  1.23M|              ch += el_channels;
 2223|  1.23M|            }
 2224|      0|            chIdx += el_channels;
 2225|  1.23M|            break;
 2226|       |
 2227|  1.27M|          default:
  ------------------
  |  Branch (2227:11): [True: 1.27M, False: 1.23M]
  ------------------
 2228|  1.27M|            break;
 2229|  2.51M|        }
 2230|       |
 2231|  2.51M|        if (self->elements[el] == ID_END) {
  ------------------
  |  Branch (2231:13): [True: 138k, False: 2.37M]
  ------------------
 2232|   138k|          break;
 2233|   138k|        }
 2234|       |
 2235|  2.37M|        el++;
 2236|  2.37M|      }
 2237|       |
 2238|   299k|      chIdx = aacChannelsOffsetIdx;
 2239|   299k|      ch = aacChannelsOffset;
 2240|  2.26M|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2240:25): [True: 1.97M, False: 299k]
  ------------------
 2241|       |        /* Allocate persistent channel memory */
 2242|  1.97M|        {
 2243|  1.97M|          self->pAacDecoderStaticChannelInfo[ch] =
 2244|  1.97M|              GetAacDecoderStaticChannelInfo(ch);
 2245|  1.97M|          if (self->pAacDecoderStaticChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2245:15): [True: 0, False: 1.97M]
  ------------------
 2246|      0|            goto bail;
 2247|      0|          }
 2248|  1.97M|          self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer =
 2249|  1.97M|              GetOverlapBuffer(ch); /* This area size depends on the AOT */
 2250|  1.97M|          if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer == NULL) {
  ------------------
  |  Branch (2250:15): [True: 0, False: 1.97M]
  ------------------
 2251|      0|            goto bail;
 2252|      0|          }
 2253|  1.97M|          if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  307|  1.97M|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  310|  1.97M|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  308|  1.97M|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2253:15): [True: 60.9k, False: 1.90M]
  ------------------
 2254|  60.9k|            self->pAacDecoderStaticChannelInfo[ch]->hArCo = CArco_Create();
 2255|  60.9k|            if (self->pAacDecoderStaticChannelInfo[ch]->hArCo == NULL) {
  ------------------
  |  Branch (2255:17): [True: 0, False: 60.9k]
  ------------------
 2256|      0|              goto bail;
 2257|      0|            }
 2258|  60.9k|          }
 2259|       |
 2260|  1.97M|          if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  307|  1.97M|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  308|  1.97M|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2260:15): [True: 1.90M, False: 60.9k]
  ------------------
 2261|  1.90M|            CPns_UpdateNoiseState(
 2262|  1.90M|                &self->pAacDecoderChannelInfo[ch]->data.aac.PnsData,
 2263|  1.90M|                &self->pAacDecoderStaticChannelInfo[ch]->pnsCurrentSeed,
 2264|  1.90M|                self->pAacDecoderChannelInfo[ch]->pComData->pnsRandomSeed);
 2265|  1.90M|          }
 2266|  1.97M|          ch++;
 2267|  1.97M|        }
 2268|      0|        chIdx++;
 2269|  1.97M|      }
 2270|       |
 2271|   299k|      if (flags & AC_USAC) {
  ------------------
  |  |  307|   299k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2271:11): [True: 39.4k, False: 259k]
  ------------------
 2272|   104k|        for (int _ch = 0; _ch < flushChannels; _ch++) {
  ------------------
  |  Branch (2272:27): [True: 65.2k, False: 39.4k]
  ------------------
 2273|  65.2k|          ch = aacChannelsOffset + _ch;
 2274|  65.2k|          if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2274:15): [True: 15.5k, False: 49.7k]
  ------------------
 2275|  15.5k|            self->pTimeDataFlush[ch] = GetTimeDataFlush(ch);
 2276|  15.5k|            if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2276:17): [True: 0, False: 15.5k]
  ------------------
 2277|      0|              goto bail;
 2278|      0|            }
 2279|  15.5k|          }
 2280|  65.2k|        }
 2281|  39.4k|      }
 2282|       |
 2283|   299k|      if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  307|   299k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  308|   299k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2283:11): [True: 39.4k, False: 259k]
  ------------------
 2284|  39.4k|        int complexStereoPredPossible = 0;
 2285|  39.4k|        ch = aacChannelsOffset;
 2286|  39.4k|        chIdx = aacChannelsOffsetIdx;
 2287|  89.2k|        for (int _el2 = 0; _el2 < (int)asc->m_sc.m_usacConfig.m_usacNumElements;
  ------------------
  |  Branch (2287:28): [True: 49.8k, False: 39.4k]
  ------------------
 2288|  49.8k|             _el2++) {
 2289|  49.8k|          int el2 = elementOffset + _el2;
 2290|  49.8k|          int elCh = 0, ch2;
 2291|       |
 2292|  49.8k|          if ((self->elements[el2] == ID_USAC_CPE) &&
  ------------------
  |  Branch (2292:15): [True: 25.8k, False: 23.9k]
  ------------------
 2293|  25.8k|              !(self->usacStereoConfigIndex[el2] == 1)) {
  ------------------
  |  Branch (2293:15): [True: 21.5k, False: 4.29k]
  ------------------
 2294|  21.5k|            elCh = 2;
 2295|  28.2k|          } else if (IS_CHANNEL_ELEMENT(self->elements[el2])) {
  ------------------
  |  |  459|  28.2k|  ((elementId) == ID_SCE || (elementId) == ID_CPE || (elementId) == ID_LFE || \
  |  |  ------------------
  |  |  |  Branch (459:4): [True: 0, False: 28.2k]
  |  |  |  Branch (459:29): [True: 0, False: 28.2k]
  |  |  |  Branch (459:54): [True: 0, False: 28.2k]
  |  |  ------------------
  |  |  460|  28.2k|   (elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE ||                \
  |  |  ------------------
  |  |  |  Branch (460:4): [True: 13.5k, False: 14.7k]
  |  |  |  Branch (460:34): [True: 4.29k, False: 10.4k]
  |  |  ------------------
  |  |  461|  28.2k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (461:4): [True: 0, False: 10.4k]
  |  |  ------------------
  ------------------
 2296|  17.8k|            elCh = 1;
 2297|  17.8k|          }
 2298|       |
 2299|  49.8k|          if (elFlags[el2] & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|  49.8k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (2299:15): [True: 9.57k, False: 40.3k]
  ------------------
 2300|  9.57k|            complexStereoPredPossible = 1;
 2301|  9.57k|            if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2301:17): [True: 9.57k, False: 0]
  ------------------
 2302|  9.57k|              self->cpeStaticData[el2] = GetCpePersistentData();
 2303|  9.57k|              if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2303:19): [True: 0, False: 9.57k]
  ------------------
 2304|      0|                goto bail;
 2305|      0|              }
 2306|  9.57k|            }
 2307|  9.57k|          }
 2308|       |
 2309|   110k|          for (ch2 = 0; ch2 < elCh; ch2++) {
  ------------------
  |  Branch (2309:25): [True: 60.9k, False: 49.8k]
  ------------------
 2310|       |            /* Hook element specific cpeStaticData into channel specific
 2311|       |             * aacDecoderStaticChannelInfo */
 2312|  60.9k|            self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData =
 2313|  60.9k|                self->cpeStaticData[el2];
 2314|  60.9k|            if (self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData !=
  ------------------
  |  Branch (2314:17): [True: 19.1k, False: 41.8k]
  ------------------
 2315|  60.9k|                NULL) {
 2316|  19.1k|              self->pAacDecoderStaticChannelInfo[ch]
 2317|  19.1k|                  ->pCpeStaticData->jointStereoPersistentData
 2318|  19.1k|                  .spectralCoeffs[ch2] =
 2319|  19.1k|                  self->pAacDecoderStaticChannelInfo[ch]
 2320|  19.1k|                      ->concealmentInfo.spectralCoefficient;
 2321|  19.1k|              self->pAacDecoderStaticChannelInfo[ch]
 2322|  19.1k|                  ->pCpeStaticData->jointStereoPersistentData.specScale[ch2] =
 2323|  19.1k|                  self->pAacDecoderStaticChannelInfo[ch]
 2324|  19.1k|                      ->concealmentInfo.specScale;
 2325|  19.1k|              self->pAacDecoderStaticChannelInfo[ch]
 2326|  19.1k|                  ->pCpeStaticData->jointStereoPersistentData.scratchBuffer =
 2327|  19.1k|                  (FIXP_DBL *)self->pTimeData2;
 2328|  19.1k|            }
 2329|  60.9k|            chIdx++;
 2330|  60.9k|            ch++;
 2331|  60.9k|          } /* for each channel in current element */
 2332|  49.8k|          if (complexStereoPredPossible && (elCh == 2)) {
  ------------------
  |  Branch (2332:15): [True: 16.4k, False: 33.4k]
  |  Branch (2332:44): [True: 9.57k, False: 6.86k]
  ------------------
 2333|       |            /* needed once for all channels */
 2334|  9.57k|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2334:17): [True: 9.57k, False: 0]
  ------------------
 2335|  9.57k|                    ->pComStaticData->cplxPredictionData == NULL) {
 2336|  9.57k|              self->pAacDecoderChannelInfo[ch - 1]
 2337|  9.57k|                  ->pComStaticData->cplxPredictionData =
 2338|  9.57k|                  GetCplxPredictionData();
 2339|  9.57k|            }
 2340|  9.57k|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2340:17): [True: 0, False: 9.57k]
  ------------------
 2341|  9.57k|                    ->pComStaticData->cplxPredictionData == NULL) {
 2342|      0|              goto bail;
 2343|      0|            }
 2344|  9.57k|          }
 2345|  49.8k|          if (elCh > 0) {
  ------------------
  |  Branch (2345:15): [True: 39.4k, False: 10.4k]
  ------------------
 2346|  39.4k|            self->pAacDecoderStaticChannelInfo[ch - elCh]->nfRandomSeed =
 2347|  39.4k|                (ULONG)0x3039;
 2348|  39.4k|            if (self->elements[el2] == ID_USAC_CPE) {
  ------------------
  |  Branch (2348:17): [True: 25.8k, False: 13.5k]
  ------------------
 2349|  25.8k|              if (asc->m_sc.m_usacConfig.element[el2].m_stereoConfigIndex !=
  ------------------
  |  Branch (2349:19): [True: 21.5k, False: 4.29k]
  ------------------
 2350|  25.8k|                  1) {
 2351|  21.5k|                self->pAacDecoderStaticChannelInfo[ch - elCh + 1]
 2352|  21.5k|                    ->nfRandomSeed = (ULONG)0x10932;
 2353|  21.5k|              }
 2354|  25.8k|            }
 2355|  39.4k|          }
 2356|  49.8k|        } /* for each element */
 2357|  39.4k|      }
 2358|       |
 2359|   299k|      if (ascChannels != self->aacChannels) {
  ------------------
  |  Branch (2359:11): [True: 299k, False: 0]
  ------------------
 2360|       |        /* Make allocated channel count persistent in decoder context. */
 2361|   299k|        self->aacChannels = aacChannelsOffset + ch;
 2362|   299k|      }
 2363|   299k|    }
 2364|       |
 2365|   299k|    if (usacResidualDelayCompSamples) {
  ------------------
  |  Branch (2365:9): [True: 1.38k, False: 297k]
  ------------------
 2366|  1.38k|      INT delayErr = FDK_Delay_Create(&self->usacResidualDelay,
 2367|  1.38k|                                      (USHORT)usacResidualDelayCompSamples, 1);
 2368|  1.38k|      if (delayErr) {
  ------------------
  |  Branch (2368:11): [True: 0, False: 1.38k]
  ------------------
 2369|      0|        goto bail;
 2370|      0|      }
 2371|  1.38k|    }
 2372|       |
 2373|       |    /* Make amount of signalled channels persistent in decoder context. */
 2374|   299k|    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|   299k|    self->aacChannelsPrev = 0;
 2379|   299k|  }
 2380|       |
 2381|   398k|  if (self->pAacDecoderChannelInfo[0] != NULL) {
  ------------------
  |  Branch (2381:7): [True: 398k, False: 0]
  ------------------
 2382|   398k|    self->pDrmBsBuffer = self->pAacDecoderChannelInfo[0]
 2383|   398k|                             ->pComStaticData->pWorkBufferCore1->DrmBsBuffer;
 2384|   398k|    self->drmBsBufferSize = DRM_BS_BUFFER_SIZE;
  ------------------
  |  |  136|   398k|  (512) /* size of the dynamic buffer which is used to reverse the bits of \
  ------------------
 2385|   398k|  }
 2386|       |
 2387|       |  /* Update structures */
 2388|   398k|  if (*configChanged) {
  ------------------
  |  Branch (2388:7): [True: 299k, False: 99.7k]
  ------------------
 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|   299k|    int ch = 0;
 2394|   299k|    int chIdx = 0;
 2395|  2.26M|    for (int _ch = 0; _ch < self->ascChannels[streamIndex]; _ch++) {
  ------------------
  |  Branch (2395:23): [True: 1.97M, False: 299k]
  ------------------
 2396|  1.97M|      switch (self->streamInfo.aot) {
 2397|  71.5k|        case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2397:9): [True: 71.5k, False: 1.89M]
  ------------------
 2398|  94.7k|        case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2398:9): [True: 23.1k, False: 1.94M]
  ------------------
 2399|  94.7k|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2400|  94.7k|              self->streamInfo.aacSamplesPerFrame;
 2401|  94.7k|          break;
 2402|  1.87M|        default:
  ------------------
  |  Branch (2402:9): [True: 1.87M, False: 94.7k]
  ------------------
 2403|  1.87M|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2404|  1.87M|              self->streamInfo.aacSamplesPerFrame / 8;
 2405|  1.87M|          break;
 2406|  1.97M|      }
 2407|  1.97M|      self->pAacDecoderChannelInfo[ch]->renderMode = initRenderMode;
 2408|       |
 2409|  1.97M|      mdct_init(&self->pAacDecoderStaticChannelInfo[ch]->IMdct,
 2410|  1.97M|                self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer,
 2411|  1.97M|                OverlapBufferSize);
  ------------------
  |  |  109|  1.97M|#define OverlapBufferSize (768)
  ------------------
 2412|       |
 2413|  1.97M|      self->pAacDecoderStaticChannelInfo[ch]->last_core_mode = FD_LONG;
 2414|  1.97M|      self->pAacDecoderStaticChannelInfo[ch]->last_lpd_mode = 255;
 2415|       |
 2416|  1.97M|      self->pAacDecoderStaticChannelInfo[ch]->last_tcx_pitch = L_DIV;
  ------------------
  |  |  192|  1.97M|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|  1.97M|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.97M|#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|  1.97M|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2417|       |
 2418|       |      /* Reset DRC control data for this channel */
 2419|  1.97M|      aacDecoder_drcInitChannelData(
 2420|  1.97M|          &self->pAacDecoderStaticChannelInfo[ch]->drcData);
 2421|       |
 2422|       |      /* Delete mixdown metadata from the past */
 2423|  1.97M|      pcmDmx_Reset(self->hPcmUtils, PCMDMX_RESET_BS_DATA);
  ------------------
  |  |  324|  1.97M|#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|  1.97M|      CConcealment_InitChannelData(
 2428|  1.97M|          &self->pAacDecoderStaticChannelInfo[ch]->concealmentInfo,
 2429|  1.97M|          &self->concealCommonData, initRenderMode,
 2430|  1.97M|          self->streamInfo.aacSamplesPerFrame);
 2431|  1.97M|      ch++;
 2432|  1.97M|      chIdx++;
 2433|  1.97M|    }
 2434|   299k|  }
 2435|       |
 2436|   398k|  if (*configChanged) {
  ------------------
  |  Branch (2436:7): [True: 299k, False: 99.7k]
  ------------------
 2437|   299k|    int drcDecSampleRate, drcDecFrameSize;
 2438|       |
 2439|   299k|    if (self->streamInfo.extSamplingRate != 0) {
  ------------------
  |  Branch (2439:9): [True: 57.5k, False: 241k]
  ------------------
 2440|  57.5k|      drcDecSampleRate = self->streamInfo.extSamplingRate;
 2441|  57.5k|      drcDecFrameSize = (self->streamInfo.aacSamplesPerFrame *
 2442|  57.5k|                         self->streamInfo.extSamplingRate) /
 2443|  57.5k|                        self->streamInfo.aacSampleRate;
 2444|   241k|    } else {
 2445|   241k|      drcDecSampleRate = self->streamInfo.aacSampleRate;
 2446|   241k|      drcDecFrameSize = self->streamInfo.aacSamplesPerFrame;
 2447|   241k|    }
 2448|       |
 2449|   299k|    if (FDK_drcDec_Init(self->hUniDrcDecoder, drcDecFrameSize, drcDecSampleRate,
  ------------------
  |  Branch (2449:9): [True: 0, False: 299k]
  ------------------
 2450|   299k|                        self->aacChannels) != 0)
 2451|      0|      goto bail;
 2452|   299k|  }
 2453|       |
 2454|   398k|  if (*configChanged) {
  ------------------
  |  Branch (2454:7): [True: 299k, False: 99.7k]
  ------------------
 2455|   299k|    if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2455:9): [True: 39.4k, False: 259k]
  ------------------
 2456|  39.4k|      aacDecoder_drcDisable(self->hDrcInfo);
 2457|  39.4k|    }
 2458|   299k|  }
 2459|       |
 2460|   398k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2460:7): [True: 68.7k, False: 330k]
  ------------------
 2461|  68.7k|    pcmLimiter_SetAttack(self->hLimiter, (5));
 2462|  68.7k|    pcmLimiter_SetThreshold(self->hLimiter, FL2FXCONST_DBL(0.89125094f));
  ------------------
  |  |  192|  68.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  68.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 68.7k, Folded]
  |  |  ------------------
  |  |  194|  68.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  68.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  68.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 68.7k]
  |  |  ------------------
  |  |  195|  68.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  68.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  68.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  68.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  68.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  68.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  68.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2463|  68.7k|  }
 2464|       |
 2465|   398k|  CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2466|   398k|                          elementOffset);
 2467|   398k|  self->sbrEnabled = sbrEnabled;
 2468|   398k|  self->sbrEnabledPrev = sbrEnabledPrev;
 2469|   398k|  self->mpsEnableCurr = mpsEnableCurr;
 2470|       |
 2471|       |  /* Update externally visible copy of flags */
 2472|   398k|  self->streamInfo.flags = self->flags[0];
 2473|       |
 2474|   398k|  return err;
 2475|       |
 2476|      0|bail:
 2477|      0|  CAacDecoder_DeInit(self, 0);
 2478|      0|  return AAC_DEC_OUT_OF_MEMORY;
 2479|   398k|}
_Z23CAacDecoder_DecodeFrameP20AAC_DECODER_INSTANCEjPiii:
 2483|   351k|    const INT timeDataSize, const int timeDataChannelOffset) {
 2484|   351k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
 2485|       |
 2486|   351k|  CProgramConfig *pce;
 2487|   351k|  HANDLE_FDK_BITSTREAM bs = transportDec_GetBitstream(self->hInput, 0);
 2488|       |
 2489|   351k|  MP4_ELEMENT_ID type = ID_NONE; /* Current element type */
 2490|   351k|  INT aacChannels = 0; /* Channel counter for channels found in the bitstream */
 2491|   351k|  const int streamIndex = 0; /* index of the current substream */
 2492|       |
 2493|   351k|  INT auStartAnchor = (INT)FDKgetValidBits(
 2494|   351k|      bs); /* AU start bit buffer position for AU byte alignment */
 2495|       |
 2496|   351k|  INT checkSampleRate = self->streamInfo.aacSampleRate;
 2497|       |
 2498|   351k|  INT CConceal_TDFading_Applied[(8)] = {
 2499|   351k|      0}; /* Initialize status of Time Domain fading */
 2500|       |
 2501|   351k|  if (self->aacChannels <= 0) {
  ------------------
  |  Branch (2501:7): [True: 42, False: 351k]
  ------------------
 2502|     42|    return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 2503|     42|  }
 2504|       |
 2505|       |  /* Any supported base layer valid AU will require more than 16 bits. */
 2506|   351k|  if ((transportDec_GetAuBitsRemaining(self->hInput, 0) < 15) &&
  ------------------
  |  Branch (2506:7): [True: 1.44k, False: 349k]
  ------------------
 2507|  1.44k|      (flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) == 0) {
  ------------------
  |  | 1018|  1.44k|#define AACDEC_CONCEAL 1
  ------------------
                    (flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) == 0) {
  ------------------
  |  | 1023|  1.44k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (2507:7): [True: 1.44k, False: 1]
  ------------------
 2508|  1.44k|    self->frameOK = 0;
 2509|  1.44k|    ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 2510|  1.44k|  }
 2511|       |
 2512|       |  /* Reset Program Config structure */
 2513|   351k|  pce = &self->pce;
 2514|   351k|  CProgramConfig_Reset(pce);
 2515|       |
 2516|   351k|  CAacDecoder_AncDataReset(&self->ancData);
 2517|   351k|  if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) &&
  ------------------
  |  | 1018|   351k|#define AACDEC_CONCEAL 1
  ------------------
                if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) &&
  ------------------
  |  | 1023|   351k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (2517:7): [True: 351k, False: 24]
  ------------------
 2518|   351k|      !(self->flags[0] & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  307|   351k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    !(self->flags[0] & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  308|   351k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2518:7): [True: 129k, False: 222k]
  ------------------
 2519|   129k|    int ch;
 2520|   129k|    if (self->streamInfo.channelConfig == 0) {
  ------------------
  |  Branch (2520:9): [True: 1.79k, False: 127k]
  ------------------
 2521|       |      /* Init Channel/Element mapping table */
 2522|  16.1k|      for (ch = 0; ch < (8); ch++) {
  ------------------
  |  Branch (2522:20): [True: 14.3k, False: 1.79k]
  ------------------
 2523|  14.3k|        self->chMapping[ch] = 255;
 2524|  14.3k|      }
 2525|  1.79k|      if (!CProgramConfig_IsValid(pce)) {
  ------------------
  |  Branch (2525:11): [True: 0, False: 1.79k]
  ------------------
 2526|      0|        int el;
 2527|      0|        for (el = 0; el < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1);
  ------------------
  |  Branch (2527:22): [True: 0, False: 0]
  ------------------
 2528|      0|             el++) {
 2529|      0|          self->elements[el] = ID_NONE;
 2530|      0|        }
 2531|      0|      }
 2532|  1.79k|    }
 2533|   129k|  }
 2534|       |
 2535|   351k|  if (self->downscaleFactor > 1 && (self->flags[0] & AC_ELD)) {
  ------------------
  |  |  303|  4.58k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (2535:7): [True: 4.58k, False: 346k]
  |  Branch (2535:36): [True: 4.58k, False: 0]
  ------------------
 2536|  4.58k|    self->flags[0] |= AC_ELD_DOWNSCALE;
  ------------------
  |  |  323|  4.58k|#define AC_ELD_DOWNSCALE 0x1000000 /*!< ELD Downscaled playout */
  ------------------
 2537|   346k|  } else {
 2538|   346k|    self->flags[0] &= ~AC_ELD_DOWNSCALE;
  ------------------
  |  |  323|   346k|#define AC_ELD_DOWNSCALE 0x1000000 /*!< ELD Downscaled playout */
  ------------------
 2539|   346k|  }
 2540|       |  /* unsupported dsf (aacSampleRate has not yet been divided by dsf) -> divide
 2541|       |   */
 2542|   351k|  if (self->downscaleFactorInBS > 1 &&
  ------------------
  |  Branch (2542:7): [True: 4.58k, False: 346k]
  ------------------
 2543|  4.58k|      (self->flags[0] & AC_ELD_DOWNSCALE) == 0) {
  ------------------
  |  |  323|  4.58k|#define AC_ELD_DOWNSCALE 0x1000000 /*!< ELD Downscaled playout */
  ------------------
  |  Branch (2543:7): [True: 0, False: 4.58k]
  ------------------
 2544|      0|    checkSampleRate =
 2545|      0|        self->streamInfo.aacSampleRate / self->downscaleFactorInBS;
 2546|      0|  }
 2547|       |
 2548|       |  /* Check sampling frequency  */
 2549|   351k|  if (self->streamInfo.aacSampleRate <= 0) {
  ------------------
  |  Branch (2549:7): [True: 0, False: 351k]
  ------------------
 2550|       |    /* Instance maybe uninitialized! */
 2551|      0|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
 2552|      0|  }
 2553|   351k|  switch (checkSampleRate) {
 2554|  4.80k|    case 96000:
  ------------------
  |  Branch (2554:5): [True: 4.80k, False: 346k]
  ------------------
 2555|  16.2k|    case 88200:
  ------------------
  |  Branch (2555:5): [True: 11.4k, False: 339k]
  ------------------
 2556|  17.7k|    case 64000:
  ------------------
  |  Branch (2556:5): [True: 1.54k, False: 349k]
  ------------------
 2557|  23.1k|    case 16000:
  ------------------
  |  Branch (2557:5): [True: 5.38k, False: 345k]
  ------------------
 2558|  36.3k|    case 12000:
  ------------------
  |  Branch (2558:5): [True: 13.1k, False: 338k]
  ------------------
 2559|  40.1k|    case 11025:
  ------------------
  |  Branch (2559:5): [True: 3.86k, False: 347k]
  ------------------
 2560|  60.1k|    case 8000:
  ------------------
  |  Branch (2560:5): [True: 20.0k, False: 331k]
  ------------------
 2561|  88.9k|    case 7350:
  ------------------
  |  Branch (2561:5): [True: 28.7k, False: 322k]
  ------------------
 2562|  89.2k|    case 48000:
  ------------------
  |  Branch (2562:5): [True: 342, False: 350k]
  ------------------
 2563|   107k|    case 44100:
  ------------------
  |  Branch (2563:5): [True: 18.2k, False: 333k]
  ------------------
 2564|   112k|    case 32000:
  ------------------
  |  Branch (2564:5): [True: 4.86k, False: 346k]
  ------------------
 2565|   165k|    case 24000:
  ------------------
  |  Branch (2565:5): [True: 52.7k, False: 298k]
  ------------------
 2566|   263k|    case 22050:
  ------------------
  |  Branch (2566:5): [True: 98.2k, False: 253k]
  ------------------
 2567|   263k|      break;
 2568|  87.8k|    default:
  ------------------
  |  Branch (2568:5): [True: 87.8k, False: 263k]
  ------------------
 2569|  87.8k|      if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  307|  87.8k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  310|  87.8k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  308|  87.8k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2569:11): [True: 21, False: 87.8k]
  ------------------
 2570|     21|        return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
 2571|     21|      }
 2572|  87.8k|      break;
 2573|   351k|  }
 2574|       |
 2575|   351k|  if (flags & AACDEC_CLRHIST) {
  ------------------
  |  | 1031|   351k|#define AACDEC_CLRHIST 8
  ------------------
  |  Branch (2575:7): [True: 0, False: 351k]
  ------------------
 2576|      0|    if (!(self->flags[0] & AC_USAC)) {
  ------------------
  |  |  307|      0|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2576:9): [True: 0, False: 0]
  ------------------
 2577|      0|      int ch;
 2578|       |      /* Clear history */
 2579|      0|      for (ch = 0; ch < self->aacChannels; ch++) {
  ------------------
  |  Branch (2579:20): [True: 0, False: 0]
  ------------------
 2580|       |        /* Reset concealment */
 2581|      0|        CConcealment_InitChannelData(
 2582|      0|            &self->pAacDecoderStaticChannelInfo[ch]->concealmentInfo,
 2583|      0|            &self->concealCommonData,
 2584|      0|            self->pAacDecoderChannelInfo[0]->renderMode,
 2585|      0|            self->streamInfo.aacSamplesPerFrame);
 2586|       |        /* Clear overlap-add buffers to avoid clicks. */
 2587|      0|        FDKmemclear(self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer,
 2588|      0|                    OverlapBufferSize * sizeof(FIXP_DBL));
  ------------------
  |  |  109|      0|#define OverlapBufferSize (768)
  ------------------
 2589|      0|      }
 2590|      0|      if (self->streamInfo.channelConfig > 0) {
  ------------------
  |  Branch (2590:11): [True: 0, False: 0]
  ------------------
 2591|       |        /* Declare the possibly adopted old PCE (with outdated metadata)
 2592|       |         * invalid. */
 2593|      0|        CProgramConfig_Init(pce);
 2594|      0|      }
 2595|      0|    }
 2596|      0|  }
 2597|       |
 2598|   351k|  int pceRead = 0; /* Flag indicating a PCE in the current raw_data_block() */
 2599|       |
 2600|   351k|  INT hdaacDecoded = 0;
 2601|   351k|  MP4_ELEMENT_ID previous_element =
 2602|   351k|      ID_END; /* Last element ID (required for extension payload mapping */
 2603|   351k|  UCHAR previous_element_index = 0; /* Canonical index of last element */
 2604|   351k|  int element_count =
 2605|   351k|      0; /* Element counter for elements found in the bitstream */
 2606|   351k|  int channel_element_count = 0; /* Channel element counter */
 2607|   351k|  MP4_ELEMENT_ID
 2608|   351k|  channel_elements[(3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) +
 2609|   351k|                    1)];     /* Channel elements in bit stream order. */
 2610|   351k|  int el_cnt[ID_LAST] = {0}; /* element counter ( robustness ) */
 2611|   351k|  int element_count_prev_streams =
 2612|   351k|      0; /* Element count of all previous sub streams. */
 2613|       |
 2614|  1.28M|  while ((type != ID_END) && (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) &&
  ------------------
  |  | 1018|   946k|#define AACDEC_CONCEAL 1
  ------------------
                while ((type != ID_END) && (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) &&
  ------------------
  |  | 1023|   946k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (2614:10): [True: 946k, False: 342k]
  |  Branch (2614:30): [True: 946k, False: 24]
  ------------------
 2615|   946k|         self->frameOK) {
  ------------------
  |  Branch (2615:10): [True: 938k, False: 8.28k]
  ------------------
 2616|   938k|    int el_channels;
 2617|       |
 2618|   938k|    if (!(self->flags[0] &
  ------------------
  |  Branch (2618:9): [True: 59.1k, False: 879k]
  ------------------
 2619|   938k|          (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD | AC_SCALABLE | AC_ER)))
  ------------------
  |  |  307|   938k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD | AC_SCALABLE | AC_ER)))
  ------------------
  |  |  310|   938k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD | AC_SCALABLE | AC_ER)))
  ------------------
  |  |  308|   938k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                        (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD | AC_SCALABLE | AC_ER)))
  ------------------
  |  |  303|   938k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                        (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD | AC_SCALABLE | AC_ER)))
  ------------------
  |  |  302|   938k|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
                        (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD | AC_SCALABLE | AC_ER)))
  ------------------
  |  |  305|   938k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
 2620|  59.1k|      type = (MP4_ELEMENT_ID)FDKreadBits(bs, 3);
 2621|   879k|    else {
 2622|   879k|      if (element_count >= (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)) {
  ------------------
  |  Branch (2622:11): [True: 0, False: 879k]
  ------------------
 2623|      0|        self->frameOK = 0;
 2624|      0|        ErrorStatus = AAC_DEC_PARSE_ERROR;
 2625|      0|        break;
 2626|      0|      }
 2627|   879k|      type = self->elements[element_count];
 2628|   879k|    }
 2629|       |
 2630|   938k|    if ((self->flags[streamIndex] & (AC_USAC | AC_RSVD50) &&
  ------------------
  |  |  307|   938k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if ((self->flags[streamIndex] & (AC_USAC | AC_RSVD50) &&
  ------------------
  |  |  310|   938k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
  |  Branch (2630:10): [True: 458k, False: 480k]
  ------------------
 2631|   458k|         element_count == 0) ||
  ------------------
  |  Branch (2631:10): [True: 220k, False: 237k]
  ------------------
 2632|   717k|        (self->flags[streamIndex] & AC_RSV603DA)) {
  ------------------
  |  |  308|   717k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2632:9): [True: 0, False: 717k]
  ------------------
 2633|   220k|      self->flags[streamIndex] &= ~AC_INDEP;
  ------------------
  |  |  319|   220k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
 2634|       |
 2635|   220k|      if (FDKreadBit(bs)) {
  ------------------
  |  Branch (2635:11): [True: 158k, False: 61.8k]
  ------------------
 2636|   158k|        self->flags[streamIndex] |= AC_INDEP;
  ------------------
  |  |  319|   158k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
 2637|   158k|      }
 2638|       |
 2639|   220k|      int ch = aacChannels;
 2640|   510k|      for (int chIdx = aacChannels; chIdx < self->ascChannels[streamIndex];
  ------------------
  |  Branch (2640:37): [True: 289k, False: 220k]
  ------------------
 2641|   289k|           chIdx++) {
 2642|   289k|        {
 2643|       |          /* Robustness check */
 2644|   289k|          if (ch >= self->aacChannels) {
  ------------------
  |  Branch (2644:15): [True: 0, False: 289k]
  ------------------
 2645|      0|            return AAC_DEC_UNKNOWN;
 2646|      0|          }
 2647|       |
 2648|       |          /* if last frame was broken and this frame is no independent frame,
 2649|       |           * correct decoding is impossible we need to trigger concealment */
 2650|   289k|          if ((CConcealment_GetLastFrameOk(
  ------------------
  |  Branch (2650:15): [True: 0, False: 289k]
  ------------------
 2651|   289k|                   &self->pAacDecoderStaticChannelInfo[ch]->concealmentInfo,
 2652|   289k|                   1) == 0) &&
 2653|      0|              !(self->flags[streamIndex] & AC_INDEP)) {
  ------------------
  |  |  319|      0|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
  |  Branch (2653:15): [True: 0, False: 0]
  ------------------
 2654|      0|            self->frameOK = 0;
 2655|      0|          }
 2656|   289k|          ch++;
 2657|   289k|        }
 2658|   289k|      }
 2659|   220k|    }
 2660|       |
 2661|   938k|    if ((INT)FDKgetValidBits(bs) < 0) {
  ------------------
  |  Branch (2661:9): [True: 3.12k, False: 935k]
  ------------------
 2662|  3.12k|      self->frameOK = 0;
 2663|  3.12k|    }
 2664|       |
 2665|   938k|    switch (type) {
 2666|  86.5k|      case ID_SCE:
  ------------------
  |  Branch (2666:7): [True: 86.5k, False: 851k]
  ------------------
 2667|   191k|      case ID_CPE:
  ------------------
  |  Branch (2667:7): [True: 105k, False: 833k]
  ------------------
 2668|   210k|      case ID_LFE:
  ------------------
  |  Branch (2668:7): [True: 18.8k, False: 919k]
  ------------------
 2669|   256k|      case ID_USAC_SCE:
  ------------------
  |  Branch (2669:7): [True: 45.8k, False: 892k]
  ------------------
 2670|   430k|      case ID_USAC_CPE:
  ------------------
  |  Branch (2670:7): [True: 174k, False: 763k]
  ------------------
 2671|   430k|      case ID_USAC_LFE:
  ------------------
  |  Branch (2671:7): [True: 0, False: 938k]
  ------------------
 2672|   430k|        if (element_count >= (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)) {
  ------------------
  |  Branch (2672:13): [True: 20, False: 430k]
  ------------------
 2673|     20|          self->frameOK = 0;
 2674|     20|          ErrorStatus = AAC_DEC_PARSE_ERROR;
 2675|     20|          break;
 2676|     20|        }
 2677|       |
 2678|   430k|        el_channels = CAacDecoder_GetELChannels(
 2679|   430k|            type, self->usacStereoConfigIndex[element_count]);
 2680|       |
 2681|       |        /*
 2682|       |          Consistency check
 2683|       |         */
 2684|   430k|        {
 2685|   430k|          int totalAscChannels = 0;
 2686|       |
 2687|   861k|          for (int i = 0; i < (1 * 1); i++) {
  ------------------
  |  Branch (2687:27): [True: 430k, False: 430k]
  ------------------
 2688|   430k|            totalAscChannels += self->ascChannels[i];
 2689|   430k|          }
 2690|   430k|          if ((el_cnt[type] >= (totalAscChannels >> (el_channels - 1))) ||
  ------------------
  |  Branch (2690:15): [True: 127, False: 430k]
  ------------------
 2691|   430k|              (aacChannels > (totalAscChannels - el_channels))) {
  ------------------
  |  Branch (2691:15): [True: 28, False: 430k]
  ------------------
 2692|    155|            ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 2693|    155|            self->frameOK = 0;
 2694|    155|            break;
 2695|    155|          }
 2696|   430k|        }
 2697|       |
 2698|   430k|        if (!(self->flags[streamIndex] & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  307|   430k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      if (!(self->flags[streamIndex] & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  310|   430k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                      if (!(self->flags[streamIndex] & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  308|   430k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2698:13): [True: 210k, False: 220k]
  ------------------
 2699|   210k|          int ch;
 2700|   525k|          for (ch = 0; ch < el_channels; ch += 1) {
  ------------------
  |  Branch (2700:24): [True: 315k, False: 210k]
  ------------------
 2701|   315k|            CPns_ResetData(&self->pAacDecoderChannelInfo[aacChannels + ch]
 2702|   315k|                                ->data.aac.PnsData,
 2703|   315k|                           &self->pAacDecoderChannelInfo[aacChannels + ch]
 2704|   315k|                                ->pComData->pnsInterChannelData);
 2705|   315k|          }
 2706|   210k|        }
 2707|       |
 2708|   430k|        if (self->frameOK) {
  ------------------
  |  Branch (2708:13): [True: 429k, False: 1.11k]
  ------------------
 2709|   429k|          ErrorStatus = CChannelElement_Read(
 2710|   429k|              bs, &self->pAacDecoderChannelInfo[aacChannels],
 2711|   429k|              &self->pAacDecoderStaticChannelInfo[aacChannels],
 2712|   429k|              self->streamInfo.aot, &self->samplingRateInfo[streamIndex],
 2713|   429k|              self->flags[streamIndex], self->elFlags[element_count],
 2714|   429k|              self->streamInfo.aacSamplesPerFrame, el_channels,
 2715|   429k|              self->streamInfo.epConfig, self->hInput);
 2716|   429k|          if (ErrorStatus != AAC_DEC_OK) {
  ------------------
  |  Branch (2716:15): [True: 2.65k, False: 427k]
  ------------------
 2717|  2.65k|            self->frameOK = 0;
 2718|  2.65k|          }
 2719|   429k|        }
 2720|       |
 2721|   430k|        if (self->frameOK) {
  ------------------
  |  Branch (2721:13): [True: 427k, False: 3.77k]
  ------------------
 2722|       |          /* Lookup the element and decode it only if it belongs to the current
 2723|       |           * program */
 2724|   427k|          if (CProgramConfig_LookupElement(
  ------------------
  |  Branch (2724:15): [True: 426k, False: 98]
  ------------------
 2725|   427k|                  pce, self->streamInfo.channelConfig,
 2726|   427k|                  self->pAacDecoderChannelInfo[aacChannels]->ElementInstanceTag,
 2727|   427k|                  aacChannels, self->chMapping, self->channelType,
 2728|   427k|                  self->channelIndices, (8), &previous_element_index,
 2729|   427k|                  self->elements, type)) {
 2730|   426k|            channel_elements[channel_element_count++] = type;
 2731|   426k|            aacChannels += el_channels;
 2732|   426k|          } else {
 2733|     98|            self->frameOK = 0;
 2734|     98|          }
 2735|       |          /* Create SBR element for SBR for upsampling for LFE elements,
 2736|       |             and if SBR was implicitly signaled, because the first frame(s)
 2737|       |             may not contain SBR payload (broken encoder, bit errors). */
 2738|   427k|          if (self->frameOK &&
  ------------------
  |  Branch (2738:15): [True: 426k, False: 98]
  ------------------
 2739|   426k|              ((self->flags[streamIndex] & AC_SBR_PRESENT) ||
  ------------------
  |  |  311|   426k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
  |  Branch (2739:16): [True: 295k, False: 131k]
  ------------------
 2740|   131k|               (self->sbrEnabled == 1)) &&
  ------------------
  |  Branch (2740:16): [True: 247, False: 131k]
  ------------------
 2741|   295k|              !(self->flags[streamIndex] &
  ------------------
  |  Branch (2741:15): [True: 102k, False: 192k]
  ------------------
 2742|   295k|                AC_USAC) /* Is done during explicit config set up */
  ------------------
  |  |  307|   295k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
 2743|   427k|          ) {
 2744|   102k|            SBR_ERROR sbrError;
 2745|   102k|            UCHAR configMode = 0;
 2746|   102k|            UCHAR configChanged = 0;
 2747|   102k|            configMode |= AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|   102k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
 2748|       |
 2749|   102k|            sbrError = sbrDecoder_InitElement(
 2750|   102k|                self->hSbrDecoder, self->streamInfo.aacSampleRate,
 2751|   102k|                self->streamInfo.extSamplingRate,
 2752|   102k|                self->streamInfo.aacSamplesPerFrame, self->streamInfo.aot, type,
 2753|   102k|                previous_element_index, 2, /* Signalize that harmonicSBR shall
 2754|       |                                              be ignored in the config change
 2755|       |                                              detection */
 2756|   102k|                0, configMode, &configChanged, self->downscaleFactor);
 2757|   102k|            if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (2757:17): [True: 42, False: 102k]
  ------------------
 2758|       |              /* Do not try to apply SBR because initializing the element
 2759|       |               * failed. */
 2760|     42|              self->sbrEnabled = 0;
 2761|     42|            }
 2762|   102k|          }
 2763|   427k|        }
 2764|       |
 2765|   430k|        el_cnt[type]++;
 2766|   430k|        if (self->frameOK && (self->flags[streamIndex] & AC_USAC) &&
  ------------------
  |  |  307|   426k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2766:13): [True: 426k, False: 3.86k]
  |  Branch (2766:30): [True: 218k, False: 208k]
  ------------------
 2767|   218k|            (type == ID_USAC_CPE || type == ID_USAC_SCE)) {
  ------------------
  |  Branch (2767:14): [True: 173k, False: 44.7k]
  |  Branch (2767:37): [True: 44.7k, False: 0]
  ------------------
 2768|   218k|          ErrorStatus = aacDecoder_ParseExplicitMpsAndSbr(
 2769|   218k|              self, bs, previous_element, previous_element_index, element_count,
 2770|   218k|              el_cnt);
 2771|   218k|          if (ErrorStatus != AAC_DEC_OK) {
  ------------------
  |  Branch (2771:15): [True: 329, False: 218k]
  ------------------
 2772|    329|            self->frameOK = 0;
 2773|    329|          }
 2774|   218k|        }
 2775|   430k|        break;
 2776|       |
 2777|    977|      case ID_CCE:
  ------------------
  |  Branch (2777:7): [True: 977, False: 937k]
  ------------------
 2778|       |        /*
 2779|       |          Consistency check
 2780|       |        */
 2781|    977|        if (el_cnt[type] > self->ascChannels[streamIndex]) {
  ------------------
  |  Branch (2781:13): [True: 2, False: 975]
  ------------------
 2782|      2|          ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 2783|      2|          self->frameOK = 0;
 2784|      2|          break;
 2785|      2|        }
 2786|       |
 2787|    975|        if (self->frameOK) {
  ------------------
  |  Branch (2787:13): [True: 973, False: 2]
  ------------------
 2788|    973|          CAacDecoderCommonData commonData;
 2789|    973|          CAacDecoderCommonStaticData commonStaticData;
 2790|    973|          CWorkBufferCore1 workBufferCore1;
 2791|    973|          commonStaticData.pWorkBufferCore1 = &workBufferCore1;
 2792|       |          /* memory for spectral lines temporal on scratch */
 2793|    973|          C_AALLOC_SCRATCH_START(mdctSpec, FIXP_DBL, 1024);
  ------------------
  |  |  319|    973|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|    973|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|    973|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|    973|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|    973|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|    973|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|    973|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|    973|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|    973|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|    973|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
 2794|       |
 2795|       |          /* create dummy channel for CCE parsing on stack */
 2796|    973|          CAacDecoderChannelInfo tmpAacDecoderChannelInfo,
 2797|    973|              *pTmpAacDecoderChannelInfo;
 2798|       |
 2799|    973|          FDKmemclear(mdctSpec, 1024 * sizeof(FIXP_DBL));
 2800|       |
 2801|    973|          tmpAacDecoderChannelInfo.pDynData = commonData.pAacDecoderDynamicData;
 2802|    973|          tmpAacDecoderChannelInfo.pComData = &commonData;
 2803|    973|          tmpAacDecoderChannelInfo.pComStaticData = &commonStaticData;
 2804|    973|          tmpAacDecoderChannelInfo.pSpectralCoefficient =
 2805|    973|              (SPECTRAL_PTR)mdctSpec;
 2806|       |          /* Assume AAC-LC */
 2807|    973|          tmpAacDecoderChannelInfo.granuleLength =
 2808|    973|              self->streamInfo.aacSamplesPerFrame / 8;
 2809|       |          /* Reset PNS data. */
 2810|    973|          CPns_ResetData(
 2811|    973|              &tmpAacDecoderChannelInfo.data.aac.PnsData,
 2812|    973|              &tmpAacDecoderChannelInfo.pComData->pnsInterChannelData);
 2813|    973|          pTmpAacDecoderChannelInfo = &tmpAacDecoderChannelInfo;
 2814|       |          /* do CCE parsing */
 2815|    973|          ErrorStatus = CChannelElement_Read(
 2816|    973|              bs, &pTmpAacDecoderChannelInfo, NULL, self->streamInfo.aot,
 2817|    973|              &self->samplingRateInfo[streamIndex], self->flags[streamIndex],
 2818|    973|              AC_EL_GA_CCE, self->streamInfo.aacSamplesPerFrame, 1,
  ------------------
  |  |  292|    973|#define AC_EL_GA_CCE 0x00000001 /*!< GA AAC coupling channel element (CCE) */
  ------------------
 2819|    973|              self->streamInfo.epConfig, self->hInput);
 2820|       |
 2821|    973|          C_AALLOC_SCRATCH_END(mdctSpec, FIXP_DBL, 1024);
  ------------------
  |  |  327|    973|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
 2822|       |
 2823|    973|          if (ErrorStatus) {
  ------------------
  |  Branch (2823:15): [True: 25, False: 948]
  ------------------
 2824|     25|            self->frameOK = 0;
 2825|     25|          }
 2826|       |
 2827|    973|          if (self->frameOK) {
  ------------------
  |  Branch (2827:15): [True: 948, False: 25]
  ------------------
 2828|       |            /* Lookup the element and decode it only if it belongs to the
 2829|       |             * current program */
 2830|    948|            if (CProgramConfig_LookupElement(
  ------------------
  |  Branch (2830:17): [True: 942, False: 6]
  ------------------
 2831|    948|                    pce, self->streamInfo.channelConfig,
 2832|    948|                    pTmpAacDecoderChannelInfo->ElementInstanceTag, 0,
 2833|    948|                    self->chMapping, self->channelType, self->channelIndices,
 2834|    948|                    (8), &previous_element_index, self->elements, type)) {
 2835|       |              /* decoding of CCE not supported */
 2836|    942|            } else {
 2837|      6|              self->frameOK = 0;
 2838|      6|            }
 2839|    948|          }
 2840|    973|        }
 2841|    975|        el_cnt[type]++;
 2842|    975|        break;
 2843|       |
 2844|  17.0k|      case ID_DSE: {
  ------------------
  |  Branch (2844:7): [True: 17.0k, False: 921k]
  ------------------
 2845|  17.0k|        UCHAR element_instance_tag;
 2846|       |
 2847|  17.0k|        CDataStreamElement_Read(self, bs, &element_instance_tag, auStartAnchor);
 2848|       |
 2849|  17.0k|        if (!CProgramConfig_LookupElement(
  ------------------
  |  Branch (2849:13): [True: 1.77k, False: 15.2k]
  ------------------
 2850|  17.0k|                pce, self->streamInfo.channelConfig, element_instance_tag, 0,
 2851|  17.0k|                self->chMapping, self->channelType, self->channelIndices, (8),
 2852|  17.0k|                &previous_element_index, self->elements, type)) {
 2853|       |          /* most likely an error in bitstream occured */
 2854|       |          // self->frameOK = 0;
 2855|  1.77k|        }
 2856|  17.0k|      } break;
 2857|       |
 2858|  1.97k|      case ID_PCE: {
  ------------------
  |  Branch (2858:7): [True: 1.97k, False: 936k]
  ------------------
 2859|  1.97k|        int result = CProgramConfigElement_Read(bs, self->hInput, pce,
 2860|  1.97k|                                                self->streamInfo.channelConfig,
 2861|  1.97k|                                                auStartAnchor);
 2862|  1.97k|        if (result < 0) {
  ------------------
  |  Branch (2862:13): [True: 10, False: 1.96k]
  ------------------
 2863|       |          /* Something went wrong */
 2864|     10|          ErrorStatus = AAC_DEC_PARSE_ERROR;
 2865|     10|          self->frameOK = 0;
 2866|  1.96k|        } else if (result > 1) {
  ------------------
  |  Branch (2866:20): [True: 0, False: 1.96k]
  ------------------
 2867|       |          /* Built element table */
 2868|      0|          int elIdx = CProgramConfig_GetElementTable(
 2869|      0|              pce, self->elements, (((8)) + (8)), &self->chMapIndex);
 2870|       |          /* Reset the remaining tabs */
 2871|      0|          for (; elIdx < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1);
  ------------------
  |  Branch (2871:18): [True: 0, False: 0]
  ------------------
 2872|      0|               elIdx++) {
 2873|      0|            self->elements[elIdx] = ID_NONE;
 2874|      0|          }
 2875|       |          /* Make new number of channel persistent */
 2876|      0|          self->ascChannels[streamIndex] = pce->NumChannels;
 2877|       |          /* If PCE is not first element conceal this frame to avoid
 2878|       |           * inconsistencies */
 2879|      0|          if (element_count != 0) {
  ------------------
  |  Branch (2879:15): [True: 0, False: 0]
  ------------------
 2880|      0|            self->frameOK = 0;
 2881|      0|          }
 2882|      0|        }
 2883|  1.97k|        pceRead = (result >= 0) ? 1 : 0;
  ------------------
  |  Branch (2883:19): [True: 1.96k, False: 10]
  ------------------
 2884|  1.97k|      } break;
 2885|       |
 2886|  8.78k|      case ID_FIL: {
  ------------------
  |  Branch (2886:7): [True: 8.78k, False: 929k]
  ------------------
 2887|  8.78k|        int bitCnt = FDKreadBits(bs, 4); /* bs_count */
 2888|       |
 2889|  8.78k|        if (bitCnt == 15) {
  ------------------
  |  Branch (2889:13): [True: 36, False: 8.75k]
  ------------------
 2890|     36|          int esc_count = FDKreadBits(bs, 8); /* bs_esc_count */
 2891|     36|          bitCnt = esc_count + 14;
 2892|     36|        }
 2893|       |
 2894|       |        /* Convert to bits */
 2895|  8.78k|        bitCnt <<= 3;
 2896|       |
 2897|  15.4k|        while (bitCnt > 0) {
  ------------------
  |  Branch (2897:16): [True: 6.71k, False: 8.73k]
  ------------------
 2898|  6.71k|          ErrorStatus = CAacDecoder_ExtPayloadParse(
 2899|  6.71k|              self, bs, &bitCnt, previous_element, previous_element_index, 1);
 2900|  6.71k|          if (ErrorStatus != AAC_DEC_OK) {
  ------------------
  |  Branch (2900:15): [True: 49, False: 6.66k]
  ------------------
 2901|     49|            self->frameOK = 0;
 2902|     49|            break;
 2903|     49|          }
 2904|  6.71k|        }
 2905|  8.78k|      } break;
 2906|       |
 2907|   116k|      case ID_EXT:
  ------------------
  |  Branch (2907:7): [True: 116k, False: 821k]
  ------------------
 2908|   116k|        if (element_count >= (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)) {
  ------------------
  |  Branch (2908:13): [True: 0, False: 116k]
  ------------------
 2909|      0|          self->frameOK = 0;
 2910|      0|          ErrorStatus = AAC_DEC_PARSE_ERROR;
 2911|      0|          break;
 2912|      0|        }
 2913|       |
 2914|   116k|        ErrorStatus = aacDecoder_ParseExplicitMpsAndSbr(
 2915|   116k|            self, bs, previous_element, previous_element_index, element_count,
 2916|   116k|            el_cnt);
 2917|   116k|        break;
 2918|       |
 2919|  19.2k|      case ID_USAC_EXT: {
  ------------------
  |  Branch (2919:7): [True: 19.2k, False: 919k]
  ------------------
 2920|  19.2k|        if ((element_count - element_count_prev_streams) >=
  ------------------
  |  Branch (2920:13): [True: 0, False: 19.2k]
  ------------------
 2921|  19.2k|            TP_USAC_MAX_ELEMENTS) {
  ------------------
  |  |  118|  19.2k|#define TP_USAC_MAX_ELEMENTS ((24) + TP_USAC_MAX_EXT_ELEMENTS)
  |  |  ------------------
  |  |  |  |  116|  19.2k|#define TP_USAC_MAX_EXT_ELEMENTS ((24))
  |  |  ------------------
  ------------------
 2922|      0|          self->frameOK = 0;
 2923|      0|          ErrorStatus = AAC_DEC_PARSE_ERROR;
 2924|      0|          break;
 2925|      0|        }
 2926|       |        /* parse extension element payload
 2927|       |           q.v. rsv603daExtElement() ISO/IEC DIS 23008-3  Table 30
 2928|       |           or   UsacExElement() ISO/IEC FDIS 23003-3:2011(E)  Table 21
 2929|       |         */
 2930|  19.2k|        int usacExtElementPayloadLength;
 2931|       |        /* int usacExtElementStart, usacExtElementStop; */
 2932|       |
 2933|  19.2k|        if (FDKreadBit(bs)) {   /* usacExtElementPresent */
  ------------------
  |  Branch (2933:13): [True: 8.84k, False: 10.3k]
  ------------------
 2934|  8.84k|          if (FDKreadBit(bs)) { /* usacExtElementUseDefaultLength */
  ------------------
  |  Branch (2934:15): [True: 6.41k, False: 2.42k]
  ------------------
 2935|  6.41k|            usacExtElementPayloadLength =
 2936|  6.41k|                self->pUsacConfig[streamIndex]
 2937|  6.41k|                    ->element[element_count - element_count_prev_streams]
 2938|  6.41k|                    .extElement.usacExtElementDefaultLength;
 2939|  6.41k|          } else {
 2940|  2.42k|            usacExtElementPayloadLength = FDKreadBits(bs, 8);
 2941|  2.42k|            if (usacExtElementPayloadLength == (UINT)(1 << 8) - 1) {
  ------------------
  |  Branch (2941:17): [True: 15, False: 2.41k]
  ------------------
 2942|     15|              UINT valueAdd = FDKreadBits(bs, 16);
 2943|     15|              usacExtElementPayloadLength += (INT)valueAdd - 2;
 2944|     15|            }
 2945|  2.42k|          }
 2946|  8.84k|          if (usacExtElementPayloadLength > 0) {
  ------------------
  |  Branch (2946:15): [True: 7.71k, False: 1.13k]
  ------------------
 2947|  7.71k|            int usacExtBitPos;
 2948|       |
 2949|  7.71k|            if (self->pUsacConfig[streamIndex]
  ------------------
  |  Branch (2949:17): [True: 828, False: 6.88k]
  ------------------
 2950|  7.71k|                    ->element[element_count - element_count_prev_streams]
 2951|  7.71k|                    .extElement.usacExtElementPayloadFrag) {
 2952|    828|              /* usacExtElementStart = */ FDKreadBit(bs);
 2953|    828|              /* usacExtElementStop = */ FDKreadBit(bs);
 2954|  6.88k|            } else {
 2955|       |              /* usacExtElementStart = 1; */
 2956|       |              /* usacExtElementStop = 1; */
 2957|  6.88k|            }
 2958|       |
 2959|  7.71k|            usacExtBitPos = (INT)FDKgetValidBits(bs);
 2960|       |
 2961|  7.71k|            USAC_EXT_ELEMENT_TYPE usacExtElementType =
 2962|  7.71k|                self->pUsacConfig[streamIndex]
 2963|  7.71k|                    ->element[element_count - element_count_prev_streams]
 2964|  7.71k|                    .extElement.usacExtElementType;
 2965|       |
 2966|  7.71k|            switch (usacExtElementType) {
 2967|  6.65k|              case ID_EXT_ELE_UNI_DRC: /* uniDrcGain() */
  ------------------
  |  Branch (2967:15): [True: 6.65k, False: 1.05k]
  ------------------
 2968|  6.65k|                if (streamIndex == 0) {
  ------------------
  |  Branch (2968:21): [True: 6.65k, Folded]
  ------------------
 2969|  6.65k|                  int drcErr;
 2970|       |
 2971|  6.65k|                  drcErr = FDK_drcDec_ReadUniDrcGain(self->hUniDrcDecoder, bs);
 2972|  6.65k|                  if (drcErr != 0) {
  ------------------
  |  Branch (2972:23): [True: 300, False: 6.35k]
  ------------------
 2973|    300|                    ErrorStatus = AAC_DEC_PARSE_ERROR;
 2974|    300|                  }
 2975|  6.65k|                }
 2976|  6.65k|                break;
 2977|       |
 2978|  1.05k|              default:
  ------------------
  |  Branch (2978:15): [True: 1.05k, False: 6.65k]
  ------------------
 2979|  1.05k|                break;
 2980|  7.71k|            }
 2981|       |
 2982|       |            /* Skip any remaining bits of extension payload */
 2983|  7.71k|            usacExtBitPos = (usacExtElementPayloadLength * 8) -
 2984|  7.71k|                            (usacExtBitPos - (INT)FDKgetValidBits(bs));
 2985|  7.71k|            if (usacExtBitPos < 0) {
  ------------------
  |  Branch (2985:17): [True: 78, False: 7.63k]
  ------------------
 2986|     78|              self->frameOK = 0;
 2987|     78|              ErrorStatus = AAC_DEC_PARSE_ERROR;
 2988|     78|            }
 2989|  7.71k|            FDKpushBiDirectional(bs, usacExtBitPos);
 2990|  7.71k|          }
 2991|  8.84k|        }
 2992|  19.2k|      } break;
 2993|   342k|      case ID_END:
  ------------------
  |  Branch (2993:7): [True: 342k, False: 595k]
  ------------------
 2994|   342k|      case ID_USAC_END:
  ------------------
  |  Branch (2994:7): [True: 0, False: 938k]
  ------------------
 2995|   342k|        break;
 2996|       |
 2997|      0|      default:
  ------------------
  |  Branch (2997:7): [True: 0, False: 938k]
  ------------------
 2998|      0|        ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 2999|      0|        self->frameOK = 0;
 3000|      0|        break;
 3001|   938k|    }
 3002|       |
 3003|   938k|    previous_element = type;
 3004|   938k|    element_count++;
 3005|       |
 3006|   938k|  } /* while ( (type != ID_END) ... ) */
 3007|       |
 3008|   351k|  if (!(self->flags[streamIndex] &
  ------------------
  |  Branch (3008:7): [True: 11.6k, False: 339k]
  ------------------
 3009|   351k|        (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_BSAC | AC_LD | AC_ELD | AC_ER |
  ------------------
  |  |  307|   351k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_BSAC | AC_LD | AC_ELD | AC_ER |
  ------------------
  |  |  310|   351k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                      (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_BSAC | AC_LD | AC_ELD | AC_ER |
  ------------------
  |  |  308|   351k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                      (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_BSAC | AC_LD | AC_ELD | AC_ER |
  ------------------
  |  |  306|   351k|#define AC_BSAC 0x000080        /*!< BSAC */
  ------------------
                      (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_BSAC | AC_LD | AC_ELD | AC_ER |
  ------------------
  |  |  304|   351k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                      (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_BSAC | AC_LD | AC_ELD | AC_ER |
  ------------------
  |  |  303|   351k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                      (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_BSAC | AC_LD | AC_ELD | AC_ER |
  ------------------
  |  |  305|   351k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
 3010|   351k|         AC_SCALABLE)) &&
  ------------------
  |  |  302|   351k|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
 3011|  11.6k|      (self->streamInfo.channelConfig == 0) && pce->isValid &&
  ------------------
  |  Branch (3011:7): [True: 1.79k, False: 9.83k]
  |  Branch (3011:48): [True: 1.79k, False: 0]
  ------------------
 3012|  1.79k|      (ErrorStatus == AAC_DEC_OK) && self->frameOK &&
  ------------------
  |  Branch (3012:7): [True: 1.71k, False: 82]
  |  Branch (3012:38): [True: 1.48k, False: 233]
  ------------------
 3013|  1.48k|      !(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1018|  1.48k|#define AACDEC_CONCEAL 1
  ------------------
                    !(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1023|  1.48k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3013:7): [True: 1.48k, False: 0]
  ------------------
 3014|       |    /* Check whether all PCE listed element instance tags are present in
 3015|       |     * raw_data_block() */
 3016|  1.48k|    if (!validateElementInstanceTags(
  ------------------
  |  Branch (3016:9): [True: 21, False: 1.46k]
  ------------------
 3017|  1.48k|            &self->pce, self->pAacDecoderChannelInfo, aacChannels,
 3018|  1.48k|            channel_elements,
 3019|  1.48k|            fMin(channel_element_count, (int)(sizeof(channel_elements) /
 3020|  1.48k|                                              sizeof(*channel_elements))))) {
 3021|     21|      ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 3022|     21|      self->frameOK = 0;
 3023|     21|    }
 3024|  1.48k|  }
 3025|       |
 3026|   351k|  if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1018|   351k|#define AACDEC_CONCEAL 1
  ------------------
                if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1023|   351k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3026:7): [True: 351k, False: 24]
  ------------------
 3027|       |    /* float decoder checks if bitsLeft is in range 0-7; only prerollAUs are
 3028|       |     * byteAligned with respect to the first bit */
 3029|       |    /* Byte alignment with respect to the first bit of the raw_data_block(). */
 3030|   351k|    if (!(self->flags[streamIndex] & (AC_RSVD50 | AC_USAC)) ||
  ------------------
  |  |  310|   351k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                  if (!(self->flags[streamIndex] & (AC_RSVD50 | AC_USAC)) ||
  ------------------
  |  |  307|   351k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (3030:9): [True: 129k, False: 222k]
  ------------------
 3031|   222k|        (self->prerollAULength[self->accessUnit]) /* indicates preroll */
  ------------------
  |  Branch (3031:9): [True: 2.07k, False: 220k]
  ------------------
 3032|   351k|    ) {
 3033|   131k|      FDKbyteAlign(bs, auStartAnchor);
 3034|   131k|    }
 3035|       |
 3036|       |    /* Check if all bits of the raw_data_block() have been read. */
 3037|   351k|    if (transportDec_GetAuBitsTotal(self->hInput, 0) > 0) {
  ------------------
  |  Branch (3037:9): [True: 85.7k, False: 265k]
  ------------------
 3038|  85.7k|      INT unreadBits = transportDec_GetAuBitsRemaining(self->hInput, 0);
 3039|       |      /* for pre-roll frames pre-roll length has to be used instead of total AU
 3040|       |       * lenght */
 3041|       |      /* unreadBits regarding preroll bounds */
 3042|  85.7k|      if (self->prerollAULength[self->accessUnit]) {
  ------------------
  |  Branch (3042:11): [True: 67, False: 85.6k]
  ------------------
 3043|     67|        unreadBits = unreadBits - transportDec_GetAuBitsTotal(self->hInput, 0) +
 3044|     67|                     (INT)self->prerollAULength[self->accessUnit];
 3045|     67|      }
 3046|  85.7k|      if (((self->flags[streamIndex] & (AC_RSVD50 | AC_USAC)) &&
  ------------------
  |  |  310|  85.7k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if (((self->flags[streamIndex] & (AC_RSVD50 | AC_USAC)) &&
  ------------------
  |  |  307|  85.7k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (3046:12): [True: 10.1k, False: 75.6k]
  ------------------
 3047|  10.1k|           ((unreadBits < 0) || (unreadBits > 7)) &&
  ------------------
  |  Branch (3047:13): [True: 981, False: 9.13k]
  |  Branch (3047:33): [True: 355, False: 8.77k]
  ------------------
 3048|  1.33k|           !(self->prerollAULength[self->accessUnit])) ||
  ------------------
  |  Branch (3048:12): [True: 1.27k, False: 64]
  ------------------
 3049|  84.4k|          ((!(self->flags[streamIndex] & (AC_RSVD50 | AC_USAC)) ||
  ------------------
  |  |  310|  84.4k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        ((!(self->flags[streamIndex] & (AC_RSVD50 | AC_USAC)) ||
  ------------------
  |  |  307|  84.4k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (3049:13): [True: 75.6k, False: 8.84k]
  ------------------
 3050|  8.84k|            (self->prerollAULength[self->accessUnit])) &&
  ------------------
  |  Branch (3050:13): [True: 67, False: 8.77k]
  ------------------
 3051|  75.6k|           (unreadBits != 0))) {
  ------------------
  |  Branch (3051:12): [True: 2.22k, False: 73.4k]
  ------------------
 3052|  3.49k|        if ((((unreadBits < 0) || (unreadBits > 7)) && self->frameOK) &&
  ------------------
  |  Branch (3052:15): [True: 2.80k, False: 690]
  |  Branch (3052:35): [True: 689, False: 1]
  |  Branch (3052:56): [True: 184, False: 3.31k]
  ------------------
 3053|    184|            ((transportDec_GetFormat(self->hInput) == TT_DRM) &&
  ------------------
  |  Branch (3053:14): [True: 0, False: 184]
  ------------------
 3054|      0|             (self->flags[streamIndex] & AC_USAC))) {
  ------------------
  |  |  307|      0|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (3054:14): [True: 0, False: 0]
  ------------------
 3055|       |          /* Set frame OK because of fill bits. */
 3056|      0|          self->frameOK = 1;
 3057|  3.49k|        } else {
 3058|  3.49k|          self->frameOK = 0;
 3059|  3.49k|        }
 3060|       |
 3061|       |        /* Do not overwrite current error */
 3062|  3.49k|        if (ErrorStatus == AAC_DEC_OK && self->frameOK == 0) {
  ------------------
  |  Branch (3062:13): [True: 1.96k, False: 1.53k]
  |  Branch (3062:42): [True: 1.96k, False: 0]
  ------------------
 3063|  1.96k|          ErrorStatus = AAC_DEC_PARSE_ERROR;
 3064|  1.96k|        }
 3065|       |        /* Always put the bitbuffer at the right position after the current
 3066|       |         * Access Unit. */
 3067|  3.49k|        FDKpushBiDirectional(bs, unreadBits);
 3068|  3.49k|      }
 3069|  85.7k|    }
 3070|       |
 3071|       |    /* Check the last element. The terminator (ID_END) has to be the last one
 3072|       |     * (even if ER syntax is used). */
 3073|   351k|    if (self->frameOK && type != ID_END) {
  ------------------
  |  Branch (3073:9): [True: 342k, False: 9.07k]
  |  Branch (3073:26): [True: 0, False: 342k]
  ------------------
 3074|       |      /* Do not overwrite current error */
 3075|      0|      if (ErrorStatus == AAC_DEC_OK) {
  ------------------
  |  Branch (3075:11): [True: 0, False: 0]
  ------------------
 3076|      0|        ErrorStatus = AAC_DEC_PARSE_ERROR;
 3077|      0|      }
 3078|      0|      self->frameOK = 0;
 3079|      0|    }
 3080|   351k|  }
 3081|       |
 3082|   351k|  if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) && self->frameOK) {
  ------------------
  |  | 1018|   351k|#define AACDEC_CONCEAL 1
  ------------------
                if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) && self->frameOK) {
  ------------------
  |  | 1023|   351k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3082:7): [True: 351k, False: 24]
  |  Branch (3082:53): [True: 342k, False: 9.07k]
  ------------------
 3083|   342k|    channel_elements[channel_element_count++] = ID_END;
 3084|   342k|  }
 3085|   351k|  element_count = 0;
 3086|   351k|  aacChannels = 0;
 3087|   351k|  type = ID_NONE;
 3088|   351k|  previous_element_index = 0;
 3089|       |
 3090|  1.16M|  while (type != ID_END &&
  ------------------
  |  Branch (3090:10): [True: 810k, False: 351k]
  ------------------
 3091|   810k|         element_count < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)) {
  ------------------
  |  Branch (3091:10): [True: 810k, False: 0]
  ------------------
 3092|   810k|    int el_channels;
 3093|       |
 3094|   810k|    if ((flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) || !self->frameOK) {
  ------------------
  |  | 1018|   810k|#define AACDEC_CONCEAL 1
  ------------------
                  if ((flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) || !self->frameOK) {
  ------------------
  |  | 1023|   810k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3094:9): [True: 72, False: 810k]
  |  Branch (3094:54): [True: 28.4k, False: 782k]
  ------------------
 3095|  28.5k|      channel_elements[element_count] = self->elements[element_count];
 3096|  28.5k|      if (channel_elements[element_count] == ID_NONE) {
  ------------------
  |  Branch (3096:11): [True: 338, False: 28.2k]
  ------------------
 3097|    338|        channel_elements[element_count] = ID_END;
 3098|    338|      }
 3099|  28.5k|    }
 3100|       |
 3101|   810k|    if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA | AC_BSAC)) {
  ------------------
  |  |  307|   810k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA | AC_BSAC)) {
  ------------------
  |  |  308|   810k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                  if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA | AC_BSAC)) {
  ------------------
  |  |  306|   810k|#define AC_BSAC 0x000080        /*!< BSAC */
  ------------------
  |  Branch (3101:9): [True: 464k, False: 346k]
  ------------------
 3102|   464k|      type = self->elements[element_count];
 3103|   464k|    } else {
 3104|   346k|      type = channel_elements[element_count];
 3105|   346k|    }
 3106|       |
 3107|   810k|    if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) && self->frameOK) {
  ------------------
  |  | 1018|   810k|#define AACDEC_CONCEAL 1
  ------------------
                  if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) && self->frameOK) {
  ------------------
  |  | 1023|   810k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3107:9): [True: 810k, False: 72]
  |  Branch (3107:55): [True: 782k, False: 28.4k]
  ------------------
 3108|   782k|      switch (type) {
 3109|  82.9k|        case ID_SCE:
  ------------------
  |  Branch (3109:9): [True: 82.9k, False: 699k]
  ------------------
 3110|   185k|        case ID_CPE:
  ------------------
  |  Branch (3110:9): [True: 102k, False: 679k]
  ------------------
 3111|   203k|        case ID_LFE:
  ------------------
  |  Branch (3111:9): [True: 18.5k, False: 763k]
  ------------------
 3112|   248k|        case ID_USAC_SCE:
  ------------------
  |  Branch (3112:9): [True: 44.3k, False: 737k]
  ------------------
 3113|   421k|        case ID_USAC_CPE:
  ------------------
  |  Branch (3113:9): [True: 173k, False: 608k]
  ------------------
 3114|   421k|        case ID_USAC_LFE:
  ------------------
  |  Branch (3114:9): [True: 0, False: 782k]
  ------------------
 3115|       |
 3116|   421k|          el_channels = CAacDecoder_GetELChannels(
 3117|   421k|              type, self->usacStereoConfigIndex[element_count]);
 3118|       |
 3119|   421k|          if (!hdaacDecoded) {
  ------------------
  |  Branch (3119:15): [True: 421k, False: 0]
  ------------------
 3120|   421k|            if (self->pAacDecoderStaticChannelInfo[aacChannels]
  ------------------
  |  Branch (3120:17): [True: 52.8k, False: 368k]
  ------------------
 3121|   421k|                    ->pCpeStaticData != NULL) {
 3122|  52.8k|              self->pAacDecoderStaticChannelInfo[aacChannels]
 3123|  52.8k|                  ->pCpeStaticData->jointStereoPersistentData.scratchBuffer =
 3124|  52.8k|                  (FIXP_DBL *)pTimeData;
 3125|  52.8k|            }
 3126|   421k|            CChannelElement_Decode(
 3127|   421k|                &self->pAacDecoderChannelInfo[aacChannels],
 3128|   421k|                &self->pAacDecoderStaticChannelInfo[aacChannels],
 3129|   421k|                &self->samplingRateInfo[streamIndex], self->flags[streamIndex],
 3130|   421k|                self->elFlags[element_count], el_channels);
 3131|   421k|          }
 3132|   421k|          aacChannels += el_channels;
 3133|   421k|          break;
 3134|      0|        case ID_NONE:
  ------------------
  |  Branch (3134:9): [True: 0, False: 782k]
  ------------------
 3135|      0|          type = ID_END;
 3136|      0|          break;
 3137|   360k|        default:
  ------------------
  |  Branch (3137:9): [True: 360k, False: 421k]
  ------------------
 3138|   360k|          break;
 3139|   782k|      }
 3140|   782k|    }
 3141|   810k|    element_count++;
 3142|   810k|  }
 3143|       |
 3144|       |  /* More AAC channels than specified by the ASC not allowed. */
 3145|   351k|  if ((aacChannels == 0 || aacChannels > self->aacChannels) &&
  ------------------
  |  Branch (3145:8): [True: 9.12k, False: 342k]
  |  Branch (3145:28): [True: 0, False: 342k]
  ------------------
 3146|  9.12k|      !(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1018|  9.12k|#define AACDEC_CONCEAL 1
  ------------------
                    !(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1023|  9.12k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3146:7): [True: 9.10k, False: 24]
  ------------------
 3147|       |    /* Do not overwrite current error */
 3148|  9.10k|    if (ErrorStatus == AAC_DEC_OK) {
  ------------------
  |  Branch (3148:9): [True: 1.91k, False: 7.19k]
  ------------------
 3149|  1.91k|      ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 3150|  1.91k|    }
 3151|  9.10k|    self->frameOK = 0;
 3152|  9.10k|    aacChannels = 0;
 3153|  9.10k|  }
 3154|       |
 3155|   351k|  if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1018|   351k|#define AACDEC_CONCEAL 1
  ------------------
                if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) {
  ------------------
  |  | 1023|   351k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3155:7): [True: 351k, False: 24]
  ------------------
 3156|   351k|    if (TRANSPORTDEC_OK != transportDec_CrcCheck(self->hInput)) {
  ------------------
  |  Branch (3156:9): [True: 0, False: 351k]
  ------------------
 3157|      0|      ErrorStatus = AAC_DEC_CRC_ERROR;
 3158|      0|      self->frameOK = 0;
 3159|      0|    }
 3160|   351k|  }
 3161|       |
 3162|       |  /* Ensure that in case of concealment a proper error status is set. */
 3163|   351k|  if ((self->frameOK == 0) && (ErrorStatus == AAC_DEC_OK)) {
  ------------------
  |  Branch (3163:7): [True: 9.10k, False: 342k]
  |  Branch (3163:31): [True: 0, False: 9.10k]
  ------------------
 3164|      0|    ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 3165|      0|  }
 3166|       |
 3167|   351k|  if (self->frameOK && (flags & AACDEC_FLUSH)) {
  ------------------
  |  | 1023|   342k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3167:7): [True: 342k, False: 9.10k]
  |  Branch (3167:24): [True: 24, False: 342k]
  ------------------
 3168|     24|    aacChannels = self->aacChannelsPrev;
 3169|       |    /* Because the downmix could be active, its necessary to restore the channel
 3170|       |     * type and indices. */
 3171|     24|    FDKmemcpy(self->channelType, self->channelTypePrev,
 3172|     24|              (8) * sizeof(AUDIO_CHANNEL_TYPE)); /* restore */
 3173|     24|    FDKmemcpy(self->channelIndices, self->channelIndicesPrev,
 3174|     24|              (8) * sizeof(UCHAR)); /* restore */
 3175|     24|    self->sbrEnabled = self->sbrEnabledPrev;
 3176|   351k|  } else {
 3177|       |    /* store or restore the number of channels and the corresponding info */
 3178|   351k|    if (self->frameOK && !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1018|   342k|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (3178:9): [True: 342k, False: 9.10k]
  |  Branch (3178:26): [True: 342k, False: 0]
  ------------------
 3179|   342k|      self->aacChannelsPrev = aacChannels; /* store */
 3180|   342k|      FDKmemcpy(self->channelTypePrev, self->channelType,
 3181|   342k|                (8) * sizeof(AUDIO_CHANNEL_TYPE)); /* store */
 3182|   342k|      FDKmemcpy(self->channelIndicesPrev, self->channelIndices,
 3183|   342k|                (8) * sizeof(UCHAR)); /* store */
 3184|   342k|      self->sbrEnabledPrev = self->sbrEnabled;
 3185|   342k|    } else {
 3186|  9.10k|      if (self->aacChannels > 0) {
  ------------------
  |  Branch (3186:11): [True: 9.10k, False: 0]
  ------------------
 3187|  9.10k|        if ((self->buildUpStatus == AACDEC_RSV60_BUILD_UP_ON) ||
  ------------------
  |  Branch (3187:13): [True: 0, False: 9.10k]
  ------------------
 3188|  9.10k|            (self->buildUpStatus == AACDEC_RSV60_BUILD_UP_ON_IN_BAND) ||
  ------------------
  |  Branch (3188:13): [True: 0, False: 9.10k]
  ------------------
 3189|  9.10k|            (self->buildUpStatus == AACDEC_USAC_BUILD_UP_ON)) {
  ------------------
  |  Branch (3189:13): [True: 764, False: 8.33k]
  ------------------
 3190|    764|          aacChannels = self->aacChannels;
 3191|    764|          self->aacChannelsPrev = aacChannels; /* store */
 3192|  8.33k|        } else {
 3193|  8.33k|          aacChannels = self->aacChannelsPrev; /* restore */
 3194|  8.33k|        }
 3195|  9.10k|        FDKmemcpy(self->channelType, self->channelTypePrev,
 3196|  9.10k|                  (8) * sizeof(AUDIO_CHANNEL_TYPE)); /* restore */
 3197|  9.10k|        FDKmemcpy(self->channelIndices, self->channelIndicesPrev,
 3198|  9.10k|                  (8) * sizeof(UCHAR)); /* restore */
 3199|  9.10k|        self->sbrEnabled = self->sbrEnabledPrev;
 3200|  9.10k|      }
 3201|  9.10k|    }
 3202|   351k|  }
 3203|       |
 3204|       |  /* Update number of output channels */
 3205|   351k|  self->streamInfo.aacNumChannels = aacChannels;
 3206|       |
 3207|       |  /* Ensure consistency of IS_OUTPUT_VALID() macro. */
 3208|   351k|  if (aacChannels == 0) {
  ------------------
  |  Branch (3208:7): [True: 3.33k, False: 347k]
  ------------------
 3209|  3.33k|    ErrorStatus = AAC_DEC_UNKNOWN;
 3210|  3.33k|  }
 3211|       |
 3212|   351k|  if (pceRead == 1 && CProgramConfig_IsValid(pce)) {
  ------------------
  |  Branch (3212:7): [True: 349, False: 350k]
  |  Branch (3212:23): [True: 178, False: 171]
  ------------------
 3213|       |    /* Set matrix mixdown infos if available from PCE. */
 3214|    178|    pcmDmx_SetMatrixMixdownFromPce(
 3215|    178|        self->hPcmUtils, pce->MatrixMixdownIndexPresent,
 3216|    178|        pce->MatrixMixdownIndex, pce->PseudoSurroundEnable);
 3217|    178|    ;
 3218|    178|  }
 3219|       |
 3220|       |  /* If there is no valid data to transfrom into time domain, return. */
 3221|   351k|  if (!IS_OUTPUT_VALID(ErrorStatus)) {
  ------------------
  |  |  561|   351k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|  9.10k|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 5.76k, False: 3.33k]
  |  |  |  |  |  Branch (552:5): [True: 5.76k, False: 3.33k]
  |  |  |  |  ------------------
  |  |  |  |  553|  9.10k|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 5.76k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|  9.10k|       ? 1                                   \
  |  |  |  |  555|  9.10k|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 342k, False: 9.10k]
  |  |  ------------------
  ------------------
 3222|  3.33k|    return ErrorStatus;
 3223|  3.33k|  }
 3224|       |
 3225|       |  /* Setup the output channel mapping. The table below shows the three
 3226|       |   * possibilities: # | chCfg | PCE | chMapIndex
 3227|       |   *  ---+-------+-----+------------------
 3228|       |   *   1 |  > 0  |  no | chCfg
 3229|       |   *   2 |   0   | yes | cChCfg
 3230|       |   *   3 |   0   |  no | aacChannels || 0
 3231|       |   *  ---+-------+-----+--------+------------------
 3232|       |   *  Where chCfg is the channel configuration index from ASC and cChCfg is a
 3233|       |   * corresponding chCfg derived from a given PCE. The variable aacChannels
 3234|       |   * represents the number of channel found during bitstream decoding. Due to
 3235|       |   * the structure of the mapping table it can only be used for mapping if its
 3236|       |   * value is smaller than 7. Otherwise we use the fallback (0) which is a
 3237|       |   * simple pass-through. The possibility #3 should appear only with MPEG-2
 3238|       |   * (ADTS) streams. This is mode is called "implicit channel mapping".
 3239|       |   */
 3240|   347k|  if ((self->streamInfo.channelConfig == 0) && !pce->isValid) {
  ------------------
  |  Branch (3240:7): [True: 1.56k, False: 346k]
  |  Branch (3240:48): [True: 0, False: 1.56k]
  ------------------
 3241|      0|    self->chMapIndex = (aacChannels < 7) ? aacChannels : 0;
  ------------------
  |  Branch (3241:24): [True: 0, False: 0]
  ------------------
 3242|      0|  }
 3243|       |
 3244|       |  /*
 3245|       |    Inverse transform
 3246|       |  */
 3247|   347k|  {
 3248|   347k|    int c, cIdx;
 3249|   347k|    int mapped, fCopyChMap = 1;
 3250|   347k|    UCHAR drcChMap[(8)];
 3251|       |
 3252|   347k|    if ((self->streamInfo.channelConfig == 0) && CProgramConfig_IsValid(pce)) {
  ------------------
  |  Branch (3252:9): [True: 1.56k, False: 346k]
  |  Branch (3252:50): [True: 1.56k, False: 0]
  ------------------
 3253|       |      /* ISO/IEC 14496-3 says:
 3254|       |           If a PCE is present, the exclude_mask bits correspond to the audio
 3255|       |         channels in the SCE, CPE, CCE and LFE syntax elements in the order of
 3256|       |         their appearance in the PCE. In the case of a CPE, the first
 3257|       |         transmitted mask bit corresponds to the first channel in the CPE, the
 3258|       |         second transmitted mask bit to the second channel. In the case of a
 3259|       |         CCE, a mask bit is transmitted only if the coupling channel is
 3260|       |         specified to be an independently switched coupling channel. Thus we
 3261|       |         have to convert the internal channel mapping from "canonical" MPEG to
 3262|       |         PCE order: */
 3263|  1.56k|      UCHAR tmpChMap[(8)];
 3264|  1.56k|      if (CProgramConfig_GetPceChMap(pce, tmpChMap, (8)) == 0) {
  ------------------
  |  Branch (3264:11): [True: 1.56k, False: 0]
  ------------------
 3265|  9.16k|        for (c = 0; c < aacChannels; c += 1) {
  ------------------
  |  Branch (3265:21): [True: 7.60k, False: 1.56k]
  ------------------
 3266|  7.60k|          drcChMap[c] =
 3267|  7.60k|              (self->chMapping[c] == 255) ? 255 : tmpChMap[self->chMapping[c]];
  ------------------
  |  Branch (3267:15): [True: 282, False: 7.32k]
  ------------------
 3268|  7.60k|        }
 3269|  1.56k|        fCopyChMap = 0;
 3270|  1.56k|      }
 3271|  1.56k|    }
 3272|   347k|    if (fCopyChMap != 0) {
  ------------------
  |  Branch (3272:9): [True: 346k, False: 1.56k]
  ------------------
 3273|   346k|      FDKmemcpy(drcChMap, self->chMapping, (8) * sizeof(UCHAR));
 3274|   346k|    }
 3275|       |
 3276|       |    /* Extract DRC control data and map it to channels (without bitstream delay)
 3277|       |     */
 3278|   347k|    mapped = aacDecoder_drcProlog(
 3279|   347k|        self->hDrcInfo, bs, self->pAacDecoderStaticChannelInfo,
 3280|   347k|        pce->ElementInstanceTag, drcChMap, aacChannels);
 3281|   347k|    if (mapped > 0) {
  ------------------
  |  Branch (3281:9): [True: 3.77k, False: 344k]
  ------------------
 3282|  3.77k|      if (!(self->flags[streamIndex] & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  307|  3.77k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (!(self->flags[streamIndex] & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  308|  3.77k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (3282:11): [True: 3.77k, False: 0]
  ------------------
 3283|       |        /* If at least one DRC thread has been mapped to a channel there was DRC
 3284|       |         * data in the bitstream. */
 3285|  3.77k|        self->flags[streamIndex] |= AC_DRC_PRESENT;
  ------------------
  |  |  326|  3.77k|  0x4000000 /*!< Dynamic Range Control (DRC) data found. \
  ------------------
 3286|  3.77k|      } else {
 3287|      0|        ErrorStatus = AAC_DEC_UNSUPPORTED_FORMAT;
 3288|      0|      }
 3289|  3.77k|    }
 3290|   347k|    if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  307|   347k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  308|   347k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (3290:9): [True: 221k, False: 126k]
  ------------------
 3291|   221k|      aacDecoder_drcDisable(self->hDrcInfo);
 3292|   221k|    }
 3293|       |
 3294|       |    /* Create a reverse mapping table */
 3295|   347k|    UCHAR Reverse_chMapping[((8) * 2)];
 3296|   949k|    for (c = 0; c < aacChannels; c++) {
  ------------------
  |  Branch (3296:17): [True: 601k, False: 347k]
  ------------------
 3297|   601k|      int d;
 3298|  1.24M|      for (d = 0; d < aacChannels - 1; d++) {
  ------------------
  |  Branch (3298:19): [True: 899k, False: 348k]
  ------------------
 3299|   899k|        if (self->chMapping[d] == c) {
  ------------------
  |  Branch (3299:13): [True: 253k, False: 646k]
  ------------------
 3300|   253k|          break;
 3301|   253k|        }
 3302|   899k|      }
 3303|   601k|      Reverse_chMapping[c] = d;
 3304|   601k|    }
 3305|       |
 3306|   347k|    int el;
 3307|   347k|    int el_channels;
 3308|   347k|    c = 0;
 3309|   347k|    cIdx = 0;
 3310|   347k|    el_channels = 0;
 3311|  1.14M|    for (el = 0; el < element_count; el++) {
  ------------------
  |  Branch (3311:18): [True: 798k, False: 347k]
  ------------------
 3312|   798k|      int frameOk_butConceal =
 3313|   798k|          0; /* Force frame concealment during mute release active state. */
 3314|   798k|      int concealApplyReturnCode;
 3315|       |
 3316|   798k|      if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA | AC_BSAC)) {
  ------------------
  |  |  307|   798k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA | AC_BSAC)) {
  ------------------
  |  |  308|   798k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                    if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA | AC_BSAC)) {
  ------------------
  |  |  306|   798k|#define AC_BSAC 0x000080        /*!< BSAC */
  ------------------
  |  Branch (3316:11): [True: 462k, False: 336k]
  ------------------
 3317|   462k|        type = self->elements[el];
 3318|   462k|      } else {
 3319|   336k|        type = channel_elements[el];
 3320|   336k|      }
 3321|       |
 3322|   798k|      {
 3323|   798k|        int nElementChannels;
 3324|       |
 3325|   798k|        nElementChannels =
 3326|   798k|            CAacDecoder_GetELChannels(type, self->usacStereoConfigIndex[el]);
 3327|       |
 3328|   798k|        el_channels += nElementChannels;
 3329|       |
 3330|   798k|        if (nElementChannels == 0) {
  ------------------
  |  Branch (3330:13): [True: 369k, False: 429k]
  ------------------
 3331|   369k|          continue;
 3332|   369k|        }
 3333|   798k|      }
 3334|       |
 3335|   429k|      int offset;
 3336|   429k|      int elCh = 0;
 3337|       |      /* "c" iterates in canonical MPEG channel order */
 3338|  1.03M|      for (; cIdx < el_channels; c++, cIdx++, elCh++) {
  ------------------
  |  Branch (3338:14): [True: 602k, False: 428k]
  ------------------
 3339|       |        /* Robustness check */
 3340|   602k|        if (c >= aacChannels) {
  ------------------
  |  Branch (3340:13): [True: 244, False: 601k]
  ------------------
 3341|    244|          return AAC_DEC_UNKNOWN;
 3342|    244|        }
 3343|       |
 3344|   601k|        CAacDecoderChannelInfo *pAacDecoderChannelInfo =
 3345|   601k|            self->pAacDecoderChannelInfo[c];
 3346|   601k|        CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo =
 3347|   601k|            self->pAacDecoderStaticChannelInfo[c];
 3348|       |
 3349|       |        /* Setup offset for time buffer traversal. */
 3350|   601k|        {
 3351|   601k|          pAacDecoderStaticChannelInfo =
 3352|   601k|              self->pAacDecoderStaticChannelInfo[Reverse_chMapping[c]];
 3353|   601k|          offset =
 3354|   601k|              FDK_chMapDescr_getMapValue(
 3355|   601k|                  &self->mapDescr, Reverse_chMapping[cIdx], self->chMapIndex) *
 3356|   601k|              timeDataChannelOffset;
 3357|   601k|        }
 3358|       |
 3359|   601k|        if (flags & AACDEC_FLUSH) {
  ------------------
  |  | 1023|   601k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (3359:13): [True: 24, False: 601k]
  ------------------
 3360|       |          /* Clear pAacDecoderChannelInfo->pSpectralCoefficient because with
 3361|       |           * AACDEC_FLUSH set it contains undefined data. */
 3362|     24|          FDKmemclear(pAacDecoderChannelInfo->pSpectralCoefficient,
 3363|     24|                      sizeof(FIXP_DBL) * self->streamInfo.aacSamplesPerFrame);
 3364|     24|        }
 3365|       |
 3366|       |        /* if The ics info is not valid and it will be stored and used in the
 3367|       |         * following concealment method, mark the frame as erroneous */
 3368|   601k|        {
 3369|   601k|          CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
 3370|   601k|          CConcealmentInfo *hConcealmentInfo =
 3371|   601k|              &pAacDecoderStaticChannelInfo->concealmentInfo;
 3372|   601k|          const int mute_release_active =
 3373|   601k|              (self->frameOK && !(flags & AACDEC_CONCEAL)) &&
  ------------------
  |  | 1018|   592k|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (3373:16): [True: 592k, False: 9.64k]
  |  Branch (3373:33): [True: 592k, False: 0]
  ------------------
 3374|   592k|              ((hConcealmentInfo->concealState >= ConcealState_Mute) &&
  ------------------
  |  Branch (3374:16): [True: 0, False: 592k]
  ------------------
 3375|      0|               (hConcealmentInfo->cntValidFrames + 1 <=
  ------------------
  |  Branch (3375:16): [True: 0, False: 0]
  ------------------
 3376|      0|                hConcealmentInfo->pConcealParams->numMuteReleaseFrames));
 3377|   601k|          const int icsIsInvalid = (GetScaleFactorBandsTransmitted(pIcsInfo) >
 3378|   601k|                                    GetScaleFactorBandsTotal(pIcsInfo));
 3379|   601k|          const int icsInfoUsedinFadeOut =
 3380|   601k|              !(pAacDecoderChannelInfo->renderMode == AACDEC_RENDER_LPD &&
  ------------------
  |  Branch (3380:17): [True: 42.7k, False: 559k]
  ------------------
 3381|  42.7k|                pAacDecoderStaticChannelInfo->last_lpd_mode == 0);
  ------------------
  |  Branch (3381:17): [True: 9.59k, False: 33.1k]
  ------------------
 3382|   601k|          if (icsInfoUsedinFadeOut && icsIsInvalid && !mute_release_active) {
  ------------------
  |  Branch (3382:15): [True: 592k, False: 9.59k]
  |  Branch (3382:39): [True: 431, False: 591k]
  |  Branch (3382:55): [True: 431, False: 0]
  ------------------
 3383|    431|            self->frameOK = 0;
 3384|    431|          }
 3385|   601k|        }
 3386|       |
 3387|       |        /*
 3388|       |          Conceal defective spectral data
 3389|       |        */
 3390|   601k|        {
 3391|   601k|          CAacDecoderChannelInfo **ppAacDecoderChannelInfo =
 3392|   601k|              &pAacDecoderChannelInfo;
 3393|   601k|          CAacDecoderStaticChannelInfo **ppAacDecoderStaticChannelInfo =
 3394|   601k|              &pAacDecoderStaticChannelInfo;
 3395|   601k|          {
 3396|   601k|            concealApplyReturnCode = CConcealment_Apply(
 3397|   601k|                &(*ppAacDecoderStaticChannelInfo)->concealmentInfo,
 3398|   601k|                *ppAacDecoderChannelInfo, *ppAacDecoderStaticChannelInfo,
 3399|   601k|                &self->samplingRateInfo[streamIndex],
 3400|   601k|                self->streamInfo.aacSamplesPerFrame,
 3401|   601k|                pAacDecoderStaticChannelInfo->last_lpd_mode,
 3402|   601k|                (self->frameOK && !(flags & AACDEC_CONCEAL)),
  ------------------
  |  | 1018|   592k|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (3402:18): [True: 592k, False: 9.64k]
  |  Branch (3402:35): [True: 592k, False: 0]
  ------------------
 3403|   601k|                self->flags[streamIndex]);
 3404|   601k|          }
 3405|   601k|        }
 3406|   601k|        if (concealApplyReturnCode == -1) {
  ------------------
  |  Branch (3406:13): [True: 0, False: 601k]
  ------------------
 3407|      0|          frameOk_butConceal = 1;
 3408|      0|        }
 3409|       |
 3410|   601k|        if (flags & (AACDEC_INTR)) {
  ------------------
  |  | 1027|   601k|#define AACDEC_INTR 4
  ------------------
  |  Branch (3410:13): [True: 0, False: 601k]
  ------------------
 3411|       |          /* Reset DRC control data for this channel */
 3412|      0|          aacDecoder_drcInitChannelData(&pAacDecoderStaticChannelInfo->drcData);
 3413|      0|        }
 3414|   601k|        if (flags & (AACDEC_CLRHIST)) {
  ------------------
  |  | 1031|   601k|#define AACDEC_CLRHIST 8
  ------------------
  |  Branch (3414:13): [True: 0, False: 601k]
  ------------------
 3415|      0|          if (!(self->flags[0] & AC_USAC)) {
  ------------------
  |  |  307|      0|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (3415:15): [True: 0, False: 0]
  ------------------
 3416|       |            /* Reset DRC control data for this channel */
 3417|      0|            aacDecoder_drcInitChannelData(
 3418|      0|                &pAacDecoderStaticChannelInfo->drcData);
 3419|      0|          }
 3420|      0|        }
 3421|       |
 3422|       |        /* The DRC module demands to be called with the gain field holding the
 3423|       |         * gain scale. */
 3424|   601k|        self->extGain[0] = (FIXP_DBL)AACDEC_DRC_GAIN_SCALING;
  ------------------
  |  |  112|   601k|#define AACDEC_DRC_GAIN_SCALING (11) /* Scaling of DRC gains */
  ------------------
 3425|       |
 3426|       |        /* DRC processing */
 3427|   601k|        aacDecoder_drcApply(
 3428|   601k|            self->hDrcInfo, self->hSbrDecoder, pAacDecoderChannelInfo,
 3429|   601k|            &pAacDecoderStaticChannelInfo->drcData, self->extGain, c,
 3430|   601k|            self->streamInfo.aacSamplesPerFrame, self->sbrEnabled
 3431|       |
 3432|   601k|        );
 3433|       |
 3434|   601k|        if (timeDataSize < timeDataChannelOffset * self->aacChannels) {
  ------------------
  |  Branch (3434:13): [True: 0, False: 601k]
  ------------------
 3435|      0|          ErrorStatus = AAC_DEC_OUTPUT_BUFFER_TOO_SMALL;
 3436|      0|          break;
 3437|      0|        }
 3438|   601k|        if (self->flushStatus && (self->flushCnt > 0) &&
  ------------------
  |  Branch (3438:13): [True: 24, False: 601k]
  |  Branch (3438:34): [True: 0, False: 24]
  ------------------
 3439|      0|            !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1018|      0|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (3439:13): [True: 0, False: 0]
  ------------------
 3440|      0|          FDKmemclear(pTimeData + offset,
 3441|      0|                      sizeof(PCM_DEC) * self->streamInfo.aacSamplesPerFrame);
 3442|      0|        } else
 3443|   601k|          switch (pAacDecoderChannelInfo->renderMode) {
 3444|   336k|            case AACDEC_RENDER_IMDCT:
  ------------------
  |  Branch (3444:13): [True: 336k, False: 265k]
  ------------------
 3445|       |
 3446|   336k|              CBlock_FrequencyToTime(
 3447|   336k|                  pAacDecoderStaticChannelInfo, pAacDecoderChannelInfo,
 3448|   336k|                  pTimeData + offset, self->streamInfo.aacSamplesPerFrame,
 3449|   336k|                  (self->frameOK && !(flags & AACDEC_CONCEAL) &&
  ------------------
  |  | 1018|   330k|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (3449:20): [True: 330k, False: 5.98k]
  |  Branch (3449:37): [True: 330k, False: 0]
  ------------------
 3450|   330k|                   !frameOk_butConceal),
  ------------------
  |  Branch (3450:20): [True: 330k, False: 0]
  ------------------
 3451|   336k|                  pAacDecoderChannelInfo->pComStaticData->pWorkBufferCore1
 3452|   336k|                      ->mdctOutTemp,
 3453|   336k|                  self->aacOutDataHeadroom, self->elFlags[el], elCh);
 3454|       |
 3455|   336k|              self->extGainDelay = self->streamInfo.aacSamplesPerFrame;
 3456|   336k|              break;
 3457|   222k|            case AACDEC_RENDER_ELDFB: {
  ------------------
  |  Branch (3457:13): [True: 222k, False: 379k]
  ------------------
 3458|   222k|              CBlock_FrequencyToTimeLowDelay(
 3459|   222k|                  pAacDecoderStaticChannelInfo, pAacDecoderChannelInfo,
 3460|   222k|                  pTimeData + offset, self->streamInfo.aacSamplesPerFrame);
 3461|   222k|              self->extGainDelay =
 3462|   222k|                  (self->streamInfo.aacSamplesPerFrame * 2 -
 3463|   222k|                   self->streamInfo.aacSamplesPerFrame / 2 - 1) /
 3464|   222k|                  2;
 3465|   222k|            } break;
 3466|  42.4k|            case AACDEC_RENDER_LPD:
  ------------------
  |  Branch (3466:13): [True: 42.4k, False: 559k]
  ------------------
 3467|       |
 3468|  42.4k|              CLpd_RenderTimeSignal(
 3469|  42.4k|                  pAacDecoderStaticChannelInfo, pAacDecoderChannelInfo,
 3470|  42.4k|                  pTimeData + offset, self->streamInfo.aacSamplesPerFrame,
 3471|  42.4k|                  &self->samplingRateInfo[streamIndex],
 3472|  42.4k|                  (self->frameOK && !(flags & AACDEC_CONCEAL) &&
  ------------------
  |  | 1018|  41.5k|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (3472:20): [True: 41.5k, False: 929]
  |  Branch (3472:37): [True: 41.5k, False: 0]
  ------------------
 3473|  41.5k|                   !frameOk_butConceal),
  ------------------
  |  Branch (3473:20): [True: 41.5k, False: 0]
  ------------------
 3474|  42.4k|                  self->aacOutDataHeadroom, flags, self->flags[streamIndex]);
 3475|       |
 3476|  42.4k|              self->extGainDelay = self->streamInfo.aacSamplesPerFrame;
 3477|  42.4k|              break;
 3478|      0|            default:
  ------------------
  |  Branch (3478:13): [True: 0, False: 601k]
  ------------------
 3479|      0|              ErrorStatus = AAC_DEC_UNKNOWN;
 3480|      0|              break;
 3481|   601k|          }
 3482|       |        /* TimeDomainFading */
 3483|   601k|        if (!CConceal_TDFading_Applied[c]) {
  ------------------
  |  Branch (3483:13): [True: 601k, False: 0]
  ------------------
 3484|   601k|          CConceal_TDFading_Applied[c] = CConcealment_TDFading(
 3485|   601k|              self->streamInfo.aacSamplesPerFrame,
 3486|   601k|              &self->pAacDecoderStaticChannelInfo[c], self->aacOutDataHeadroom,
 3487|   601k|              pTimeData + offset, 0);
 3488|   601k|          if (c + 1 < (8) && c < aacChannels - 1) {
  ------------------
  |  Branch (3488:15): [True: 585k, False: 16.2k]
  |  Branch (3488:30): [True: 253k, False: 331k]
  ------------------
 3489|       |            /* update next TDNoise Seed to avoid muting in case of Parametric
 3490|       |             * Stereo */
 3491|   253k|            self->pAacDecoderStaticChannelInfo[c + 1]
 3492|   253k|                ->concealmentInfo.TDNoiseSeed =
 3493|   253k|                self->pAacDecoderStaticChannelInfo[c]
 3494|   253k|                    ->concealmentInfo.TDNoiseSeed;
 3495|   253k|          }
 3496|   601k|        }
 3497|   601k|      }
 3498|   429k|    }
 3499|       |
 3500|   347k|    if (self->flags[streamIndex] & AC_USAC) {
  ------------------
  |  |  307|   347k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (3500:9): [True: 221k, False: 126k]
  ------------------
 3501|   221k|      int bsPseudoLr = 0;
 3502|   221k|      mpegSurroundDecoder_IsPseudoLR(
 3503|   221k|          (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, &bsPseudoLr);
 3504|       |      /* ISO/IEC 23003-3, 7.11.2.6 Modification of core decoder output (pseudo
 3505|       |       * LR) */
 3506|   221k|      if ((aacChannels == 2) && bsPseudoLr) {
  ------------------
  |  Branch (3506:11): [True: 69.0k, False: 152k]
  |  Branch (3506:33): [True: 11.9k, False: 57.1k]
  ------------------
 3507|  11.9k|        int i, offset2;
 3508|  11.9k|        const FIXP_SGL invSqrt2 = FL2FXCONST_SGL(0.707106781186547f);
  ------------------
  |  |  180|  11.9k|  (FIXP_SGL)(                                                                \
  |  |  181|  11.9k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  ------------------
  |  |  182|  11.9k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (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|  11.9k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|  11.9k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  11.9k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 11.9k]
  |  |  ------------------
  |  |  187|  11.9k|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|  11.9k|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|  11.9k|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|  11.9k|                 ? (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|  11.9k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|  11.9k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  11.9k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3509|  11.9k|        PCM_DEC *pTD = pTimeData;
  ------------------
  |  |  112|  11.9k|#define PCM_DEC FIXP_DBL
  ------------------
 3510|       |
 3511|  11.9k|        offset2 = timeDataChannelOffset;
 3512|       |
 3513|  11.2M|        for (i = 0; i < self->streamInfo.aacSamplesPerFrame; i++) {
  ------------------
  |  Branch (3513:21): [True: 11.2M, False: 11.9k]
  ------------------
 3514|  11.2M|          FIXP_DBL L = PCM_DEC2FIXP_DBL(pTD[0]);
  ------------------
  |  |  116|  11.2M|#define PCM_DEC2FIXP_DBL(x) (x)
  ------------------
 3515|  11.2M|          FIXP_DBL R = PCM_DEC2FIXP_DBL(pTD[offset2]);
  ------------------
  |  |  116|  11.2M|#define PCM_DEC2FIXP_DBL(x) (x)
  ------------------
 3516|  11.2M|          L = fMult(L, invSqrt2);
 3517|  11.2M|          R = fMult(R, invSqrt2);
 3518|  11.2M|          pTD[0] = L + R;
 3519|  11.2M|          pTD[offset2] = L - R;
 3520|  11.2M|          pTD++;
 3521|  11.2M|        }
 3522|  11.9k|      }
 3523|   221k|    }
 3524|       |
 3525|       |    /* Extract DRC control data and map it to channels (with bitstream delay) */
 3526|   347k|    mapped = aacDecoder_drcEpilog(
 3527|   347k|        self->hDrcInfo, bs, self->pAacDecoderStaticChannelInfo,
 3528|   347k|        pce->ElementInstanceTag, drcChMap, aacChannels);
 3529|   347k|    if (mapped > 0) {
  ------------------
  |  Branch (3529:9): [True: 3.47k, False: 344k]
  ------------------
 3530|  3.47k|      if (!(self->flags[streamIndex] & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  307|  3.47k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (!(self->flags[streamIndex] & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  308|  3.47k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (3530:11): [True: 3.47k, False: 0]
  ------------------
 3531|       |        /* If at least one DRC thread has been mapped to a channel there was DRC
 3532|       |         * data in the bitstream. */
 3533|  3.47k|        self->flags[streamIndex] |= AC_DRC_PRESENT;
  ------------------
  |  |  326|  3.47k|  0x4000000 /*!< Dynamic Range Control (DRC) data found. \
  ------------------
 3534|  3.47k|      } else {
 3535|      0|        ErrorStatus = AAC_DEC_UNSUPPORTED_FORMAT;
 3536|      0|      }
 3537|  3.47k|    }
 3538|   347k|    if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  307|   347k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (self->flags[streamIndex] & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  308|   347k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (3538:9): [True: 221k, False: 126k]
  ------------------
 3539|   221k|      aacDecoder_drcDisable(self->hDrcInfo);
 3540|   221k|    }
 3541|   347k|  }
 3542|       |
 3543|       |  /* Add additional concealment delay */
 3544|      0|  self->streamInfo.outputDelay +=
 3545|   347k|      CConcealment_GetDelay(&self->concealCommonData) *
 3546|   347k|      self->streamInfo.aacSamplesPerFrame;
 3547|       |
 3548|       |  /* Map DRC data to StreamInfo structure */
 3549|   347k|  aacDecoder_drcGetInfo(self->hDrcInfo, &self->streamInfo.drcPresMode,
 3550|   347k|                        &self->streamInfo.drcProgRefLev);
 3551|       |
 3552|       |  /* Reorder channel type information tables.  */
 3553|   347k|  if (!(self->flags[0] & AC_RSV603DA)) {
  ------------------
  |  |  308|   347k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (3553:7): [True: 347k, False: 0]
  ------------------
 3554|   347k|    AUDIO_CHANNEL_TYPE types[(8)];
 3555|   347k|    UCHAR idx[(8)];
 3556|   347k|    int c;
 3557|   347k|    int mapValue;
 3558|       |
 3559|   347k|    FDK_ASSERT(sizeof(self->channelType) == sizeof(types));
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (3559:5): [True: 347k, Folded]
  ------------------
 3560|   347k|    FDK_ASSERT(sizeof(self->channelIndices) == sizeof(idx));
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (3560:5): [True: 347k, Folded]
  ------------------
 3561|       |
 3562|   347k|    FDKmemcpy(types, self->channelType, sizeof(types));
 3563|   347k|    FDKmemcpy(idx, self->channelIndices, sizeof(idx));
 3564|       |
 3565|   949k|    for (c = 0; c < aacChannels; c++) {
  ------------------
  |  Branch (3565:17): [True: 601k, False: 347k]
  ------------------
 3566|   601k|      mapValue =
 3567|   601k|          FDK_chMapDescr_getMapValue(&self->mapDescr, c, self->chMapIndex);
 3568|   601k|      self->channelType[mapValue] = types[c];
 3569|   601k|      self->channelIndices[mapValue] = idx[c];
 3570|   601k|    }
 3571|   347k|  }
 3572|       |
 3573|   347k|  self->blockNumber++;
 3574|       |
 3575|   347k|  return ErrorStatus;
 3576|   347k|}
aacdecoder.cpp:_ZL24CAacDecoder_AncDataResetP8CAncData:
  321|   373k|static AAC_DECODER_ERROR CAacDecoder_AncDataReset(CAncData *ancData) {
  322|   373k|  int i;
  323|  3.35M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (323:15): [True: 2.98M, False: 373k]
  ------------------
  324|  2.98M|    ancData->offset[i] = 0;
  325|  2.98M|  }
  326|   373k|  ancData->nrElements = 0;
  327|       |
  328|   373k|  return AAC_DEC_OK;
  329|   373k|}
aacdecoder.cpp:_ZL15CStreamInfoInitP11CStreamInfo:
 1239|  21.8k|static void CStreamInfoInit(CStreamInfo *pStreamInfo) {
 1240|  21.8k|  pStreamInfo->aacSampleRate = 0;
 1241|  21.8k|  pStreamInfo->profile = -1;
 1242|  21.8k|  pStreamInfo->aot = AOT_NONE;
 1243|       |
 1244|  21.8k|  pStreamInfo->channelConfig = -1;
 1245|  21.8k|  pStreamInfo->bitRate = 0;
 1246|  21.8k|  pStreamInfo->aacSamplesPerFrame = 0;
 1247|       |
 1248|  21.8k|  pStreamInfo->extAot = AOT_NONE;
 1249|  21.8k|  pStreamInfo->extSamplingRate = 0;
 1250|       |
 1251|  21.8k|  pStreamInfo->flags = 0;
 1252|       |
 1253|  21.8k|  pStreamInfo->epConfig = -1; /* default: no ER */
 1254|       |
 1255|  21.8k|  pStreamInfo->numChannels = 0;
 1256|  21.8k|  pStreamInfo->sampleRate = 0;
 1257|  21.8k|  pStreamInfo->frameSize = 0;
 1258|       |
 1259|  21.8k|  pStreamInfo->outputDelay = 0;
 1260|       |
 1261|       |  /* DRC */
 1262|  21.8k|  pStreamInfo->drcProgRefLev =
 1263|  21.8k|      -1; /* set program reference level to not indicated */
 1264|  21.8k|  pStreamInfo->drcPresMode = -1; /* default: presentation mode not indicated */
 1265|       |
 1266|  21.8k|  pStreamInfo->outputLoudness = -1; /* default: no loudness metadata present */
 1267|  21.8k|}
aacdecoder.cpp:_ZL18CAacDecoder_DeInitP20AAC_DECODER_INSTANCEi:
 1343|   333k|                               const int subStreamIndex) {
 1344|   333k|  int ch;
 1345|   333k|  int aacChannelOffset = 0, aacChannels = (8);
 1346|   333k|  int numElements = (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1),
 1347|   333k|      elementOffset = 0;
 1348|       |
 1349|   333k|  if (self == NULL) return;
  ------------------
  |  Branch (1349:7): [True: 0, False: 333k]
  ------------------
 1350|       |
 1351|   333k|  {
 1352|   333k|    self->ascChannels[0] = 0;
 1353|   333k|    self->elements[0] = ID_END;
 1354|   333k|  }
 1355|       |
 1356|  3.00M|  for (ch = aacChannelOffset; ch < aacChannelOffset + aacChannels; ch++) {
  ------------------
  |  Branch (1356:31): [True: 2.66M, False: 333k]
  ------------------
 1357|  2.66M|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1357:9): [True: 1.97M, False: 699k]
  ------------------
 1358|  1.97M|      if (self->pAacDecoderChannelInfo[ch]->pComStaticData != NULL) {
  ------------------
  |  Branch (1358:11): [True: 1.23M, False: 730k]
  ------------------
 1359|  1.23M|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1359:13): [True: 1.23M, False: 0]
  ------------------
 1360|  1.23M|                ->pComStaticData->pWorkBufferCore1 != NULL) {
 1361|  1.23M|          if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1361:15): [True: 299k, False: 940k]
  ------------------
 1362|   299k|            FreeWorkBufferCore1(&self->pAacDecoderChannelInfo[ch]
 1363|   299k|                                     ->pComStaticData->pWorkBufferCore1);
 1364|   299k|          }
 1365|  1.23M|        }
 1366|  1.23M|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1366:13): [True: 9.57k, False: 1.23M]
  ------------------
 1367|  1.23M|                ->pComStaticData->cplxPredictionData != NULL) {
 1368|  9.57k|          FreeCplxPredictionData(&self->pAacDecoderChannelInfo[ch]
 1369|  9.57k|                                      ->pComStaticData->cplxPredictionData);
 1370|  9.57k|        }
 1371|       |        /* Avoid double free of linked pComStaticData in case of CPE by settings
 1372|       |         * pointer to NULL. */
 1373|  1.23M|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1373:13): [True: 1.05M, False: 182k]
  ------------------
 1374|  1.05M|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1374:15): [True: 1.02M, False: 36.3k]
  ------------------
 1375|  1.02M|              (self->pAacDecoderChannelInfo[ch + 1]->pComStaticData ==
  ------------------
  |  Branch (1375:15): [True: 730k, False: 290k]
  ------------------
 1376|  1.02M|               self->pAacDecoderChannelInfo[ch]->pComStaticData)) {
 1377|   730k|            self->pAacDecoderChannelInfo[ch + 1]->pComStaticData = NULL;
 1378|   730k|          }
 1379|  1.05M|        }
 1380|  1.23M|        FDKfree(self->pAacDecoderChannelInfo[ch]->pComStaticData);
 1381|  1.23M|        self->pAacDecoderChannelInfo[ch]->pComStaticData = NULL;
 1382|  1.23M|      }
 1383|  1.97M|      if (self->pAacDecoderChannelInfo[ch]->pComData != NULL) {
  ------------------
  |  Branch (1383:11): [True: 1.23M, False: 730k]
  ------------------
 1384|       |        /* Avoid double free of linked pComData in case of CPE by settings
 1385|       |         * pointer to NULL. */
 1386|  1.23M|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1386:13): [True: 1.05M, False: 182k]
  ------------------
 1387|  1.05M|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1387:15): [True: 1.02M, False: 36.3k]
  ------------------
 1388|  1.02M|              (self->pAacDecoderChannelInfo[ch + 1]->pComData ==
  ------------------
  |  Branch (1388:15): [True: 730k, False: 290k]
  ------------------
 1389|  1.02M|               self->pAacDecoderChannelInfo[ch]->pComData)) {
 1390|   730k|            self->pAacDecoderChannelInfo[ch + 1]->pComData = NULL;
 1391|   730k|          }
 1392|  1.05M|        }
 1393|  1.23M|        if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1393:13): [True: 299k, False: 940k]
  ------------------
 1394|   299k|          FreeWorkBufferCore6(
 1395|   299k|              (SCHAR **)&self->pAacDecoderChannelInfo[ch]->pComData);
 1396|   940k|        } else {
 1397|   940k|          FDKafree(self->pAacDecoderChannelInfo[ch]->pComData);
 1398|   940k|        }
 1399|  1.23M|        self->pAacDecoderChannelInfo[ch]->pComData = NULL;
 1400|  1.23M|      }
 1401|  1.97M|    }
 1402|  2.66M|    if (self->pAacDecoderStaticChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1402:9): [True: 1.97M, False: 699k]
  ------------------
 1403|  1.97M|      if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer != NULL) {
  ------------------
  |  Branch (1403:11): [True: 1.97M, False: 0]
  ------------------
 1404|  1.97M|        FreeOverlapBuffer(
 1405|  1.97M|            &self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer);
 1406|  1.97M|      }
 1407|  1.97M|      if (self->pAacDecoderStaticChannelInfo[ch]->hArCo != NULL) {
  ------------------
  |  Branch (1407:11): [True: 60.9k, False: 1.90M]
  ------------------
 1408|  60.9k|        CArco_Destroy(self->pAacDecoderStaticChannelInfo[ch]->hArCo);
 1409|  60.9k|      }
 1410|  1.97M|      FreeAacDecoderStaticChannelInfo(&self->pAacDecoderStaticChannelInfo[ch]);
 1411|  1.97M|    }
 1412|  2.66M|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1412:9): [True: 1.97M, False: 699k]
  ------------------
 1413|  1.97M|      FreeAacDecoderChannelInfo(&self->pAacDecoderChannelInfo[ch]);
 1414|  1.97M|    }
 1415|  2.66M|  }
 1416|       |
 1417|   333k|  {
 1418|   333k|    int el;
 1419|  20.6M|    for (el = elementOffset; el < elementOffset + numElements; el++) {
  ------------------
  |  Branch (1419:30): [True: 20.3M, False: 333k]
  ------------------
 1420|  20.3M|      if (self->cpeStaticData[el] != NULL) {
  ------------------
  |  Branch (1420:11): [True: 9.57k, False: 20.3M]
  ------------------
 1421|  9.57k|        FreeCpePersistentData(&self->cpeStaticData[el]);
 1422|  9.57k|      }
 1423|  20.3M|    }
 1424|   333k|  }
 1425|       |
 1426|   333k|  FDK_Delay_Destroy(&self->usacResidualDelay);
 1427|       |
 1428|   333k|  self->aacChannels = 0;
 1429|   333k|  self->streamInfo.aacSampleRate = 0;
 1430|   333k|  self->streamInfo.sampleRate = 0;
 1431|       |  /* This samplerate value is checked for configuration change, not the others
 1432|       |   * above. */
 1433|   333k|  self->samplingRateInfo[subStreamIndex].samplingRate = 0;
 1434|   333k|}
aacdecoder.cpp:_ZL23CAacDecoder_AcceptFlagsP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfigjPjii:
 1451|   811k|                                    int elementOffset) {
 1452|   811k|  FDKmemcpy(self->elFlags, elFlags, sizeof(self->elFlags));
 1453|       |
 1454|   811k|  self->flags[streamIndex] = flags;
 1455|   811k|}
aacdecoder.cpp:_ZL25CAacDecoder_GetELChannels14MP4_ELEMENT_IDh:
  286|  2.89M|                                     UCHAR usacStereoConfigIndex) {
  287|  2.89M|  int el_channels = 0;
  288|       |
  289|  2.89M|  switch (type) {
  290|   548k|    case ID_USAC_CPE:
  ------------------
  |  Branch (290:5): [True: 548k, False: 2.34M]
  ------------------
  291|   548k|      if (usacStereoConfigIndex == 1) {
  ------------------
  |  Branch (291:11): [True: 320k, False: 227k]
  ------------------
  292|   320k|        el_channels = 1;
  293|   320k|      } else {
  294|   227k|        el_channels = 2;
  295|   227k|      }
  296|   548k|      break;
  297|  1.02M|    case ID_CPE:
  ------------------
  |  Branch (297:5): [True: 1.02M, False: 1.87M]
  ------------------
  298|  1.02M|      el_channels = 2;
  299|  1.02M|      break;
  300|   150k|    case ID_USAC_SCE:
  ------------------
  |  Branch (300:5): [True: 150k, False: 2.74M]
  ------------------
  301|   150k|    case ID_USAC_LFE:
  ------------------
  |  Branch (301:5): [True: 0, False: 2.89M]
  ------------------
  302|   661k|    case ID_SCE:
  ------------------
  |  Branch (302:5): [True: 510k, False: 2.37M]
  ------------------
  303|   952k|    case ID_LFE:
  ------------------
  |  Branch (303:5): [True: 291k, False: 2.59M]
  ------------------
  304|   952k|      el_channels = 1;
  305|   952k|      break;
  306|   369k|    default:
  ------------------
  |  Branch (306:5): [True: 369k, False: 2.52M]
  ------------------
  307|   369k|      el_channels = 0;
  308|   369k|      break;
  309|  2.89M|  }
  310|       |
  311|  2.89M|  return el_channels;
  312|  2.89M|}
aacdecoder.cpp:_ZL33aacDecoder_ParseExplicitMpsAndSbrP20AAC_DECODER_INSTANCEP13FDK_BITSTREAM14MP4_ELEMENT_IDiiPKi:
 1138|   334k|    const int element_index, const int el_cnt[]) {
 1139|   334k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
 1140|   334k|  INT bitCnt = 0;
 1141|       |
 1142|       |  /* get the remaining bits of this frame */
 1143|   334k|  bitCnt = transportDec_GetAuBitsRemaining(self->hInput, 0);
 1144|       |
 1145|   334k|  if ((self->flags[0] & AC_SBR_PRESENT) &&
  ------------------
  |  |  311|   334k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
  |  Branch (1145:7): [True: 240k, False: 94.8k]
  ------------------
 1146|   240k|      (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD | AC_DRM))) {
  ------------------
  |  |  307|   240k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD | AC_DRM))) {
  ------------------
  |  |  310|   240k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD | AC_DRM))) {
  ------------------
  |  |  303|   240k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                    (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD | AC_DRM))) {
  ------------------
  |  |  318|   240k|#define AC_DRM 0x080000       /*!< DRM bit stream syntax */
  ------------------
  |  Branch (1146:7): [True: 227k, False: 12.5k]
  ------------------
 1147|   227k|    SBR_ERROR err = SBRDEC_OK;
 1148|   227k|    int chElIdx, numChElements = el_cnt[ID_SCE] + el_cnt[ID_CPE] +
 1149|   227k|                                 el_cnt[ID_LFE] + el_cnt[ID_USAC_SCE] +
 1150|   227k|                                 el_cnt[ID_USAC_CPE] + el_cnt[ID_USAC_LFE];
 1151|   227k|    INT bitCntTmp = bitCnt;
 1152|       |
 1153|   227k|    if (self->flags[0] & AC_USAC) {
  ------------------
  |  |  307|   227k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1153:9): [True: 192k, False: 34.5k]
  ------------------
 1154|   192k|      chElIdx = numChElements - 1;
 1155|   192k|    } else {
 1156|  34.5k|      chElIdx = 0; /* ELD case */
 1157|  34.5k|    }
 1158|       |
 1159|   502k|    for (; chElIdx < numChElements; chElIdx += 1) {
  ------------------
  |  Branch (1159:12): [True: 274k, False: 227k]
  ------------------
 1160|   274k|      MP4_ELEMENT_ID sbrType;
 1161|   274k|      SBR_ERROR errTmp;
 1162|   274k|      if (self->flags[0] & (AC_USAC)) {
  ------------------
  |  |  307|   274k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1162:11): [True: 192k, False: 81.9k]
  ------------------
 1163|   192k|        FDK_ASSERT((self->elements[element_index] == ID_USAC_SCE) ||
  ------------------
  |  |  221|   192k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1163:9): [True: 20.8k, False: 172k]
  |  Branch (1163:9): [True: 172k, False: 0]
  |  Branch (1163:9): [True: 192k, False: 0]
  ------------------
 1164|   192k|                   (self->elements[element_index] == ID_USAC_CPE));
 1165|   192k|        sbrType = IS_STEREO_SBR(self->elements[element_index],
  ------------------
  |  |  184|   192k|  (((el_id) == ID_USAC_CPE && (stereoConfigIndex) == 0) || \
  |  |  ------------------
  |  |  |  Branch (184:5): [True: 172k, False: 20.8k]
  |  |  |  Branch (184:31): [True: 51.1k, False: 120k]
  |  |  ------------------
  |  |  185|   192k|   ((el_id) == ID_USAC_CPE && (stereoConfigIndex) == 3))
  |  |  ------------------
  |  |  |  Branch (185:5): [True: 120k, False: 20.8k]
  |  |  |  Branch (185:31): [True: 12.1k, False: 108k]
  |  |  ------------------
  ------------------
 1166|   192k|                                self->usacStereoConfigIndex[element_index])
 1167|   192k|                      ? ID_CPE
 1168|   192k|                      : ID_SCE;
 1169|   192k|      } else
 1170|  81.9k|        sbrType = self->elements[chElIdx];
 1171|   274k|      errTmp = sbrDecoder_Parse(self->hSbrDecoder, bs, self->pDrmBsBuffer,
 1172|   274k|                                self->drmBsBufferSize, &bitCnt, -1,
 1173|   274k|                                self->flags[0] & AC_SBRCRC, sbrType, chElIdx,
  ------------------
  |  |  313|   274k|  0x010000 /*!< SBR CRC present flag. Only relevant for AAC-ELD for now. */
  ------------------
 1174|   274k|                                self->flags[0], self->elFlags);
 1175|   274k|      if (errTmp != SBRDEC_OK) {
  ------------------
  |  Branch (1175:11): [True: 63.0k, False: 211k]
  ------------------
 1176|  63.0k|        err = errTmp;
 1177|  63.0k|        bitCntTmp = bitCnt;
 1178|  63.0k|        bitCnt = 0;
 1179|  63.0k|      }
 1180|   274k|    }
 1181|   227k|    switch (err) {
 1182|  63.0k|      case SBRDEC_PARSE_ERROR:
  ------------------
  |  Branch (1182:7): [True: 63.0k, False: 164k]
  ------------------
 1183|       |        /* Can not go on parsing because we do not
 1184|       |            know the length of the SBR extension data. */
 1185|  63.0k|        FDKpushFor(bs, bitCntTmp);
 1186|  63.0k|        bitCnt = 0;
 1187|  63.0k|        break;
 1188|   164k|      case SBRDEC_OK:
  ------------------
  |  Branch (1188:7): [True: 164k, False: 63.0k]
  ------------------
 1189|   164k|        self->sbrEnabled = 1;
 1190|   164k|        break;
 1191|      0|      default:
  ------------------
  |  Branch (1191:7): [True: 0, False: 227k]
  ------------------
 1192|      0|        self->frameOK = 0;
 1193|      0|        break;
 1194|   227k|    }
 1195|   227k|  }
 1196|       |
 1197|   334k|  if ((bitCnt > 0) && (self->flags[0] & (AC_USAC | AC_RSVD50))) {
  ------------------
  |  |  307|   262k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                if ((bitCnt > 0) && (self->flags[0] & (AC_USAC | AC_RSVD50))) {
  ------------------
  |  |  310|   262k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
  |  Branch (1197:7): [True: 262k, False: 72.0k]
  |  Branch (1197:23): [True: 173k, False: 88.9k]
  ------------------
 1198|   173k|    if ((self->flags[0] & AC_MPS_PRESENT) ||
  ------------------
  |  |  316|   173k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
  |  Branch (1198:9): [True: 95.9k, False: 77.9k]
  ------------------
 1199|  96.9k|        (self->elFlags[element_index] & AC_EL_USAC_MPS212)) {
  ------------------
  |  |  348|  77.9k|#define AC_EL_USAC_MPS212 0x000010 /*!< USAC MPS212 tool is active */
  ------------------
  |  Branch (1199:9): [True: 1.02k, False: 76.8k]
  ------------------
 1200|  96.9k|      int err;
 1201|       |
 1202|  96.9k|      err = mpegSurroundDecoder_ParseNoHeader(
 1203|  96.9k|          (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, bs, &bitCnt,
 1204|  96.9k|          self->flags[0] & AC_INDEP);
  ------------------
  |  |  319|  96.9k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
 1205|  96.9k|      if (err != MPS_OK) {
  ------------------
  |  Branch (1205:11): [True: 329, False: 96.6k]
  ------------------
 1206|    329|        self->frameOK = 0;
 1207|    329|        ErrorStatus = AAC_DEC_PARSE_ERROR;
 1208|    329|      }
 1209|  96.9k|    }
 1210|   173k|  }
 1211|       |
 1212|   334k|  if (self->flags[0] & AC_DRM) {
  ------------------
  |  |  318|   334k|#define AC_DRM 0x080000       /*!< DRM bit stream syntax */
  ------------------
  |  Branch (1212:7): [True: 0, False: 334k]
  ------------------
 1213|      0|    if ((bitCnt = (INT)FDKgetValidBits(bs)) != 0) {
  ------------------
  |  Branch (1213:9): [True: 0, False: 0]
  ------------------
 1214|      0|      FDKpushBiDirectional(bs, bitCnt);
 1215|      0|    }
 1216|      0|  }
 1217|       |
 1218|   334k|  if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_DRM))) {
  ------------------
  |  |  307|   334k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_DRM))) {
  ------------------
  |  |  310|   334k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_DRM))) {
  ------------------
  |  |  318|   334k|#define AC_DRM 0x080000       /*!< DRM bit stream syntax */
  ------------------
  |  Branch (1218:7): [True: 116k, False: 218k]
  ------------------
 1219|   335k|    while (bitCnt > 7) {
  ------------------
  |  Branch (1219:12): [True: 219k, False: 115k]
  ------------------
 1220|   219k|      ErrorStatus = CAacDecoder_ExtPayloadParse(
 1221|   219k|          self, bs, &bitCnt, previous_element, previous_element_index, 0);
 1222|   219k|      if (ErrorStatus != AAC_DEC_OK) {
  ------------------
  |  Branch (1222:11): [True: 422, False: 219k]
  ------------------
 1223|    422|        self->frameOK = 0;
 1224|    422|        ErrorStatus = AAC_DEC_PARSE_ERROR;
 1225|    422|        break;
 1226|    422|      }
 1227|   219k|    }
 1228|   116k|  }
 1229|   334k|  return ErrorStatus;
 1230|   334k|}
aacdecoder.cpp:_ZL23CDataStreamElement_ReadP20AAC_DECODER_INSTANCEP13FDK_BITSTREAMPhj:
  439|  17.0k|                                                 UINT alignmentAnchor) {
  440|  17.0k|  AAC_DECODER_ERROR error = AAC_DEC_OK;
  441|  17.0k|  UINT dseBits;
  442|  17.0k|  INT dataStart;
  443|  17.0k|  int dataByteAlignFlag, count;
  444|       |
  445|  17.0k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|  17.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (445:3): [True: 17.0k, False: 0]
  ------------------
  446|       |
  447|  17.0k|  int crcReg = transportDec_CrcStartReg(self->hInput, 0);
  448|       |
  449|       |  /* Element Instance Tag */
  450|  17.0k|  *elementInstanceTag = FDKreadBits(bs, 4);
  451|       |  /* Data Byte Align Flag */
  452|  17.0k|  dataByteAlignFlag = FDKreadBits(bs, 1);
  453|       |
  454|  17.0k|  count = FDKreadBits(bs, 8);
  455|       |
  456|  17.0k|  if (count == 255) {
  ------------------
  |  Branch (456:7): [True: 23, False: 16.9k]
  ------------------
  457|     23|    count += FDKreadBits(bs, 8); /* EscCount */
  458|     23|  }
  459|  17.0k|  dseBits = count * 8;
  460|       |
  461|  17.0k|  if (dataByteAlignFlag) {
  ------------------
  |  Branch (461:7): [True: 5.31k, False: 11.7k]
  ------------------
  462|  5.31k|    FDKbyteAlign(bs, alignmentAnchor);
  463|  5.31k|  }
  464|       |
  465|  17.0k|  dataStart = (INT)FDKgetValidBits(bs);
  466|       |
  467|  17.0k|  error = CAacDecoder_AncDataParse(&self->ancData, bs, count);
  468|  17.0k|  transportDec_CrcEndReg(self->hInput, crcReg);
  469|       |
  470|  17.0k|  {
  471|       |    /* Move to the beginning of the data chunk */
  472|  17.0k|    FDKpushBack(bs, dataStart - (INT)FDKgetValidBits(bs));
  473|       |
  474|       |    /* Read Anc data if available */
  475|  17.0k|    aacDecoder_drcMarkPayload(self->hDrcInfo, bs, DVB_DRC_ANC_DATA);
  476|  17.0k|  }
  477|       |
  478|  17.0k|  {
  479|  17.0k|    PCMDMX_ERROR dmxErr = PCMDMX_OK;
  480|       |
  481|       |    /* Move to the beginning of the data chunk */
  482|  17.0k|    FDKpushBack(bs, dataStart - (INT)FDKgetValidBits(bs));
  483|       |
  484|       |    /* Read DMX meta-data */
  485|  17.0k|    dmxErr = pcmDmx_Parse(self->hPcmUtils, bs, dseBits, 0 /* not mpeg2 */);
  486|  17.0k|    if (error == AAC_DEC_OK && dmxErr != PCMDMX_OK) {
  ------------------
  |  Branch (486:9): [True: 17.0k, False: 0]
  |  Branch (486:32): [True: 7.76k, False: 9.25k]
  ------------------
  487|  7.76k|      error = AAC_DEC_UNKNOWN;
  488|  7.76k|    }
  489|  17.0k|  }
  490|       |
  491|       |  /* Move to the very end of the element. */
  492|  17.0k|  FDKpushBiDirectional(bs, (INT)FDKgetValidBits(bs) - dataStart + (INT)dseBits);
  493|       |
  494|  17.0k|  return error;
  495|  17.0k|}
aacdecoder.cpp:_ZL24CAacDecoder_AncDataParseP8CAncDataP13FDK_BITSTREAMi:
  391|  17.8k|                                                  const int ancBytes) {
  392|  17.8k|  AAC_DECODER_ERROR error = AAC_DEC_OK;
  393|  17.8k|  int readBytes = 0;
  394|       |
  395|  17.8k|  if (ancData->buffer != NULL) {
  ------------------
  |  Branch (395:7): [True: 0, False: 17.8k]
  ------------------
  396|      0|    if (ancBytes > 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 0]
  ------------------
  397|       |      /* write ancillary data to external buffer */
  398|      0|      int offset = ancData->offset[ancData->nrElements];
  399|       |
  400|      0|      if ((offset + ancBytes) > ancData->bufferSize) {
  ------------------
  |  Branch (400:11): [True: 0, False: 0]
  ------------------
  401|      0|        error = AAC_DEC_TOO_SMALL_ANC_BUFFER;
  402|      0|      } else if (ancData->nrElements >= 8 - 1) {
  ------------------
  |  Branch (402:18): [True: 0, False: 0]
  ------------------
  403|      0|        error = AAC_DEC_TOO_MANY_ANC_ELEMENTS;
  404|      0|      } else {
  405|      0|        int i;
  406|       |
  407|      0|        for (i = 0; i < ancBytes; i++) {
  ------------------
  |  Branch (407:21): [True: 0, False: 0]
  ------------------
  408|      0|          ancData->buffer[i + offset] = FDKreadBits(hBs, 8);
  409|      0|          readBytes++;
  410|      0|        }
  411|       |
  412|      0|        ancData->nrElements++;
  413|      0|        ancData->offset[ancData->nrElements] =
  414|      0|            ancBytes + ancData->offset[ancData->nrElements - 1];
  415|      0|      }
  416|      0|    }
  417|      0|  }
  418|       |
  419|  17.8k|  readBytes = ancBytes - readBytes;
  420|       |
  421|  17.8k|  if (readBytes > 0) {
  ------------------
  |  Branch (421:7): [True: 12.8k, False: 4.97k]
  ------------------
  422|       |    /* skip data */
  423|  12.8k|    FDKpushFor(hBs, readBytes << 3);
  424|  12.8k|  }
  425|       |
  426|  17.8k|  return error;
  427|  17.8k|}
aacdecoder.cpp:_ZL26CProgramConfigElement_ReadP13FDK_BITSTREAMP12TRANSPORTDECP14CProgramConfigjj:
  582|  1.97k|                                      const UINT alignAnchor) {
  583|  1.97k|  int pceStatus = 0;
  584|  1.97k|  int crcReg;
  585|       |
  586|       |  /* read PCE to temporal buffer first */
  587|  1.97k|  C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|  1.97k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  588|       |
  589|  1.97k|  CProgramConfig_Init(tmpPce);
  590|       |
  591|  1.97k|  crcReg = transportDec_CrcStartReg(pTp, 0);
  592|       |
  593|  1.97k|  CProgramConfig_Read(tmpPce, bs, alignAnchor);
  594|       |
  595|  1.97k|  transportDec_CrcEndReg(pTp, crcReg);
  596|       |
  597|  1.97k|  if (CProgramConfig_IsValid(tmpPce) && (tmpPce->Profile == 1)) {
  ------------------
  |  Branch (597:7): [True: 1.34k, False: 622]
  |  Branch (597:41): [True: 1.05k, False: 290]
  ------------------
  598|  1.05k|    if (!CProgramConfig_IsValid(pce) && (channelConfig > 0)) {
  ------------------
  |  Branch (598:9): [True: 5, False: 1.05k]
  |  Branch (598:41): [True: 5, False: 0]
  ------------------
  599|       |      /* Create a standard channel config PCE to compare with */
  600|      5|      CProgramConfig_GetDefault(pce, channelConfig);
  601|      5|    }
  602|       |
  603|  1.05k|    if (CProgramConfig_IsValid(pce)) {
  ------------------
  |  Branch (603:9): [True: 1.05k, False: 0]
  ------------------
  604|       |      /* Compare the new and the old PCE (tags ignored) */
  605|  1.05k|      switch (CProgramConfig_Compare(pce, tmpPce)) {
  606|    338|        case 1: /* Channel configuration not changed. Just new metadata. */
  ------------------
  |  Branch (606:9): [True: 338, False: 720]
  ------------------
  607|    338|          FDKmemcpy(pce, tmpPce,
  608|    338|                    sizeof(CProgramConfig)); /* Store the complete PCE */
  609|    338|          pceStatus = 1; /* New PCE but no change of config */
  610|    338|          break;
  611|      1|        case 2:  /* The number of channels are identical but not the config */
  ------------------
  |  Branch (611:9): [True: 1, False: 1.05k]
  ------------------
  612|     10|        case -1: /* The channel configuration is completely different */
  ------------------
  |  Branch (612:9): [True: 9, False: 1.04k]
  ------------------
  613|     10|          pceStatus = -1; /* Not supported! */
  614|     10|          break;
  615|    710|        case 0: /* Nothing to do because PCE matches the old one exactly. */
  ------------------
  |  Branch (615:9): [True: 710, False: 348]
  ------------------
  616|    710|        default:
  ------------------
  |  Branch (616:9): [True: 0, False: 1.05k]
  ------------------
  617|       |          /* pceStatus = 0; */
  618|    710|          break;
  619|  1.05k|      }
  620|  1.05k|    }
  621|  1.05k|  }
  622|       |
  623|  1.97k|  C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
  624|       |
  625|  1.97k|  return pceStatus;
  626|  1.97k|}
aacdecoder.cpp:_ZL27CAacDecoder_ExtPayloadParseP20AAC_DECODER_INSTANCEP13FDK_BITSTREAMPi14MP4_ELEMENT_IDii:
  881|   281k|    MP4_ELEMENT_ID previous_element, int elIndex, int fIsFillElement) {
  882|   281k|  AAC_DECODER_ERROR error = AAC_DEC_OK;
  883|   281k|  EXT_PAYLOAD_TYPE extension_type;
  884|   281k|  int bytes = (*count) >> 3;
  885|   281k|  int crcFlag = 0;
  886|       |
  887|   281k|  if (*count < 4) {
  ------------------
  |  Branch (887:7): [True: 11, False: 281k]
  ------------------
  888|     11|    return AAC_DEC_PARSE_ERROR;
  889|   281k|  } else if ((INT)FDKgetValidBits(hBs) < *count) {
  ------------------
  |  Branch (889:14): [True: 205, False: 281k]
  ------------------
  890|    205|    return AAC_DEC_DECODE_FRAME_ERROR;
  891|    205|  }
  892|       |
  893|   281k|  extension_type =
  894|   281k|      (EXT_PAYLOAD_TYPE)FDKreadBits(hBs, 4); /* bs_extension_type */
  895|   281k|  *count -= 4;
  896|       |
  897|       |  /* For ELD, the SBR signaling is explicit and parsed in
  898|       |     aacDecoder_ParseExplicitMpsAndSbr(), therefore skip SBR if implicit
  899|       |     present. */
  900|   281k|  if ((self->flags[0] & AC_ELD) && ((extension_type == EXT_SBR_DATA_CRC) ||
  ------------------
  |  |  303|   281k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (900:7): [True: 95.1k, False: 186k]
  |  Branch (900:37): [True: 391, False: 94.7k]
  ------------------
  901|  94.7k|                                    (extension_type == EXT_SBR_DATA))) {
  ------------------
  |  Branch (901:37): [True: 513, False: 94.2k]
  ------------------
  902|    904|    extension_type = EXT_FIL; /* skip sbr data */
  903|    904|  }
  904|       |
  905|   281k|  switch (extension_type) {
  906|  84.5k|    case EXT_DYNAMIC_RANGE: {
  ------------------
  |  Branch (906:5): [True: 84.5k, False: 196k]
  ------------------
  907|  84.5k|      INT readBits =
  908|  84.5k|          aacDecoder_drcMarkPayload(self->hDrcInfo, hBs, MPEG_DRC_EXT_DATA);
  909|       |
  910|  84.5k|      if (readBits > *count) { /* Read too much. Something went wrong! */
  ------------------
  |  Branch (910:11): [True: 5.76k, False: 78.8k]
  ------------------
  911|  5.76k|        error = AAC_DEC_PARSE_ERROR;
  912|  5.76k|      }
  913|  84.5k|      *count -= readBits;
  914|  84.5k|    } break;
  915|  9.67k|    case EXT_LDSAC_DATA:
  ------------------
  |  Branch (915:5): [True: 9.67k, False: 271k]
  ------------------
  916|  40.5k|    case EXT_SAC_DATA:
  ------------------
  |  Branch (916:5): [True: 30.8k, False: 250k]
  ------------------
  917|       |      /* Read MPEG Surround Extension payload */
  918|  40.5k|      {
  919|  40.5k|        int err, mpsSampleRate, mpsFrameSize;
  920|       |
  921|  40.5k|        if (self->flags[0] & AC_PS_PRESENT) {
  ------------------
  |  |  314|  40.5k|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  ------------------
  |  Branch (921:13): [True: 166, False: 40.3k]
  ------------------
  922|    166|          error = AAC_DEC_PARSE_ERROR;
  923|    166|          goto bail;
  924|    166|        }
  925|       |
  926|       |        /* Handle SBR dual rate case */
  927|  40.3k|        if (self->streamInfo.extSamplingRate != 0) {
  ------------------
  |  Branch (927:13): [True: 35.0k, False: 5.26k]
  ------------------
  928|  35.0k|          mpsSampleRate = self->streamInfo.extSamplingRate;
  929|  35.0k|          mpsFrameSize = self->streamInfo.aacSamplesPerFrame *
  930|  35.0k|                         (self->streamInfo.extSamplingRate /
  931|  35.0k|                          self->streamInfo.aacSampleRate);
  932|  35.0k|        } else {
  933|  5.26k|          mpsSampleRate = self->streamInfo.aacSampleRate;
  934|  5.26k|          mpsFrameSize = self->streamInfo.aacSamplesPerFrame;
  935|  5.26k|        }
  936|       |        /* Setting of internal MPS state; may be reset in
  937|       |           CAacDecoder_SyncQmfMode if decoder is unable to decode with user
  938|       |           defined qmfMode */
  939|  40.3k|        if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD))) {
  ------------------
  |  |  307|  40.3k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD))) {
  ------------------
  |  |  310|  40.3k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                      if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD))) {
  ------------------
  |  |  303|  40.3k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (939:13): [True: 5.26k, False: 35.0k]
  ------------------
  940|  5.26k|          self->mpsEnableCurr = self->mpsEnableUser;
  941|  5.26k|        }
  942|  40.3k|        if (self->mpsEnableCurr) {
  ------------------
  |  Branch (942:13): [True: 34.1k, False: 6.21k]
  ------------------
  943|  34.1k|          if (!self->qmfDomain.globalConf.qmfDomainExplicitConfig) {
  ------------------
  |  Branch (943:15): [True: 828, False: 33.3k]
  ------------------
  944|       |            /* if not done yet, allocate full MPEG Surround decoder instance */
  945|    828|            if (mpegSurroundDecoder_IsFullMpegSurroundDecoderInstanceAvailable(
  ------------------
  |  Branch (945:17): [True: 370, False: 458]
  ------------------
  946|    828|                    (CMpegSurroundDecoder *)self->pMpegSurroundDecoder) ==
  947|    828|                SAC_INSTANCE_NOT_FULL_AVAILABLE) {
  948|    370|              if (mpegSurroundDecoder_Open(
  ------------------
  |  Branch (948:19): [True: 0, False: 370]
  ------------------
  949|    370|                      (CMpegSurroundDecoder **)&self->pMpegSurroundDecoder, -1,
  950|    370|                      &self->qmfDomain)) {
  951|      0|                return AAC_DEC_OUT_OF_MEMORY;
  952|      0|              }
  953|    370|            }
  954|    828|          }
  955|  34.1k|          err = mpegSurroundDecoder_Parse(
  956|  34.1k|              (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, hBs, count,
  957|  34.1k|              self->streamInfo.aot, mpsSampleRate, mpsFrameSize,
  958|  34.1k|              self->flags[0] & AC_INDEP);
  ------------------
  |  |  319|  34.1k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
  959|  34.1k|          if (err == MPS_OK) {
  ------------------
  |  Branch (959:15): [True: 21.0k, False: 13.1k]
  ------------------
  960|  21.0k|            self->flags[0] |= AC_MPS_PRESENT;
  ------------------
  |  |  316|  21.0k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
  961|  21.0k|          } else {
  962|  13.1k|            error = AAC_DEC_PARSE_ERROR;
  963|  13.1k|          }
  964|  34.1k|        }
  965|       |        /* Skip any trailing bytes */
  966|  40.3k|        FDKpushFor(hBs, *count);
  967|  40.3k|        *count = 0;
  968|  40.3k|      }
  969|      0|      break;
  970|       |
  971|  10.9k|    case EXT_SBR_DATA_CRC:
  ------------------
  |  Branch (971:5): [True: 10.9k, False: 270k]
  ------------------
  972|  10.9k|      crcFlag = 1;
  973|  10.9k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|  10.9k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  974|  35.2k|    case EXT_SBR_DATA:
  ------------------
  |  Branch (974:5): [True: 24.3k, False: 256k]
  ------------------
  975|  35.2k|      if (IS_CHANNEL_ELEMENT(previous_element)) {
  ------------------
  |  |  459|  35.2k|  ((elementId) == ID_SCE || (elementId) == ID_CPE || (elementId) == ID_LFE || \
  |  |  ------------------
  |  |  |  Branch (459:4): [True: 20.2k, False: 15.0k]
  |  |  |  Branch (459:29): [True: 14.5k, False: 452]
  |  |  |  Branch (459:54): [True: 285, False: 167]
  |  |  ------------------
  |  |  460|  35.2k|   (elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE ||                \
  |  |  ------------------
  |  |  |  Branch (460:4): [True: 0, False: 167]
  |  |  |  Branch (460:34): [True: 0, False: 167]
  |  |  ------------------
  |  |  461|  35.2k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (461:4): [True: 0, False: 167]
  |  |  ------------------
  ------------------
  976|  35.0k|        SBR_ERROR sbrError;
  977|  35.0k|        UCHAR configMode = 0;
  978|  35.0k|        UCHAR configChanged = 0;
  979|       |
  980|  35.0k|        CAacDecoder_SyncQmfMode(self);
  981|       |
  982|  35.0k|        configMode |= AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|  35.0k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  983|       |
  984|  35.0k|        sbrError = sbrDecoder_InitElement(
  985|  35.0k|            self->hSbrDecoder, self->streamInfo.aacSampleRate,
  986|  35.0k|            self->streamInfo.extSamplingRate,
  987|  35.0k|            self->streamInfo.aacSamplesPerFrame, self->streamInfo.aot,
  988|  35.0k|            previous_element, elIndex,
  989|  35.0k|            2, /* Signalize that harmonicSBR shall be ignored in the config
  990|       |                  change detection */
  991|  35.0k|            0, configMode, &configChanged, self->downscaleFactor);
  992|       |
  993|  35.0k|        if (sbrError == SBRDEC_OK) {
  ------------------
  |  Branch (993:13): [True: 34.3k, False: 751]
  ------------------
  994|  34.3k|          sbrError = sbrDecoder_Parse(self->hSbrDecoder, hBs,
  995|  34.3k|                                      self->pDrmBsBuffer, self->drmBsBufferSize,
  996|  34.3k|                                      count, *count, crcFlag, previous_element,
  997|  34.3k|                                      elIndex, self->flags[0], self->elFlags);
  998|       |          /* Enable SBR for implicit SBR signalling but only if no severe error
  999|       |           * happend. */
 1000|  34.3k|          if ((sbrError == SBRDEC_OK) || (sbrError == SBRDEC_PARSE_ERROR)) {
  ------------------
  |  Branch (1000:15): [True: 8.31k, False: 26.0k]
  |  Branch (1000:42): [True: 26.0k, False: 0]
  ------------------
 1001|  34.3k|            self->sbrEnabled = 1;
 1002|  34.3k|          }
 1003|  34.3k|        } else {
 1004|       |          /* Do not try to apply SBR because initializing the element failed. */
 1005|    751|          self->sbrEnabled = 0;
 1006|    751|        }
 1007|       |        /* Citation from ISO/IEC 14496-3 chapter 4.5.2.1.5.2
 1008|       |        Fill elements containing an extension_payload() with an extension_type
 1009|       |        of EXT_SBR_DATA or EXT_SBR_DATA_CRC shall not contain any other
 1010|       |        extension_payload of any other extension_type.
 1011|       |        */
 1012|  35.0k|        if (fIsFillElement) {
  ------------------
  |  Branch (1012:13): [True: 27.1k, False: 7.93k]
  ------------------
 1013|  27.1k|          FDKpushBiDirectional(hBs, *count);
 1014|  27.1k|          *count = 0;
 1015|  27.1k|        } else {
 1016|       |          /* If this is not a fill element with a known length, we are screwed
 1017|       |           * and further parsing makes no sense. */
 1018|  7.93k|          if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (1018:15): [True: 1.70k, False: 6.22k]
  ------------------
 1019|  1.70k|            self->frameOK = 0;
 1020|  1.70k|          }
 1021|  7.93k|        }
 1022|  35.0k|      } else {
 1023|    167|        error = AAC_DEC_PARSE_ERROR;
 1024|    167|      }
 1025|  35.2k|      break;
 1026|       |
 1027|  1.65k|    case EXT_FILL_DATA: {
  ------------------
  |  Branch (1027:5): [True: 1.65k, False: 279k]
  ------------------
 1028|  1.65k|      int temp;
 1029|       |
 1030|  1.65k|      temp = FDKreadBits(hBs, 4);
 1031|  1.65k|      bytes--;
 1032|  1.65k|      if (temp != 0) {
  ------------------
  |  Branch (1032:11): [True: 244, False: 1.40k]
  ------------------
 1033|    244|        error = AAC_DEC_PARSE_ERROR;
 1034|    244|        break;
 1035|    244|      }
 1036|  2.39k|      while (bytes > 0) {
  ------------------
  |  Branch (1036:14): [True: 1.35k, False: 1.04k]
  ------------------
 1037|  1.35k|        temp = FDKreadBits(hBs, 8);
 1038|  1.35k|        bytes--;
 1039|  1.35k|        if (temp != 0xa5) {
  ------------------
  |  Branch (1039:13): [True: 364, False: 986]
  ------------------
 1040|    364|          error = AAC_DEC_PARSE_ERROR;
 1041|    364|          break;
 1042|    364|        }
 1043|  1.35k|      }
 1044|  1.40k|      *count = bytes << 3;
 1045|  1.40k|    } break;
 1046|       |
 1047|  1.07k|    case EXT_DATA_ELEMENT: {
  ------------------
  |  Branch (1047:5): [True: 1.07k, False: 280k]
  ------------------
 1048|  1.07k|      int dataElementVersion;
 1049|       |
 1050|  1.07k|      dataElementVersion = FDKreadBits(hBs, 4);
 1051|  1.07k|      *count -= 4;
 1052|  1.07k|      if (dataElementVersion == 0) /* ANC_DATA */
  ------------------
  |  Branch (1052:11): [True: 847, False: 227]
  ------------------
 1053|    847|      {
 1054|    847|        int temp, dataElementLength = 0;
 1055|  38.4k|        do {
 1056|  38.4k|          temp = FDKreadBits(hBs, 8);
 1057|  38.4k|          *count -= 8;
 1058|  38.4k|          dataElementLength += temp;
 1059|  38.4k|        } while (temp == 255);
  ------------------
  |  Branch (1059:18): [True: 37.6k, False: 847]
  ------------------
 1060|       |
 1061|    847|        CAacDecoder_AncDataParse(&self->ancData, hBs, dataElementLength);
 1062|    847|        *count -= (dataElementLength << 3);
 1063|    847|      } else {
 1064|       |        /* align = 0 */
 1065|    227|        error = AAC_DEC_PARSE_ERROR;
 1066|    227|        goto bail;
 1067|    227|      }
 1068|  1.07k|    } break;
 1069|       |
 1070|  55.3k|    case EXT_DATA_LENGTH:
  ------------------
  |  Branch (1070:5): [True: 55.3k, False: 225k]
  ------------------
 1071|  55.3k|      if (!fIsFillElement /* Makes no sens to have an additional length in a
  ------------------
  |  Branch (1071:11): [True: 55.3k, False: 21]
  ------------------
 1072|       |                             fill ...   */
 1073|  55.3k|          &&
 1074|  55.3k|          (self->flags[0] &
  ------------------
  |  Branch (1074:11): [True: 55.3k, False: 0]
  ------------------
 1075|  55.3k|           AC_ER)) /* ... element because this extension payload type was ... */
  ------------------
  |  |  305|  55.3k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
 1076|  55.3k|      { /* ... created to circumvent the missing length in ER-Syntax. */
 1077|  55.3k|        int bitCnt, len = FDKreadBits(hBs, 4);
 1078|  55.3k|        *count -= 4;
 1079|       |
 1080|  55.3k|        if (len == 15) {
  ------------------
  |  Branch (1080:13): [True: 1.26k, False: 54.0k]
  ------------------
 1081|  1.26k|          int add_len = FDKreadBits(hBs, 8);
 1082|  1.26k|          *count -= 8;
 1083|  1.26k|          len += add_len;
 1084|       |
 1085|  1.26k|          if (add_len == 255) {
  ------------------
  |  Branch (1085:15): [True: 61, False: 1.20k]
  ------------------
 1086|     61|            len += FDKreadBits(hBs, 16);
 1087|     61|            *count -= 16;
 1088|     61|          }
 1089|  1.26k|        }
 1090|  55.3k|        len <<= 3;
 1091|  55.3k|        bitCnt = len;
 1092|       |
 1093|  55.3k|        if ((EXT_PAYLOAD_TYPE)FDKreadBits(hBs, 4) == EXT_DATA_LENGTH) {
  ------------------
  |  Branch (1093:13): [True: 17, False: 55.3k]
  ------------------
 1094|       |          /* Check NOTE 2: The extension_payload() included here must
 1095|       |                           not have extension_type == EXT_DATA_LENGTH. */
 1096|     17|          error = AAC_DEC_PARSE_ERROR;
 1097|     17|          goto bail;
 1098|  55.3k|        } else {
 1099|       |          /* rewind and call myself again. */
 1100|  55.3k|          FDKpushBack(hBs, 4);
 1101|       |
 1102|  55.3k|          error = CAacDecoder_ExtPayloadParse(
 1103|  55.3k|              self, hBs, &bitCnt, previous_element, elIndex,
 1104|  55.3k|              1); /* Treat same as fill element */
 1105|       |
 1106|  55.3k|          *count -= len - bitCnt;
 1107|  55.3k|        }
 1108|       |        /* Note: the fall through in case the if statement above is not taken is
 1109|       |         * intentional. */
 1110|  55.3k|        break;
 1111|  55.3k|      }
 1112|     21|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|     21|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1113|       |
 1114|  34.4k|    case EXT_FIL:
  ------------------
  |  Branch (1114:5): [True: 34.4k, False: 246k]
  ------------------
 1115|       |
 1116|  62.8k|    default:
  ------------------
  |  Branch (1116:5): [True: 28.3k, False: 252k]
  ------------------
 1117|       |      /* align = 4 */
 1118|  62.8k|      FDKpushFor(hBs, *count);
 1119|  62.8k|      *count = 0;
 1120|  62.8k|      break;
 1121|   281k|  }
 1122|       |
 1123|   281k|bail:
 1124|   281k|  if ((error != AAC_DEC_OK) &&
  ------------------
  |  Branch (1124:7): [True: 20.2k, False: 261k]
  ------------------
 1125|  20.2k|      fIsFillElement) { /* Skip the remaining extension bytes */
  ------------------
  |  Branch (1125:7): [True: 19.8k, False: 381]
  ------------------
 1126|  19.8k|    FDKpushBiDirectional(hBs, *count);
 1127|  19.8k|    *count = 0;
 1128|       |    /* Patch error code because decoding can go on. */
 1129|  19.8k|    error = AAC_DEC_OK;
 1130|       |    /* Be sure that parsing errors have been stored. */
 1131|  19.8k|  }
 1132|   281k|  return error;
 1133|   281k|}
aacdecoder.cpp:_ZL27validateElementInstanceTagsP14CProgramConfigPP22CAacDecoderChannelInfoiP14MP4_ELEMENT_IDi:
  526|  1.48k|    INT nChannels, MP4_ELEMENT_ID *pElementIdTab, INT nElements) {
  527|  1.48k|  if (nChannels >= pce->NumChannels) {
  ------------------
  |  Branch (527:7): [True: 1.48k, False: 2]
  ------------------
  528|  2.59k|    for (int el = 0; el < pce->NumFrontChannelElements; el++) {
  ------------------
  |  Branch (528:22): [True: 1.11k, False: 1.47k]
  ------------------
  529|  1.11k|      if (!findElementInstanceTag(pce->FrontElementTagSelect[el],
  ------------------
  |  Branch (529:11): [True: 4, False: 1.11k]
  ------------------
  530|  1.11k|                                  pce->FrontElementIsCpe[el] ? ID_CPE : ID_SCE,
  ------------------
  |  Branch (530:35): [True: 321, False: 794]
  ------------------
  531|  1.11k|                                  pAacDecoderChannelInfo, nChannels,
  532|  1.11k|                                  pElementIdTab, nElements)) {
  533|      4|        return 0; /* element instance tag not in raw_data_block() */
  534|      4|      }
  535|  1.11k|    }
  536|  3.11k|    for (int el = 0; el < pce->NumSideChannelElements; el++) {
  ------------------
  |  Branch (536:22): [True: 1.64k, False: 1.47k]
  ------------------
  537|  1.64k|      if (!findElementInstanceTag(pce->SideElementTagSelect[el],
  ------------------
  |  Branch (537:11): [True: 7, False: 1.63k]
  ------------------
  538|  1.64k|                                  pce->SideElementIsCpe[el] ? ID_CPE : ID_SCE,
  ------------------
  |  Branch (538:35): [True: 697, False: 948]
  ------------------
  539|  1.64k|                                  pAacDecoderChannelInfo, nChannels,
  540|  1.64k|                                  pElementIdTab, nElements)) {
  541|      7|        return 0; /* element instance tag not in raw_data_block() */
  542|      7|      }
  543|  1.64k|    }
  544|  3.34k|    for (int el = 0; el < pce->NumBackChannelElements; el++) {
  ------------------
  |  Branch (544:22): [True: 1.87k, False: 1.46k]
  ------------------
  545|  1.87k|      if (!findElementInstanceTag(pce->BackElementTagSelect[el],
  ------------------
  |  Branch (545:11): [True: 4, False: 1.87k]
  ------------------
  546|  1.87k|                                  pce->BackElementIsCpe[el] ? ID_CPE : ID_SCE,
  ------------------
  |  Branch (546:35): [True: 844, False: 1.03k]
  ------------------
  547|  1.87k|                                  pAacDecoderChannelInfo, nChannels,
  548|  1.87k|                                  pElementIdTab, nElements)) {
  549|      4|        return 0; /* element instance tag not in raw_data_block() */
  550|      4|      }
  551|  1.87k|    }
  552|  2.17k|    for (int el = 0; el < pce->NumLfeChannelElements; el++) {
  ------------------
  |  Branch (552:22): [True: 710, False: 1.46k]
  ------------------
  553|    710|      if (!findElementInstanceTag(pce->LfeElementTagSelect[el], ID_LFE,
  ------------------
  |  Branch (553:11): [True: 4, False: 706]
  ------------------
  554|    710|                                  pAacDecoderChannelInfo, nChannels,
  555|    710|                                  pElementIdTab, nElements)) {
  556|      4|        return 0; /* element instance tag not in raw_data_block() */
  557|      4|      }
  558|    710|    }
  559|  1.46k|  } else {
  560|      2|    return 0; /* too less decoded audio channels */
  561|      2|  }
  562|       |
  563|  1.46k|  return 1; /* all element instance tags found in raw_data_block() */
  564|  1.48k|}
aacdecoder.cpp:_ZL22findElementInstanceTagi14MP4_ELEMENT_IDPP22CAacDecoderChannelInfoiPS_i:
  500|  5.34k|    MP4_ELEMENT_ID *pElementIdTab, INT nElements) {
  501|  5.34k|  int el, chCnt = 0;
  502|       |
  503|  13.7k|  for (el = 0; el < nElements; el++) {
  ------------------
  |  Branch (503:16): [True: 13.7k, False: 0]
  ------------------
  504|  13.7k|    switch (pElementIdTab[el]) {
  505|  3.73k|      case ID_CPE:
  ------------------
  |  Branch (505:7): [True: 3.73k, False: 10.0k]
  ------------------
  506|  12.2k|      case ID_SCE:
  ------------------
  |  Branch (506:7): [True: 8.50k, False: 5.25k]
  ------------------
  507|  13.7k|      case ID_LFE:
  ------------------
  |  Branch (507:7): [True: 1.51k, False: 12.2k]
  ------------------
  508|  13.7k|        if ((elementTag == pAacDecoderChannelInfo[chCnt]->ElementInstanceTag) &&
  ------------------
  |  Branch (508:13): [True: 5.99k, False: 7.76k]
  ------------------
  509|  5.99k|            (elementId == pElementIdTab[el])) {
  ------------------
  |  Branch (509:13): [True: 5.32k, False: 668]
  ------------------
  510|  5.32k|          return 1; /* element instance tag found */
  511|  5.32k|        }
  512|  8.43k|        chCnt += (pElementIdTab[el] == ID_CPE) ? 2 : 1;
  ------------------
  |  Branch (512:18): [True: 1.87k, False: 6.55k]
  ------------------
  513|  8.43k|        break;
  514|      0|      default:
  ------------------
  |  Branch (514:7): [True: 0, False: 13.7k]
  ------------------
  515|      0|        break;
  516|  13.7k|    }
  517|  8.43k|    if (chCnt >= nChannels) break;
  ------------------
  |  Branch (517:9): [True: 19, False: 8.41k]
  ------------------
  518|  8.41k|    if (pElementIdTab[el] == ID_END) break;
  ------------------
  |  Branch (518:9): [True: 0, False: 8.41k]
  ------------------
  519|  8.41k|  }
  520|       |
  521|     19|  return 0; /* element instance tag not found */
  522|  5.34k|}

aacDecoder_Open:
  957|  21.8k|                                               UINT nrOfLayers) {
  958|  21.8k|  AAC_DECODER_INSTANCE *aacDec = NULL;
  959|  21.8k|  HANDLE_TRANSPORTDEC pIn;
  960|  21.8k|  int err = 0;
  961|  21.8k|  int stereoConfigIndex = -1;
  962|       |
  963|  21.8k|  UINT nrOfLayers_min = fMin(nrOfLayers, (UINT)1);
  964|       |
  965|       |  /* Allocate transport layer struct. */
  966|  21.8k|  pIn = transportDec_Open(transportFmt, TP_FLAG_MPEG4, nrOfLayers_min);
  ------------------
  |  |  322|  21.8k|#define TP_FLAG_MPEG4 1
  ------------------
  967|  21.8k|  if (pIn == NULL) {
  ------------------
  |  Branch (967:7): [True: 0, False: 21.8k]
  ------------------
  968|      0|    return NULL;
  969|      0|  }
  970|       |
  971|       |  /* Allocate AAC decoder core struct. */
  972|  21.8k|  aacDec = CAacDecoder_Open(transportFmt);
  973|       |
  974|  21.8k|  if (aacDec == NULL) {
  ------------------
  |  Branch (974:7): [True: 0, False: 21.8k]
  ------------------
  975|      0|    transportDec_Close(&pIn);
  976|      0|    goto bail;
  977|      0|  }
  978|  21.8k|  aacDec->hInput = pIn;
  979|       |
  980|  21.8k|  aacDec->nrOfLayers = nrOfLayers_min;
  981|       |
  982|       |  /* Setup channel mapping descriptor. */
  983|  21.8k|  FDK_chMapDescr_init(&aacDec->mapDescr, NULL, 0, 0);
  984|       |
  985|       |  /* Register Config Update callback. */
  986|  21.8k|  transportDec_RegisterAscCallback(pIn, aacDecoder_ConfigCallback,
  987|  21.8k|                                   (void *)aacDec);
  988|       |
  989|       |  /* Register Free Memory callback. */
  990|  21.8k|  transportDec_RegisterFreeMemCallback(pIn, aacDecoder_FreeMemCallback,
  991|  21.8k|                                       (void *)aacDec);
  992|       |
  993|       |  /* Register config switch control callback. */
  994|  21.8k|  transportDec_RegisterCtrlCFGChangeCallback(
  995|  21.8k|      pIn, aacDecoder_CtrlCFGChangeCallback, (void *)aacDec);
  996|       |
  997|  21.8k|  FDKmemclear(&aacDec->qmfDomain, sizeof(FDK_QMF_DOMAIN));
  998|       |  /* open SBR decoder */
  999|  21.8k|  if (SBRDEC_OK != sbrDecoder_Open(&aacDec->hSbrDecoder, &aacDec->qmfDomain)) {
  ------------------
  |  Branch (999:7): [True: 0, False: 21.8k]
  ------------------
 1000|      0|    err = -1;
 1001|      0|    goto bail;
 1002|      0|  }
 1003|  21.8k|  aacDec->qmfModeUser = NOT_DEFINED;
 1004|  21.8k|  transportDec_RegisterSbrCallback(aacDec->hInput, aacDecoder_SbrCallback,
 1005|  21.8k|                                   (void *)aacDec->hSbrDecoder);
 1006|       |
 1007|  21.8k|  if (mpegSurroundDecoder_Open(
  ------------------
  |  Branch (1007:7): [True: 0, False: 21.8k]
  ------------------
 1008|  21.8k|          (CMpegSurroundDecoder **)&aacDec->pMpegSurroundDecoder,
 1009|  21.8k|          stereoConfigIndex, &aacDec->qmfDomain)) {
 1010|      0|    err = -1;
 1011|      0|    goto bail;
 1012|      0|  }
 1013|       |  /* Set MPEG Surround defaults */
 1014|  21.8k|  aacDec->mpsEnableUser = 0;
 1015|  21.8k|  aacDec->mpsEnableCurr = 0;
 1016|  21.8k|  aacDec->mpsApplicable = 0;
 1017|  21.8k|  aacDec->mpsOutputMode = (SCHAR)SACDEC_OUT_MODE_NORMAL;
 1018|  21.8k|  transportDec_RegisterSscCallback(pIn, aacDecoder_SscCallback, (void *)aacDec);
 1019|       |
 1020|  21.8k|  {
 1021|  21.8k|    if (FDK_drcDec_Open(&(aacDec->hUniDrcDecoder), DRC_DEC_ALL) != 0) {
  ------------------
  |  Branch (1021:9): [True: 0, False: 21.8k]
  ------------------
 1022|      0|      err = -1;
 1023|      0|      goto bail;
 1024|      0|    }
 1025|  21.8k|  }
 1026|       |
 1027|  21.8k|  transportDec_RegisterUniDrcConfigCallback(pIn, aacDecoder_UniDrcCallback,
 1028|  21.8k|                                            (void *)aacDec,
 1029|  21.8k|                                            aacDec->loudnessInfoSetPosition);
 1030|  21.8k|  aacDec->defaultTargetLoudness = (SCHAR)96;
 1031|       |
 1032|  21.8k|  pcmDmx_Open(&aacDec->hPcmUtils);
 1033|  21.8k|  if (aacDec->hPcmUtils == NULL) {
  ------------------
  |  Branch (1033:7): [True: 0, False: 21.8k]
  ------------------
 1034|      0|    err = -1;
 1035|      0|    goto bail;
 1036|      0|  }
 1037|       |
 1038|  21.8k|  aacDec->hLimiter =
 1039|  21.8k|      pcmLimiter_Create(TDL_ATTACK_DEFAULT_MS, TDL_RELEASE_DEFAULT_MS,
  ------------------
  |  |  109|  21.8k|#define TDL_ATTACK_DEFAULT_MS (15)  /* default attack  time in ms */
  ------------------
                    pcmLimiter_Create(TDL_ATTACK_DEFAULT_MS, TDL_RELEASE_DEFAULT_MS,
  ------------------
  |  |  110|  21.8k|#define TDL_RELEASE_DEFAULT_MS (50) /* default release time in ms */
  ------------------
 1040|  21.8k|                        (FIXP_DBL)MAXVAL_DBL, (8), 96000);
  ------------------
  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1041|  21.8k|  if (NULL == aacDec->hLimiter) {
  ------------------
  |  Branch (1041:7): [True: 0, False: 21.8k]
  ------------------
 1042|      0|    err = -1;
 1043|      0|    goto bail;
 1044|      0|  }
 1045|  21.8k|  aacDec->limiterEnableUser = (UCHAR)-1;
 1046|  21.8k|  aacDec->limiterEnableCurr = 0;
 1047|       |
 1048|       |  /* Assure that all modules have same delay */
 1049|  21.8k|  if (setConcealMethod(aacDec,
  ------------------
  |  Branch (1049:7): [True: 0, False: 21.8k]
  ------------------
 1050|  21.8k|                       CConcealment_GetMethod(&aacDec->concealCommonData))) {
 1051|      0|    err = -1;
 1052|      0|    goto bail;
 1053|      0|  }
 1054|       |
 1055|  21.8k|bail:
 1056|  21.8k|  if (err == -1) {
  ------------------
  |  Branch (1056:7): [True: 0, False: 21.8k]
  ------------------
 1057|      0|    aacDecoder_Close(aacDec);
 1058|       |    aacDec = NULL;
 1059|      0|  }
 1060|  21.8k|  return aacDec;
 1061|  21.8k|}
aacDecoder_Fill:
 1066|  22.8k|                                               UINT *pBytesValid) {
 1067|  22.8k|  TRANSPORTDEC_ERROR tpErr;
 1068|       |  /* loop counter for layers; if not TT_MP4_RAWPACKETS used as index for only
 1069|       |     available layer */
 1070|  22.8k|  INT layer = 0;
 1071|  22.8k|  INT nrOfLayers = self->nrOfLayers;
 1072|       |
 1073|  22.8k|  {
 1074|  45.6k|    for (layer = 0; layer < nrOfLayers; layer++) {
  ------------------
  |  Branch (1074:21): [True: 22.8k, False: 22.8k]
  ------------------
 1075|  22.8k|      {
 1076|  22.8k|        tpErr = transportDec_FillData(self->hInput, pBuffer[layer],
 1077|  22.8k|                                      bufferSize[layer], &pBytesValid[layer],
 1078|  22.8k|                                      layer);
 1079|  22.8k|        if (tpErr != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1079:13): [True: 0, False: 22.8k]
  ------------------
 1080|      0|          return AAC_DEC_UNKNOWN; /* Must be an internal error */
 1081|      0|        }
 1082|  22.8k|      }
 1083|  22.8k|    }
 1084|  22.8k|  }
 1085|       |
 1086|  22.8k|  return AAC_DEC_OK;
 1087|  22.8k|}
aacDecoder_DecodeFrame:
 1152|   363k|                                                      const UINT flags) {
 1153|   363k|  AAC_DECODER_ERROR ErrorStatus;
 1154|   363k|  INT layer;
 1155|   363k|  INT nBits;
 1156|   363k|  INT timeData2Size;
 1157|   363k|  INT timeData3Size;
 1158|   363k|  INT timeDataHeadroom;
 1159|   363k|  HANDLE_FDK_BITSTREAM hBs;
 1160|   363k|  int fTpInterruption = 0; /* Transport originated interruption detection. */
 1161|   363k|  int fTpConceal = 0;      /* Transport originated concealment. */
 1162|   363k|  UINT accessUnit = 0;
 1163|   363k|  UINT numAccessUnits = 1;
 1164|   363k|  UINT numPrerollAU = 0;
 1165|   363k|  int fEndAuNotAdjusted = 0; /* The end of the access unit was not adjusted */
 1166|   363k|  int applyCrossfade = 1;    /* flag indicates if flushing was possible */
 1167|   363k|  PCM_DEC *pTimeData2;
  ------------------
  |  |  112|   363k|#define PCM_DEC FIXP_DBL
  ------------------
 1168|   363k|  PCM_AAC *pTimeData3;
  ------------------
  |  |  111|   363k|#define PCM_AAC LONG
  |  |  ------------------
  |  |  |  |  181|   363k|#define LONG INT
  |  |  ------------------
  ------------------
 1169|   363k|  INT pcmLimiterScale = 0;
 1170|   363k|  INT interleaved = 0;
 1171|       |
 1172|   363k|  if (self == NULL) {
  ------------------
  |  Branch (1172:7): [True: 0, False: 363k]
  ------------------
 1173|      0|    return AAC_DEC_INVALID_HANDLE;
 1174|      0|  }
 1175|       |
 1176|   363k|  if (flags & AACDEC_INTR) {
  ------------------
  |  | 1027|   363k|#define AACDEC_INTR 4
  ------------------
  |  Branch (1176:7): [True: 0, False: 363k]
  ------------------
 1177|      0|    self->streamInfo.numLostAccessUnits = 0;
 1178|      0|  }
 1179|   363k|  hBs = transportDec_GetBitstream(self->hInput, 0);
 1180|       |
 1181|       |  /* Get current bits position for bitrate calculation. */
 1182|   363k|  nBits = FDKgetValidBits(hBs);
 1183|       |
 1184|   363k|  if (flags & AACDEC_CLRHIST) {
  ------------------
  |  | 1031|   363k|#define AACDEC_CLRHIST 8
  ------------------
  |  Branch (1184:7): [True: 0, False: 363k]
  ------------------
 1185|      0|    if (self->flags[0] & AC_USAC) {
  ------------------
  |  |  307|      0|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1185:9): [True: 0, False: 0]
  ------------------
 1186|       |      /* 1) store AudioSpecificConfig always in AudioSpecificConfig_Parse() */
 1187|       |      /* 2) free memory of dynamic allocated data */
 1188|      0|      CSAudioSpecificConfig asc;
 1189|      0|      transportDec_GetAsc(self->hInput, 0, &asc);
 1190|      0|      aacDecoder_FreeMemCallback(self, &asc);
 1191|      0|      self->streamInfo.numChannels = 0;
 1192|       |      /* 3) restore AudioSpecificConfig */
 1193|      0|      if (asc.configBits <= (TP_USAC_MAX_CONFIG_LEN << 3)) {
  ------------------
  |  |  121|      0|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
  |  Branch (1193:11): [True: 0, False: 0]
  ------------------
 1194|      0|        transportDec_OutOfBandConfig(self->hInput, asc.config,
 1195|      0|                                     (asc.configBits + 7) >> 3, 0);
 1196|      0|      }
 1197|      0|    }
 1198|      0|  }
 1199|       |
 1200|   363k|  if (!((flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) ||
  ------------------
  |  | 1018|   363k|#define AACDEC_CONCEAL 1
  ------------------
                if (!((flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) ||
  ------------------
  |  | 1023|   363k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1200:9): [True: 0, False: 363k]
  ------------------
 1201|   363k|        (self->flushStatus == AACDEC_RSV60_DASH_IPF_ATSC_FLUSH_ON) ||
  ------------------
  |  Branch (1201:9): [True: 0, False: 363k]
  ------------------
 1202|   363k|        (self->flushStatus == AACDEC_USAC_DASH_IPF_FLUSH_ON) ||
  ------------------
  |  Branch (1202:9): [True: 0, False: 363k]
  ------------------
 1203|   363k|        (self->buildUpStatus == AACDEC_RSV60_BUILD_UP_IDLE_IN_BAND))) {
  ------------------
  |  Branch (1203:9): [True: 0, False: 363k]
  ------------------
 1204|   363k|    TRANSPORTDEC_ERROR err;
 1205|       |
 1206|   718k|    for (layer = 0; layer < self->nrOfLayers; layer++) {
  ------------------
  |  Branch (1206:21): [True: 363k, False: 355k]
  ------------------
 1207|   363k|      err = transportDec_ReadAccessUnit(self->hInput, layer);
 1208|   363k|      if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1208:11): [True: 14.0k, False: 349k]
  ------------------
 1209|  14.0k|        switch (err) {
 1210|  7.65k|          case TRANSPORTDEC_NOT_ENOUGH_BITS:
  ------------------
  |  Branch (1210:11): [True: 7.65k, False: 6.38k]
  ------------------
 1211|  7.65k|            ErrorStatus = AAC_DEC_NOT_ENOUGH_BITS;
 1212|  7.65k|            goto bail;
 1213|  6.38k|          case TRANSPORTDEC_SYNC_ERROR:
  ------------------
  |  Branch (1213:11): [True: 6.38k, False: 7.65k]
  ------------------
 1214|  6.38k|            self->streamInfo.numLostAccessUnits =
 1215|  6.38k|                aacDecoder_EstimateNumberOfLostFrames(self);
 1216|  6.38k|            fTpInterruption = 1;
 1217|  6.38k|            break;
 1218|      0|          case TRANSPORTDEC_NEED_TO_RESTART:
  ------------------
  |  Branch (1218:11): [True: 0, False: 14.0k]
  ------------------
 1219|      0|            ErrorStatus = AAC_DEC_NEED_TO_RESTART;
 1220|      0|            goto bail;
 1221|      0|          case TRANSPORTDEC_CRC_ERROR:
  ------------------
  |  Branch (1221:11): [True: 0, False: 14.0k]
  ------------------
 1222|      0|            fTpConceal = 1;
 1223|      0|            break;
 1224|      0|          case TRANSPORTDEC_UNSUPPORTED_FORMAT:
  ------------------
  |  Branch (1224:11): [True: 0, False: 14.0k]
  ------------------
 1225|      0|            ErrorStatus = AAC_DEC_UNSUPPORTED_FORMAT;
 1226|      0|            goto bail;
 1227|      0|          default:
  ------------------
  |  Branch (1227:11): [True: 0, False: 14.0k]
  ------------------
 1228|      0|            ErrorStatus = AAC_DEC_UNKNOWN;
 1229|      0|            goto bail;
 1230|  14.0k|        }
 1231|  14.0k|      }
 1232|   363k|    }
 1233|   363k|  } else {
 1234|      0|    if (self->streamInfo.numLostAccessUnits > 0) {
  ------------------
  |  Branch (1234:9): [True: 0, False: 0]
  ------------------
 1235|      0|      self->streamInfo.numLostAccessUnits--;
 1236|      0|    }
 1237|      0|  }
 1238|       |
 1239|   355k|  self->frameOK = 1;
 1240|       |
 1241|   355k|  UINT prerollAUOffset[AACDEC_MAX_NUM_PREROLL_AU];
 1242|   355k|  UINT prerollAULength[AACDEC_MAX_NUM_PREROLL_AU];
 1243|  1.77M|  for (int i = 0; i < AACDEC_MAX_NUM_PREROLL_AU + 1; i++)
  ------------------
  |  |  139|  1.77M|#define AACDEC_MAX_NUM_PREROLL_AU AACDEC_MAX_NUM_PREROLL_AU_USAC
  |  |  ------------------
  |  |  |  |  136|  1.77M|#define AACDEC_MAX_NUM_PREROLL_AU_USAC (3)
  |  |  ------------------
  ------------------
  |  Branch (1243:19): [True: 1.42M, False: 355k]
  ------------------
 1244|  1.42M|    self->prerollAULength[i] = 0;
 1245|       |
 1246|   355k|  INT auStartAnchor;
 1247|   355k|  HANDLE_FDK_BITSTREAM hBsAu;
 1248|       |
 1249|       |  /* Process preroll frames and current frame */
 1250|   357k|  do {
 1251|   357k|    if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) &&
  ------------------
  |  | 1018|   357k|#define AACDEC_CONCEAL 1
  ------------------
                  if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) &&
  ------------------
  |  | 1023|   357k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1251:9): [True: 357k, False: 0]
  ------------------
 1252|   357k|        (self->flushStatus != AACDEC_RSV60_CFG_CHANGE_ATSC_FLUSH_ON) &&
  ------------------
  |  Branch (1252:9): [True: 357k, False: 0]
  ------------------
 1253|   357k|        (accessUnit == 0) &&
  ------------------
  |  Branch (1253:9): [True: 355k, False: 2.06k]
  ------------------
 1254|   355k|        (self->hasAudioPreRoll ||
  ------------------
  |  Branch (1254:10): [True: 3.28k, False: 352k]
  ------------------
 1255|   352k|         (self->buildUpStatus == AACDEC_RSV60_BUILD_UP_IDLE_IN_BAND)) &&
  ------------------
  |  Branch (1255:10): [True: 0, False: 352k]
  ------------------
 1256|  3.28k|        !fTpInterruption &&
  ------------------
  |  Branch (1256:9): [True: 2.78k, False: 502]
  ------------------
 1257|  2.78k|        !fTpConceal /* Bit stream pointer needs to be at the beginning of a
  ------------------
  |  Branch (1257:9): [True: 2.78k, False: 0]
  ------------------
 1258|       |                       (valid) AU. */
 1259|   357k|    ) {
 1260|  2.78k|      ErrorStatus = CAacDecoder_PreRollExtensionPayloadParse(
 1261|  2.78k|          self, &numPrerollAU, prerollAUOffset, prerollAULength);
 1262|       |
 1263|  2.78k|      if (ErrorStatus != AAC_DEC_OK) {
  ------------------
  |  Branch (1263:11): [True: 53, False: 2.72k]
  ------------------
 1264|     53|        switch (ErrorStatus) {
 1265|      3|          case AAC_DEC_NOT_ENOUGH_BITS:
  ------------------
  |  Branch (1265:11): [True: 3, False: 50]
  ------------------
 1266|      3|            goto bail;
 1267|     50|          case AAC_DEC_PARSE_ERROR:
  ------------------
  |  Branch (1267:11): [True: 50, False: 3]
  ------------------
 1268|     50|            self->frameOK = 0;
 1269|     50|            break;
 1270|      0|          default:
  ------------------
  |  Branch (1270:11): [True: 0, False: 53]
  ------------------
 1271|      0|            break;
 1272|     53|        }
 1273|     53|      }
 1274|       |
 1275|  2.77k|      numAccessUnits += numPrerollAU;
 1276|  2.77k|    }
 1277|       |
 1278|   357k|    hBsAu = transportDec_GetBitstream(self->hInput, 0);
 1279|   357k|    auStartAnchor = (INT)FDKgetValidBits(hBsAu);
 1280|       |
 1281|   357k|    self->accessUnit = accessUnit;
 1282|   357k|    if (accessUnit < numPrerollAU) {
  ------------------
  |  Branch (1282:9): [True: 2.06k, False: 355k]
  ------------------
 1283|  2.06k|      FDKpushFor(hBsAu, prerollAUOffset[accessUnit]);
 1284|  2.06k|    }
 1285|       |
 1286|       |    /* Signal bit stream interruption to other modules if required. */
 1287|   357k|    if (fTpInterruption || ((flags & AACDEC_INTR) && (accessUnit == 0))) {
  ------------------
  |  | 1027|   351k|#define AACDEC_INTR 4
  ------------------
  |  Branch (1287:9): [True: 6.38k, False: 351k]
  |  Branch (1287:29): [True: 0, False: 351k]
  |  Branch (1287:54): [True: 0, False: 0]
  ------------------
 1288|  6.38k|      aacDecoder_SignalInterruption(self);
 1289|  6.38k|      if (!((flags & AACDEC_INTR) && (accessUnit == 0))) {
  ------------------
  |  | 1027|  6.38k|#define AACDEC_INTR 4
  ------------------
  |  Branch (1289:13): [True: 0, False: 6.38k]
  |  Branch (1289:38): [True: 0, False: 0]
  ------------------
 1290|  6.38k|        ErrorStatus = AAC_DEC_TRANSPORT_SYNC_ERROR;
 1291|  6.38k|        goto bail;
 1292|  6.38k|      }
 1293|  6.38k|    }
 1294|       |
 1295|       |    /* Clearing core data will be done in CAacDecoder_DecodeFrame() below.
 1296|       |       Tell other modules to clear states if required. */
 1297|   351k|    if (flags & AACDEC_CLRHIST) {
  ------------------
  |  | 1031|   351k|#define AACDEC_CLRHIST 8
  ------------------
  |  Branch (1297:9): [True: 0, False: 351k]
  ------------------
 1298|      0|      if (!(self->flags[0] & AC_USAC)) {
  ------------------
  |  |  307|      0|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1298:11): [True: 0, False: 0]
  ------------------
 1299|      0|        sbrDecoder_SetParam(self->hSbrDecoder, SBR_CLEAR_HISTORY, 1);
 1300|      0|        mpegSurroundDecoder_SetParam(
 1301|      0|            (CMpegSurroundDecoder *)self->pMpegSurroundDecoder,
 1302|      0|            SACDEC_CLEAR_HISTORY, 1);
 1303|      0|        if (FDK_QmfDomain_ClearPersistentMemory(&self->qmfDomain) != 0) {
  ------------------
  |  Branch (1303:13): [True: 0, False: 0]
  ------------------
 1304|      0|          ErrorStatus = AAC_DEC_UNKNOWN;
 1305|      0|          goto bail;
 1306|      0|        }
 1307|      0|      }
 1308|      0|    }
 1309|       |
 1310|       |    /* Empty bit buffer in case of flush request. */
 1311|   351k|    if (flags & AACDEC_FLUSH && !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1023|   702k|#define AACDEC_FLUSH 2
  ------------------
                  if (flags & AACDEC_FLUSH && !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1018|      0|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1311:9): [True: 0, False: 351k]
  |  Branch (1311:33): [True: 0, False: 0]
  ------------------
 1312|      0|      if (!self->flushStatus) {
  ------------------
  |  Branch (1312:11): [True: 0, False: 0]
  ------------------
 1313|      0|        transportDec_SetParam(self->hInput, TPDEC_PARAM_RESET, 1);
 1314|      0|        self->streamInfo.numLostAccessUnits = 0;
 1315|      0|        self->streamInfo.numBadBytes = 0;
 1316|      0|        self->streamInfo.numTotalBytes = 0;
 1317|      0|      }
 1318|      0|    }
 1319|       |    /* Reset the output delay field. The modules will add their figures one
 1320|       |     * after another. */
 1321|   351k|    self->streamInfo.outputDelay = 0;
 1322|       |
 1323|   351k|    if (self->limiterEnableUser == (UCHAR)-2) {
  ------------------
  |  Branch (1323:9): [True: 0, False: 351k]
  ------------------
 1324|       |      /* Enable limiter only for RSVD60. */
 1325|      0|      self->limiterEnableCurr = (self->flags[0] & AC_RSV603DA) ? 1 : 0;
  ------------------
  |  |  308|      0|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (1325:33): [True: 0, False: 0]
  ------------------
 1326|   351k|    } else if (self->limiterEnableUser == (UCHAR)-1) {
  ------------------
  |  Branch (1326:16): [True: 351k, False: 0]
  ------------------
 1327|       |      /* Enable limiter for all non-lowdelay AOT's. */
 1328|   351k|      self->limiterEnableCurr = (self->flags[0] & (AC_LD | AC_ELD)) ? 0 : 1;
  ------------------
  |  |  304|   351k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                    self->limiterEnableCurr = (self->flags[0] & (AC_LD | AC_ELD)) ? 0 : 1;
  ------------------
  |  |  303|   351k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (1328:33): [True: 82.2k, False: 269k]
  ------------------
 1329|   351k|    } else {
 1330|       |      /* Use limiter configuration as requested. */
 1331|      0|      self->limiterEnableCurr = self->limiterEnableUser;
 1332|      0|    }
 1333|       |
 1334|       |    /* reset DRC level normalization gain on a per frame basis */
 1335|   351k|    self->extGain[0] = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|   351k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|   351k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   351k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 351k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   351k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   351k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   351k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 351k]
  |  |  |  |  ------------------
  |  |  |  |  195|   351k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   351k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   351k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   351k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   351k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   351k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   351k|          : ((((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|   351k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
 1336|       |
 1337|   351k|    pTimeData2 = self->pTimeData2;
 1338|   351k|    timeData2Size = self->timeData2Size / sizeof(PCM_DEC);
 1339|   351k|    pTimeData3 = (PCM_AAC *)self->pTimeData2;
 1340|   351k|    timeData3Size = self->timeData2Size / sizeof(PCM_AAC);
 1341|       |
 1342|   351k|    ErrorStatus = CAacDecoder_DecodeFrame(
 1343|   351k|        self,
 1344|   351k|        flags | (fTpConceal ? AACDEC_CONCEAL : 0) |
  ------------------
  |  | 1018|      0|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1344:18): [True: 0, False: 351k]
  ------------------
 1345|   351k|            ((self->flushStatus && !(flags & AACDEC_CONCEAL)) ? AACDEC_FLUSH
  ------------------
  |  | 1018|     24|#define AACDEC_CONCEAL 1
  ------------------
                          ((self->flushStatus && !(flags & AACDEC_CONCEAL)) ? AACDEC_FLUSH
  ------------------
  |  | 1023|     24|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1345:15): [True: 24, False: 351k]
  |  Branch (1345:36): [True: 24, False: 0]
  ------------------
 1346|   351k|                                                              : 0),
 1347|   351k|        pTimeData2 + 0, timeData2Size, self->streamInfo.aacSamplesPerFrame + 0);
 1348|       |
 1349|   351k|    timeDataHeadroom = self->aacOutDataHeadroom;
 1350|       |
 1351|       |    /* if flushing for USAC DASH IPF was not possible go on with decoding
 1352|       |     * preroll */
 1353|   351k|    if ((self->flags[0] & AC_USAC) &&
  ------------------
  |  |  307|   351k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1353:9): [True: 222k, False: 129k]
  ------------------
 1354|   222k|        (self->flushStatus == AACDEC_USAC_DASH_IPF_FLUSH_ON) &&
  ------------------
  |  Branch (1354:9): [True: 24, False: 222k]
  ------------------
 1355|     24|        !(flags & AACDEC_CONCEAL) && (ErrorStatus != AAC_DEC_OK)) {
  ------------------
  |  | 1018|     24|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1355:9): [True: 24, False: 0]
  |  Branch (1355:38): [True: 0, False: 24]
  ------------------
 1356|      0|      applyCrossfade = 0;
 1357|      0|    } else /* USAC DASH IPF flushing possible begin */
 1358|   351k|    {
 1359|   351k|      if (!((flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) || fTpConceal ||
  ------------------
  |  | 1018|   351k|#define AACDEC_CONCEAL 1
  ------------------
                    if (!((flags & (AACDEC_CONCEAL | AACDEC_FLUSH)) || fTpConceal ||
  ------------------
  |  | 1023|   351k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1359:13): [True: 0, False: 351k]
  |  Branch (1359:58): [True: 0, False: 351k]
  ------------------
 1360|   351k|            self->flushStatus) &&
  ------------------
  |  Branch (1360:13): [True: 24, False: 351k]
  ------------------
 1361|   351k|          (!(IS_OUTPUT_VALID(ErrorStatus)) || !(accessUnit < numPrerollAU))) {
  ------------------
  |  |  561|   351k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|  9.16k|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 5.52k, False: 3.64k]
  |  |  |  |  |  Branch (552:5): [True: 5.52k, False: 3.64k]
  |  |  |  |  ------------------
  |  |  |  |  553|  9.16k|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 5.52k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|  9.16k|       ? 1                                   \
  |  |  |  |  555|  9.16k|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 342k, False: 9.16k]
  |  |  ------------------
  ------------------
  |  Branch (1361:47): [True: 345k, False: 2.06k]
  ------------------
 1362|   349k|        TRANSPORTDEC_ERROR tpErr;
 1363|   349k|        tpErr = transportDec_EndAccessUnit(self->hInput);
 1364|   349k|        if (tpErr != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1364:13): [True: 90.4k, False: 258k]
  ------------------
 1365|  90.4k|          self->frameOK = 0;
 1366|  90.4k|        }
 1367|   349k|      } else { /* while preroll processing later possibly an error in the
 1368|       |                  renderer part occurrs */
 1369|  2.09k|        if (IS_OUTPUT_VALID(ErrorStatus)) {
  ------------------
  |  |  561|  2.09k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|    391|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 391, False: 0]
  |  |  |  |  |  Branch (552:5): [True: 391, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  553|    391|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 391, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|    391|       ? 1                                   \
  |  |  |  |  555|    391|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 1.70k, False: 391]
  |  |  ------------------
  ------------------
 1370|  2.09k|          fEndAuNotAdjusted = 1;
 1371|  2.09k|        }
 1372|  2.09k|      }
 1373|       |
 1374|       |      /* If the current pTimeData2 does not contain a valid signal, there
 1375|       |       * nothing else we can do, so bail. */
 1376|   351k|      if (!IS_OUTPUT_VALID(ErrorStatus)) {
  ------------------
  |  |  561|   351k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|  9.16k|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 5.52k, False: 3.64k]
  |  |  |  |  |  Branch (552:5): [True: 5.52k, False: 3.64k]
  |  |  |  |  ------------------
  |  |  |  |  553|  9.16k|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 5.52k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|  9.16k|       ? 1                                   \
  |  |  |  |  555|  9.16k|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 342k, False: 9.16k]
  |  |  ------------------
  ------------------
 1377|  3.64k|        goto bail;
 1378|  3.64k|      }
 1379|       |
 1380|   347k|      {
 1381|   347k|        self->streamInfo.sampleRate = self->streamInfo.aacSampleRate;
 1382|   347k|        self->streamInfo.frameSize = self->streamInfo.aacSamplesPerFrame;
 1383|   347k|      }
 1384|       |
 1385|   347k|      self->streamInfo.numChannels = self->streamInfo.aacNumChannels;
 1386|       |
 1387|   347k|      {
 1388|   347k|        FDK_Delay_Apply(
 1389|   347k|            &self->usacResidualDelay,
 1390|   347k|            pTimeData2 + 1 * (self->streamInfo.aacSamplesPerFrame + 0) + 0,
 1391|   347k|            self->streamInfo.frameSize, 0);
 1392|   347k|      }
 1393|       |
 1394|       |      /* Setting of internal MPS state; may be reset in CAacDecoder_SyncQmfMode
 1395|       |         if decoder is unable to decode with user defined qmfMode */
 1396|   347k|      if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD))) {
  ------------------
  |  |  307|   347k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD))) {
  ------------------
  |  |  310|   347k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD))) {
  ------------------
  |  |  308|   347k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                    if (!(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA | AC_ELD))) {
  ------------------
  |  |  303|   347k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (1396:11): [True: 45.1k, False: 302k]
  ------------------
 1397|  45.1k|        self->mpsEnableCurr =
 1398|  45.1k|            (self->mpsEnableUser &&
  ------------------
  |  Branch (1398:14): [True: 0, False: 45.1k]
  ------------------
 1399|      0|             isSupportedMpsConfig(self->streamInfo.aot,
  ------------------
  |  Branch (1399:14): [True: 0, False: 0]
  ------------------
 1400|      0|                                  self->streamInfo.numChannels,
 1401|      0|                                  (self->flags[0] & AC_MPS_PRESENT) ? 1 : 0));
  ------------------
  |  |  316|      0|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
  |  Branch (1401:35): [True: 0, False: 0]
  ------------------
 1402|  45.1k|      }
 1403|       |
 1404|   347k|      if (!self->qmfDomain.globalConf.qmfDomainExplicitConfig &&
  ------------------
  |  Branch (1404:11): [True: 116k, False: 231k]
  ------------------
 1405|   116k|          self->mpsEnableCurr) {
  ------------------
  |  Branch (1405:11): [True: 1.65k, False: 115k]
  ------------------
 1406|       |        /* if not done yet, allocate full MPEG Surround decoder instance */
 1407|  1.65k|        if (mpegSurroundDecoder_IsFullMpegSurroundDecoderInstanceAvailable(
  ------------------
  |  Branch (1407:13): [True: 576, False: 1.07k]
  ------------------
 1408|  1.65k|                (CMpegSurroundDecoder *)self->pMpegSurroundDecoder) ==
 1409|  1.65k|            SAC_INSTANCE_NOT_FULL_AVAILABLE) {
 1410|    576|          if (mpegSurroundDecoder_Open(
  ------------------
  |  Branch (1410:15): [True: 0, False: 576]
  ------------------
 1411|    576|                  (CMpegSurroundDecoder **)&self->pMpegSurroundDecoder, -1,
 1412|    576|                  &self->qmfDomain)) {
 1413|      0|            return AAC_DEC_OUT_OF_MEMORY;
 1414|      0|          }
 1415|    576|        }
 1416|  1.65k|      }
 1417|       |
 1418|   347k|      CAacDecoder_SyncQmfMode(self);
 1419|       |
 1420|   347k|      if (!self->qmfDomain.globalConf.qmfDomainExplicitConfig &&
  ------------------
  |  Branch (1420:11): [True: 116k, False: 231k]
  ------------------
 1421|   116k|          self->mpsEnableCurr) {
  ------------------
  |  Branch (1421:11): [True: 1.65k, False: 115k]
  ------------------
 1422|  1.65k|        SAC_INPUT_CONFIG sac_interface = (self->sbrEnabled && self->hSbrDecoder)
  ------------------
  |  Branch (1422:43): [True: 83, False: 1.56k]
  |  Branch (1422:63): [True: 83, False: 0]
  ------------------
 1423|  1.65k|                                             ? SAC_INTERFACE_QMF
 1424|  1.65k|                                             : SAC_INTERFACE_TIME;
 1425|       |        /* needs to be done before first SBR apply. */
 1426|  1.65k|        mpegSurroundDecoder_ConfigureQmfDomain(
 1427|  1.65k|            (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, sac_interface,
 1428|  1.65k|            (UINT)self->streamInfo.aacSampleRate, self->streamInfo.aot);
 1429|  1.65k|        if (self->qmfDomain.globalConf.nBandsAnalysis_requested > 0) {
  ------------------
  |  Branch (1429:13): [True: 1.65k, False: 0]
  ------------------
 1430|  1.65k|          self->qmfDomain.globalConf.nQmfTimeSlots_requested =
 1431|  1.65k|              self->streamInfo.aacSamplesPerFrame /
 1432|  1.65k|              self->qmfDomain.globalConf.nBandsAnalysis_requested;
 1433|  1.65k|        } else {
 1434|      0|          self->qmfDomain.globalConf.nQmfTimeSlots_requested = 0;
 1435|      0|        }
 1436|  1.65k|      }
 1437|       |
 1438|   347k|      switch (FDK_QmfDomain_Configure(&self->qmfDomain)) {
 1439|      0|        default:
  ------------------
  |  Branch (1439:9): [True: 0, False: 347k]
  ------------------
 1440|      4|        case QMF_DOMAIN_INIT_ERROR:
  ------------------
  |  Branch (1440:9): [True: 4, False: 347k]
  ------------------
 1441|      4|          ErrorStatus = AAC_DEC_UNKNOWN;
 1442|      4|          goto bail;
 1443|      0|        case QMF_DOMAIN_OUT_OF_MEMORY:
  ------------------
  |  Branch (1443:9): [True: 0, False: 347k]
  ------------------
 1444|      0|          ErrorStatus = AAC_DEC_OUT_OF_MEMORY;
 1445|      0|          goto bail;
 1446|   347k|        case QMF_DOMAIN_OK:
  ------------------
  |  Branch (1446:9): [True: 347k, False: 4]
  ------------------
 1447|   347k|          break;
 1448|   347k|      }
 1449|       |
 1450|       |      /* sbr decoder */
 1451|       |
 1452|   347k|      if ((ErrorStatus != AAC_DEC_OK) || (flags & AACDEC_CONCEAL) ||
  ------------------
  |  | 1018|   342k|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1452:11): [True: 5.52k, False: 342k]
  |  Branch (1452:42): [True: 0, False: 342k]
  ------------------
 1453|   342k|          self->pAacDecoderStaticChannelInfo[0]->concealmentInfo.concealState >
  ------------------
  |  Branch (1453:11): [True: 0, False: 342k]
  ------------------
 1454|   342k|              ConcealState_FadeIn) {
 1455|  5.52k|        self->frameOK = 0; /* if an error has occured do concealment in the SBR
 1456|       |                              decoder too */
 1457|  5.52k|      }
 1458|       |
 1459|   347k|      if (self->sbrEnabled && (!(self->flags[0] & AC_USAC_SCFGI3))) {
  ------------------
  |  |  329|   253k|  0x8000000 /*!< USAC flag: If stereoConfigIndex is 3 the flag is set. */
  ------------------
  |  Branch (1459:11): [True: 253k, False: 94.3k]
  |  Branch (1459:31): [True: 241k, False: 12.2k]
  ------------------
 1460|   241k|        SBR_ERROR sbrError = SBRDEC_OK;
 1461|   241k|        int chIdx, numCoreChannel = self->streamInfo.numChannels;
 1462|       |
 1463|       |        /* set params */
 1464|   241k|        sbrDecoder_SetParam(self->hSbrDecoder, SBR_SYSTEM_BITSTREAM_DELAY,
 1465|   241k|                            self->sbrParams.bsDelay);
 1466|   241k|        sbrDecoder_SetParam(
 1467|   241k|            self->hSbrDecoder, SBR_FLUSH_DATA,
 1468|   241k|            (flags & AACDEC_FLUSH) |
  ------------------
  |  | 1023|   241k|#define AACDEC_FLUSH 2
  ------------------
 1469|   241k|                ((self->flushStatus && !(flags & AACDEC_CONCEAL)) ? AACDEC_FLUSH
  ------------------
  |  | 1018|     24|#define AACDEC_CONCEAL 1
  ------------------
                              ((self->flushStatus && !(flags & AACDEC_CONCEAL)) ? AACDEC_FLUSH
  ------------------
  |  | 1023|     24|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1469:19): [True: 24, False: 241k]
  |  Branch (1469:40): [True: 24, False: 0]
  ------------------
 1470|   241k|                                                                  : 0));
 1471|       |
 1472|   241k|        if (self->streamInfo.aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1472:13): [True: 34.7k, False: 206k]
  ------------------
 1473|       |          /* Configure QMF */
 1474|  34.7k|          sbrDecoder_SetParam(self->hSbrDecoder, SBR_LD_QMF_TIME_ALIGN,
 1475|  34.7k|                              (self->flags[0] & AC_MPS_PRESENT) ? 1 : 0);
  ------------------
  |  |  316|  34.7k|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
  |  Branch (1475:31): [True: 1.62k, False: 33.1k]
  ------------------
 1476|  34.7k|        }
 1477|       |
 1478|   241k|        {
 1479|   241k|          PCMDMX_ERROR dmxErr;
 1480|   241k|          INT maxOutCh = 0;
 1481|       |
 1482|   241k|          dmxErr = pcmDmx_GetParam(self->hPcmUtils,
 1483|   241k|                                   MAX_NUMBER_OF_OUTPUT_CHANNELS, &maxOutCh);
 1484|   241k|          if ((dmxErr == PCMDMX_OK) && (maxOutCh == 1)) {
  ------------------
  |  Branch (1484:15): [True: 241k, False: 0]
  |  Branch (1484:40): [True: 0, False: 241k]
  ------------------
 1485|       |            /* Disable PS processing if we have to create a mono output signal.
 1486|       |             */
 1487|      0|            self->psPossible = 0;
 1488|      0|          }
 1489|   241k|        }
 1490|       |
 1491|   241k|        sbrDecoder_SetParam(self->hSbrDecoder, SBR_SKIP_QMF,
 1492|   241k|                            (self->mpsEnableCurr) ? 2 : 0);
  ------------------
  |  Branch (1492:29): [True: 110k, False: 130k]
  ------------------
 1493|       |
 1494|   241k|        PCM_AAC *input;
  ------------------
  |  |  111|   241k|#define PCM_AAC LONG
  |  |  ------------------
  |  |  |  |  181|   241k|#define LONG INT
  |  |  ------------------
  ------------------
 1495|   241k|        input = (PCM_AAC *)self->workBufferCore2;
 1496|   241k|        FDKmemcpy(input, pTimeData3,
 1497|   241k|                  sizeof(PCM_AAC) * (self->streamInfo.numChannels) *
 1498|   241k|                      (self->streamInfo.frameSize));
 1499|       |
 1500|       |        /* apply SBR processing */
 1501|   241k|        sbrError = sbrDecoder_Apply(
 1502|   241k|            self->hSbrDecoder, input, pTimeData3, timeData3Size,
 1503|   241k|            &self->streamInfo.numChannels, &self->streamInfo.sampleRate,
 1504|   241k|            &self->mapDescr, self->chMapIndex, self->frameOK, &self->psPossible,
 1505|   241k|            self->aacOutDataHeadroom, &timeDataHeadroom);
 1506|       |
 1507|   241k|        if (sbrError == SBRDEC_OK) {
  ------------------
  |  Branch (1507:13): [True: 241k, False: 97]
  ------------------
 1508|       |          /* Update data in streaminfo structure. Assume that the SBR upsampling
 1509|       |             factor is either 1, 2, 8/3 or 4. Maximum upsampling factor is 4
 1510|       |             (CELP+SBR or USAC 4:1 SBR) */
 1511|   241k|          self->flags[0] |= AC_SBR_PRESENT;
  ------------------
  |  |  311|   241k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
 1512|   241k|          if (self->streamInfo.aacSampleRate != self->streamInfo.sampleRate) {
  ------------------
  |  Branch (1512:15): [True: 222k, False: 18.8k]
  ------------------
 1513|   222k|            if (self->streamInfo.aacSampleRate >> 2 ==
  ------------------
  |  Branch (1513:17): [True: 0, False: 222k]
  ------------------
 1514|   222k|                self->streamInfo.sampleRate) {
 1515|      0|              self->streamInfo.frameSize =
 1516|      0|                  self->streamInfo.aacSamplesPerFrame >> 2;
 1517|      0|              self->streamInfo.outputDelay = self->streamInfo.outputDelay >> 2;
 1518|   222k|            } else if (self->streamInfo.aacSampleRate >> 1 ==
  ------------------
  |  Branch (1518:24): [True: 0, False: 222k]
  ------------------
 1519|   222k|                       self->streamInfo.sampleRate) {
 1520|      0|              self->streamInfo.frameSize =
 1521|      0|                  self->streamInfo.aacSamplesPerFrame >> 1;
 1522|      0|              self->streamInfo.outputDelay = self->streamInfo.outputDelay >> 1;
 1523|   222k|            } else if (self->streamInfo.aacSampleRate << 1 ==
  ------------------
  |  Branch (1523:24): [True: 139k, False: 83.1k]
  ------------------
 1524|   222k|                       self->streamInfo.sampleRate) {
 1525|   139k|              self->streamInfo.frameSize = self->streamInfo.aacSamplesPerFrame
 1526|   139k|                                           << 1;
 1527|   139k|              self->streamInfo.outputDelay = self->streamInfo.outputDelay << 1;
 1528|   139k|            } else if (self->streamInfo.aacSampleRate << 2 ==
  ------------------
  |  Branch (1528:24): [True: 14.3k, False: 68.8k]
  ------------------
 1529|  83.1k|                       self->streamInfo.sampleRate) {
 1530|  14.3k|              self->streamInfo.frameSize = self->streamInfo.aacSamplesPerFrame
 1531|  14.3k|                                           << 2;
 1532|  14.3k|              self->streamInfo.outputDelay = self->streamInfo.outputDelay << 2;
 1533|  68.8k|            } else if (self->streamInfo.frameSize == 768) {
  ------------------
  |  Branch (1533:24): [True: 68.8k, False: 9]
  ------------------
 1534|  68.8k|              self->streamInfo.frameSize =
 1535|  68.8k|                  (self->streamInfo.aacSamplesPerFrame << 3) / 3;
 1536|  68.8k|              self->streamInfo.outputDelay =
 1537|  68.8k|                  (self->streamInfo.outputDelay << 3) / 3;
 1538|  68.8k|            } else {
 1539|      9|              ErrorStatus = AAC_DEC_SET_PARAM_FAIL;
 1540|      9|              goto bail;
 1541|      9|            }
 1542|   222k|          } else {
 1543|  18.8k|            self->streamInfo.frameSize = self->streamInfo.aacSamplesPerFrame;
 1544|  18.8k|          }
 1545|   241k|          self->streamInfo.outputDelay +=
 1546|   241k|              sbrDecoder_GetDelay(self->hSbrDecoder);
 1547|       |
 1548|   241k|          if (self->psPossible) {
  ------------------
  |  Branch (1548:15): [True: 3.37k, False: 237k]
  ------------------
 1549|  3.37k|            self->flags[0] |= AC_PS_PRESENT;
  ------------------
  |  |  314|  3.37k|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  ------------------
 1550|  3.37k|          }
 1551|   246k|          for (chIdx = numCoreChannel; chIdx < self->streamInfo.numChannels;
  ------------------
  |  Branch (1551:40): [True: 5.50k, False: 241k]
  ------------------
 1552|   241k|               chIdx += 1) {
 1553|  5.50k|            self->channelType[chIdx] = ACT_FRONT;
 1554|  5.50k|            self->channelIndices[chIdx] = chIdx;
 1555|  5.50k|          }
 1556|   241k|        }
 1557|   241k|        if (sbrError == SBRDEC_OUTPUT_BUFFER_TOO_SMALL) {
  ------------------
  |  Branch (1557:13): [True: 0, False: 241k]
  ------------------
 1558|      0|          ErrorStatus = AAC_DEC_OUTPUT_BUFFER_TOO_SMALL;
 1559|      0|          goto bail;
 1560|      0|        }
 1561|   241k|      }
 1562|       |
 1563|   347k|      if (self->mpsEnableCurr) {
  ------------------
  |  Branch (1563:11): [True: 158k, False: 188k]
  ------------------
 1564|   158k|        int err, sac_interface, nChannels, frameSize;
 1565|       |
 1566|   158k|        nChannels = self->streamInfo.numChannels;
 1567|   158k|        frameSize = self->streamInfo.frameSize;
 1568|   158k|        sac_interface = SAC_INTERFACE_TIME;
 1569|       |
 1570|   158k|        if (self->sbrEnabled && self->hSbrDecoder)
  ------------------
  |  Branch (1570:13): [True: 122k, False: 36.4k]
  |  Branch (1570:33): [True: 122k, False: 0]
  ------------------
 1571|   122k|          sac_interface = SAC_INTERFACE_QMF;
 1572|   158k|        if (self->streamInfo.aot == AOT_USAC) {
  ------------------
  |  Branch (1572:13): [True: 121k, False: 37.4k]
  ------------------
 1573|   121k|          if (self->flags[0] & AC_USAC_SCFGI3) {
  ------------------
  |  |  329|   121k|  0x8000000 /*!< USAC flag: If stereoConfigIndex is 3 the flag is set. */
  ------------------
  |  Branch (1573:15): [True: 12.2k, False: 109k]
  ------------------
 1574|  12.2k|            sac_interface = SAC_INTERFACE_TIME;
 1575|  12.2k|          }
 1576|   121k|        }
 1577|   158k|        err = mpegSurroundDecoder_SetParam(
 1578|   158k|            (CMpegSurroundDecoder *)self->pMpegSurroundDecoder,
 1579|   158k|            SACDEC_INTERFACE, sac_interface);
 1580|       |
 1581|   158k|        if (err == 0) {
  ------------------
  |  Branch (1581:13): [True: 158k, False: 0]
  ------------------
 1582|   158k|          err = mpegSurroundDecoder_Apply(
 1583|   158k|              (CMpegSurroundDecoder *)self->pMpegSurroundDecoder,
 1584|   158k|              (PCM_AAC *)self->workBufferCore2, pTimeData3, timeData3Size,
 1585|   158k|              self->streamInfo.aacSamplesPerFrame, &nChannels, &frameSize,
 1586|   158k|              self->streamInfo.sampleRate, self->streamInfo.aot,
 1587|   158k|              self->channelType, self->channelIndices, &self->mapDescr,
 1588|   158k|              self->aacOutDataHeadroom, &timeDataHeadroom);
 1589|   158k|        }
 1590|       |
 1591|   158k|        if (err == MPS_OUTPUT_BUFFER_TOO_SMALL) {
  ------------------
  |  Branch (1591:13): [True: 0, False: 158k]
  ------------------
 1592|      0|          ErrorStatus = AAC_DEC_OUTPUT_BUFFER_TOO_SMALL;
 1593|      0|          goto bail;
 1594|      0|        }
 1595|   158k|        if (err == 0) {
  ------------------
  |  Branch (1595:13): [True: 158k, False: 4]
  ------------------
 1596|       |          /* Update output parameter */
 1597|   158k|          self->streamInfo.numChannels = nChannels;
 1598|   158k|          self->streamInfo.frameSize = frameSize;
 1599|   158k|          self->streamInfo.outputDelay += mpegSurroundDecoder_GetDelay(
 1600|   158k|              (CMpegSurroundDecoder *)self->pMpegSurroundDecoder);
 1601|       |          /* Save current parameter for possible concealment of next frame */
 1602|   158k|          self->mpsOutChannelsLast = nChannels;
 1603|   158k|          self->mpsFrameSizeLast = frameSize;
 1604|   158k|        } else if ((self->mpsOutChannelsLast > 0) &&
  ------------------
  |  Branch (1604:20): [True: 4, False: 0]
  ------------------
 1605|      4|                   (self->mpsFrameSizeLast > 0)) {
  ------------------
  |  Branch (1605:20): [True: 4, False: 0]
  ------------------
 1606|       |          /* Restore parameters of last frame ... */
 1607|      4|          self->streamInfo.numChannels = self->mpsOutChannelsLast;
 1608|      4|          self->streamInfo.frameSize = self->mpsFrameSizeLast;
 1609|       |          /* ... and clear output buffer so that potentially corrupted data does
 1610|       |           * not reach the framework. */
 1611|      4|          FDKmemclear(pTimeData3, self->mpsOutChannelsLast *
 1612|      4|                                      self->mpsFrameSizeLast * sizeof(PCM_AAC));
 1613|       |          /* Additionally proclaim that this frame had errors during decoding.
 1614|       |           */
 1615|      4|          ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 1616|      4|        } else {
 1617|      0|          ErrorStatus = AAC_DEC_UNKNOWN; /* no output */
 1618|      0|        }
 1619|   158k|      }
 1620|       |
 1621|       |      /* SBR decoder for Unified Stereo Config (stereoConfigIndex == 3) */
 1622|       |
 1623|   347k|      if (self->sbrEnabled && (self->flags[0] & AC_USAC_SCFGI3)) {
  ------------------
  |  |  329|   253k|  0x8000000 /*!< USAC flag: If stereoConfigIndex is 3 the flag is set. */
  ------------------
  |  Branch (1623:11): [True: 253k, False: 94.3k]
  |  Branch (1623:31): [True: 12.2k, False: 241k]
  ------------------
 1624|  12.2k|        SBR_ERROR sbrError = SBRDEC_OK;
 1625|       |
 1626|       |        /* set params */
 1627|  12.2k|        sbrDecoder_SetParam(self->hSbrDecoder, SBR_SYSTEM_BITSTREAM_DELAY,
 1628|  12.2k|                            self->sbrParams.bsDelay);
 1629|  12.2k|        sbrDecoder_SetParam(
 1630|  12.2k|            self->hSbrDecoder, SBR_FLUSH_DATA,
 1631|  12.2k|            (flags & AACDEC_FLUSH) |
  ------------------
  |  | 1023|  12.2k|#define AACDEC_FLUSH 2
  ------------------
 1632|  12.2k|                ((self->flushStatus && !(flags & AACDEC_CONCEAL)) ? AACDEC_FLUSH
  ------------------
  |  | 1018|      0|#define AACDEC_CONCEAL 1
  ------------------
                              ((self->flushStatus && !(flags & AACDEC_CONCEAL)) ? AACDEC_FLUSH
  ------------------
  |  | 1023|      0|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1632:19): [True: 0, False: 12.2k]
  |  Branch (1632:40): [True: 0, False: 0]
  ------------------
 1633|  12.2k|                                                                  : 0));
 1634|       |
 1635|  12.2k|        sbrDecoder_SetParam(self->hSbrDecoder, SBR_SKIP_QMF, 1);
 1636|       |
 1637|       |        /* apply SBR processing */
 1638|  12.2k|        sbrError = sbrDecoder_Apply(
 1639|  12.2k|            self->hSbrDecoder, pTimeData3, pTimeData3, timeData3Size,
 1640|  12.2k|            &self->streamInfo.numChannels, &self->streamInfo.sampleRate,
 1641|  12.2k|            &self->mapDescr, self->chMapIndex, self->frameOK, &self->psPossible,
 1642|  12.2k|            self->aacOutDataHeadroom, &timeDataHeadroom);
 1643|       |
 1644|  12.2k|        if (sbrError == SBRDEC_OK) {
  ------------------
  |  Branch (1644:13): [True: 12.2k, False: 0]
  ------------------
 1645|       |          /* Update data in streaminfo structure. Assume that the SBR upsampling
 1646|       |           * factor is either 1,2 or 4 */
 1647|  12.2k|          self->flags[0] |= AC_SBR_PRESENT;
  ------------------
  |  |  311|  12.2k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
 1648|  12.2k|          if (self->streamInfo.aacSampleRate != self->streamInfo.sampleRate) {
  ------------------
  |  Branch (1648:15): [True: 12.2k, False: 0]
  ------------------
 1649|  12.2k|            if (self->streamInfo.frameSize == 768) {
  ------------------
  |  Branch (1649:17): [True: 1.24k, False: 11.0k]
  ------------------
 1650|  1.24k|              self->streamInfo.frameSize =
 1651|  1.24k|                  (self->streamInfo.aacSamplesPerFrame * 8) / 3;
 1652|  11.0k|            } else if (self->streamInfo.aacSampleRate << 2 ==
  ------------------
  |  Branch (1652:24): [True: 9.45k, False: 1.58k]
  ------------------
 1653|  11.0k|                       self->streamInfo.sampleRate) {
 1654|  9.45k|              self->streamInfo.frameSize = self->streamInfo.aacSamplesPerFrame
 1655|  9.45k|                                           << 2;
 1656|  9.45k|            } else {
 1657|  1.58k|              self->streamInfo.frameSize = self->streamInfo.aacSamplesPerFrame
 1658|  1.58k|                                           << 1;
 1659|  1.58k|            }
 1660|  12.2k|          }
 1661|       |
 1662|  12.2k|          self->flags[0] &= ~AC_PS_PRESENT;
  ------------------
  |  |  314|  12.2k|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  ------------------
 1663|  12.2k|        }
 1664|  12.2k|        if (sbrError == SBRDEC_OUTPUT_BUFFER_TOO_SMALL) {
  ------------------
  |  Branch (1664:13): [True: 0, False: 12.2k]
  ------------------
 1665|      0|          ErrorStatus = AAC_DEC_OUTPUT_BUFFER_TOO_SMALL;
 1666|      0|          goto bail;
 1667|      0|        }
 1668|  12.2k|      }
 1669|       |
 1670|   347k|      {
 1671|   347k|        if ((INT)PCM_OUT_HEADROOM != timeDataHeadroom) {
  ------------------
  |  |  111|   347k|#define PCM_OUT_HEADROOM 8 /* Must have the same values as DMXH_HEADROOM */
  ------------------
  |  Branch (1671:13): [True: 57.9k, False: 289k]
  ------------------
 1672|  57.9k|          for (int i = ((self->streamInfo.frameSize *
 1673|  57.9k|                         self->streamInfo.numChannels) -
 1674|  57.9k|                        1);
 1675|  95.5M|               i >= 0; i--) {
  ------------------
  |  Branch (1675:16): [True: 95.5M, False: 57.9k]
  ------------------
 1676|  95.5M|            pTimeData2[i] =
 1677|  95.5M|                (PCM_DEC)pTimeData3[i] >> (PCM_OUT_HEADROOM - timeDataHeadroom);
  ------------------
  |  |  111|  95.5M|#define PCM_OUT_HEADROOM 8 /* Must have the same values as DMXH_HEADROOM */
  ------------------
 1678|  95.5M|          }
 1679|  57.9k|        }
 1680|   347k|      }
 1681|       |
 1682|   347k|      {
 1683|   347k|        if ((FDK_drcDec_GetParam(self->hUniDrcDecoder, DRC_DEC_IS_ACTIVE)) &&
  ------------------
  |  Branch (1683:13): [True: 17.9k, False: 329k]
  ------------------
 1684|  17.9k|            (self->flags[0] & AC_USAC)) {
  ------------------
  |  |  307|  17.9k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1684:13): [True: 15.4k, False: 2.48k]
  ------------------
 1685|       |          /* Apply DRC gains*/
 1686|  15.4k|          int ch, drcDelay = 0;
 1687|  15.4k|          int needsDeinterleaving = 0;
 1688|  15.4k|          FIXP_DBL *drcWorkBuffer = NULL;
 1689|  15.4k|          FIXP_DBL channelGain[(8)];
 1690|  15.4k|          int reverseInChannelMap[(8)];
 1691|  15.4k|          int reverseOutChannelMap[(8)];
 1692|  15.4k|          FDKmemclear(channelGain, sizeof(channelGain));
 1693|   139k|          for (ch = 0; ch < (8); ch++) {
  ------------------
  |  Branch (1693:24): [True: 123k, False: 15.4k]
  ------------------
 1694|   123k|            reverseInChannelMap[ch] = ch;
 1695|   123k|            reverseOutChannelMap[ch] = ch;
 1696|   123k|          }
 1697|       |
 1698|       |          /* Update sampleRate and frameSize. This may be necessary in case of
 1699|       |           * implicit SBR signaling */
 1700|  15.4k|          FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_SAMPLE_RATE,
 1701|  15.4k|                              self->streamInfo.sampleRate);
 1702|  15.4k|          FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_FRAME_SIZE,
 1703|  15.4k|                              self->streamInfo.frameSize);
 1704|       |
 1705|       |          /* If SBR and/or MPS is active, the DRC gains are aligned to the QMF
 1706|       |             domain signal before the QMF synthesis. Therefore the DRC gains
 1707|       |             need to be delayed by the QMF synthesis delay. */
 1708|  15.4k|          if (self->sbrEnabled) drcDelay = 257;
  ------------------
  |  Branch (1708:15): [True: 1.33k, False: 14.1k]
  ------------------
 1709|  15.4k|          if (self->mpsEnableCurr) drcDelay = 257;
  ------------------
  |  Branch (1709:15): [True: 1.27k, False: 14.1k]
  ------------------
 1710|       |          /* Take into account concealment delay */
 1711|  15.4k|          drcDelay += CConcealment_GetDelay(&self->concealCommonData) *
 1712|  15.4k|                      self->streamInfo.frameSize;
 1713|       |
 1714|       |          /* The output of SBR and MPS is interleaved. Deinterleaving may be
 1715|       |           * necessary for FDK_drcDec_ProcessTime, which accepts deinterleaved
 1716|       |           * audio only. */
 1717|  15.4k|          if ((self->streamInfo.numChannels > 1) &&
  ------------------
  |  Branch (1717:15): [True: 1.36k, False: 14.0k]
  ------------------
 1718|  1.36k|              (0 || (self->sbrEnabled) || (self->mpsEnableCurr))) {
  ------------------
  |  Branch (1718:16): [Folded, False: 1.36k]
  |  Branch (1718:21): [True: 1.27k, False: 94]
  |  Branch (1718:43): [True: 0, False: 94]
  ------------------
 1719|       |            /* interleaving/deinterleaving is performed on upper part of
 1720|       |             * pTimeData2. Check if this buffer is large enough. */
 1721|  1.27k|            if (timeData2Size < (INT)(2 * self->streamInfo.numChannels *
  ------------------
  |  Branch (1721:17): [True: 0, False: 1.27k]
  ------------------
 1722|  1.27k|                                      self->streamInfo.frameSize)) {
 1723|      0|              ErrorStatus = AAC_DEC_UNKNOWN;
 1724|      0|              goto bail;
 1725|      0|            }
 1726|  1.27k|            needsDeinterleaving = 1;
 1727|  1.27k|            drcWorkBuffer =
 1728|  1.27k|                (FIXP_DBL *)pTimeData2 +
 1729|  1.27k|                self->streamInfo.numChannels * self->streamInfo.frameSize;
 1730|  1.27k|            FDK_deinterleave(
 1731|  1.27k|                pTimeData2, drcWorkBuffer, self->streamInfo.numChannels,
 1732|  1.27k|                self->streamInfo.frameSize, self->streamInfo.frameSize);
 1733|  14.1k|          } else {
 1734|  14.1k|            drcWorkBuffer = pTimeData2;
 1735|  14.1k|          }
 1736|       |
 1737|       |          /* prepare Loudness Normalisation gain */
 1738|  15.4k|          FDK_drcDec_SetParam(self->hUniDrcDecoder, DRC_DEC_TARGET_LOUDNESS,
 1739|  15.4k|                              (INT)-self->defaultTargetLoudness *
 1740|  15.4k|                                  FL2FXCONST_DBL(1.0f / (float)(1 << 9)));
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1741|  15.4k|          FDK_drcDec_SetChannelGains(self->hUniDrcDecoder,
 1742|  15.4k|                                     self->streamInfo.numChannels,
 1743|  15.4k|                                     self->streamInfo.frameSize, channelGain,
 1744|  15.4k|                                     drcWorkBuffer, self->streamInfo.frameSize);
 1745|  15.4k|          FDK_drcDec_Preprocess(self->hUniDrcDecoder);
 1746|       |
 1747|       |          /* apply DRC1 gain sequence */
 1748|  15.4k|          FDK_drcDec_ProcessTime(self->hUniDrcDecoder, drcDelay, DRC_DEC_DRC1,
 1749|  15.4k|                                 0, 0, self->streamInfo.numChannels,
 1750|  15.4k|                                 drcWorkBuffer, self->streamInfo.frameSize);
 1751|       |          /* apply downmix */
 1752|  15.4k|          FDK_drcDec_ApplyDownmix(
 1753|  15.4k|              self->hUniDrcDecoder, reverseInChannelMap, reverseOutChannelMap,
 1754|  15.4k|              drcWorkBuffer,
 1755|  15.4k|              &self->streamInfo.numChannels); /* self->streamInfo.numChannels
 1756|       |                                                 may change here */
 1757|       |          /* apply DRC2/3 gain sequence */
 1758|  15.4k|          FDK_drcDec_ProcessTime(self->hUniDrcDecoder, drcDelay,
 1759|  15.4k|                                 DRC_DEC_DRC2_DRC3, 0, 0,
 1760|  15.4k|                                 self->streamInfo.numChannels, drcWorkBuffer,
 1761|  15.4k|                                 self->streamInfo.frameSize);
 1762|       |
 1763|  15.4k|          if (needsDeinterleaving) {
  ------------------
  |  Branch (1763:15): [True: 1.27k, False: 14.1k]
  ------------------
 1764|  1.27k|            FDK_interleave(
 1765|  1.27k|                drcWorkBuffer, pTimeData2, self->streamInfo.numChannels,
 1766|  1.27k|                self->streamInfo.frameSize, self->streamInfo.frameSize);
 1767|  1.27k|          }
 1768|  15.4k|        }
 1769|   347k|      }
 1770|   347k|      if (FDK_drcDec_GetParam(self->hUniDrcDecoder, DRC_DEC_IS_ACTIVE)) {
  ------------------
  |  Branch (1770:11): [True: 17.9k, False: 329k]
  ------------------
 1771|       |        /* return output loudness information for MPEG-D DRC */
 1772|  17.9k|        LONG outputLoudness =
  ------------------
  |  |  181|  17.9k|#define LONG INT
  ------------------
 1773|  17.9k|            FDK_drcDec_GetParam(self->hUniDrcDecoder, DRC_DEC_OUTPUT_LOUDNESS);
 1774|  17.9k|        if (outputLoudness == DRC_DEC_LOUDNESS_NOT_PRESENT) {
  ------------------
  |  |  117|  17.9k|#define DRC_DEC_LOUDNESS_NOT_PRESENT (LONG)0x7FFFFFFE
  ------------------
  |  Branch (1774:13): [True: 16.8k, False: 1.10k]
  ------------------
 1775|       |          /* no valid MPEG-D DRC loudness value contained */
 1776|  16.8k|          self->streamInfo.outputLoudness = -1;
 1777|  16.8k|        } else {
 1778|  1.10k|          if (outputLoudness > 0) {
  ------------------
  |  Branch (1778:15): [True: 452, False: 651]
  ------------------
 1779|       |            /* positive output loudness values (very unusual) are limited to 0
 1780|       |             * dB */
 1781|    452|            self->streamInfo.outputLoudness = 0;
 1782|    651|          } else {
 1783|    651|            self->streamInfo.outputLoudness =
 1784|    651|                -(INT)outputLoudness >>
 1785|    651|                22; /* negate and scale from e = 7 to e = (31-2) */
 1786|    651|          }
 1787|  1.10k|        }
 1788|   329k|      } else {
 1789|       |        /* return output loudness information for MPEG-4 DRC */
 1790|   329k|        if (self->streamInfo.drcProgRefLev <
  ------------------
  |  Branch (1790:13): [True: 313k, False: 16.1k]
  ------------------
 1791|   329k|            0) { /* no MPEG-4 DRC loudness metadata contained */
 1792|   313k|          self->streamInfo.outputLoudness = -1;
 1793|   313k|        } else {
 1794|  16.1k|          if (self->defaultTargetLoudness <
  ------------------
  |  Branch (1794:15): [True: 0, False: 16.1k]
  ------------------
 1795|  16.1k|              0) { /* loudness normalization is off */
 1796|      0|            self->streamInfo.outputLoudness = self->streamInfo.drcProgRefLev;
 1797|  16.1k|          } else {
 1798|  16.1k|            self->streamInfo.outputLoudness = self->defaultTargetLoudness;
 1799|  16.1k|          }
 1800|  16.1k|        }
 1801|   329k|      }
 1802|       |
 1803|   347k|      if (self->streamInfo.extAot != AOT_AAC_SLS) {
  ------------------
  |  Branch (1803:11): [True: 347k, False: 0]
  ------------------
 1804|   347k|        interleaved = 0;
 1805|   347k|        interleaved |= (self->sbrEnabled) ? 1 : 0;
  ------------------
  |  Branch (1805:24): [True: 253k, False: 94.3k]
  ------------------
 1806|   347k|        interleaved |= (self->mpsEnableCurr) ? 1 : 0;
  ------------------
  |  Branch (1806:24): [True: 158k, False: 188k]
  ------------------
 1807|   347k|        PCMDMX_ERROR dmxErr = PCMDMX_OK;
 1808|   347k|        if ((flags & AACDEC_INTR) && (accessUnit == 0)) {
  ------------------
  |  | 1027|   347k|#define AACDEC_INTR 4
  ------------------
  |  Branch (1808:13): [True: 0, False: 347k]
  |  Branch (1808:38): [True: 0, False: 0]
  ------------------
 1809|       |          /* delete data from the past (e.g. mixdown coeficients) */
 1810|      0|          pcmDmx_Reset(self->hPcmUtils, PCMDMX_RESET_BS_DATA);
  ------------------
  |  |  324|      0|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
 1811|      0|        }
 1812|   347k|        if (flags & (AACDEC_CLRHIST)) {
  ------------------
  |  | 1031|   347k|#define AACDEC_CLRHIST 8
  ------------------
  |  Branch (1812:13): [True: 0, False: 347k]
  ------------------
 1813|      0|          if (!(self->flags[0] & AC_USAC)) {
  ------------------
  |  |  307|      0|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1813:15): [True: 0, False: 0]
  ------------------
 1814|       |            /* delete data from the past (e.g. mixdown coeficients) */
 1815|      0|            pcmDmx_Reset(self->hPcmUtils, PCMDMX_RESET_BS_DATA);
  ------------------
  |  |  324|      0|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
 1816|      0|          }
 1817|      0|        }
 1818|       |
 1819|       |        /* do PCM post processing */
 1820|   347k|        dmxErr = pcmDmx_ApplyFrame(self->hPcmUtils, pTimeData2, timeData2Size,
 1821|   347k|                                   self->streamInfo.frameSize,
 1822|   347k|                                   &self->streamInfo.numChannels, interleaved,
 1823|   347k|                                   self->channelType, self->channelIndices,
 1824|   347k|                                   &self->mapDescr, &pcmLimiterScale);
 1825|   347k|        if (dmxErr == PCMDMX_OUTPUT_BUFFER_TOO_SMALL) {
  ------------------
  |  Branch (1825:13): [True: 0, False: 347k]
  ------------------
 1826|      0|          ErrorStatus = AAC_DEC_OUTPUT_BUFFER_TOO_SMALL;
 1827|      0|          goto bail;
 1828|      0|        }
 1829|   347k|        if ((ErrorStatus == AAC_DEC_OK) && (dmxErr == PCMDMX_INVALID_MODE)) {
  ------------------
  |  Branch (1829:13): [True: 342k, False: 5.52k]
  |  Branch (1829:44): [True: 4, False: 342k]
  ------------------
 1830|       |          /* Announce the framework that the current combination of channel
 1831|       |           * configuration and downmix settings are not know to produce a
 1832|       |           * predictable behavior and thus maybe produce strange output. */
 1833|      4|          ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR;
 1834|      4|        }
 1835|   347k|      }
 1836|       |
 1837|   347k|      if (self->flags[0] & AC_USAC) {
  ------------------
  |  |  307|   347k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1837:11): [True: 221k, False: 126k]
  ------------------
 1838|   221k|        if (self->flushStatus == AACDEC_USAC_DASH_IPF_FLUSH_ON &&
  ------------------
  |  Branch (1838:13): [True: 24, False: 221k]
  ------------------
 1839|     24|            !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1018|     24|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1839:13): [True: 24, False: 0]
  ------------------
 1840|     24|          CAacDecoder_PrepareCrossFade(pTimeData2, self->pTimeDataFlush,
 1841|     24|                                       self->streamInfo.numChannels,
 1842|     24|                                       self->streamInfo.frameSize, interleaved);
 1843|     24|        }
 1844|       |
 1845|       |        /* prepare crossfade buffer for fade in */
 1846|   221k|        if (!applyCrossfade &&
  ------------------
  |  Branch (1846:13): [True: 0, False: 221k]
  ------------------
 1847|      0|            (self->applyCrossfade != AACDEC_CROSSFADE_BITMASK_OFF) &&
  ------------------
  |  |  176|      0|  ((UCHAR)0) /*!< No cross-fade between frames shall be applied at next \
  ------------------
  |  Branch (1847:13): [True: 0, False: 0]
  ------------------
 1848|      0|            !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1018|      0|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1848:13): [True: 0, False: 0]
  ------------------
 1849|      0|          for (int ch = 0; ch < self->streamInfo.numChannels; ch++) {
  ------------------
  |  Branch (1849:28): [True: 0, False: 0]
  ------------------
 1850|      0|            for (int i = 0; i < TIME_DATA_FLUSH_SIZE; i++) {
  ------------------
  |  |  133|      0|#define TIME_DATA_FLUSH_SIZE (128)
  ------------------
  |  Branch (1850:29): [True: 0, False: 0]
  ------------------
 1851|      0|              self->pTimeDataFlush[ch][i] = (PCM_DEC)0;
 1852|      0|            }
 1853|      0|          }
 1854|      0|          applyCrossfade = 1;
 1855|      0|        }
 1856|       |
 1857|   221k|        if (applyCrossfade &&
  ------------------
  |  Branch (1857:13): [True: 221k, False: 0]
  ------------------
 1858|   221k|            (self->applyCrossfade != AACDEC_CROSSFADE_BITMASK_OFF) &&
  ------------------
  |  |  176|   221k|  ((UCHAR)0) /*!< No cross-fade between frames shall be applied at next \
  ------------------
  |  Branch (1858:13): [True: 532, False: 220k]
  ------------------
 1859|    532|            !(accessUnit < numPrerollAU) &&
  ------------------
  |  Branch (1859:13): [True: 173, False: 359]
  ------------------
 1860|    173|            (self->buildUpStatus == AACDEC_USAC_BUILD_UP_ON)) {
  ------------------
  |  Branch (1860:13): [True: 173, False: 0]
  ------------------
 1861|    173|          CAacDecoder_ApplyCrossFade(pTimeData2, self->pTimeDataFlush,
 1862|    173|                                     self->streamInfo.numChannels,
 1863|    173|                                     self->streamInfo.frameSize, interleaved);
 1864|    173|          self->applyCrossfade =
 1865|    173|              AACDEC_CROSSFADE_BITMASK_OFF; /* disable cross-fade between frames
  ------------------
  |  |  176|    173|  ((UCHAR)0) /*!< No cross-fade between frames shall be applied at next \
  ------------------
 1866|       |                                               at nect config change */
 1867|    173|        }
 1868|   221k|      }
 1869|       |
 1870|       |      /* Signal interruption to take effect in next frame. */
 1871|   347k|      if ((flags & AACDEC_FLUSH || self->flushStatus) &&
  ------------------
  |  | 1023|   695k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1871:12): [True: 0, False: 347k]
  |  Branch (1871:36): [True: 24, False: 347k]
  ------------------
 1872|     24|          !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1018|     24|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1872:11): [True: 24, False: 0]
  ------------------
 1873|     24|        aacDecoder_SignalInterruption(self);
 1874|     24|      }
 1875|       |
 1876|       |      /* Update externally visible copy of flags */
 1877|   347k|      self->streamInfo.flags = self->flags[0];
 1878|       |
 1879|   347k|    } /* USAC DASH IPF flushing possible end */
 1880|   347k|    if (accessUnit < numPrerollAU) {
  ------------------
  |  Branch (1880:9): [True: 2.06k, False: 345k]
  ------------------
 1881|  2.06k|      FDKpushBack(hBsAu, auStartAnchor - (INT)FDKgetValidBits(hBsAu));
 1882|   345k|    } else {
 1883|   345k|      if ((self->buildUpStatus == AACDEC_RSV60_BUILD_UP_ON) ||
  ------------------
  |  Branch (1883:11): [True: 0, False: 345k]
  ------------------
 1884|   345k|          (self->buildUpStatus == AACDEC_RSV60_BUILD_UP_ON_IN_BAND) ||
  ------------------
  |  Branch (1884:11): [True: 0, False: 345k]
  ------------------
 1885|   345k|          (self->buildUpStatus == AACDEC_USAC_BUILD_UP_ON)) {
  ------------------
  |  Branch (1885:11): [True: 1.00k, False: 344k]
  ------------------
 1886|  1.00k|        self->buildUpCnt--;
 1887|       |
 1888|  1.00k|        if (self->buildUpCnt < 0) {
  ------------------
  |  Branch (1888:13): [True: 1.00k, False: 0]
  ------------------
 1889|  1.00k|          self->buildUpStatus = 0;
 1890|  1.00k|        }
 1891|  1.00k|      }
 1892|       |
 1893|   345k|      if (self->flags[0] & AC_USAC) {
  ------------------
  |  |  307|   345k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1893:11): [True: 219k, False: 126k]
  ------------------
 1894|   219k|        if (self->flushStatus == AACDEC_USAC_DASH_IPF_FLUSH_ON &&
  ------------------
  |  Branch (1894:13): [True: 24, False: 219k]
  ------------------
 1895|     24|            !(flags & AACDEC_CONCEAL)) {
  ------------------
  |  | 1018|     24|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1895:13): [True: 24, False: 0]
  ------------------
 1896|     24|          self->streamInfo.frameSize = 0;
 1897|     24|        }
 1898|   219k|      }
 1899|   345k|    }
 1900|       |
 1901|   347k|    if (self->flushStatus != AACDEC_USAC_DASH_IPF_FLUSH_ON) {
  ------------------
  |  Branch (1901:9): [True: 347k, False: 24]
  ------------------
 1902|   347k|      accessUnit++;
 1903|   347k|    }
 1904|   347k|  } while ((accessUnit < numAccessUnits) ||
  ------------------
  |  Branch (1904:12): [True: 2.09k, False: 345k]
  ------------------
 1905|   345k|           ((self->flushStatus == AACDEC_USAC_DASH_IPF_FLUSH_ON) &&
  ------------------
  |  Branch (1905:13): [True: 0, False: 345k]
  ------------------
 1906|      0|            !(flags & AACDEC_CONCEAL)));
  ------------------
  |  | 1018|      0|#define AACDEC_CONCEAL 1
  ------------------
  |  Branch (1906:13): [True: 0, False: 0]
  ------------------
 1907|       |
 1908|   345k|  if (self->streamInfo.extAot != AOT_AAC_SLS) {
  ------------------
  |  Branch (1908:7): [True: 345k, False: 0]
  ------------------
 1909|   345k|    pcmLimiterScale += PCM_OUT_HEADROOM;
  ------------------
  |  |  111|   345k|#define PCM_OUT_HEADROOM 8 /* Must have the same values as DMXH_HEADROOM */
  ------------------
 1910|       |
 1911|   345k|    if (flags & AACDEC_CLRHIST) {
  ------------------
  |  | 1031|   345k|#define AACDEC_CLRHIST 8
  ------------------
  |  Branch (1911:9): [True: 0, False: 345k]
  ------------------
 1912|      0|      if (!(self->flags[0] & AC_USAC)) {
  ------------------
  |  |  307|      0|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (1912:11): [True: 0, False: 0]
  ------------------
 1913|       |        /* Reset DRC data */
 1914|      0|        aacDecoder_drcReset(self->hDrcInfo);
 1915|       |        /* Delete the delayed signal. */
 1916|      0|        pcmLimiter_Reset(self->hLimiter);
 1917|      0|      }
 1918|      0|    }
 1919|       |
 1920|       |    /* Set applyExtGain if DRC processing is enabled and if progRefLevelPresent
 1921|       |       is present for the first time. Consequences: The headroom of the output
 1922|       |       signal can be set to AACDEC_DRC_GAIN_SCALING only for audio formats which
 1923|       |       support legacy DRC Level Normalization. For all other audio formats the
 1924|       |       headroom of the output signal is set to PCM_OUT_HEADROOM. */
 1925|   345k|    if (self->hDrcInfo->enable && (self->hDrcInfo->progRefLevelPresent == 1)) {
  ------------------
  |  Branch (1925:9): [True: 123k, False: 222k]
  |  Branch (1925:35): [True: 16.1k, False: 107k]
  ------------------
 1926|  16.1k|      self->hDrcInfo->applyExtGain |= 1;
 1927|  16.1k|    }
 1928|       |
 1929|       |    /* Check whether time data buffer is large enough. */
 1930|   345k|    if (timeDataSize <
  ------------------
  |  Branch (1930:9): [True: 0, False: 345k]
  ------------------
 1931|   345k|        (self->streamInfo.numChannels * self->streamInfo.frameSize)) {
 1932|      0|      ErrorStatus = AAC_DEC_OUTPUT_BUFFER_TOO_SMALL;
 1933|      0|      goto bail;
 1934|      0|    }
 1935|       |
 1936|   345k|    if (self->limiterEnableCurr) {
  ------------------
  |  Branch (1936:9): [True: 263k, False: 81.6k]
  ------------------
 1937|       |      /* use workBufferCore2 buffer for interleaving */
 1938|   263k|      PCM_LIM *pInterleaveBuffer;
  ------------------
  |  |  147|   263k|#define PCM_LIM LONG
  |  |  ------------------
  |  |  |  |  181|   263k|#define LONG INT
  |  |  ------------------
  ------------------
 1939|   263k|      int blockLength = self->streamInfo.frameSize;
 1940|       |
 1941|       |      /* Set actual signal parameters */
 1942|   263k|      pcmLimiter_SetNChannels(self->hLimiter, self->streamInfo.numChannels);
 1943|   263k|      pcmLimiter_SetSampleRate(self->hLimiter, self->streamInfo.sampleRate);
 1944|       |
 1945|   263k|      if ((self->streamInfo.numChannels == 1) || (self->sbrEnabled) ||
  ------------------
  |  Branch (1945:11): [True: 50.8k, False: 213k]
  |  Branch (1945:50): [True: 192k, False: 20.6k]
  ------------------
 1946|   243k|          (self->mpsEnableCurr)) {
  ------------------
  |  Branch (1946:11): [True: 0, False: 20.6k]
  ------------------
 1947|   243k|        pInterleaveBuffer = (PCM_LIM *)pTimeData2;
 1948|   243k|      } else {
 1949|  20.6k|        pInterleaveBuffer = (PCM_LIM *)self->workBufferCore2;
 1950|       |
 1951|       |        /* applyLimiter requests for interleaved data */
 1952|       |        /* Interleave ouput buffer */
 1953|  20.6k|        FDK_interleave(pTimeData2, pInterleaveBuffer,
 1954|  20.6k|                       self->streamInfo.numChannels, blockLength,
 1955|  20.6k|                       self->streamInfo.frameSize);
 1956|  20.6k|      }
 1957|       |
 1958|   263k|      FIXP_DBL *pGainPerSample = NULL;
 1959|       |
 1960|   263k|      if (self->hDrcInfo->enable && self->hDrcInfo->applyExtGain) {
  ------------------
  |  Branch (1960:11): [True: 44.8k, False: 219k]
  |  Branch (1960:37): [True: 10.2k, False: 34.5k]
  ------------------
 1961|  10.2k|        pGainPerSample = self->workBufferCore1;
 1962|       |
 1963|  10.2k|        if ((INT)GetRequiredMemWorkBufferCore1() <
  ------------------
  |  Branch (1963:13): [True: 0, False: 10.2k]
  ------------------
 1964|  10.2k|            (INT)(self->streamInfo.frameSize * sizeof(FIXP_DBL))) {
 1965|      0|          ErrorStatus = AAC_DEC_UNKNOWN;
 1966|      0|          goto bail;
 1967|      0|        }
 1968|       |
 1969|  10.2k|        pcmLimiterScale = applyDrcLevelNormalization(
 1970|  10.2k|            self->hDrcInfo, (PCM_DEC *)pInterleaveBuffer, self->extGain,
 1971|  10.2k|            pGainPerSample, pcmLimiterScale, self->extGainDelay,
 1972|  10.2k|            self->streamInfo.frameSize, self->streamInfo.numChannels, 1, 1);
 1973|  10.2k|      }
 1974|       |
 1975|   263k|      pcmLimiter_Apply(self->hLimiter, pInterleaveBuffer, pTimeData,
 1976|   263k|                       pGainPerSample, pcmLimiterScale,
 1977|   263k|                       self->streamInfo.frameSize);
 1978|       |
 1979|   263k|      {
 1980|       |        /* Announce the additional limiter output delay */
 1981|   263k|        self->streamInfo.outputDelay += pcmLimiter_GetDelay(self->hLimiter);
 1982|   263k|      }
 1983|   263k|    } else {
 1984|  81.6k|      if (self->hDrcInfo->enable && self->hDrcInfo->applyExtGain) {
  ------------------
  |  Branch (1984:11): [True: 78.3k, False: 3.26k]
  |  Branch (1984:37): [True: 5.85k, False: 72.5k]
  ------------------
 1985|  5.85k|        pcmLimiterScale = applyDrcLevelNormalization(
 1986|  5.85k|            self->hDrcInfo, pTimeData2, self->extGain, NULL, pcmLimiterScale,
 1987|  5.85k|            self->extGainDelay, self->streamInfo.frameSize,
 1988|  5.85k|            self->streamInfo.numChannels,
 1989|  5.85k|            (interleaved || (self->streamInfo.numChannels == 1))
  ------------------
  |  Branch (1989:14): [True: 4.35k, False: 1.49k]
  |  Branch (1989:29): [True: 568, False: 931]
  ------------------
 1990|  5.85k|                ? 1
 1991|  5.85k|                : self->streamInfo.frameSize,
 1992|  5.85k|            0);
 1993|  5.85k|      }
 1994|       |
 1995|       |      /* If numChannels = 1 we do not need interleaving. The same applies if SBR
 1996|       |      or MPS are used, since their output is interleaved already (resampled or
 1997|       |      not) */
 1998|  81.6k|      if ((self->streamInfo.numChannels == 1) || (self->sbrEnabled) ||
  ------------------
  |  Branch (1998:11): [True: 8.08k, False: 73.5k]
  |  Branch (1998:50): [True: 30.8k, False: 42.7k]
  ------------------
 1999|  75.3k|          (self->mpsEnableCurr)) {
  ------------------
  |  Branch (1999:11): [True: 36.4k, False: 6.33k]
  ------------------
 2000|  75.3k|        scaleValuesSaturate(
 2001|  75.3k|            pTimeData, pTimeData2,
 2002|  75.3k|            self->streamInfo.frameSize * self->streamInfo.numChannels,
 2003|  75.3k|            pcmLimiterScale);
 2004|       |
 2005|  75.3k|      } else {
 2006|  6.33k|        scaleValuesSaturate(
 2007|  6.33k|            (INT_PCM *)self->workBufferCore2, pTimeData2,
 2008|  6.33k|            self->streamInfo.frameSize * self->streamInfo.numChannels,
 2009|  6.33k|            pcmLimiterScale);
 2010|       |        /* Interleave ouput buffer */
 2011|  6.33k|        FDK_interleave((INT_PCM *)self->workBufferCore2, pTimeData,
 2012|  6.33k|                       self->streamInfo.numChannels, self->streamInfo.frameSize,
 2013|  6.33k|                       self->streamInfo.frameSize);
 2014|  6.33k|      }
 2015|  81.6k|    }
 2016|   345k|  } /* if (self->streamInfo.extAot != AOT_AAC_SLS)*/
 2017|       |
 2018|   363k|bail:
 2019|       |
 2020|       |  /* error in renderer part occurred, ErrorStatus was set to invalid output */
 2021|   363k|  if (fEndAuNotAdjusted && !IS_OUTPUT_VALID(ErrorStatus) &&
  ------------------
  |  |  561|   364k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|    361|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 359, False: 2]
  |  |  |  |  |  Branch (552:5): [True: 359, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  553|    361|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 359, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|    361|       ? 1                                   \
  |  |  |  |  555|    361|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 633, False: 361]
  |  |  ------------------
  ------------------
  |  Branch (2021:7): [True: 994, False: 362k]
  ------------------
 2022|      2|      (accessUnit < numPrerollAU)) {
  ------------------
  |  Branch (2022:7): [True: 2, False: 0]
  ------------------
 2023|      2|    transportDec_EndAccessUnit(self->hInput);
 2024|      2|  }
 2025|       |
 2026|       |  /* Update Statistics */
 2027|   363k|  aacDecoder_UpdateBitStreamCounters(&self->streamInfo, hBs, nBits,
 2028|   363k|                                     ErrorStatus);
 2029|   363k|  if (((self->streamInfo.numChannels <= 0) ||
  ------------------
  |  Branch (2029:8): [True: 10.1k, False: 353k]
  ------------------
 2030|   353k|       (self->streamInfo.frameSize <= 0) ||
  ------------------
  |  Branch (2030:8): [True: 0, False: 353k]
  ------------------
 2031|   353k|       (self->streamInfo.sampleRate <= 0)) &&
  ------------------
  |  Branch (2031:8): [True: 238, False: 352k]
  ------------------
 2032|  10.4k|      IS_OUTPUT_VALID(ErrorStatus)) {
  ------------------
  |  |  561|  10.4k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|  10.4k|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 0, False: 10.4k]
  |  |  |  |  |  Branch (552:5): [True: 0, False: 10.4k]
  |  |  |  |  ------------------
  |  |  |  |  553|  10.4k|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|  10.4k|       ? 1                                   \
  |  |  |  |  555|  10.4k|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 0, False: 10.4k]
  |  |  ------------------
  ------------------
 2033|       |    /* Ensure consistency of IS_OUTPUT_VALID() macro. */
 2034|      0|    ErrorStatus = AAC_DEC_UNKNOWN;
 2035|      0|  }
 2036|       |
 2037|   363k|  if (!IS_OUTPUT_VALID(ErrorStatus)) {
  ------------------
  |  |  561|   363k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|  22.8k|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 5.13k, False: 17.6k]
  |  |  |  |  |  Branch (552:5): [True: 5.13k, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |  553|  22.8k|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 5.13k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|  22.8k|       ? 1                                   \
  |  |  |  |  555|  22.8k|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 340k, False: 22.8k]
  |  |  ------------------
  ------------------
 2038|  17.6k|    FDKmemclear(pTimeData, timeDataSize * sizeof(*pTimeData));
 2039|  17.6k|  }
 2040|       |
 2041|   363k|  return ErrorStatus;
 2042|   345k|}
aacDecoder_Close:
 2044|  21.8k|LINKSPEC_CPP void aacDecoder_Close(HANDLE_AACDECODER self) {
 2045|  21.8k|  if (self == NULL) return;
  ------------------
  |  Branch (2045:7): [True: 0, False: 21.8k]
  ------------------
 2046|       |
 2047|  21.8k|  if (self->hLimiter != NULL) {
  ------------------
  |  Branch (2047:7): [True: 21.8k, False: 0]
  ------------------
 2048|  21.8k|    pcmLimiter_Destroy(self->hLimiter);
 2049|  21.8k|  }
 2050|       |
 2051|  21.8k|  if (self->hPcmUtils != NULL) {
  ------------------
  |  Branch (2051:7): [True: 21.8k, False: 0]
  ------------------
 2052|  21.8k|    pcmDmx_Close(&self->hPcmUtils);
 2053|  21.8k|  }
 2054|       |
 2055|  21.8k|  FDK_drcDec_Close(&self->hUniDrcDecoder);
 2056|       |
 2057|  21.8k|  if (self->pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (2057:7): [True: 21.8k, False: 0]
  ------------------
 2058|  21.8k|    mpegSurroundDecoder_Close(
 2059|  21.8k|        (CMpegSurroundDecoder *)self->pMpegSurroundDecoder);
 2060|  21.8k|  }
 2061|       |
 2062|  21.8k|  if (self->hSbrDecoder != NULL) {
  ------------------
  |  Branch (2062:7): [True: 21.8k, False: 0]
  ------------------
 2063|  21.8k|    sbrDecoder_Close(&self->hSbrDecoder);
 2064|  21.8k|  }
 2065|       |
 2066|  21.8k|  if (self->hInput != NULL) {
  ------------------
  |  Branch (2066:7): [True: 21.8k, False: 0]
  ------------------
 2067|  21.8k|    transportDec_Close(&self->hInput);
 2068|  21.8k|  }
 2069|       |
 2070|  21.8k|  CAacDecoder_Close(self);
 2071|  21.8k|}
aacdecoder_lib.cpp:_ZL28aacDecoder_setMetadataExpiryP20AAC_DECODER_INSTANCEi:
  137|   811k|                                         const INT value) {
  138|       |  /* check decoder handle */
  139|   811k|  if (self != NULL) {
  ------------------
  |  Branch (139:7): [True: 811k, False: 0]
  ------------------
  140|   811k|    INT mdExpFrame = 0; /* default: disable */
  141|       |
  142|   811k|    if ((value > 0) &&
  ------------------
  |  Branch (142:9): [True: 0, False: 811k]
  ------------------
  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|   811k|    aacDecoder_drcSetParam(self->hDrcInfo, DRC_DATA_EXPIRY_FRAME, mdExpFrame);
  152|       |
  153|       |    /* Configure PCM downmix module */
  154|   811k|    pcmDmx_SetParam(self->hPcmUtils, DMX_BS_DATA_EXPIRY_FRAME, mdExpFrame);
  155|   811k|  }
  156|   811k|}
aacdecoder_lib.cpp:_ZL16setConcealMethodP20AAC_DECODER_INSTANCEi:
  565|  36.5k|    const INT method) {
  566|  36.5k|  AAC_DECODER_ERROR errorStatus = AAC_DEC_OK;
  567|  36.5k|  CConcealParams *pConcealData = NULL;
  568|  36.5k|  int method_revert = 0;
  569|  36.5k|  HANDLE_SBRDECODER hSbrDec = NULL;
  570|  36.5k|  HANDLE_AAC_DRC hDrcInfo = NULL;
  571|  36.5k|  HANDLE_PCM_DOWNMIX hPcmDmx = NULL;
  572|  36.5k|  CConcealmentMethod backupMethod = ConcealMethodNone;
  573|  36.5k|  int backupDelay = 0;
  574|  36.5k|  int bsDelay = 0;
  575|       |
  576|       |  /* check decoder handle */
  577|  36.5k|  if (self != NULL) {
  ------------------
  |  Branch (577:7): [True: 36.5k, False: 0]
  ------------------
  578|  36.5k|    pConcealData = &self->concealCommonData;
  579|  36.5k|    hSbrDec = self->hSbrDecoder;
  580|  36.5k|    hDrcInfo = self->hDrcInfo;
  581|  36.5k|    hPcmDmx = self->hPcmUtils;
  582|  36.5k|    if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  307|  36.5k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  310|  36.5k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  308|  36.5k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (582:9): [True: 10.0k, False: 26.4k]
  |  Branch (582:65): [True: 0, False: 10.0k]
  ------------------
  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|  36.5k|    if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  307|  36.5k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  310|  36.5k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  308|  36.5k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (588:9): [True: 10.0k, False: 26.4k]
  |  Branch (588:65): [True: 0, False: 10.0k]
  ------------------
  589|       |      /* Interpolation concealment is not implemented for USAC/RSVD50 */
  590|      0|      errorStatus = AAC_DEC_SET_PARAM_FAIL;
  591|      0|      goto bail;
  592|      0|    }
  593|  36.5k|  }
  594|       |
  595|       |  /* Get current method/delay */
  596|  36.5k|  backupMethod = CConcealment_GetMethod(pConcealData);
  597|  36.5k|  backupDelay = CConcealment_GetDelay(pConcealData);
  598|       |
  599|       |  /* Be sure to set AAC and SBR concealment method simultaneously! */
  600|  36.5k|  errorStatus = CConcealment_SetParams(
  601|  36.5k|      pConcealData,
  602|  36.5k|      (method_revert == 0) ? (int)method : (int)1,  // concealMethod
  ------------------
  |  Branch (602:7): [True: 36.5k, False: 0]
  ------------------
  603|  36.5k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,           // concealFadeOutSlope
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  604|  36.5k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,           // concealFadeInSlope
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  605|  36.5k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,           // concealMuteRelease
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  606|  36.5k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED            // concealComfNoiseLevel
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  607|  36.5k|  );
  608|  36.5k|  if ((errorStatus != AAC_DEC_OK) && (errorStatus != AAC_DEC_INVALID_HANDLE)) {
  ------------------
  |  Branch (608:7): [True: 0, False: 36.5k]
  |  Branch (608:38): [True: 0, False: 0]
  ------------------
  609|      0|    goto bail;
  610|      0|  }
  611|       |
  612|       |  /* Get new delay */
  613|  36.5k|  bsDelay = CConcealment_GetDelay(pConcealData);
  614|       |
  615|  36.5k|  {
  616|  36.5k|    SBR_ERROR sbrErr = SBRDEC_OK;
  617|       |
  618|       |    /* set SBR bitstream delay */
  619|  36.5k|    sbrErr = sbrDecoder_SetParam(hSbrDec, SBR_SYSTEM_BITSTREAM_DELAY, bsDelay);
  620|       |
  621|  36.5k|    switch (sbrErr) {
  622|  36.5k|      case SBRDEC_OK:
  ------------------
  |  Branch (622:7): [True: 36.5k, False: 0]
  ------------------
  623|  36.5k|      case SBRDEC_NOT_INITIALIZED:
  ------------------
  |  Branch (623:7): [True: 0, False: 36.5k]
  ------------------
  624|  36.5k|        if (self != NULL) {
  ------------------
  |  Branch (624:13): [True: 36.5k, False: 0]
  ------------------
  625|       |          /* save the param value and set later
  626|       |             (when SBR has been initialized) */
  627|  36.5k|          self->sbrParams.bsDelay = bsDelay;
  628|  36.5k|        }
  629|  36.5k|        break;
  630|      0|      default:
  ------------------
  |  Branch (630:7): [True: 0, False: 36.5k]
  ------------------
  631|      0|        errorStatus = AAC_DEC_SET_PARAM_FAIL;
  632|      0|        goto bail;
  633|  36.5k|    }
  634|  36.5k|  }
  635|       |
  636|  36.5k|  errorStatus = aacDecoder_drcSetParam(hDrcInfo, DRC_BS_DELAY, bsDelay);
  637|  36.5k|  if ((errorStatus != AAC_DEC_OK) && (errorStatus != AAC_DEC_INVALID_HANDLE)) {
  ------------------
  |  Branch (637:7): [True: 0, False: 36.5k]
  |  Branch (637:38): [True: 0, False: 0]
  ------------------
  638|      0|    goto bail;
  639|      0|  }
  640|       |
  641|  36.5k|  if (errorStatus == AAC_DEC_OK) {
  ------------------
  |  Branch (641:7): [True: 36.5k, False: 0]
  ------------------
  642|  36.5k|    PCMDMX_ERROR err = pcmDmx_SetParam(hPcmDmx, DMX_BS_DATA_DELAY, bsDelay);
  643|  36.5k|    switch (err) {
  644|      0|      case PCMDMX_INVALID_HANDLE:
  ------------------
  |  Branch (644:7): [True: 0, False: 36.5k]
  ------------------
  645|      0|        errorStatus = AAC_DEC_INVALID_HANDLE;
  646|      0|        break;
  647|  36.5k|      case PCMDMX_OK:
  ------------------
  |  Branch (647:7): [True: 36.5k, False: 0]
  ------------------
  648|  36.5k|        break;
  649|      0|      default:
  ------------------
  |  Branch (649:7): [True: 0, False: 36.5k]
  ------------------
  650|      0|        errorStatus = AAC_DEC_SET_PARAM_FAIL;
  651|      0|        goto bail;
  652|  36.5k|    }
  653|  36.5k|  }
  654|       |
  655|  36.5k|bail:
  656|  36.5k|  if ((errorStatus != AAC_DEC_OK) && (errorStatus != AAC_DEC_INVALID_HANDLE)) {
  ------------------
  |  Branch (656:7): [True: 0, False: 36.5k]
  |  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|  36.5k|  return errorStatus;
  671|  36.5k|}
aacdecoder_lib.cpp:_ZL25aacDecoder_ConfigCallbackPvPK21CSAudioSpecificConfighPh:
  275|   836k|                                     UCHAR configMode, UCHAR *configChanged) {
  276|   836k|  HANDLE_AACDECODER self = (HANDLE_AACDECODER)handle;
  277|   836k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
  278|   836k|  TRANSPORTDEC_ERROR errTp;
  279|       |
  280|   836k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|   836k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (280:3): [True: 836k, False: 0]
  ------------------
  281|   836k|  {
  282|   836k|    { err = aacDecoder_Config(self, pAscStruct, configMode, configChanged); }
  283|   836k|  }
  284|   836k|  if (err == AAC_DEC_OK) {
  ------------------
  |  Branch (284:7): [True: 811k, False: 24.4k]
  ------------------
  285|       |    /*
  286|       |    revert concealment method if either
  287|       |       - Interpolation concealment might not be meaningful
  288|       |       - Interpolation concealment is not implemented
  289|       |    */
  290|   811k|    if ((self->flags[0] & (AC_LD | AC_ELD) &&
  ------------------
  |  |  304|   811k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                  if ((self->flags[0] & (AC_LD | AC_ELD) &&
  ------------------
  |  |  303|   811k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (290:10): [True: 115k, False: 696k]
  ------------------
  291|   115k|         (self->concealMethodUser == ConcealMethodNone) &&
  ------------------
  |  Branch (291:10): [True: 115k, False: 0]
  ------------------
  292|   115k|         CConcealment_GetDelay(&self->concealCommonData) >
  ------------------
  |  Branch (292:10): [True: 4.56k, False: 110k]
  ------------------
  293|   115k|             0) /* might not be meaningful but allow if user has set it
  294|       |                   expicitly */
  295|   807k|        || (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) &&
  ------------------
  |  |  307|   807k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      || (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) &&
  ------------------
  |  |  310|   807k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                      || (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) &&
  ------------------
  |  |  308|   807k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (295:13): [True: 141k, False: 665k]
  ------------------
  296|   141k|            CConcealment_GetDelay(&self->concealCommonData) >
  ------------------
  |  Branch (296:13): [True: 10.0k, False: 131k]
  ------------------
  297|   141k|                0) /* not implemented */
  298|   811k|    ) {
  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|  14.6k|      setConcealMethod(self, 1);
  303|  14.6k|    }
  304|   811k|    aacDecoder_setMetadataExpiry(self, self->metadataExpiry);
  305|   811k|    errTp = TRANSPORTDEC_OK;
  306|   811k|  } else {
  307|  24.4k|    if (err == AAC_DEC_NEED_TO_RESTART) {
  ------------------
  |  Branch (307:9): [True: 0, False: 24.4k]
  ------------------
  308|      0|      errTp = TRANSPORTDEC_NEED_TO_RESTART;
  309|  24.4k|    } else if (IS_INIT_ERROR(err)) {
  ------------------
  |  |  547|  24.4k|  ((((err) >= aac_dec_init_error_start) && ((err) <= aac_dec_init_error_end)) \
  |  |  ------------------
  |  |  |  Branch (547:3): [True: 24.4k, False: 0]
  |  |  |  Branch (547:5): [True: 24.4k, False: 0]
  |  |  |  Branch (547:44): [True: 24.4k, False: 0]
  |  |  ------------------
  |  |  548|  24.4k|       ? 1                                                                    \
  |  |  549|  24.4k|       : 0)
  ------------------
  310|  24.4k|      errTp = TRANSPORTDEC_UNSUPPORTED_FORMAT;
  311|  24.4k|    } /* Fatal errors */
  312|      0|    else {
  313|      0|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  314|      0|    }
  315|  24.4k|  }
  316|       |
  317|   836k|  return errTp;
  318|   836k|}
aacdecoder_lib.cpp:_ZL17aacDecoder_ConfigP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfighPh:
  179|   836k|    UCHAR configMode, UCHAR *configChanged) {
  180|   836k|  AAC_DECODER_ERROR err;
  181|       |
  182|       |  /* Initialize AAC core decoder, and update self->streaminfo */
  183|   836k|  err = CAacDecoder_Init(self, pAscStruct, configMode, configChanged);
  184|       |
  185|   836k|  if (!FDK_chMapDescr_isValid(&self->mapDescr)) {
  ------------------
  |  Branch (185:7): [True: 0, False: 836k]
  ------------------
  186|      0|    return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
  187|      0|  }
  188|       |
  189|   836k|  return err;
  190|   836k|}
aacdecoder_lib.cpp:_ZL26aacDecoder_FreeMemCallbackPvPK21CSAudioSpecificConfig:
  321|   311k|                                      const CSAudioSpecificConfig *pAscStruct) {
  322|   311k|  TRANSPORTDEC_ERROR errTp = TRANSPORTDEC_OK;
  323|   311k|  HANDLE_AACDECODER self = (HANDLE_AACDECODER)handle;
  324|       |
  325|   311k|  const int subStreamIndex = 0;
  326|       |
  327|   311k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|   311k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 311k, False: 0]
  ------------------
  328|       |
  329|   311k|  if (CAacDecoder_FreeMem(self, subStreamIndex) != AAC_DEC_OK) {
  ------------------
  |  Branch (329:7): [True: 0, False: 311k]
  ------------------
  330|      0|    errTp = TRANSPORTDEC_UNKOWN_ERROR;
  331|      0|  }
  332|       |
  333|       |  /* free Ram_SbrDecoder and Ram_SbrDecChannel */
  334|   311k|  if (self->hSbrDecoder != NULL) {
  ------------------
  |  Branch (334:7): [True: 311k, False: 0]
  ------------------
  335|   311k|    if (sbrDecoder_FreeMem(&self->hSbrDecoder) != SBRDEC_OK) {
  ------------------
  |  Branch (335:9): [True: 0, False: 311k]
  ------------------
  336|      0|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  337|      0|    }
  338|   311k|  }
  339|       |
  340|       |  /* free pSpatialDec and mpsData */
  341|   311k|  if (self->pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (341:7): [True: 311k, False: 0]
  ------------------
  342|   311k|    if (mpegSurroundDecoder_FreeMem(
  ------------------
  |  Branch (342:9): [True: 0, False: 311k]
  ------------------
  343|   311k|            (CMpegSurroundDecoder *)self->pMpegSurroundDecoder) != MPS_OK) {
  344|      0|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  345|      0|    }
  346|   311k|  }
  347|       |
  348|       |  /* free persistent qmf domain buffer, QmfWorkBufferCore3, QmfWorkBufferCore4,
  349|       |   * QmfWorkBufferCore5 and configuration variables */
  350|   311k|  FDK_QmfDomain_FreeMem(&self->qmfDomain);
  351|       |
  352|   311k|  return errTp;
  353|   311k|}
aacdecoder_lib.cpp:_ZL32aacDecoder_CtrlCFGChangeCallbackPvPK14CCtrlCFGChange:
  356|     91|    void *handle, const CCtrlCFGChange *pCtrlCFGChangeStruct) {
  357|     91|  TRANSPORTDEC_ERROR errTp = TRANSPORTDEC_OK;
  358|     91|  HANDLE_AACDECODER self = (HANDLE_AACDECODER)handle;
  359|       |
  360|     91|  if (self != NULL) {
  ------------------
  |  Branch (360:7): [True: 91, False: 0]
  ------------------
  361|     91|    CAacDecoder_CtrlCFGChange(
  362|     91|        self, pCtrlCFGChangeStruct->flushStatus, pCtrlCFGChangeStruct->flushCnt,
  363|     91|        pCtrlCFGChangeStruct->buildUpStatus, pCtrlCFGChangeStruct->buildUpCnt);
  364|     91|  } else {
  365|      0|    errTp = TRANSPORTDEC_UNKOWN_ERROR;
  366|      0|  }
  367|       |
  368|     91|  return errTp;
  369|     91|}
aacdecoder_lib.cpp:_ZL22aacDecoder_SbrCallbackPvP13FDK_BITSTREAMiii17AUDIO_OBJECT_TYPE14MP4_ELEMENT_IDihhhPhi:
  377|   539k|    const INT downscaleFactor) {
  378|   539k|  HANDLE_SBRDECODER self = (HANDLE_SBRDECODER)handle;
  379|       |
  380|   539k|  INT errTp = sbrDecoder_Header(self, hBs, sampleRateIn, sampleRateOut,
  381|   539k|                                samplesPerFrame, coreCodec, elementID,
  382|   539k|                                elementIndex, harmonicSBR, stereoConfigIndex,
  383|   539k|                                configMode, configChanged, downscaleFactor);
  384|       |
  385|   539k|  return errTp;
  386|   539k|}
aacdecoder_lib.cpp:_ZL22aacDecoder_SscCallbackPvP13FDK_BITSTREAM17AUDIO_OBJECT_TYPEiiiiiihPh:
  392|   175k|    const INT configBytes, const UCHAR configMode, UCHAR *configChanged) {
  393|   175k|  SACDEC_ERROR err;
  394|   175k|  TRANSPORTDEC_ERROR errTp;
  395|   175k|  HANDLE_AACDECODER hAacDecoder = (HANDLE_AACDECODER)handle;
  396|       |
  397|   175k|  err = mpegSurroundDecoder_Config(
  398|   175k|      (CMpegSurroundDecoder *)hAacDecoder->pMpegSurroundDecoder, hBs, coreCodec,
  399|   175k|      samplingRate, frameSize, numChannels, stereoConfigIndex,
  400|   175k|      coreSbrFrameLengthIndex, configBytes, configMode, configChanged);
  401|       |
  402|   175k|  switch (err) {
  403|  36.6k|    case MPS_UNSUPPORTED_CONFIG:
  ------------------
  |  Branch (403:5): [True: 36.6k, False: 138k]
  ------------------
  404|       |      /* MPS found but invalid or not decodable by this instance            */
  405|       |      /* We switch off MPS and keep going                                   */
  406|  36.6k|      hAacDecoder->mpsEnableCurr = 0;
  407|  36.6k|      hAacDecoder->mpsApplicable = 0;
  408|  36.6k|      errTp = TRANSPORTDEC_OK;
  409|  36.6k|      break;
  410|  27.6k|    case MPS_PARSE_ERROR:
  ------------------
  |  Branch (410:5): [True: 27.6k, False: 147k]
  ------------------
  411|       |      /* MPS found but invalid or not decodable by this instance            */
  412|  27.6k|      hAacDecoder->mpsEnableCurr = 0;
  413|  27.6k|      hAacDecoder->mpsApplicable = 0;
  414|  27.6k|      if ((coreCodec == AOT_USAC) || (coreCodec == AOT_DRM_USAC) ||
  ------------------
  |  Branch (414:11): [True: 3.93k, False: 23.7k]
  |  Branch (414:38): [True: 0, False: 23.7k]
  ------------------
  415|  27.6k|          IS_LOWDELAY(coreCodec)) {
  ------------------
  |  |  228|  23.7k|#define IS_LOWDELAY(aot) ((aot) == AOT_ER_AAC_LD || (aot) == AOT_ER_AAC_ELD)
  |  |  ------------------
  |  |  |  Branch (228:27): [True: 0, False: 23.7k]
  |  |  |  Branch (228:53): [True: 23.7k, False: 0]
  |  |  ------------------
  ------------------
  416|  27.6k|        errTp = TRANSPORTDEC_PARSE_ERROR;
  417|  27.6k|      } else {
  418|      0|        errTp = TRANSPORTDEC_OK;
  419|      0|      }
  420|  27.6k|      break;
  421|   107k|    case MPS_OK:
  ------------------
  |  Branch (421:5): [True: 107k, False: 67.6k]
  ------------------
  422|   107k|      hAacDecoder->mpsApplicable = 1;
  423|   107k|      errTp = TRANSPORTDEC_OK;
  424|   107k|      break;
  425|  3.39k|    default:
  ------------------
  |  Branch (425:5): [True: 3.39k, False: 171k]
  ------------------
  426|       |      /* especially Parsing error is critical for transport layer          */
  427|  3.39k|      hAacDecoder->mpsApplicable = 0;
  428|  3.39k|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  429|   175k|  }
  430|       |
  431|   175k|  return (INT)errTp;
  432|   175k|}
aacdecoder_lib.cpp:_ZL25aacDecoder_UniDrcCallbackPvP13FDK_BITSTREAMiiii17AUDIO_OBJECT_TYPE:
  439|   545k|                                     const AUDIO_OBJECT_TYPE aot) {
  440|   545k|  DRC_DEC_ERROR err = DRC_DEC_OK;
  441|   545k|  TRANSPORTDEC_ERROR errTp;
  442|   545k|  HANDLE_AACDECODER hAacDecoder = (HANDLE_AACDECODER)handle;
  443|   545k|  DRC_DEC_CODEC_MODE drcDecCodecMode = DRC_DEC_CODEC_MODE_UNDEFINED;
  444|   545k|  UCHAR dummyBuffer[4] = {0};
  445|   545k|  FDK_BITSTREAM dummyBs;
  446|   545k|  HANDLE_FDK_BITSTREAM hReadBs;
  447|       |
  448|   545k|  if (subStreamIndex != 0) {
  ------------------
  |  Branch (448:7): [True: 0, False: 545k]
  ------------------
  449|      0|    return TRANSPORTDEC_OK;
  450|      0|  }
  451|       |
  452|   545k|  if (hBs == NULL) {
  ------------------
  |  Branch (452:7): [True: 371k, False: 174k]
  ------------------
  453|       |    /* use dummy zero payload to clear memory */
  454|   371k|    hReadBs = &dummyBs;
  455|   371k|    FDKinitBitStream(hReadBs, dummyBuffer, 4, 24);
  456|   371k|  } else {
  457|   174k|    hReadBs = hBs;
  458|   174k|  }
  459|       |
  460|   545k|  if (aot == AOT_USAC) {
  ------------------
  |  Branch (460:7): [True: 545k, False: 0]
  ------------------
  461|   545k|    drcDecCodecMode = DRC_DEC_MPEG_D_USAC;
  462|   545k|  }
  463|       |
  464|   545k|  err = FDK_drcDec_SetCodecMode(hAacDecoder->hUniDrcDecoder, drcDecCodecMode);
  465|   545k|  if (err) return (INT)TRANSPORTDEC_UNKOWN_ERROR;
  ------------------
  |  Branch (465:7): [True: 0, False: 545k]
  ------------------
  466|       |
  467|   545k|  if (payloadType == 0) /* uniDrcConfig */
  ------------------
  |  Branch (467:7): [True: 346k, False: 199k]
  ------------------
  468|   346k|  {
  469|   346k|    err = FDK_drcDec_ReadUniDrcConfig(hAacDecoder->hUniDrcDecoder, hReadBs);
  470|   346k|  } else /* loudnessInfoSet */
  471|   199k|  {
  472|   199k|    err = FDK_drcDec_ReadLoudnessInfoSet(hAacDecoder->hUniDrcDecoder, hReadBs);
  473|   199k|    hAacDecoder->loudnessInfoSetPosition[1] = payloadStart;
  474|   199k|    hAacDecoder->loudnessInfoSetPosition[2] = fullPayloadLength;
  475|   199k|  }
  476|       |
  477|   545k|  if (err == DRC_DEC_OK)
  ------------------
  |  Branch (477:7): [True: 545k, False: 0]
  ------------------
  478|   545k|    errTp = TRANSPORTDEC_OK;
  479|      0|  else
  480|      0|    errTp = TRANSPORTDEC_UNKOWN_ERROR;
  481|       |
  482|   545k|  return (INT)errTp;
  483|   545k|}
aacdecoder_lib.cpp:_ZL37aacDecoder_EstimateNumberOfLostFramesP20AAC_DECODER_INSTANCE:
 1141|  6.38k|static INT aacDecoder_EstimateNumberOfLostFrames(HANDLE_AACDECODER self) {
 1142|  6.38k|  INT n;
 1143|       |
 1144|  6.38k|  transportDec_GetMissingAccessUnitCount(&n, self->hInput);
 1145|       |
 1146|  6.38k|  return n;
 1147|  6.38k|}
aacdecoder_lib.cpp:_ZL29aacDecoder_SignalInterruptionP20AAC_DECODER_INSTANCE:
 1089|  6.41k|static void aacDecoder_SignalInterruption(HANDLE_AACDECODER self) {
 1090|  6.41k|  CAacDecoder_SignalInterruption(self);
 1091|       |
 1092|  6.41k|  if (self->hSbrDecoder != NULL) {
  ------------------
  |  Branch (1092:7): [True: 6.41k, False: 0]
  ------------------
 1093|  6.41k|    sbrDecoder_SetParam(self->hSbrDecoder, SBR_BS_INTERRUPTION, 1);
 1094|  6.41k|  }
 1095|  6.41k|  if (self->mpsEnableUser) {
  ------------------
  |  Branch (1095:7): [True: 0, False: 6.41k]
  ------------------
 1096|      0|    mpegSurroundDecoder_SetParam(
 1097|      0|        (CMpegSurroundDecoder *)self->pMpegSurroundDecoder,
 1098|      0|        SACDEC_BS_INTERRUPTION, 1);
 1099|      0|  }
 1100|  6.41k|}
aacdecoder_lib.cpp:_ZL34aacDecoder_UpdateBitStreamCountersP11CStreamInfoP13FDK_BITSTREAMi17AAC_DECODER_ERROR:
 1105|   363k|                                               AAC_DECODER_ERROR ErrorStatus) {
 1106|       |  /* calculate bit difference (amount of bits moved forward) */
 1107|   363k|  nBits = nBits - (INT)FDKgetValidBits(hBs);
 1108|       |
 1109|       |  /* Note: The amount of bits consumed might become negative when parsing a
 1110|       |     bit stream with several sub frames, and we find out at the last sub frame
 1111|       |     that the total frame length does not match the sum of sub frame length.
 1112|       |     If this happens, the transport decoder might want to rewind to the supposed
 1113|       |     ending of the transport frame, and this position might be before the last
 1114|       |     access unit beginning. */
 1115|       |
 1116|       |  /* Calc bitrate. */
 1117|   363k|  if (pSi->frameSize > 0) {
  ------------------
  |  Branch (1117:7): [True: 353k, False: 10.1k]
  ------------------
 1118|       |    /* bitRate = nBits * sampleRate / frameSize */
 1119|   353k|    int ratio_e = 0;
 1120|   353k|    FIXP_DBL ratio_m = fDivNorm(pSi->sampleRate, pSi->frameSize, &ratio_e);
 1121|   353k|    pSi->bitRate = (INT)fMultNorm(nBits, DFRACT_BITS - 1, ratio_m, ratio_e,
  ------------------
  |  |  113|   353k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1122|   353k|                                  DFRACT_BITS - 1);
  ------------------
  |  |  113|   353k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1123|   353k|  }
 1124|       |
 1125|       |  /* bit/byte counters */
 1126|   363k|  {
 1127|   363k|    INT nBytes;
 1128|       |
 1129|   363k|    nBytes = nBits >> 3;
 1130|   363k|    pSi->numTotalBytes += nBytes;
 1131|   363k|    if (IS_OUTPUT_VALID(ErrorStatus)) {
  ------------------
  |  |  561|   363k|#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err))
  |  |  ------------------
  |  |  |  |  552|  22.8k|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (552:3): [True: 5.13k, False: 17.6k]
  |  |  |  |  |  Branch (552:5): [True: 5.13k, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |  553|  22.8k|    ((err) <= aac_dec_decode_error_end))     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (553:5): [True: 5.13k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  554|  22.8k|       ? 1                                   \
  |  |  |  |  555|  22.8k|       : 0)
  |  |  ------------------
  |  |  |  Branch (561:31): [True: 340k, False: 22.8k]
  |  |  ------------------
  ------------------
 1132|   345k|      pSi->numTotalAccessUnits++;
 1133|   345k|    }
 1134|   363k|    if (IS_DECODE_ERROR(ErrorStatus)) {
  ------------------
  |  |  552|   363k|  ((((err) >= aac_dec_decode_error_start) && \
  |  |  ------------------
  |  |  |  Branch (552:3): [True: 5.13k, False: 358k]
  |  |  |  Branch (552:5): [True: 5.13k, False: 358k]
  |  |  ------------------
  |  |  553|   363k|    ((err) <= aac_dec_decode_error_end))     \
  |  |  ------------------
  |  |  |  Branch (553:5): [True: 5.13k, False: 0]
  |  |  ------------------
  |  |  554|   363k|       ? 1                                   \
  |  |  555|   363k|       : 0)
  ------------------
 1135|  5.13k|      pSi->numBadBytes += nBytes;
 1136|  5.13k|      pSi->numBadAccessUnits++;
 1137|  5.13k|    }
 1138|   363k|  }
 1139|   363k|}

_Z16CBlock_GetEscapeP13FDK_BITSTREAMi:
  140|   472k|{
  141|   472k|  if (fAbs(q) != 16) return (q);
  ------------------
  |  Branch (141:7): [True: 445k, False: 26.9k]
  ------------------
  142|       |
  143|  26.9k|  LONG i, off;
  ------------------
  |  |  181|  26.9k|#define LONG INT
  ------------------
  144|  37.3k|  for (i = 4; i < 13; i++) {
  ------------------
  |  Branch (144:15): [True: 37.3k, False: 67]
  ------------------
  145|  37.3k|    if (FDKreadBit(bs) == 0) break;
  ------------------
  |  Branch (145:9): [True: 26.8k, False: 10.4k]
  ------------------
  146|  37.3k|  }
  147|       |
  148|  26.9k|  if (i == 13) return (MAX_QUANTIZED_VALUE + 1);
  ------------------
  |  Branch (148:7): [True: 67, False: 26.8k]
  ------------------
  149|       |
  150|  26.8k|  off = FDKreadBits(bs, i);
  151|  26.8k|  i = off + (1 << i);
  152|       |
  153|  26.8k|  if (q < 0) i = -i;
  ------------------
  |  Branch (153:7): [True: 7.11k, False: 19.7k]
  ------------------
  154|       |
  155|  26.8k|  return i;
  156|  26.9k|}
_Z26CBlock_ReadScaleFactorDataP22CAacDecoderChannelInfoP13FDK_BITSTREAMj:
  160|   423k|    UINT flags) {
  161|   423k|  int temp;
  162|   423k|  int band;
  163|   423k|  int group;
  164|   423k|  int position = 0; /* accu for intensity delta coding */
  165|   423k|  int factor = pAacDecoderChannelInfo->pDynData->RawDataInfo
  166|   423k|                   .GlobalGain; /* accu for scale factor delta coding */
  167|   423k|  UCHAR *pCodeBook = pAacDecoderChannelInfo->pDynData->aCodeBook;
  168|   423k|  SHORT *pScaleFactor = pAacDecoderChannelInfo->pDynData->aScaleFactor;
  169|   423k|  const CodeBookDescription *hcb = &AACcodeBookDescriptionTable[BOOKSCL];
  170|       |
  171|   423k|  const USHORT(*CodeBook)[HuffmanEntries] = hcb->CodeBook;
  172|       |
  173|   423k|  int ScaleFactorBandsTransmitted =
  174|   423k|      GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  175|  1.30M|  for (group = 0; group < GetWindowGroups(&pAacDecoderChannelInfo->icsInfo);
  ------------------
  |  Branch (175:19): [True: 882k, False: 423k]
  ------------------
  176|   882k|       group++) {
  177|  2.87M|    for (band = 0; band < ScaleFactorBandsTransmitted; band++) {
  ------------------
  |  Branch (177:20): [True: 1.98M, False: 882k]
  ------------------
  178|  1.98M|      switch (pCodeBook[band]) {
  179|  45.2k|        case ZERO_HCB: /* zero book */
  ------------------
  |  Branch (179:9): [True: 45.2k, False: 1.94M]
  ------------------
  180|  45.2k|          pScaleFactor[band] = 0;
  181|  45.2k|          break;
  182|       |
  183|  1.89M|        default: /* decode scale factor */
  ------------------
  |  Branch (183:9): [True: 1.89M, False: 94.8k]
  ------------------
  184|  1.89M|          if (!((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) && band == 0 &&
  ------------------
  |  |  307|  1.89M|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (!((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) && band == 0 &&
  ------------------
  |  |  310|  1.89M|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        if (!((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) && band == 0 &&
  ------------------
  |  |  308|  1.89M|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (184:17): [True: 1.69M, False: 199k]
  |  Branch (184:66): [True: 176k, False: 1.51M]
  ------------------
  185|  1.77M|                group == 0)) {
  ------------------
  |  Branch (185:17): [True: 122k, False: 54.8k]
  ------------------
  186|  1.77M|            temp = CBlock_DecodeHuffmanWordCB(bs, CodeBook);
  187|  1.77M|            factor += temp - 60; /* MIDFAC 1.5 dB */
  188|  1.77M|          }
  189|  1.89M|          pScaleFactor[band] = factor - 100;
  190|  1.89M|          break;
  191|       |
  192|  23.1k|        case INTENSITY_HCB: /* intensity steering */
  ------------------
  |  Branch (192:9): [True: 23.1k, False: 1.96M]
  ------------------
  193|  34.1k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (193:9): [True: 11.0k, False: 1.97M]
  ------------------
  194|  34.1k|          temp = CBlock_DecodeHuffmanWordCB(bs, CodeBook);
  195|  34.1k|          position += temp - 60;
  196|  34.1k|          pScaleFactor[band] = position - 100;
  197|  34.1k|          break;
  198|       |
  199|  15.4k|        case NOISE_HCB: /* PNS */
  ------------------
  |  Branch (199:9): [True: 15.4k, False: 1.97M]
  ------------------
  200|  15.4k|          if (flags & (AC_MPEGD_RES | AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  320|  15.4k|#define AC_MPEGD_RES 0x200000 /*!< MPEG-D residual individual channel data. */
  ------------------
                        if (flags & (AC_MPEGD_RES | AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  307|  15.4k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (flags & (AC_MPEGD_RES | AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  310|  15.4k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        if (flags & (AC_MPEGD_RES | AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  308|  15.4k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (200:15): [True: 0, False: 15.4k]
  ------------------
  201|      0|            return AAC_DEC_PARSE_ERROR;
  202|      0|          }
  203|  15.4k|          CPns_Read(&pAacDecoderChannelInfo->data.aac.PnsData, bs, hcb,
  204|  15.4k|                    pAacDecoderChannelInfo->pDynData->aScaleFactor,
  205|  15.4k|                    pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain,
  206|  15.4k|                    band, group);
  207|  15.4k|          break;
  208|  1.98M|      }
  209|  1.98M|    }
  210|   882k|    pCodeBook += 16;
  211|   882k|    pScaleFactor += 16;
  212|   882k|  }
  213|       |
  214|   423k|  return AAC_DEC_OK;
  215|   423k|}
_Z24CBlock_ScaleSpectralDataP22CAacDecoderChannelInfohP16SamplingRateInfo:
  219|   543k|                              SamplingRateInfo *pSamplingRateInfo) {
  220|   543k|  int band;
  221|   543k|  int window;
  222|   543k|  const SHORT *RESTRICT pSfbScale = pAacDecoderChannelInfo->pDynData->aSfbScale;
  223|   543k|  SHORT *RESTRICT pSpecScale = pAacDecoderChannelInfo->specScale;
  224|   543k|  int groupwin, group;
  225|   543k|  const SHORT *RESTRICT BandOffsets = GetScaleFactorBandOffsets(
  226|   543k|      &pAacDecoderChannelInfo->icsInfo, pSamplingRateInfo);
  227|   543k|  SPECTRAL_PTR RESTRICT pSpectralCoefficient =
  228|   543k|      pAacDecoderChannelInfo->pSpectralCoefficient;
  229|       |
  230|   543k|  FDKmemclear(pSpecScale, 8 * sizeof(SHORT));
  231|       |
  232|   543k|  for (window = 0, group = 0;
  233|  1.59M|       group < GetWindowGroups(&pAacDecoderChannelInfo->icsInfo); group++) {
  ------------------
  |  Branch (233:8): [True: 1.05M, False: 543k]
  ------------------
  234|  2.33M|    for (groupwin = 0; groupwin < GetWindowGroupLength(
  ------------------
  |  Branch (234:24): [True: 1.28M, False: 1.05M]
  ------------------
  235|  2.33M|                                      &pAacDecoderChannelInfo->icsInfo, group);
  236|  1.28M|         groupwin++, window++) {
  237|  1.28M|      int SpecScale_window = pSpecScale[window];
  238|  1.28M|      FIXP_DBL *pSpectrum = SPEC(pSpectralCoefficient, window,
  ------------------
  |  |  115|  1.28M|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  239|  1.28M|                                 pAacDecoderChannelInfo->granuleLength);
  240|       |
  241|       |      /* find scaling for current window */
  242|  4.46M|      for (band = 0; band < maxSfbs; band++) {
  ------------------
  |  Branch (242:22): [True: 3.18M, False: 1.28M]
  ------------------
  243|  3.18M|        SpecScale_window =
  244|  3.18M|            fMax(SpecScale_window, (int)pSfbScale[window * 16 + band]);
  245|  3.18M|      }
  246|       |
  247|  1.28M|      if (pAacDecoderChannelInfo->pDynData->TnsData.Active &&
  ------------------
  |  Branch (247:11): [True: 475k, False: 806k]
  ------------------
  248|   475k|          pAacDecoderChannelInfo->pDynData->TnsData.NumberOfFilters[window] >
  ------------------
  |  Branch (248:11): [True: 201k, False: 274k]
  ------------------
  249|   475k|              0) {
  250|   201k|        int filter_index, SpecScale_window_tns;
  251|   201k|        int tns_start, tns_stop;
  252|       |
  253|       |        /* Find max scale of TNS bands */
  254|   201k|        SpecScale_window_tns = 0;
  255|   201k|        tns_start = GetMaximumTnsBands(&pAacDecoderChannelInfo->icsInfo,
  256|   201k|                                       pSamplingRateInfo->samplingRateIndex);
  257|   201k|        tns_stop = 0;
  258|   201k|        for (filter_index = 0;
  259|   421k|             filter_index < (int)pAacDecoderChannelInfo->pDynData->TnsData
  ------------------
  |  Branch (259:14): [True: 219k, False: 201k]
  ------------------
  260|   421k|                                .NumberOfFilters[window];
  261|   219k|             filter_index++) {
  262|   219k|          for (band = pAacDecoderChannelInfo->pDynData->TnsData
  263|   219k|                          .Filter[window][filter_index]
  264|   219k|                          .StartBand;
  265|  2.22M|               band < pAacDecoderChannelInfo->pDynData->TnsData
  ------------------
  |  Branch (265:16): [True: 2.00M, False: 219k]
  ------------------
  266|  2.22M|                          .Filter[window][filter_index]
  267|  2.22M|                          .StopBand;
  268|  2.00M|               band++) {
  269|  2.00M|            SpecScale_window_tns =
  270|  2.00M|                fMax(SpecScale_window_tns, (int)pSfbScale[window * 16 + band]);
  271|  2.00M|          }
  272|       |          /* Find TNS line boundaries for all TNS filters */
  273|   219k|          tns_start =
  274|   219k|              fMin(tns_start, (int)pAacDecoderChannelInfo->pDynData->TnsData
  275|   219k|                                  .Filter[window][filter_index]
  276|   219k|                                  .StartBand);
  277|   219k|          tns_stop =
  278|   219k|              fMax(tns_stop, (int)pAacDecoderChannelInfo->pDynData->TnsData
  279|   219k|                                 .Filter[window][filter_index]
  280|   219k|                                 .StopBand);
  281|   219k|        }
  282|   201k|        SpecScale_window_tns = SpecScale_window_tns +
  283|   201k|                               pAacDecoderChannelInfo->pDynData->TnsData.GainLd;
  284|   201k|        FDK_ASSERT(tns_stop >= tns_start);
  ------------------
  |  |  221|   201k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (284:9): [True: 201k, False: 0]
  ------------------
  285|       |        /* Consider existing headroom of all MDCT lines inside the TNS bands. */
  286|   201k|        SpecScale_window_tns -=
  287|   201k|            getScalefactor(pSpectrum + BandOffsets[tns_start],
  288|   201k|                           BandOffsets[tns_stop] - BandOffsets[tns_start]);
  289|   201k|        if (SpecScale_window <= 17) {
  ------------------
  |  Branch (289:13): [True: 191k, False: 10.0k]
  ------------------
  290|   191k|          SpecScale_window_tns++;
  291|   191k|        }
  292|       |        /* Add enough mantissa head room such that the spectrum is still
  293|       |           representable after applying TNS. */
  294|   201k|        SpecScale_window = fMax(SpecScale_window, SpecScale_window_tns);
  295|   201k|      }
  296|       |
  297|       |      /* store scaling of current window */
  298|  1.28M|      pSpecScale[window] = SpecScale_window;
  299|       |
  300|       |#ifdef FUNCTION_CBlock_ScaleSpectralData_func1
  301|       |
  302|       |      CBlock_ScaleSpectralData_func1(pSpectrum, maxSfbs, BandOffsets,
  303|       |                                     SpecScale_window, pSfbScale, window);
  304|       |
  305|       |#else  /* FUNCTION_CBlock_ScaleSpectralData_func1 */
  306|  4.46M|      for (band = 0; band < maxSfbs; band++) {
  ------------------
  |  Branch (306:22): [True: 3.18M, False: 1.28M]
  ------------------
  307|  3.18M|        int scale = fMin(DFRACT_BITS - 1,
  ------------------
  |  |  113|  3.18M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  308|  3.18M|                         SpecScale_window - pSfbScale[window * 16 + band]);
  309|  3.18M|        if (scale) {
  ------------------
  |  Branch (309:13): [True: 2.23M, False: 950k]
  ------------------
  310|  2.23M|          FDK_ASSERT(scale > 0);
  ------------------
  |  |  221|  2.23M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (310:11): [True: 2.23M, False: 0]
  ------------------
  311|       |
  312|       |          /* following relation can be used for optimizations:
  313|       |           * (BandOffsets[i]%4) == 0 for all i */
  314|  2.23M|          int max_index = BandOffsets[band + 1];
  315|  2.23M|          DWORD_ALIGNED(pSpectrum);
  ------------------
  |  |  291|  2.23M|#define DWORD_ALIGNED(x) C_ALLOC_ALIGNED_CHECK2((const void *)(x), 4);
  ------------------
  316|  21.4M|          for (int index = BandOffsets[band]; index < max_index; index++) {
  ------------------
  |  Branch (316:47): [True: 19.1M, False: 2.23M]
  ------------------
  317|  19.1M|            pSpectrum[index] >>= scale;
  318|  19.1M|          }
  319|  2.23M|        }
  320|  3.18M|      }
  321|  1.28M|#endif /* FUNCTION_CBlock_ScaleSpectralData_func1 */
  322|  1.28M|    }
  323|  1.05M|  }
  324|   543k|}
_Z22CBlock_ReadSectionDataP13FDK_BITSTREAMP22CAacDecoderChannelInfoPK16SamplingRateInfoj:
  328|   314k|    const SamplingRateInfo *pSamplingRateInfo, const UINT flags) {
  329|   314k|  int top, band;
  330|   314k|  int sect_len, sect_len_incr;
  331|   314k|  int group;
  332|   314k|  UCHAR sect_cb;
  333|   314k|  UCHAR *pCodeBook = pAacDecoderChannelInfo->pDynData->aCodeBook;
  334|       |  /* HCR input (long) */
  335|   314k|  SHORT *pNumLinesInSec =
  336|   314k|      pAacDecoderChannelInfo->pDynData->specificTo.aac.aNumLineInSec4Hcr;
  337|   314k|  int numLinesInSecIdx = 0;
  338|   314k|  UCHAR *pHcrCodeBook =
  339|   314k|      pAacDecoderChannelInfo->pDynData->specificTo.aac.aCodeBooks4Hcr;
  340|   314k|  const SHORT *BandOffsets = GetScaleFactorBandOffsets(
  341|   314k|      &pAacDecoderChannelInfo->icsInfo, pSamplingRateInfo);
  342|   314k|  pAacDecoderChannelInfo->pDynData->specificTo.aac.numberSection = 0;
  343|   314k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
  344|       |
  345|   314k|  FDKmemclear(pCodeBook, sizeof(UCHAR) * (8 * 16));
  346|       |
  347|   314k|  const int nbits =
  348|   314k|      (IsLongBlock(&pAacDecoderChannelInfo->icsInfo) == 1) ? 5 : 3;
  ------------------
  |  Branch (348:7): [True: 258k, False: 56.3k]
  ------------------
  349|       |
  350|   314k|  int sect_esc_val = (1 << nbits) - 1;
  351|       |
  352|   314k|  UCHAR ScaleFactorBandsTransmitted =
  353|   314k|      GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  354|   871k|  for (group = 0; group < GetWindowGroups(&pAacDecoderChannelInfo->icsInfo);
  ------------------
  |  Branch (354:19): [True: 556k, False: 314k]
  ------------------
  355|   556k|       group++) {
  356|  65.6M|    for (band = 0; band < ScaleFactorBandsTransmitted;) {
  ------------------
  |  Branch (356:20): [True: 65.0M, False: 556k]
  ------------------
  357|  65.0M|      sect_len = 0;
  358|  65.0M|      if (flags & AC_ER_VCB11) {
  ------------------
  |  |  294|  65.0M|  0x000001 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (358:11): [True: 44.5M, False: 20.4M]
  ------------------
  359|  44.5M|        sect_cb = (UCHAR)FDKreadBits(bs, 5);
  360|  44.5M|      } else
  361|  20.4M|        sect_cb = (UCHAR)FDKreadBits(bs, 4);
  362|       |
  363|  65.0M|      if (((flags & AC_ER_VCB11) == 0) || (sect_cb < 11) ||
  ------------------
  |  |  294|  65.0M|  0x000001 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (363:11): [True: 20.4M, False: 44.5M]
  |  Branch (363:43): [True: 44.4M, False: 109k]
  ------------------
  364|  64.9M|          ((sect_cb > 11) && (sect_cb < 16))) {
  ------------------
  |  Branch (364:12): [True: 108k, False: 1.25k]
  |  Branch (364:30): [True: 25.5k, False: 82.4k]
  ------------------
  365|  64.9M|        sect_len_incr = FDKreadBits(bs, nbits);
  366|  65.1M|        while (sect_len_incr == sect_esc_val) {
  ------------------
  |  Branch (366:16): [True: 165k, False: 64.9M]
  ------------------
  367|   165k|          sect_len += sect_esc_val;
  368|   165k|          sect_len_incr = FDKreadBits(bs, nbits);
  369|   165k|        }
  370|  64.9M|      } else {
  371|  83.7k|        sect_len_incr = 1;
  372|  83.7k|      }
  373|       |
  374|  65.0M|      sect_len += sect_len_incr;
  375|       |
  376|  65.0M|      top = band + sect_len;
  377|       |
  378|  65.0M|      if (flags & AC_ER_HCR) {
  ------------------
  |  |  300|  65.0M|  0x000004 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (378:11): [True: 113k, False: 64.9M]
  ------------------
  379|       |        /* HCR input (long) -- collecting sideinfo (for HCR-_long_ only) */
  380|   113k|        if (numLinesInSecIdx >= MAX_SFB_HCR) {
  ------------------
  |  |  120|   113k|  (((1024 / 8) / LINES_PER_UNIT) * 8) /* (8 * 16) is not enough because sfbs \
  |  |  ------------------
  |  |  |  |  113|   113k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
  |  Branch (380:13): [True: 212, False: 113k]
  ------------------
  381|    212|          return AAC_DEC_PARSE_ERROR;
  382|    212|        }
  383|   113k|        if (top > (int)GetNumberOfScaleFactorBands(
  ------------------
  |  Branch (383:13): [True: 9, False: 113k]
  ------------------
  384|   113k|                      &pAacDecoderChannelInfo->icsInfo, pSamplingRateInfo)) {
  385|      9|          return AAC_DEC_PARSE_ERROR;
  386|      9|        }
  387|   113k|        pNumLinesInSec[numLinesInSecIdx] = BandOffsets[top] - BandOffsets[band];
  388|   113k|        numLinesInSecIdx++;
  389|   113k|        if (sect_cb == BOOKSCL) {
  ------------------
  |  Branch (389:13): [True: 5, False: 113k]
  ------------------
  390|      5|          return AAC_DEC_INVALID_CODE_BOOK;
  391|   113k|        } else {
  392|   113k|          *pHcrCodeBook++ = sect_cb;
  393|   113k|        }
  394|   113k|        pAacDecoderChannelInfo->pDynData->specificTo.aac.numberSection++;
  395|   113k|      }
  396|       |
  397|       |      /* Check spectral line limits */
  398|  65.0M|      if (IsLongBlock(&(pAacDecoderChannelInfo->icsInfo))) {
  ------------------
  |  Branch (398:11): [True: 14.4M, False: 50.6M]
  ------------------
  399|  14.4M|        if (top > 64) {
  ------------------
  |  Branch (399:13): [True: 11, False: 14.4M]
  ------------------
  400|     11|          return AAC_DEC_DECODE_FRAME_ERROR;
  401|     11|        }
  402|  50.6M|      } else { /* short block */
  403|  50.6M|        if (top + group * 16 > (8 * 16)) {
  ------------------
  |  Branch (403:13): [True: 17, False: 50.6M]
  ------------------
  404|     17|          return AAC_DEC_DECODE_FRAME_ERROR;
  405|     17|        }
  406|  50.6M|      }
  407|       |
  408|       |      /* Check if decoded codebook index is feasible */
  409|  65.0M|      if ((sect_cb == BOOKSCL) ||
  ------------------
  |  Branch (409:11): [True: 130, False: 65.0M]
  ------------------
  410|  65.0M|          ((sect_cb == INTENSITY_HCB || sect_cb == INTENSITY_HCB2) &&
  ------------------
  |  Branch (410:13): [True: 17.4k, False: 65.0M]
  |  Branch (410:41): [True: 21.7k, False: 65.0M]
  ------------------
  411|  39.1k|           pAacDecoderChannelInfo->pDynData->RawDataInfo.CommonWindow == 0)) {
  ------------------
  |  Branch (411:12): [True: 37, False: 39.1k]
  ------------------
  412|    167|        return AAC_DEC_INVALID_CODE_BOOK;
  413|    167|      }
  414|       |
  415|       |      /* Store codebook index */
  416|  67.7M|      for (; band < top; band++) {
  ------------------
  |  Branch (416:14): [True: 2.70M, False: 65.0M]
  ------------------
  417|  2.70M|        pCodeBook[group * 16 + band] = sect_cb;
  418|  2.70M|      }
  419|  65.0M|    }
  420|   556k|  }
  421|       |
  422|   314k|  return ErrorStatus;
  423|   314k|}
_Z34CBlock_InverseQuantizeSpectralDataP22CAacDecoderChannelInfoP16SamplingRateInfoPhh:
  490|   558k|    UCHAR active_band_search) {
  491|   558k|  int window, group, groupwin, band;
  492|   558k|  int ScaleFactorBandsTransmitted =
  493|   558k|      GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  494|   558k|  UCHAR *RESTRICT pCodeBook = pAacDecoderChannelInfo->pDynData->aCodeBook;
  495|   558k|  SHORT *RESTRICT pSfbScale = pAacDecoderChannelInfo->pDynData->aSfbScale;
  496|   558k|  SHORT *RESTRICT pScaleFactor = pAacDecoderChannelInfo->pDynData->aScaleFactor;
  497|   558k|  const SHORT *RESTRICT BandOffsets = GetScaleFactorBandOffsets(
  498|   558k|      &pAacDecoderChannelInfo->icsInfo, pSamplingRateInfo);
  499|   558k|  const SHORT total_bands =
  500|   558k|      GetScaleFactorBandsTotal(&pAacDecoderChannelInfo->icsInfo);
  501|       |
  502|   558k|  FDKmemclear(pAacDecoderChannelInfo->pDynData->aSfbScale,
  503|   558k|              (8 * 16) * sizeof(SHORT));
  504|       |
  505|   558k|  for (window = 0, group = 0;
  506|  1.65M|       group < GetWindowGroups(&pAacDecoderChannelInfo->icsInfo); group++) {
  ------------------
  |  Branch (506:8): [True: 1.09M, False: 558k]
  ------------------
  507|  2.42M|    for (groupwin = 0; groupwin < GetWindowGroupLength(
  ------------------
  |  Branch (507:24): [True: 1.33M, False: 1.09M]
  ------------------
  508|  2.42M|                                      &pAacDecoderChannelInfo->icsInfo, group);
  509|  1.33M|         groupwin++, window++) {
  510|       |      /* inverse quantization */
  511|  4.49M|      for (band = 0; band < ScaleFactorBandsTransmitted; band++) {
  ------------------
  |  Branch (511:22): [True: 3.16M, False: 1.33M]
  ------------------
  512|  3.16M|        FIXP_DBL *pSpectralCoefficient =
  513|  3.16M|            SPEC(pAacDecoderChannelInfo->pSpectralCoefficient, window,
  ------------------
  |  |  115|  3.16M|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  514|  3.16M|                 pAacDecoderChannelInfo->granuleLength) +
  515|  3.16M|            BandOffsets[band];
  516|  3.16M|        FIXP_DBL locMax;
  517|       |
  518|  3.16M|        const int noLines = BandOffsets[band + 1] - BandOffsets[band];
  519|  3.16M|        const int bnds = group * 16 + band;
  520|       |
  521|  3.16M|        if ((pCodeBook[bnds] == ZERO_HCB) ||
  ------------------
  |  Branch (521:13): [True: 403k, False: 2.76M]
  ------------------
  522|  2.76M|            (pCodeBook[bnds] == INTENSITY_HCB) ||
  ------------------
  |  Branch (522:13): [True: 81.6k, False: 2.67M]
  ------------------
  523|  2.67M|            (pCodeBook[bnds] == INTENSITY_HCB2))
  ------------------
  |  Branch (523:13): [True: 85.9k, False: 2.59M]
  ------------------
  524|   571k|          continue;
  525|       |
  526|  2.59M|        if (pCodeBook[bnds] == NOISE_HCB) {
  ------------------
  |  Branch (526:13): [True: 85.4k, False: 2.50M]
  ------------------
  527|       |          /* Leave headroom for PNS values. + 1 because ceil(log2(2^(0.25*3))) =
  528|       |             1, worst case of additional headroom required because of the
  529|       |             scalefactor. */
  530|  85.4k|          pSfbScale[window * 16 + band] = (pScaleFactor[bnds] >> 2) + 1;
  531|  85.4k|          continue;
  532|  85.4k|        }
  533|       |
  534|  2.50M|        locMax = maxabs_D(pSpectralCoefficient, noLines);
  535|       |
  536|  2.50M|        if (active_band_search) {
  ------------------
  |  Branch (536:13): [True: 2.50M, False: 0]
  ------------------
  537|  2.50M|          if (locMax != FIXP_DBL(0)) {
  ------------------
  |  Branch (537:15): [True: 1.37M, False: 1.13M]
  ------------------
  538|  1.37M|            band_is_noise[group * 16 + band] = 0;
  539|  1.37M|          }
  540|  2.50M|        }
  541|       |
  542|       |        /* Cheap robustness improvement - Do not remove!!! */
  543|  2.50M|        if (fixp_abs(locMax) > (FIXP_DBL)MAX_QUANTIZED_VALUE) {
  ------------------
  |  |  305|  2.50M|#define fixp_abs(x) fAbs(x)
  ------------------
  |  Branch (543:13): [True: 21, False: 2.50M]
  ------------------
  544|     21|          return AAC_DEC_PARSE_ERROR;
  545|     21|        }
  546|       |
  547|       |        /* Added by Youliy Ninov:
  548|       |        The inverse quantization operation is given by (ISO/IEC 14496-3:2009(E))
  549|       |        by:
  550|       |
  551|       |        x_invquant=Sign(x_quant). abs(x_quant)^(4/3)
  552|       |
  553|       |        We apply a gain, derived from the scale factor for the particular sfb,
  554|       |        according to the following function:
  555|       |
  556|       |        gain=2^(0.25*ScaleFactor)
  557|       |
  558|       |        So, after scaling we have:
  559|       |
  560|       |        x_rescale=gain*x_invquant=Sign(x_quant)*2^(0.25*ScaleFactor)*abs(s_quant)^(4/3)
  561|       |
  562|       |        We could represent the ScaleFactor as:
  563|       |
  564|       |        ScaleFactor= (ScaleFactor >> 2)*4 + ScaleFactor %4
  565|       |
  566|       |        When we substitute it we get:
  567|       |
  568|       |        x_rescale=Sign(x_quant)*2^(ScaleFactor>>2)* (
  569|       |        2^(0.25*(ScaleFactor%4))*abs(s_quant)^(4/3))
  570|       |
  571|       |        When we set: msb=(ScaleFactor>>2) and lsb=(ScaleFactor%4), we obtain:
  572|       |
  573|       |        x_rescale=Sign(x_quant)*(2^msb)* ( 2^(lsb/4)*abs(s_quant)^(4/3))
  574|       |
  575|       |        The rescaled output can be represented by:
  576|       |           mantissa : Sign(x_quant)*( 2^(lsb/4)*abs(s_quant)^(4/3))
  577|       |           exponent :(2^msb)
  578|       |
  579|       |        */
  580|       |
  581|  2.50M|        int msb = pScaleFactor[bnds] >> 2;
  582|       |
  583|       |        /* Inverse quantize band only if it is not empty */
  584|  2.50M|        if (locMax != FIXP_DBL(0)) {
  ------------------
  |  Branch (584:13): [True: 1.37M, False: 1.13M]
  ------------------
  585|  1.37M|          int lsb = pScaleFactor[bnds] & 0x03;
  586|       |
  587|  1.37M|          int scale = EvaluatePower43(&locMax, lsb);
  588|       |
  589|  1.37M|          scale = CntLeadingZeros(locMax) - scale - 2;
  ------------------
  |  |  308|  1.37M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  590|       |
  591|  1.37M|          pSfbScale[window * 16 + band] = msb - scale;
  592|  1.37M|          InverseQuantizeBand(pSpectralCoefficient, InverseQuantTable,
  593|  1.37M|                              MantissaTable[lsb], ExponentTable[lsb], noLines,
  594|  1.37M|                              scale);
  595|  1.37M|        } else {
  596|  1.13M|          pSfbScale[window * 16 + band] = msb;
  597|  1.13M|        }
  598|       |
  599|  2.50M|      } /* for (band=0; band < ScaleFactorBandsTransmitted; band++) */
  600|       |
  601|       |      /* Make sure the array is cleared to the end */
  602|  1.33M|      SHORT start_clear = BandOffsets[ScaleFactorBandsTransmitted];
  603|  1.33M|      SHORT end_clear = BandOffsets[total_bands];
  604|  1.33M|      int diff_clear = (int)(end_clear - start_clear);
  605|  1.33M|      FIXP_DBL *pSpectralCoefficient =
  606|  1.33M|          SPEC(pAacDecoderChannelInfo->pSpectralCoefficient, window,
  ------------------
  |  |  115|  1.33M|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  607|  1.33M|               pAacDecoderChannelInfo->granuleLength) +
  608|  1.33M|          start_clear;
  609|  1.33M|      FDKmemclear(pSpectralCoefficient, diff_clear * sizeof(FIXP_DBL));
  610|       |
  611|  1.33M|    } /* for (groupwin=0; groupwin <
  612|       |         GetWindowGroupLength(&pAacDecoderChannelInfo->icsInfo,group);
  613|       |         groupwin++, window++) */
  614|  1.09M|  }   /* for (window=0, group=0; group <
  615|       |         GetWindowGroups(&pAacDecoderChannelInfo->icsInfo); group++)*/
  616|       |
  617|   558k|  return AAC_DEC_OK;
  618|   558k|}
_Z23CBlock_ReadSpectralDataP13FDK_BITSTREAMP22CAacDecoderChannelInfoPK16SamplingRateInfoj:
  622|   313k|    const SamplingRateInfo *pSamplingRateInfo, const UINT flags) {
  623|   313k|  int index, i;
  624|   313k|  const SHORT *RESTRICT BandOffsets = GetScaleFactorBandOffsets(
  625|   313k|      &pAacDecoderChannelInfo->icsInfo, pSamplingRateInfo);
  626|       |
  627|   313k|  SPECTRAL_PTR pSpectralCoefficient =
  628|   313k|      pAacDecoderChannelInfo->pSpectralCoefficient;
  629|       |
  630|   313k|  FDK_ASSERT(BandOffsets != NULL);
  ------------------
  |  |  221|   313k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (630:3): [True: 313k, False: 0]
  ------------------
  631|       |
  632|   313k|  FDKmemclear(pSpectralCoefficient, sizeof(SPECTRUM));
  633|       |
  634|   313k|  if ((flags & AC_ER_HCR) == 0) {
  ------------------
  |  |  300|   313k|  0x000004 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (634:7): [True: 305k, False: 8.73k]
  ------------------
  635|   305k|    int group;
  636|   305k|    int groupoffset;
  637|   305k|    UCHAR *pCodeBook = pAacDecoderChannelInfo->pDynData->aCodeBook;
  638|   305k|    int ScaleFactorBandsTransmitted =
  639|   305k|        GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  640|   305k|    int granuleLength = pAacDecoderChannelInfo->granuleLength;
  641|       |
  642|   305k|    groupoffset = 0;
  643|       |
  644|       |    /* plain huffman decoder  short */
  645|   305k|    int max_group = GetWindowGroups(&pAacDecoderChannelInfo->icsInfo);
  646|       |
  647|   839k|    for (group = 0; group < max_group; group++) {
  ------------------
  |  Branch (647:21): [True: 534k, False: 305k]
  ------------------
  648|   534k|      int max_groupwin =
  649|   534k|          GetWindowGroupLength(&pAacDecoderChannelInfo->icsInfo, group);
  650|   534k|      int band;
  651|       |
  652|   534k|      int bnds = group * 16;
  653|       |
  654|   534k|      int bandOffset1 = BandOffsets[0];
  655|  1.45M|      for (band = 0; band < ScaleFactorBandsTransmitted; band++, bnds++) {
  ------------------
  |  Branch (655:22): [True: 916k, False: 534k]
  ------------------
  656|   916k|        UCHAR currentCB = pCodeBook[bnds];
  657|   916k|        int bandOffset0 = bandOffset1;
  658|   916k|        bandOffset1 = BandOffsets[band + 1];
  659|       |
  660|       |        /* patch to run plain-huffman-decoder with vcb11 input codebooks
  661|       |         * (LAV-checking might be possible below using the virtual cb and a
  662|       |         * LAV-table) */
  663|   916k|        if ((currentCB >= 16) && (currentCB <= 31)) {
  ------------------
  |  Branch (663:13): [True: 65.4k, False: 851k]
  |  Branch (663:34): [True: 65.4k, False: 0]
  ------------------
  664|  65.4k|          pCodeBook[bnds] = currentCB = 11;
  665|  65.4k|        }
  666|   916k|        if (((currentCB != ZERO_HCB) && (currentCB != NOISE_HCB) &&
  ------------------
  |  Branch (666:14): [True: 642k, False: 273k]
  |  Branch (666:41): [True: 579k, False: 63.6k]
  ------------------
  667|   579k|             (currentCB != INTENSITY_HCB) && (currentCB != INTENSITY_HCB2))) {
  ------------------
  |  Branch (667:14): [True: 537k, False: 41.7k]
  |  Branch (667:46): [True: 468k, False: 69.4k]
  ------------------
  668|   468k|          const CodeBookDescription *hcb =
  669|   468k|              &AACcodeBookDescriptionTable[currentCB];
  670|   468k|          int step = hcb->Dimension;
  671|   468k|          int offset = hcb->Offset;
  672|   468k|          int bits = hcb->numBits;
  673|   468k|          int mask = (1 << bits) - 1;
  674|   468k|          const USHORT(*CodeBook)[HuffmanEntries] = hcb->CodeBook;
  675|   468k|          int groupwin;
  676|       |
  677|   468k|          FIXP_DBL *mdctSpectrum =
  678|   468k|              &pSpectralCoefficient[groupoffset * granuleLength];
  679|       |
  680|   468k|          if (offset == 0) {
  ------------------
  |  Branch (680:15): [True: 288k, False: 179k]
  ------------------
  681|   607k|            for (groupwin = 0; groupwin < max_groupwin; groupwin++) {
  ------------------
  |  Branch (681:32): [True: 318k, False: 288k]
  ------------------
  682|   961k|              for (index = bandOffset0; index < bandOffset1; index += step) {
  ------------------
  |  Branch (682:41): [True: 643k, False: 318k]
  ------------------
  683|   643k|                int idx = CBlock_DecodeHuffmanWordCB(bs, CodeBook);
  684|  2.14M|                for (i = 0; i < step; i++, idx >>= bits) {
  ------------------
  |  Branch (684:29): [True: 1.49M, False: 643k]
  ------------------
  685|  1.49M|                  FIXP_DBL tmp = (FIXP_DBL)((idx & mask) - offset);
  686|  1.49M|                  if (tmp != FIXP_DBL(0)) tmp = (FDKreadBit(bs)) ? -tmp : tmp;
  ------------------
  |  Branch (686:23): [True: 737k, False: 761k]
  |  Branch (686:49): [True: 176k, False: 560k]
  ------------------
  687|  1.49M|                  mdctSpectrum[index + i] = tmp;
  688|  1.49M|                }
  689|       |
  690|   643k|                if (currentCB == ESCBOOK) {
  ------------------
  |  Branch (690:21): [True: 236k, False: 407k]
  ------------------
  691|   708k|                  for (int j = 0; j < 2; j++)
  ------------------
  |  Branch (691:35): [True: 472k, False: 236k]
  ------------------
  692|   472k|                    mdctSpectrum[index + j] = (FIXP_DBL)CBlock_GetEscape(
  693|   472k|                        bs, (LONG)mdctSpectrum[index + j]);
  694|   236k|                }
  695|   643k|              }
  696|   318k|              mdctSpectrum += granuleLength;
  697|   318k|            }
  698|   288k|          } else {
  699|   364k|            for (groupwin = 0; groupwin < max_groupwin; groupwin++) {
  ------------------
  |  Branch (699:32): [True: 185k, False: 179k]
  ------------------
  700|   480k|              for (index = bandOffset0; index < bandOffset1; index += step) {
  ------------------
  |  Branch (700:41): [True: 294k, False: 185k]
  ------------------
  701|   294k|                int idx = CBlock_DecodeHuffmanWordCB(bs, CodeBook);
  702|  1.15M|                for (i = 0; i < step; i++, idx >>= bits) {
  ------------------
  |  Branch (702:29): [True: 860k, False: 294k]
  ------------------
  703|   860k|                  mdctSpectrum[index + i] = (FIXP_DBL)((idx & mask) - offset);
  704|   860k|                }
  705|   294k|                if (currentCB == ESCBOOK) {
  ------------------
  |  Branch (705:21): [True: 0, False: 294k]
  ------------------
  706|      0|                  for (int j = 0; j < 2; j++)
  ------------------
  |  Branch (706:35): [True: 0, False: 0]
  ------------------
  707|      0|                    mdctSpectrum[index + j] = (FIXP_DBL)CBlock_GetEscape(
  708|      0|                        bs, (LONG)mdctSpectrum[index + j]);
  709|      0|                }
  710|   294k|              }
  711|   185k|              mdctSpectrum += granuleLength;
  712|   185k|            }
  713|   179k|          }
  714|   468k|        }
  715|   916k|      }
  716|   534k|      groupoffset += max_groupwin;
  717|   534k|    }
  718|       |    /* plain huffman decoding (short) finished */
  719|   305k|  }
  720|       |
  721|       |  /* HCR - Huffman Codeword Reordering  short */
  722|  8.73k|  else /* if ( flags & AC_ER_HCR ) */
  723|       |
  724|  8.73k|  {
  725|  8.73k|    H_HCR_INFO hHcr = &pAacDecoderChannelInfo->pComData->overlay.aac.erHcrInfo;
  726|       |
  727|  8.73k|    int hcrStatus = 0;
  728|       |
  729|       |    /* advanced Huffman decoding starts here (HCR decoding :) */
  730|  8.73k|    if (pAacDecoderChannelInfo->pDynData->specificTo.aac
  ------------------
  |  Branch (730:9): [True: 8.49k, False: 247]
  ------------------
  731|  8.73k|            .lenOfReorderedSpectralData != 0) {
  732|       |      /* HCR initialization short */
  733|  8.49k|      hcrStatus = HcrInit(hHcr, pAacDecoderChannelInfo, pSamplingRateInfo, bs);
  734|       |
  735|  8.49k|      if (hcrStatus != 0) {
  ------------------
  |  Branch (735:11): [True: 36, False: 8.45k]
  ------------------
  736|     36|        return AAC_DEC_DECODE_FRAME_ERROR;
  737|     36|      }
  738|       |
  739|       |      /* HCR decoding short */
  740|  8.45k|      hcrStatus =
  741|  8.45k|          HcrDecoder(hHcr, pAacDecoderChannelInfo, pSamplingRateInfo, bs);
  742|       |
  743|  8.45k|      if (hcrStatus != 0) {
  ------------------
  |  Branch (743:11): [True: 5.63k, False: 2.82k]
  ------------------
  744|  5.63k|#if HCR_ERROR_CONCEALMENT
  745|  5.63k|        HcrMuteErroneousLines(hHcr);
  746|       |#else
  747|       |        return AAC_DEC_DECODE_FRAME_ERROR;
  748|       |#endif /* HCR_ERROR_CONCEALMENT */
  749|  5.63k|      }
  750|       |
  751|  8.45k|      FDKpushFor(bs, pAacDecoderChannelInfo->pDynData->specificTo.aac
  752|  8.45k|                         .lenOfReorderedSpectralData);
  753|  8.45k|    }
  754|  8.73k|  }
  755|       |  /* HCR - Huffman Codeword Reordering short finished */
  756|       |
  757|   313k|  if (IsLongBlock(&pAacDecoderChannelInfo->icsInfo) &&
  ------------------
  |  Branch (757:7): [True: 257k, False: 56.1k]
  ------------------
  758|   257k|      !(flags & (AC_ELD | AC_SCALABLE))) {
  ------------------
  |  |  303|   257k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                    !(flags & (AC_ELD | AC_SCALABLE))) {
  ------------------
  |  |  302|   257k|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
  |  Branch (758:7): [True: 19.4k, False: 238k]
  ------------------
  759|       |    /* apply pulse data */
  760|  19.4k|    CPulseData_Apply(
  761|  19.4k|        &pAacDecoderChannelInfo->pDynData->specificTo.aac.PulseData,
  762|  19.4k|        GetScaleFactorBandOffsets(&pAacDecoderChannelInfo->icsInfo,
  763|  19.4k|                                  pSamplingRateInfo),
  764|  19.4k|        SPEC_LONG(pSpectralCoefficient));
  ------------------
  |  |  114|  19.4k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  765|  19.4k|  }
  766|       |
  767|   313k|  return AAC_DEC_OK;
  768|   313k|}
_Z17CBlock_ApplyNoiseP22CAacDecoderChannelInfoP16SamplingRateInfoPjPh:
  785|  10.2k|                       UCHAR *band_is_noise) {
  786|  10.2k|  const SHORT *swb_offset = GetScaleFactorBandOffsets(
  787|  10.2k|      &pAacDecoderChannelInfo->icsInfo, pSamplingRateInfo);
  788|  10.2k|  int g, win, gwin, sfb, noiseFillingStartOffset, nfStartOffset_sfb;
  789|       |
  790|       |  /* Obtain noise level and scale factor offset. */
  791|  10.2k|  int noise_level = pAacDecoderChannelInfo->pDynData->specificTo.usac
  792|  10.2k|                        .fd_noise_level_and_offset >>
  793|  10.2k|                    5;
  794|  10.2k|  const FIXP_SGL noiseVal_pos = noise_level_tab[noise_level];
  795|       |
  796|       |  /* noise_offset can change even when noise_level=0. Neccesary for IGF stereo
  797|       |   * filling */
  798|  10.2k|  const int noise_offset = (pAacDecoderChannelInfo->pDynData->specificTo.usac
  799|  10.2k|                                .fd_noise_level_and_offset &
  800|  10.2k|                            0x1f) -
  801|  10.2k|                           16;
  802|       |
  803|  10.2k|  int max_sfb =
  804|  10.2k|      GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  805|       |
  806|  10.2k|  noiseFillingStartOffset =
  807|  10.2k|      (GetWindowSequence(&pAacDecoderChannelInfo->icsInfo) == BLOCK_SHORT)
  ------------------
  |  Branch (807:7): [True: 6.51k, False: 3.70k]
  ------------------
  808|  10.2k|          ? 20
  809|  10.2k|          : 160;
  810|  10.2k|  if (pAacDecoderChannelInfo->granuleLength == 96) {
  ------------------
  |  Branch (810:7): [True: 2.86k, False: 7.36k]
  ------------------
  811|  2.86k|    noiseFillingStartOffset =
  812|  2.86k|        (3 * noiseFillingStartOffset) /
  813|  2.86k|        4; /* scale offset with 3/4 for coreCoderFrameLength == 768 */
  814|  2.86k|  }
  815|       |
  816|       |  /* determine sfb from where on noise filling is applied */
  817|   105k|  for (sfb = 0; swb_offset[sfb] < noiseFillingStartOffset; sfb++)
  ------------------
  |  Branch (817:17): [True: 95.1k, False: 10.2k]
  ------------------
  818|  95.1k|    ;
  819|  10.2k|  nfStartOffset_sfb = sfb;
  820|       |
  821|       |  /* if (noise_level!=0) */
  822|  10.2k|  {
  823|  55.5k|    for (g = 0, win = 0; g < GetWindowGroups(&pAacDecoderChannelInfo->icsInfo);
  ------------------
  |  Branch (823:26): [True: 45.3k, False: 10.2k]
  ------------------
  824|  45.3k|         g++) {
  825|  45.3k|      int windowGroupLength =
  826|  45.3k|          GetWindowGroupLength(&pAacDecoderChannelInfo->icsInfo, g);
  827|  51.5k|      for (sfb = nfStartOffset_sfb; sfb < max_sfb; sfb++) {
  ------------------
  |  Branch (827:37): [True: 6.23k, False: 45.3k]
  ------------------
  828|  6.23k|        int bin_start = swb_offset[sfb];
  829|  6.23k|        int bin_stop = swb_offset[sfb + 1];
  830|       |
  831|  6.23k|        int flagN = band_is_noise[g * 16 + sfb];
  832|       |
  833|       |        /* if all bins of one sfb in one window group are zero modify the scale
  834|       |         * factor by noise_offset */
  835|  6.23k|        if (flagN) {
  ------------------
  |  Branch (835:13): [True: 3.38k, False: 2.85k]
  ------------------
  836|       |          /* Change scaling factors for empty signal bands */
  837|  3.38k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[g * 16 + sfb] +=
  838|  3.38k|              noise_offset;
  839|       |          /* scale factor "sf" implied gain "g" is g = 2^(sf/4) */
  840|  7.27k|          for (gwin = 0; gwin < windowGroupLength; gwin++) {
  ------------------
  |  Branch (840:26): [True: 3.89k, False: 3.38k]
  ------------------
  841|  3.89k|            pAacDecoderChannelInfo->pDynData
  842|  3.89k|                ->aSfbScale[(win + gwin) * 16 + sfb] += (noise_offset >> 2);
  843|  3.89k|          }
  844|  3.38k|        }
  845|       |
  846|  6.23k|        ULONG seed = *nfRandomSeed;
  ------------------
  |  |  182|  6.23k|#define ULONG UINT
  ------------------
  847|       |        /* + 1 because exponent of MantissaTable[lsb][0] is always 1. */
  848|  6.23k|        int scale =
  849|  6.23k|            (pAacDecoderChannelInfo->pDynData->aScaleFactor[g * 16 + sfb] >>
  850|  6.23k|             2) +
  851|  6.23k|            1;
  852|  6.23k|        int lsb =
  853|  6.23k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[g * 16 + sfb] & 3;
  854|  6.23k|        FIXP_DBL mantissa = MantissaTable[lsb][0];
  855|       |
  856|  14.7k|        for (gwin = 0; gwin < windowGroupLength; gwin++) {
  ------------------
  |  Branch (856:24): [True: 8.47k, False: 6.23k]
  ------------------
  857|  8.47k|          FIXP_DBL *pSpec =
  858|  8.47k|              SPEC(pAacDecoderChannelInfo->pSpectralCoefficient, win + gwin,
  ------------------
  |  |  115|  8.47k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  859|  8.47k|                   pAacDecoderChannelInfo->granuleLength);
  860|       |
  861|  8.47k|          int scale1 = scale - pAacDecoderChannelInfo->pDynData
  862|  8.47k|                                   ->aSfbScale[(win + gwin) * 16 + sfb];
  863|  8.47k|          FIXP_DBL scaled_noiseVal_pos =
  864|  8.47k|              scaleValue(fMultDiv2(noiseVal_pos, mantissa), scale1);
  865|  8.47k|          FIXP_DBL scaled_noiseVal_neg = -scaled_noiseVal_pos;
  866|       |
  867|       |          /* If the whole band is zero, just fill without checking */
  868|  8.47k|          if (flagN) {
  ------------------
  |  Branch (868:15): [True: 3.89k, False: 4.57k]
  ------------------
  869|  67.5k|            for (int bin = bin_start; bin < bin_stop; bin++) {
  ------------------
  |  Branch (869:39): [True: 63.6k, False: 3.89k]
  ------------------
  870|  63.6k|              seed = (ULONG)(
  871|  63.6k|                  (UINT64)seed * 69069 +
  872|  63.6k|                  5); /* Inlined: UsacRandomSign - origin in usacdec_lpd.h */
  873|  63.6k|              pSpec[bin] =
  874|  63.6k|                  (seed & 0x10000) ? scaled_noiseVal_neg : scaled_noiseVal_pos;
  ------------------
  |  Branch (874:19): [True: 32.2k, False: 31.4k]
  ------------------
  875|  63.6k|            } /* for (bin...) */
  876|  3.89k|          }
  877|       |          /*If band is sparsely filled, check for 0 and fill */
  878|  4.57k|          else {
  879|  54.7k|            for (int bin = bin_start; bin < bin_stop; bin++) {
  ------------------
  |  Branch (879:39): [True: 50.2k, False: 4.57k]
  ------------------
  880|  50.2k|              if (pSpec[bin] == (FIXP_DBL)0) {
  ------------------
  |  Branch (880:19): [True: 36.6k, False: 13.5k]
  ------------------
  881|  36.6k|                seed = (ULONG)(
  882|  36.6k|                    (UINT64)seed * 69069 +
  883|  36.6k|                    5); /* Inlined: UsacRandomSign - origin in usacdec_lpd.h */
  884|  36.6k|                pSpec[bin] = (seed & 0x10000) ? scaled_noiseVal_neg
  ------------------
  |  Branch (884:30): [True: 18.9k, False: 17.7k]
  ------------------
  885|  36.6k|                                              : scaled_noiseVal_pos;
  886|  36.6k|              }
  887|  50.2k|            } /* for (bin...) */
  888|  4.57k|          }
  889|       |
  890|  8.47k|        } /* for (gwin...) */
  891|  6.23k|        *nfRandomSeed = seed;
  892|  6.23k|      } /* for (sfb...) */
  893|  45.3k|      win += windowGroupLength;
  894|  45.3k|    } /* for (g...) */
  895|       |
  896|  10.2k|  } /* ... */
  897|  10.2k|}
_Z25CBlock_ReadAcSpectralDataP13FDK_BITSTREAMP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoPK16SamplingRateInfojj:
  903|   246k|    const UINT flags) {
  904|   246k|  AAC_DECODER_ERROR errorAAC = AAC_DEC_OK;
  905|   246k|  ARITH_CODING_ERROR error = ARITH_CODER_OK;
  906|   246k|  int arith_reset_flag, lg, numWin, win, winLen;
  907|   246k|  const SHORT *RESTRICT BandOffsets;
  908|       |
  909|       |  /* number of transmitted spectral coefficients */
  910|   246k|  BandOffsets = GetScaleFactorBandOffsets(&pAacDecoderChannelInfo->icsInfo,
  911|   246k|                                          pSamplingRateInfo);
  912|   246k|  lg = BandOffsets[GetScaleFactorBandsTransmitted(
  913|   246k|      &pAacDecoderChannelInfo->icsInfo)];
  914|       |
  915|   246k|  numWin = GetWindowsPerFrame(&pAacDecoderChannelInfo->icsInfo);
  916|   246k|  winLen = (IsLongBlock(&pAacDecoderChannelInfo->icsInfo))
  ------------------
  |  Branch (916:12): [True: 191k, False: 54.8k]
  ------------------
  917|   246k|               ? (int)frame_length
  918|   246k|               : (int)frame_length / numWin;
  919|       |
  920|   246k|  if (flags & AC_INDEP) {
  ------------------
  |  |  319|   246k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
  |  Branch (920:7): [True: 184k, False: 61.8k]
  ------------------
  921|   184k|    arith_reset_flag = 1;
  922|   184k|  } else {
  923|  61.8k|    arith_reset_flag = (USHORT)FDKreadBits(hBs, 1);
  924|  61.8k|  }
  925|       |
  926|   873k|  for (win = 0; win < numWin; win++) {
  ------------------
  |  Branch (926:17): [True: 628k, False: 245k]
  ------------------
  927|   628k|    error =
  928|   628k|        CArco_DecodeArithData(pAacDecoderStaticChannelInfo->hArCo, hBs,
  929|   628k|                              SPEC(pAacDecoderChannelInfo->pSpectralCoefficient,
  ------------------
  |  |  115|   628k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
  930|   628k|                                   win, pAacDecoderChannelInfo->granuleLength),
  931|   628k|                              lg, winLen, arith_reset_flag && (win == 0));
  ------------------
  |  Branch (931:43): [True: 536k, False: 92.4k]
  |  Branch (931:63): [True: 189k, False: 346k]
  ------------------
  932|   628k|    if (error != ARITH_CODER_OK) {
  ------------------
  |  Branch (932:9): [True: 985, False: 627k]
  ------------------
  933|    985|      goto bail;
  934|    985|    }
  935|   628k|  }
  936|       |
  937|   246k|bail:
  938|   246k|  if (error == ARITH_CODER_ERROR) {
  ------------------
  |  Branch (938:7): [True: 985, False: 245k]
  ------------------
  939|    985|    errorAAC = AAC_DEC_PARSE_ERROR;
  940|    985|  }
  941|       |
  942|   246k|  return errorAAC;
  943|   246k|}
_Z10ApplyToolsPP22CAacDecoderChannelInfoPK16SamplingRateInfojjii:
  948|   504k|                const int common_window) {
  949|   504k|  if (!(flags & (AC_USAC | AC_RSVD50 | AC_MPEGD_RES | AC_RSV603DA))) {
  ------------------
  |  |  307|   504k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                if (!(flags & (AC_USAC | AC_RSVD50 | AC_MPEGD_RES | AC_RSV603DA))) {
  ------------------
  |  |  310|   504k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                if (!(flags & (AC_USAC | AC_RSVD50 | AC_MPEGD_RES | AC_RSV603DA))) {
  ------------------
  |  |  320|   504k|#define AC_MPEGD_RES 0x200000 /*!< MPEG-D residual individual channel data. */
  ------------------
                if (!(flags & (AC_USAC | AC_RSVD50 | AC_MPEGD_RES | AC_RSV603DA))) {
  ------------------
  |  |  308|   504k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (949:7): [True: 306k, False: 198k]
  ------------------
  950|   306k|    CPns_Apply(&pAacDecoderChannelInfo[channel]->data.aac.PnsData,
  951|   306k|               &pAacDecoderChannelInfo[channel]->icsInfo,
  952|   306k|               pAacDecoderChannelInfo[channel]->pSpectralCoefficient,
  953|   306k|               pAacDecoderChannelInfo[channel]->specScale,
  954|   306k|               pAacDecoderChannelInfo[channel]->pDynData->aScaleFactor,
  955|   306k|               pSamplingRateInfo,
  956|   306k|               pAacDecoderChannelInfo[channel]->granuleLength, channel);
  957|   306k|  }
  958|       |
  959|   504k|  UCHAR nbands =
  960|   504k|      GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo[channel]->icsInfo);
  961|       |
  962|   504k|  CTns_Apply(&pAacDecoderChannelInfo[channel]->pDynData->TnsData,
  963|   504k|             &pAacDecoderChannelInfo[channel]->icsInfo,
  964|   504k|             pAacDecoderChannelInfo[channel]->pSpectralCoefficient,
  965|   504k|             pSamplingRateInfo, pAacDecoderChannelInfo[channel]->granuleLength,
  966|   504k|             nbands, (elFlags & AC_EL_ENHANCED_NOISE) ? 1 : 0, flags);
  ------------------
  |  |  353|   504k|#define AC_EL_ENHANCED_NOISE 0x000080   /*!< Enhanced noise filling*/
  ------------------
  |  Branch (966:22): [True: 0, False: 504k]
  ------------------
  967|   504k|}
_Z8get_gainPKiS0_i:
  980|   232k|FIXP_DBL get_gain(const FIXP_DBL *x, const FIXP_DBL *y, int n) {
  981|   232k|  FIXP_DBL corr = (FIXP_DBL)0;
  982|   232k|  FIXP_DBL ener = (FIXP_DBL)1;
  983|       |
  984|   232k|  int headroom_x = getScalefactor(x, n);
  985|   232k|  int headroom_y = getScalefactor(y, n);
  986|       |
  987|       |  /*Calculate the normalization necessary due to addition*/
  988|       |  /* Check for power of two /special case */
  989|   232k|  INT width_shift = (INT)(fNormz((FIXP_DBL)n));
  990|       |  /* Get the number of bits necessary minus one, because we need one sign bit
  991|       |   * only */
  992|   232k|  width_shift = 31 - width_shift;
  993|       |
  994|  15.0M|  for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (994:19): [True: 14.8M, False: 232k]
  ------------------
  995|  14.8M|    corr +=
  996|  14.8M|        fMultDiv2((x[i] << headroom_x), (y[i] << headroom_y)) >> width_shift;
  997|  14.8M|    ener += fPow2Div2((y[i] << headroom_y)) >> width_shift;
  998|  14.8M|  }
  999|       |
 1000|   232k|  int exp_corr = (17 - headroom_x) + (17 - headroom_y) + width_shift + 1;
 1001|   232k|  int exp_ener = ((17 - headroom_y) << 1) + width_shift + 1;
 1002|       |
 1003|   232k|  int temp_exp = 0;
 1004|   232k|  FIXP_DBL output = fDivNormSigned(corr, ener, &temp_exp);
 1005|       |
 1006|   232k|  int output_exp = (exp_corr - exp_ener) + temp_exp;
 1007|       |
 1008|   232k|  INT output_shift = 17 - output_exp;
 1009|   232k|  output_shift = fMin(output_shift, 31);
 1010|       |
 1011|   232k|  output = scaleValue(output, -output_shift);
 1012|       |
 1013|   232k|  return output;
 1014|   232k|}
_Z22CBlock_FrequencyToTimeP28CAacDecoderStaticChannelInfoP22CAacDecoderChannelInfoPisiS3_iji:
 1020|   336k|    const INT aacOutDataHeadroom, UINT elFlags, INT elCh) {
 1021|   336k|  int fr, fl, tl, nSpec;
 1022|       |
 1023|   336k|#if defined(FDK_ASSERT_ENABLE)
 1024|   336k|  LONG nSamples;
  ------------------
  |  |  181|   336k|#define LONG INT
  ------------------
 1025|   336k|#endif
 1026|       |
 1027|       |  /* Determine left slope length (fl), right slope length (fr) and transform
 1028|       |     length (tl). USAC: The slope length may mismatch with the previous frame in
 1029|       |     case of LPD / FD transitions. The adjustment is handled by the imdct
 1030|       |     implementation.
 1031|       |  */
 1032|   336k|  tl = frameLen;
 1033|   336k|  nSpec = 1;
 1034|       |
 1035|   336k|  switch (pAacDecoderChannelInfo->icsInfo.WindowSequence) {
 1036|      0|    default:
  ------------------
  |  Branch (1036:5): [True: 0, False: 336k]
  ------------------
 1037|   165k|    case BLOCK_LONG:
  ------------------
  |  Branch (1037:5): [True: 165k, False: 170k]
  ------------------
 1038|   165k|      fl = frameLen;
 1039|   165k|      fr = frameLen -
 1040|   165k|           getWindow2Nr(frameLen,
 1041|   165k|                        GetWindowShape(&pAacDecoderChannelInfo->icsInfo));
 1042|       |      /* New startup needs differentiation between sine shape and low overlap
 1043|       |         shape. This is a special case for the LD-AAC transformation windows,
 1044|       |         because the slope length can be different while using the same window
 1045|       |         sequence. */
 1046|   165k|      if (pAacDecoderStaticChannelInfo->IMdct.prev_tl == 0) {
  ------------------
  |  Branch (1046:11): [True: 14.7k, False: 151k]
  ------------------
 1047|  14.7k|        fl = fr;
 1048|  14.7k|      }
 1049|   165k|      break;
 1050|  24.2k|    case BLOCK_STOP:
  ------------------
  |  Branch (1050:5): [True: 24.2k, False: 312k]
  ------------------
 1051|  24.2k|      fl = frameLen >> 3;
 1052|  24.2k|      fr = frameLen;
 1053|  24.2k|      break;
 1054|  37.2k|    case BLOCK_START: /* or StopStartSequence */
  ------------------
  |  Branch (1054:5): [True: 37.2k, False: 299k]
  ------------------
 1055|  37.2k|      fl = frameLen;
 1056|  37.2k|      fr = frameLen >> 3;
 1057|  37.2k|      break;
 1058|   109k|    case BLOCK_SHORT:
  ------------------
  |  Branch (1058:5): [True: 109k, False: 227k]
  ------------------
 1059|   109k|      fl = fr = frameLen >> 3;
 1060|   109k|      tl >>= 3;
 1061|   109k|      nSpec = 8;
 1062|   109k|      break;
 1063|   336k|  }
 1064|       |
 1065|   336k|  {
 1066|   336k|    int last_frame_lost = pAacDecoderStaticChannelInfo->last_lpc_lost;
 1067|       |
 1068|   336k|    if (pAacDecoderStaticChannelInfo->last_core_mode == LPD) {
  ------------------
  |  Branch (1068:9): [True: 21.5k, False: 315k]
  ------------------
 1069|  21.5k|      INT fac_FB = 1;
 1070|  21.5k|      if (elFlags & AC_EL_FULLBANDLPD) {
  ------------------
  |  |  357|  21.5k|#define AC_EL_FULLBANDLPD 0x000800      /*!< enable fullband LPD tools */
  ------------------
  |  Branch (1070:11): [True: 0, False: 21.5k]
  ------------------
 1071|      0|        fac_FB = 2;
 1072|      0|      }
 1073|       |
 1074|  21.5k|      FIXP_DBL *synth;
 1075|       |
 1076|       |      /* Keep some free space at the beginning of the buffer. To be used for
 1077|       |       * past data */
 1078|  21.5k|      if (!(elFlags & AC_EL_LPDSTEREOIDX)) {
  ------------------
  |  |  358|  21.5k|#define AC_EL_LPDSTEREOIDX 0x001000     /*!< LPD-stereo-tool stereo index */
  ------------------
  |  Branch (1078:11): [True: 21.5k, False: 0]
  ------------------
 1079|  21.5k|        synth = pWorkBuffer1 + ((PIT_MAX_MAX - (1 * L_SUBFR)) * fac_FB);
  ------------------
  |  |  142|  21.5k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  21.5k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  21.5k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  21.5k|   (6 *                                                                        \
  |  |  |  |  136|  21.5k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  21.5k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  21.5k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  21.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  21.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  21.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  21.5k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  21.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      synth = pWorkBuffer1 + ((PIT_MAX_MAX - (1 * L_SUBFR)) * fac_FB);
  ------------------
  |  |  146|  21.5k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1080|  21.5k|      } else {
 1081|      0|        synth = pWorkBuffer1 + PIT_MAX_MAX * fac_FB;
  ------------------
  |  |  142|      0|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|      0|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|      0|   (6 *                                                                        \
  |  |  |  |  136|      0|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|      0|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|      0|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|      0|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|      0|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1082|      0|      }
 1083|       |
 1084|  21.5k|      int fac_length =
 1085|  21.5k|          (pAacDecoderChannelInfo->icsInfo.WindowSequence == BLOCK_SHORT)
  ------------------
  |  Branch (1085:11): [True: 13.7k, False: 7.76k]
  ------------------
 1086|  21.5k|              ? (frameLen >> 4)
 1087|  21.5k|              : (frameLen >> 3);
 1088|       |
 1089|  21.5k|      INT pitch[NB_SUBFR_SUPERFR + SYN_SFD];
 1090|  21.5k|      FIXP_DBL pit_gain[NB_SUBFR_SUPERFR + SYN_SFD];
 1091|       |
 1092|  21.5k|      int nbDiv = (elFlags & AC_EL_FULLBANDLPD) ? 2 : 4;
  ------------------
  |  |  357|  21.5k|#define AC_EL_FULLBANDLPD 0x000800      /*!< enable fullband LPD tools */
  ------------------
  |  Branch (1092:19): [True: 0, False: 21.5k]
  ------------------
 1093|  21.5k|      int lFrame = (elFlags & AC_EL_FULLBANDLPD) ? frameLen / 2 : frameLen;
  ------------------
  |  |  357|  21.5k|#define AC_EL_FULLBANDLPD 0x000800      /*!< enable fullband LPD tools */
  ------------------
  |  Branch (1093:20): [True: 0, False: 21.5k]
  ------------------
 1094|  21.5k|      int nbSubfr =
 1095|  21.5k|          lFrame / (nbDiv * L_SUBFR); /* number of subframes per division */
  ------------------
  |  |  146|  21.5k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1096|  21.5k|      int LpdSfd = (nbDiv * nbSubfr) >> 1;
 1097|  21.5k|      int SynSfd = LpdSfd - BPF_SFD;
  ------------------
  |  |  147|  21.5k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  ------------------
 1098|       |
 1099|  21.5k|      FDKmemclear(
 1100|  21.5k|          pitch,
 1101|  21.5k|          sizeof(
 1102|  21.5k|              pitch));  // added to prevent ferret errors in bass_pf_1sf_delay
 1103|  21.5k|      FDKmemclear(pit_gain, sizeof(pit_gain));
 1104|       |
 1105|       |      /* FAC case */
 1106|  21.5k|      if (pAacDecoderStaticChannelInfo->last_lpd_mode == 0 ||
  ------------------
  |  Branch (1106:11): [True: 16.4k, False: 5.04k]
  ------------------
 1107|  16.4k|          pAacDecoderStaticChannelInfo->last_lpd_mode == 4) {
  ------------------
  |  Branch (1107:11): [True: 4, False: 5.04k]
  ------------------
 1108|  16.4k|        FIXP_DBL fac_buf[LFAC];
 1109|  16.4k|        FIXP_LPC *A = pAacDecoderChannelInfo->data.usac.lp_coeff[0];
 1110|       |
 1111|  16.4k|        if (!frameOk || last_frame_lost ||
  ------------------
  |  Branch (1111:13): [True: 0, False: 16.4k]
  |  Branch (1111:25): [True: 6, False: 16.4k]
  ------------------
 1112|  16.4k|            (pAacDecoderChannelInfo->data.usac.fac_data[0] == NULL)) {
  ------------------
  |  Branch (1112:13): [True: 0, False: 16.4k]
  ------------------
 1113|      6|          FDKmemclear(fac_buf,
 1114|      6|                      pAacDecoderChannelInfo->granuleLength * sizeof(FIXP_DBL));
 1115|      6|          pAacDecoderChannelInfo->data.usac.fac_data[0] = fac_buf;
 1116|      6|          pAacDecoderChannelInfo->data.usac.fac_data_e[0] = 0;
 1117|      6|        }
 1118|       |
 1119|  16.4k|        INT A_exp; /* linear prediction coefficients exponent */
 1120|  16.4k|        {
 1121|   280k|          for (int i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   280k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1121:27): [True: 263k, False: 16.4k]
  ------------------
 1122|   263k|            A[i] = FX_DBL2FX_LPC(fixp_cos(
  ------------------
  |  |  129|   263k|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  1.05M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   263k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   263k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 263k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 263k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1123|   263k|                fMult(pAacDecoderStaticChannelInfo->lpc4_lsf[i],
 1124|   263k|                      FL2FXCONST_SGL((1 << LSPARG_SCALE) * M_PI / 6400.0)),
 1125|   263k|                LSF_SCALE - LSPARG_SCALE));
 1126|   263k|          }
 1127|       |
 1128|  16.4k|          E_LPC_f_lsp_a_conversion(A, A, &A_exp);
 1129|  16.4k|        }
 1130|       |
 1131|  16.4k|#if defined(FDK_ASSERT_ENABLE)
 1132|  16.4k|        nSamples =
 1133|  16.4k|#endif
 1134|  16.4k|            CLpd_FAC_Acelp2Mdct(
 1135|  16.4k|                &pAacDecoderStaticChannelInfo->IMdct, synth,
 1136|  16.4k|                SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient),
  ------------------
  |  |  114|  16.4k|#define SPEC_LONG(ptr) (ptr)
  ------------------
 1137|  16.4k|                pAacDecoderChannelInfo->specScale, nSpec,
 1138|  16.4k|                pAacDecoderChannelInfo->data.usac.fac_data[0],
 1139|  16.4k|                pAacDecoderChannelInfo->data.usac.fac_data_e[0], fac_length,
 1140|  16.4k|                frameLen, tl,
 1141|  16.4k|                FDKgetWindowSlope(
 1142|  16.4k|                    fr, GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1143|  16.4k|                fr, A, A_exp, &pAacDecoderStaticChannelInfo->acelp,
 1144|  16.4k|                (FIXP_DBL)0, /* FAC gain has already been applied. */
 1145|  16.4k|                (last_frame_lost || !frameOk), 1,
  ------------------
  |  Branch (1145:18): [True: 6, False: 16.4k]
  |  Branch (1145:37): [True: 0, False: 16.4k]
  ------------------
 1146|  16.4k|                pAacDecoderStaticChannelInfo->last_lpd_mode, 0,
 1147|  16.4k|                pAacDecoderChannelInfo->currAliasingSymmetry);
 1148|       |
 1149|  16.4k|      } else {
 1150|  5.04k|#if defined(FDK_ASSERT_ENABLE)
 1151|  5.04k|        nSamples =
 1152|  5.04k|#endif
 1153|  5.04k|            imlt_block(
 1154|  5.04k|                &pAacDecoderStaticChannelInfo->IMdct, synth,
 1155|  5.04k|                SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient),
  ------------------
  |  |  114|  5.04k|#define SPEC_LONG(ptr) (ptr)
  ------------------
 1156|  5.04k|                pAacDecoderChannelInfo->specScale, nSpec, frameLen, tl,
 1157|  5.04k|                FDKgetWindowSlope(
 1158|  5.04k|                    fl, GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1159|  5.04k|                fl,
 1160|  5.04k|                FDKgetWindowSlope(
 1161|  5.04k|                    fr, GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1162|  5.04k|                fr, (FIXP_DBL)0,
 1163|  5.04k|                pAacDecoderChannelInfo->currAliasingSymmetry
  ------------------
  |  Branch (1163:17): [True: 0, False: 5.04k]
  ------------------
 1164|  5.04k|                    ? MLT_FLAG_CURR_ALIAS_SYMMETRY
  ------------------
  |  |  122|      0|#define MLT_FLAG_CURR_ALIAS_SYMMETRY 1
  ------------------
 1165|  5.04k|                    : 0);
 1166|  5.04k|      }
 1167|  21.5k|      FDK_ASSERT(nSamples == frameLen);
  ------------------
  |  |  221|  21.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1167:7): [True: 21.5k, False: 0]
  ------------------
 1168|       |
 1169|       |      /* The "if" clause is entered both for fullbandLpd mono and
 1170|       |       * non-fullbandLpd*. The "else"-> just for fullbandLpd stereo*/
 1171|  21.5k|      if (!(elFlags & AC_EL_LPDSTEREOIDX)) {
  ------------------
  |  |  358|  21.5k|#define AC_EL_LPDSTEREOIDX 0x001000     /*!< LPD-stereo-tool stereo index */
  ------------------
  |  Branch (1171:11): [True: 21.5k, False: 0]
  ------------------
 1172|  21.5k|        FDKmemcpy(pitch, pAacDecoderStaticChannelInfo->old_T_pf,
 1173|  21.5k|                  SynSfd * sizeof(INT));
 1174|  21.5k|        FDKmemcpy(pit_gain, pAacDecoderStaticChannelInfo->old_gain_pf,
 1175|  21.5k|                  SynSfd * sizeof(FIXP_DBL));
 1176|       |
 1177|   107k|        for (int i = SynSfd; i < LpdSfd + 3; i++) {
  ------------------
  |  Branch (1177:30): [True: 86.1k, False: 21.5k]
  ------------------
 1178|  86.1k|          pitch[i] = L_SUBFR;
  ------------------
  |  |  146|  86.1k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1179|  86.1k|          pit_gain[i] = (FIXP_DBL)0;
 1180|  86.1k|        }
 1181|       |
 1182|  21.5k|        if (pAacDecoderStaticChannelInfo->last_lpd_mode == 0) {
  ------------------
  |  Branch (1182:13): [True: 16.4k, False: 5.04k]
  ------------------
 1183|  16.4k|          pitch[SynSfd] = pitch[SynSfd - 1];
 1184|  16.4k|          pit_gain[SynSfd] = pit_gain[SynSfd - 1];
 1185|  16.4k|          if (IsLongBlock(&pAacDecoderChannelInfo->icsInfo)) {
  ------------------
  |  Branch (1185:15): [True: 3.51k, False: 12.9k]
  ------------------
 1186|  3.51k|            pitch[SynSfd + 1] = pitch[SynSfd];
 1187|  3.51k|            pit_gain[SynSfd + 1] = pit_gain[SynSfd];
 1188|  3.51k|          }
 1189|  16.4k|        }
 1190|       |
 1191|       |        /* Copy old data to the beginning of the buffer */
 1192|  21.5k|        {
 1193|  21.5k|          FDKmemcpy(
 1194|  21.5k|              pWorkBuffer1, pAacDecoderStaticChannelInfo->old_synth,
 1195|  21.5k|              ((PIT_MAX_MAX - (1 * L_SUBFR)) * fac_FB) * sizeof(FIXP_DBL));
  ------------------
  |  |  142|  21.5k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  21.5k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  21.5k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  21.5k|   (6 *                                                                        \
  |  |  |  |  136|  21.5k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  21.5k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  21.5k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  21.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  21.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  21.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  21.5k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  21.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                            ((PIT_MAX_MAX - (1 * L_SUBFR)) * fac_FB) * sizeof(FIXP_DBL));
  ------------------
  |  |  146|  21.5k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1196|  21.5k|        }
 1197|       |
 1198|  21.5k|        FIXP_DBL *p2_synth = pWorkBuffer1 + (PIT_MAX_MAX * fac_FB);
  ------------------
  |  |  142|  21.5k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  21.5k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  21.5k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  21.5k|   (6 *                                                                        \
  |  |  |  |  136|  21.5k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  21.5k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  21.5k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  21.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  21.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  21.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  21.5k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  21.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|       |
 1200|       |        /* recalculate pitch gain to allow postfilering on FAC area */
 1201|   197k|        for (int i = 0; i < SynSfd + 2; i++) {
  ------------------
  |  Branch (1201:25): [True: 175k, False: 21.5k]
  ------------------
 1202|   175k|          int T = pitch[i];
 1203|   175k|          FIXP_DBL gain = pit_gain[i];
 1204|       |
 1205|   175k|          if (gain > (FIXP_DBL)0) {
  ------------------
  |  Branch (1205:15): [True: 78.3k, False: 97.5k]
  ------------------
 1206|  78.3k|            gain = get_gain(&p2_synth[i * L_SUBFR * fac_FB],
  ------------------
  |  |  146|  78.3k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1207|  78.3k|                            &p2_synth[(i * L_SUBFR * fac_FB) - fac_FB * T],
  ------------------
  |  |  146|  78.3k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1208|  78.3k|                            L_SUBFR * fac_FB);
  ------------------
  |  |  146|  78.3k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1209|  78.3k|            pit_gain[i] = gain;
 1210|  78.3k|          }
 1211|   175k|        }
 1212|       |
 1213|  21.5k|        bass_pf_1sf_delay(p2_synth, pitch, pit_gain, frameLen,
 1214|  21.5k|                          (LpdSfd + 2) * L_SUBFR + BPF_SFD * L_SUBFR,
  ------------------
  |  |  146|  21.5k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
                                        (LpdSfd + 2) * L_SUBFR + BPF_SFD * L_SUBFR,
  ------------------
  |  |  147|  21.5k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  ------------------
                                        (LpdSfd + 2) * L_SUBFR + BPF_SFD * L_SUBFR,
  ------------------
  |  |  146|  21.5k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1215|  21.5k|                          frameLen - (LpdSfd + 4) * L_SUBFR, outSamples,
  ------------------
  |  |  146|  21.5k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1216|  21.5k|                          aacOutDataHeadroom,
 1217|  21.5k|                          pAacDecoderStaticChannelInfo->mem_bpf);
 1218|  21.5k|      }
 1219|       |
 1220|  21.5k|    } else /* last_core_mode was not LPD */
 1221|   315k|    {
 1222|   315k|      FIXP_DBL *tmp =
 1223|   315k|          pAacDecoderChannelInfo->pComStaticData->pWorkBufferCore1->mdctOutTemp;
 1224|   315k|#if defined(FDK_ASSERT_ENABLE)
 1225|   315k|      nSamples =
 1226|   315k|#endif
 1227|   315k|          imlt_block(&pAacDecoderStaticChannelInfo->IMdct, tmp,
 1228|   315k|                     SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient),
  ------------------
  |  |  114|   315k|#define SPEC_LONG(ptr) (ptr)
  ------------------
 1229|   315k|                     pAacDecoderChannelInfo->specScale, nSpec, frameLen, tl,
 1230|   315k|                     FDKgetWindowSlope(
 1231|   315k|                         fl, GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1232|   315k|                     fl,
 1233|   315k|                     FDKgetWindowSlope(
 1234|   315k|                         fr, GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1235|   315k|                     fr, (FIXP_DBL)0,
 1236|   315k|                     pAacDecoderChannelInfo->currAliasingSymmetry
  ------------------
  |  Branch (1236:22): [True: 0, False: 315k]
  ------------------
 1237|   315k|                         ? MLT_FLAG_CURR_ALIAS_SYMMETRY
  ------------------
  |  |  122|      0|#define MLT_FLAG_CURR_ALIAS_SYMMETRY 1
  ------------------
 1238|   315k|                         : 0);
 1239|       |
 1240|   315k|      scaleValuesSaturate(outSamples, tmp, frameLen,
 1241|   315k|                          MDCT_OUT_HEADROOM - aacOutDataHeadroom);
  ------------------
  |  |  108|   315k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  ------------------
 1242|   315k|    }
 1243|   336k|  }
 1244|       |
 1245|   336k|  FDK_ASSERT(nSamples == frameLen);
  ------------------
  |  |  221|   336k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1245:3): [True: 336k, False: 0]
  ------------------
 1246|       |
 1247|   336k|  pAacDecoderStaticChannelInfo->last_core_mode =
 1248|   336k|      (pAacDecoderChannelInfo->icsInfo.WindowSequence == BLOCK_SHORT) ? FD_SHORT
  ------------------
  |  Branch (1248:7): [True: 109k, False: 227k]
  ------------------
 1249|   336k|                                                                      : FD_LONG;
 1250|   336k|  pAacDecoderStaticChannelInfo->last_lpd_mode = 255;
 1251|   336k|}
_Z30CBlock_FrequencyToTimeLowDelayP28CAacDecoderStaticChannelInfoP22CAacDecoderChannelInfoPis:
 1257|   222k|    const short frameLen) {
 1258|   222k|  InvMdctTransformLowDelay_fdk(
 1259|   222k|      SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient),
  ------------------
  |  |  114|   222k|#define SPEC_LONG(ptr) (ptr)
  ------------------
 1260|   222k|      pAacDecoderChannelInfo->specScale[0], outSamples,
 1261|   222k|      pAacDecoderStaticChannelInfo->pOverlapBuffer, frameLen);
 1262|   222k|}
block.cpp:_ZL8maxabs_DPKii:
  472|  2.50M|                                const int noLines) {
  473|       |  /* Find max spectral line value of the current sfb */
  474|  2.50M|  FIXP_DBL locMax = (FIXP_DBL)0;
  475|  2.50M|  int i;
  476|       |
  477|  2.50M|  DWORD_ALIGNED(pSpectralCoefficient);
  ------------------
  |  |  291|  2.50M|#define DWORD_ALIGNED(x) C_ALLOC_ALIGNED_CHECK2((const void *)(x), 4);
  ------------------
  478|       |
  479|  23.6M|  for (i = noLines; i-- > 0;) {
  ------------------
  |  Branch (479:21): [True: 21.1M, False: 2.50M]
  ------------------
  480|       |    /* Expensive memory access */
  481|  21.1M|    locMax = fMax(fixp_abs(pSpectralCoefficient[i]), locMax);
  ------------------
  |  |  305|  21.1M|#define fixp_abs(x) fAbs(x)
  ------------------
  482|  21.1M|  }
  483|       |
  484|  2.50M|  return locMax;
  485|  2.50M|}
block.cpp:_ZL19InverseQuantizeBandPiPKiS1_PKaii:
  439|  1.37M|    const SCHAR *RESTRICT ExponentTabler, INT noLines, INT scale) {
  440|  1.37M|  scale = scale + 1; /* +1 to compensate fMultDiv2 shift-right in loop */
  441|       |
  442|  1.37M|  FIXP_DBL *RESTRICT ptr = spectrum;
  443|  1.37M|  FIXP_DBL signedValue;
  444|       |
  445|  10.2M|  for (INT i = noLines; i--;) {
  ------------------
  |  Branch (445:25): [True: 8.91M, False: 1.37M]
  ------------------
  446|  8.91M|    if ((signedValue = *ptr++) != FL2FXCONST_DBL(0)) {
  ------------------
  |  |  192|  8.91M|  (FIXP_DBL)(                                                                \
  |  |  193|  8.91M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 8.91M, Folded]
  |  |  ------------------
  |  |  194|  8.91M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  8.91M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.91M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 8.91M]
  |  |  ------------------
  |  |  195|  8.91M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  8.91M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  8.91M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  8.91M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  8.91M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.91M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  8.91M|          : ((((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 (446:9): [True: 4.12M, False: 4.78M]
  ------------------
  447|  4.12M|      FIXP_DBL value = fAbs(signedValue);
  448|  4.12M|      UINT freeBits = CntLeadingZeros(value);
  ------------------
  |  |  308|  4.12M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  449|  4.12M|      UINT exponent = 32 - freeBits;
  450|       |
  451|  4.12M|      UINT x = (UINT)(LONG)value << (INT)freeBits;
  452|  4.12M|      x <<= 1; /* shift out sign bit to avoid masking later on */
  453|  4.12M|      UINT tableIndex = x >> 24;
  454|  4.12M|      x = (x >> 20) & 0x0F;
  455|       |
  456|  4.12M|      UINT r0 = (UINT)(LONG)InverseQuantTabler[tableIndex + 0];
  457|  4.12M|      UINT r1 = (UINT)(LONG)InverseQuantTabler[tableIndex + 1];
  458|  4.12M|      UINT temp = (r1 - r0) * x + (r0 << 4);
  459|       |
  460|  4.12M|      value = fMultDiv2((FIXP_DBL)temp, MantissaTabler[exponent]);
  461|       |
  462|       |      /* + 1 compensates fMultDiv2() */
  463|  4.12M|      scaleValueInPlace(&value, scale + ExponentTabler[exponent]);
  464|       |
  465|  4.12M|      signedValue = (signedValue < (FIXP_DBL)0) ? -value : value;
  ------------------
  |  Branch (465:21): [True: 2.34M, False: 1.78M]
  ------------------
  466|  4.12M|      ptr[-1] = signedValue;
  467|  4.12M|    }
  468|  8.91M|  }
  469|  1.37M|}
block.cpp:_ZL12getWindow2Nrii:
  969|   165k|static int getWindow2Nr(int length, int shape) {
  970|   165k|  int nr = 0;
  971|       |
  972|   165k|  if (shape == 2) {
  ------------------
  |  Branch (972:7): [True: 54, False: 165k]
  ------------------
  973|       |    /* Low Overlap, 3/4 zeroed */
  974|     54|    nr = (length * 3) >> 2;
  975|     54|  }
  976|       |
  977|   165k|  return nr;
  978|   165k|}

_Z24CBlock_DecodeHuffmanWordP13FDK_BITSTREAMPK19CodeBookDescription:
  303|  99.3k|{
  304|  99.3k|  UINT val;
  305|  99.3k|  UINT index = 0;
  306|  99.3k|  const USHORT(*CodeBook)[HuffmanEntries] = hcb->CodeBook;
  307|       |
  308|   157k|  while (1) {
  ------------------
  |  Branch (308:10): [True: 157k, Folded]
  ------------------
  309|   157k|    val = CodeBook[index]
  310|   157k|                  [FDKreadBits(bs, HuffmanBits)]; /* Expensive memory access */
  311|       |
  312|   157k|    if ((val & 1) == 0) {
  ------------------
  |  Branch (312:9): [True: 57.7k, False: 99.3k]
  ------------------
  313|  57.7k|      index = val >> 2;
  314|  57.7k|      continue;
  315|  99.3k|    } else {
  316|  99.3k|      if (val & 2) {
  ------------------
  |  Branch (316:11): [True: 79.1k, False: 20.1k]
  ------------------
  317|  79.1k|        FDKpushBackCache(bs, 1);
  318|  79.1k|      }
  319|       |
  320|  99.3k|      val >>= 2;
  321|  99.3k|      break;
  322|  99.3k|    }
  323|   157k|  }
  324|       |
  325|  99.3k|  return val;
  326|  99.3k|}
_Z26CBlock_DecodeHuffmanWordCBP13FDK_BITSTREAMPA4_Kt:
  331|  2.74M|{
  332|  2.74M|  UINT index = 0;
  333|       |
  334|  4.53M|  while (1) {
  ------------------
  |  Branch (334:10): [True: 4.53M, Folded]
  ------------------
  335|  4.53M|    index = CodeBook[index][FDKread2Bits(bs)]; /* Expensive memory access */
  336|  4.53M|    if (index & 1) break;
  ------------------
  |  Branch (336:9): [True: 2.74M, False: 1.79M]
  ------------------
  337|  1.79M|    index >>= 2;
  338|  1.79M|  }
  339|  2.74M|  if (index & 2) {
  ------------------
  |  Branch (339:7): [True: 2.15M, False: 587k]
  ------------------
  340|  2.15M|    FDKpushBackCache(bs, 1);
  341|  2.15M|  }
  342|  2.74M|  return index >> 2;
  343|  2.74M|}
aacdec_hcr.cpp:_ZL17GetScaleFromValueij:
  283|   163k|FDK_INLINE int GetScaleFromValue(FIXP_DBL value, unsigned int lsb) {
  284|   163k|  if (value != (FIXP_DBL)0) {
  ------------------
  |  Branch (284:7): [True: 39.7k, False: 123k]
  ------------------
  285|  39.7k|    int scale = EvaluatePower43(&value, lsb);
  286|  39.7k|    return CntLeadingZeros(value) - scale - 2;
  ------------------
  |  |  308|  39.7k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  287|  39.7k|  } else
  288|   123k|    return 0; /* Return zero, because its useless to scale a zero value, saves
  289|       |                 workload and avoids scaling overshifts. */
  290|   163k|}
aacdec_hcr.cpp:_ZL15EvaluatePower43Pij:
  247|  39.7k|int EvaluatePower43(FIXP_DBL *pValue, UINT lsb) {
  248|  39.7k|  FIXP_DBL value;
  249|  39.7k|  UINT freeBits;
  250|  39.7k|  UINT exponent;
  251|       |
  252|  39.7k|  value = *pValue;
  253|  39.7k|  freeBits = fNormz(value);
  254|  39.7k|  exponent = DFRACT_BITS - freeBits;
  ------------------
  |  |  113|  39.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  255|  39.7k|  FDK_ASSERT(exponent < 14);
  ------------------
  |  |  221|  39.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (255:3): [True: 39.7k, False: 0]
  ------------------
  256|       |
  257|  39.7k|  UINT x = (((int)value << freeBits) >> 19);
  258|  39.7k|  UINT tableIndex = (x & 0x0FFF) >> 4;
  259|  39.7k|  FIXP_DBL invQVal;
  260|       |
  261|  39.7k|  x = x & 0x0F;
  262|       |
  263|  39.7k|  UINT r0 = (LONG)InverseQuantTable[tableIndex + 0];
  264|  39.7k|  UINT r1 = (LONG)InverseQuantTable[tableIndex + 1];
  265|  39.7k|  USHORT nx = 16 - x;
  266|  39.7k|  UINT temp = (r0)*nx + (r1)*x;
  267|  39.7k|  invQVal = (FIXP_DBL)temp;
  268|       |
  269|  39.7k|  FDK_ASSERT(lsb < 4);
  ------------------
  |  |  221|  39.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (269:3): [True: 39.7k, False: 0]
  ------------------
  270|  39.7k|  *pValue = fMultDiv2(invQVal, MantissaTable[lsb][exponent]);
  271|       |
  272|       |  /* + 1 compensates fMultDiv2(). */
  273|  39.7k|  return ExponentTable[lsb][exponent] + 1;
  274|  39.7k|}
block.cpp:_ZL15EvaluatePower43Pij:
  247|  1.37M|int EvaluatePower43(FIXP_DBL *pValue, UINT lsb) {
  248|  1.37M|  FIXP_DBL value;
  249|  1.37M|  UINT freeBits;
  250|  1.37M|  UINT exponent;
  251|       |
  252|  1.37M|  value = *pValue;
  253|  1.37M|  freeBits = fNormz(value);
  254|  1.37M|  exponent = DFRACT_BITS - freeBits;
  ------------------
  |  |  113|  1.37M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  255|  1.37M|  FDK_ASSERT(exponent < 14);
  ------------------
  |  |  221|  1.37M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (255:3): [True: 1.37M, False: 0]
  ------------------
  256|       |
  257|  1.37M|  UINT x = (((int)value << freeBits) >> 19);
  258|  1.37M|  UINT tableIndex = (x & 0x0FFF) >> 4;
  259|  1.37M|  FIXP_DBL invQVal;
  260|       |
  261|  1.37M|  x = x & 0x0F;
  262|       |
  263|  1.37M|  UINT r0 = (LONG)InverseQuantTable[tableIndex + 0];
  264|  1.37M|  UINT r1 = (LONG)InverseQuantTable[tableIndex + 1];
  265|  1.37M|  USHORT nx = 16 - x;
  266|  1.37M|  UINT temp = (r0)*nx + (r1)*x;
  267|  1.37M|  invQVal = (FIXP_DBL)temp;
  268|       |
  269|  1.37M|  FDK_ASSERT(lsb < 4);
  ------------------
  |  |  221|  1.37M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (269:3): [True: 1.37M, False: 0]
  ------------------
  270|  1.37M|  *pValue = fMultDiv2(invQVal, MantissaTable[lsb][exponent]);
  271|       |
  272|       |  /* + 1 compensates fMultDiv2(). */
  273|  1.37M|  return ExponentTable[lsb][exponent] + 1;
  274|  1.37M|}

_Z22CChannelElement_DecodePP22CAacDecoderChannelInfoPP28CAacDecoderStaticChannelInfoP16SamplingRateInfojji:
  167|   421k|    int el_channels) {
  168|   421k|  int ch = 0;
  169|       |
  170|   421k|  int maxSfBandsL = 0, maxSfBandsR = 0;
  171|   421k|  int maybe_jstereo = (el_channels > 1);
  172|       |
  173|   421k|  if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && el_channels == 2) {
  ------------------
  |  |  307|   421k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && el_channels == 2) {
  ------------------
  |  |  310|   421k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && el_channels == 2) {
  ------------------
  |  |  308|   421k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (173:7): [True: 217k, False: 203k]
  |  Branch (173:54): [True: 68.2k, False: 149k]
  ------------------
  174|  68.2k|    if (pAacDecoderChannelInfo[L]->data.usac.core_mode ||
  ------------------
  |  Branch (174:9): [True: 8.16k, False: 60.0k]
  ------------------
  175|  60.0k|        pAacDecoderChannelInfo[R]->data.usac.core_mode) {
  ------------------
  |  Branch (175:9): [True: 2.95k, False: 57.1k]
  ------------------
  176|  11.1k|      maybe_jstereo = 0;
  177|  11.1k|    }
  178|  68.2k|  }
  179|       |
  180|   421k|  if (maybe_jstereo) {
  ------------------
  |  Branch (180:7): [True: 159k, False: 262k]
  ------------------
  181|   159k|    maxSfBandsL =
  182|   159k|        GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo[L]->icsInfo);
  183|   159k|    maxSfBandsR =
  184|   159k|        GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo[R]->icsInfo);
  185|       |
  186|       |    /* apply ms */
  187|   159k|    if (pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow) {
  ------------------
  |  Branch (187:9): [True: 144k, False: 15.1k]
  ------------------
  188|   144k|      if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  307|   144k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  310|   144k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  308|   144k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (188:11): [True: 99.4k, False: 44.8k]
  ------------------
  189|  99.4k|        if (pAacDecoderChannelInfo[L]->data.aac.PnsData.PnsActive ||
  ------------------
  |  Branch (189:13): [True: 11.3k, False: 88.0k]
  ------------------
  190|  88.0k|            pAacDecoderChannelInfo[R]->data.aac.PnsData.PnsActive) {
  ------------------
  |  Branch (190:13): [True: 1.62k, False: 86.4k]
  ------------------
  191|  13.0k|          MapMidSideMaskToPnsCorrelation(pAacDecoderChannelInfo);
  192|  13.0k|        }
  193|  99.4k|      }
  194|       |      /* if tns_on_lr == 1 run MS */ /* &&
  195|       |                                        (pAacDecoderChannelInfo[L]->pDynData->specificTo.usac.tns_active
  196|       |                                        == 1) */
  197|   144k|      if (((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  307|   144k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  310|   144k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if (((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  308|   144k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (197:12): [True: 44.8k, False: 99.4k]
  ------------------
  198|  44.8k|           (pAacDecoderChannelInfo[L]->pDynData->specificTo.usac.tns_on_lr ==
  ------------------
  |  Branch (198:12): [True: 28.9k, False: 15.8k]
  ------------------
  199|  44.8k|            1)) ||
  200|   128k|          ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) == 0)) {
  ------------------
  |  |  307|   115k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) == 0)) {
  ------------------
  |  |  310|   115k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) == 0)) {
  ------------------
  |  |  308|   115k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (200:11): [True: 99.4k, False: 15.8k]
  ------------------
  201|   128k|        int max_sfb_ste = (INT)(pAacDecoderChannelInfo[L]->icsInfo.max_sfb_ste);
  202|       |
  203|   128k|        CJointStereo_ApplyMS(
  204|   128k|            pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo,
  205|   128k|            pAacDecoderChannelInfo[L]->pSpectralCoefficient,
  206|   128k|            pAacDecoderChannelInfo[R]->pSpectralCoefficient,
  207|   128k|            pAacDecoderChannelInfo[L]->pDynData->aSfbScale,
  208|   128k|            pAacDecoderChannelInfo[R]->pDynData->aSfbScale,
  209|   128k|            pAacDecoderChannelInfo[L]->specScale,
  210|   128k|            pAacDecoderChannelInfo[R]->specScale,
  211|   128k|            GetScaleFactorBandOffsets(&pAacDecoderChannelInfo[L]->icsInfo,
  212|   128k|                                      pSamplingRateInfo),
  213|   128k|            GetWindowGroupLengthTable(&pAacDecoderChannelInfo[L]->icsInfo),
  214|   128k|            GetWindowGroups(&pAacDecoderChannelInfo[L]->icsInfo), max_sfb_ste,
  215|   128k|            maxSfBandsL, maxSfBandsR,
  216|   128k|            pAacDecoderChannelInfo[L]
  217|   128k|                ->pComData->jointStereoData.store_dmx_re_prev,
  218|   128k|            &(pAacDecoderChannelInfo[L]
  219|   128k|                  ->pComData->jointStereoData.store_dmx_re_prev_e),
  220|   128k|            1);
  221|       |
  222|   128k|      } /* if ( ((elFlags & AC_EL_USAC_CP_POSSIBLE).... */
  223|   144k|    }   /* if (pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow)*/
  224|       |
  225|       |    /* apply intensity stereo */ /* modifies pAacDecoderChannelInfo[]->aSpecSfb
  226|       |                                  */
  227|   159k|    if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  307|   159k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  310|   159k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                  if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  308|   159k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (227:9): [True: 102k, False: 57.1k]
  ------------------
  228|   102k|      if ((pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow ==
  ------------------
  |  Branch (228:11): [True: 99.4k, False: 2.94k]
  ------------------
  229|   102k|           1) &&
  230|  99.4k|          (el_channels == 2)) {
  ------------------
  |  Branch (230:11): [True: 99.4k, False: 0]
  ------------------
  231|  99.4k|        CJointStereo_ApplyIS(
  232|  99.4k|            pAacDecoderChannelInfo,
  233|  99.4k|            GetScaleFactorBandOffsets(&pAacDecoderChannelInfo[L]->icsInfo,
  234|  99.4k|                                      pSamplingRateInfo),
  235|  99.4k|            GetWindowGroupLengthTable(&pAacDecoderChannelInfo[L]->icsInfo),
  236|  99.4k|            GetWindowGroups(&pAacDecoderChannelInfo[L]->icsInfo),
  237|  99.4k|            GetScaleFactorBandsTransmitted(
  238|  99.4k|                &pAacDecoderChannelInfo[L]->icsInfo));
  239|  99.4k|      }
  240|   102k|    }
  241|   159k|  } /* maybe_stereo */
  242|       |
  243|  1.01M|  for (ch = 0; ch < el_channels; ch++) {
  ------------------
  |  Branch (243:16): [True: 592k, False: 421k]
  ------------------
  244|   592k|    if (pAacDecoderChannelInfo[ch]->renderMode == AACDEC_RENDER_LPD) {
  ------------------
  |  Branch (244:9): [True: 41.5k, False: 550k]
  ------------------
  245|       |      /* Decode LPD data */
  246|  41.5k|      CLpdChannelStream_Decode(pAacDecoderChannelInfo[ch],
  247|  41.5k|                               pAacDecoderStaticChannelInfo[ch], flags);
  248|   550k|    } else {
  249|   550k|      UCHAR noSfbs =
  250|   550k|          GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo[ch]->icsInfo);
  251|       |      /* For USAC common window: max_sfb of both channels may differ
  252|       |       * (common_max_sfb == 0). */
  253|   550k|      if ((maybe_jstereo == 1) &&
  ------------------
  |  Branch (253:11): [True: 319k, False: 231k]
  ------------------
  254|   319k|          (pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow ==
  ------------------
  |  Branch (254:11): [True: 288k, False: 30.3k]
  ------------------
  255|   319k|           1)) {
  256|   288k|        noSfbs = fMax(maxSfBandsL, maxSfBandsR);
  257|   288k|      }
  258|   550k|      int CP_active = 0;
  259|   550k|      if (elFlags & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|   550k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (259:11): [True: 90.9k, False: 459k]
  ------------------
  260|  90.9k|        CP_active = pAacDecoderChannelInfo[ch]
  261|  90.9k|                        ->pComData->jointStereoData.cplx_pred_flag;
  262|  90.9k|      }
  263|       |
  264|       |      /* Omit writing of pAacDecoderChannelInfo[ch]->specScale for complex
  265|       |         stereo prediction since scaling has already been carried out. */
  266|   550k|      int max_sfb_ste = (INT)(pAacDecoderChannelInfo[L]->icsInfo.max_sfb_ste);
  267|       |
  268|   550k|      if (!(CP_active && (max_sfb_ste == noSfbs)) ||
  ------------------
  |  Branch (268:13): [True: 73.1k, False: 477k]
  |  Branch (268:26): [True: 73.1k, False: 0]
  ------------------
  269|  73.1k|          !(CP_active &&
  ------------------
  |  Branch (269:13): [True: 73.1k, False: 0]
  ------------------
  270|  73.1k|            !(pAacDecoderChannelInfo[ch]->pDynData->TnsData.Active)) ||
  ------------------
  |  Branch (270:13): [True: 15.4k, False: 57.7k]
  ------------------
  271|  15.4k|          ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  307|  15.4k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  310|  15.4k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  308|  15.4k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (271:12): [True: 15.4k, False: 0]
  ------------------
  272|  15.4k|           (pAacDecoderChannelInfo[L]->pDynData->specificTo.usac.tns_on_lr ==
  ------------------
  |  Branch (272:12): [True: 7.86k, False: 7.59k]
  ------------------
  273|   543k|            0))) {
  274|   543k|        CBlock_ScaleSpectralData(pAacDecoderChannelInfo[ch], noSfbs,
  275|   543k|                                 pSamplingRateInfo);
  276|       |
  277|       |        /*Active for the case of TNS applied before MS/CP*/
  278|   543k|        if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  307|   543k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  310|   543k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                      if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  308|   543k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (278:13): [True: 236k, False: 306k]
  ------------------
  279|   236k|            (pAacDecoderChannelInfo[L]->pDynData->specificTo.usac.tns_on_lr ==
  ------------------
  |  Branch (279:13): [True: 162k, False: 74.4k]
  ------------------
  280|   236k|             0)) {
  281|   162k|          if (IsLongBlock(&pAacDecoderChannelInfo[ch]->icsInfo)) {
  ------------------
  |  Branch (281:15): [True: 152k, False: 9.48k]
  ------------------
  282|  1.49M|            for (int i = 0; i < noSfbs; i++) {
  ------------------
  |  Branch (282:29): [True: 1.33M, False: 152k]
  ------------------
  283|  1.33M|              pAacDecoderChannelInfo[ch]->pDynData->aSfbScale[i] =
  284|  1.33M|                  pAacDecoderChannelInfo[ch]->specScale[0];
  285|  1.33M|            }
  286|   152k|          } else {
  287|  85.3k|            for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (287:29): [True: 75.8k, False: 9.48k]
  ------------------
  288|   539k|              for (int j = 0; j < noSfbs; j++) {
  ------------------
  |  Branch (288:31): [True: 463k, False: 75.8k]
  ------------------
  289|   463k|                pAacDecoderChannelInfo[ch]->pDynData->aSfbScale[i * 16 + j] =
  290|   463k|                    pAacDecoderChannelInfo[ch]->specScale[i];
  291|   463k|              }
  292|  75.8k|            }
  293|  9.48k|          }
  294|   162k|        }
  295|   543k|      }
  296|   550k|    }
  297|   592k|  } /* End "for (ch = 0; ch < el_channels; ch++)" */
  298|       |
  299|   421k|  if (maybe_jstereo) {
  ------------------
  |  Branch (299:7): [True: 159k, False: 262k]
  ------------------
  300|       |    /* apply ms */
  301|   159k|    if (pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow) {
  ------------------
  |  Branch (301:9): [True: 144k, False: 15.1k]
  ------------------
  302|   144k|    } /* CommonWindow */
  303|  15.1k|    else {
  304|  15.1k|      if (elFlags & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|  15.1k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (304:11): [True: 2.05k, False: 13.1k]
  ------------------
  305|  2.05k|        FDKmemclear(
  306|  2.05k|            pAacDecoderStaticChannelInfo[L]
  307|  2.05k|                ->pCpeStaticData->jointStereoPersistentData.alpha_q_re_prev,
  308|  2.05k|            JointStereoMaximumGroups * JointStereoMaximumBands * sizeof(SHORT));
  309|  2.05k|        FDKmemclear(
  310|  2.05k|            pAacDecoderStaticChannelInfo[L]
  311|  2.05k|                ->pCpeStaticData->jointStereoPersistentData.alpha_q_im_prev,
  312|  2.05k|            JointStereoMaximumGroups * JointStereoMaximumBands * sizeof(SHORT));
  313|  2.05k|      }
  314|  15.1k|    }
  315|       |
  316|   159k|  } /* if (maybe_jstereo) */
  317|       |
  318|  1.01M|  for (ch = 0; ch < el_channels; ch++) {
  ------------------
  |  Branch (318:16): [True: 592k, False: 421k]
  ------------------
  319|   592k|    if (pAacDecoderChannelInfo[ch]->renderMode == AACDEC_RENDER_LPD) {
  ------------------
  |  Branch (319:9): [True: 41.5k, False: 550k]
  ------------------
  320|   550k|    } else {
  321|   550k|      if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  307|   550k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  310|   550k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  308|   550k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (321:11): [True: 306k, False: 244k]
  ------------------
  322|       |        /* Use same seed for coupled channels (CPE) */
  323|   306k|        int pnsCh = (ch > 0) ? L : ch;
  ------------------
  |  Branch (323:21): [True: 102k, False: 203k]
  ------------------
  324|   306k|        CPns_UpdateNoiseState(
  325|   306k|            &pAacDecoderChannelInfo[ch]->data.aac.PnsData,
  326|   306k|            pAacDecoderChannelInfo[pnsCh]->data.aac.PnsData.currentSeed,
  327|   306k|            pAacDecoderChannelInfo[ch]->pComData->pnsRandomSeed);
  328|   306k|      }
  329|       |
  330|   550k|      if ((!(flags & (AC_USAC))) ||
  ------------------
  |  |  307|   550k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (330:11): [True: 306k, False: 244k]
  ------------------
  331|   244k|          ((flags & (AC_USAC)) &&
  ------------------
  |  |  307|   244k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (331:12): [True: 244k, False: 0]
  ------------------
  332|   244k|           (pAacDecoderChannelInfo[L]->pDynData->specificTo.usac.tns_active ==
  ------------------
  |  Branch (332:12): [True: 68.1k, False: 176k]
  ------------------
  333|   244k|            1)) ||
  334|   504k|          (maybe_jstereo == 0)) {
  ------------------
  |  Branch (334:11): [True: 130k, False: 46.0k]
  ------------------
  335|   504k|        ApplyTools(
  336|   504k|            pAacDecoderChannelInfo, pSamplingRateInfo, flags, elFlags, ch,
  337|   504k|            pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow);
  338|   504k|      }
  339|   550k|    } /* End "} else" */
  340|   592k|  }   /* End "for (ch = 0; ch < el_channels; ch++)" */
  341|       |
  342|   421k|  if (maybe_jstereo) {
  ------------------
  |  Branch (342:7): [True: 159k, False: 262k]
  ------------------
  343|       |    /* apply ms */
  344|   159k|    if (pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow) {
  ------------------
  |  Branch (344:9): [True: 144k, False: 15.1k]
  ------------------
  345|       |      /* if tns_on_lr == 0 run MS */
  346|   144k|      if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  307|   144k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  310|   144k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if ((flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) &&
  ------------------
  |  |  308|   144k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (346:11): [True: 44.8k, False: 99.4k]
  ------------------
  347|  44.8k|          (pAacDecoderChannelInfo[L]->pDynData->specificTo.usac.tns_on_lr ==
  ------------------
  |  Branch (347:11): [True: 15.8k, False: 28.9k]
  ------------------
  348|  44.8k|           0)) {
  349|  15.8k|        int max_sfb_ste = (INT)(pAacDecoderChannelInfo[L]->icsInfo.max_sfb_ste);
  350|       |
  351|  15.8k|        CJointStereo_ApplyMS(
  352|  15.8k|            pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo,
  353|  15.8k|            pAacDecoderChannelInfo[L]->pSpectralCoefficient,
  354|  15.8k|            pAacDecoderChannelInfo[R]->pSpectralCoefficient,
  355|  15.8k|            pAacDecoderChannelInfo[L]->pDynData->aSfbScale,
  356|  15.8k|            pAacDecoderChannelInfo[R]->pDynData->aSfbScale,
  357|  15.8k|            pAacDecoderChannelInfo[L]->specScale,
  358|  15.8k|            pAacDecoderChannelInfo[R]->specScale,
  359|  15.8k|            GetScaleFactorBandOffsets(&pAacDecoderChannelInfo[L]->icsInfo,
  360|  15.8k|                                      pSamplingRateInfo),
  361|  15.8k|            GetWindowGroupLengthTable(&pAacDecoderChannelInfo[L]->icsInfo),
  362|  15.8k|            GetWindowGroups(&pAacDecoderChannelInfo[L]->icsInfo), max_sfb_ste,
  363|  15.8k|            maxSfBandsL, maxSfBandsR,
  364|  15.8k|            pAacDecoderChannelInfo[L]
  365|  15.8k|                ->pComData->jointStereoData.store_dmx_re_prev,
  366|  15.8k|            &(pAacDecoderChannelInfo[L]
  367|  15.8k|                  ->pComData->jointStereoData.store_dmx_re_prev_e),
  368|  15.8k|            1);
  369|  15.8k|      }
  370|       |
  371|   144k|    } /* if (pAacDecoderChannelInfo[L]->pDynData->RawDataInfo.CommonWindow) */
  372|       |
  373|   159k|  } /* if (maybe_jstereo) */
  374|       |
  375|  1.01M|  for (ch = 0; ch < el_channels; ch++) {
  ------------------
  |  Branch (375:16): [True: 592k, False: 421k]
  ------------------
  376|   592k|    if (elFlags & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|   592k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (376:9): [True: 105k, False: 486k]
  ------------------
  377|   105k|      pAacDecoderStaticChannelInfo[L]
  378|   105k|          ->pCpeStaticData->jointStereoPersistentData.clearSpectralCoeffs = 0;
  379|   105k|    }
  380|   592k|  }
  381|       |
  382|   421k|  CRvlc_ElementCheck(pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo,
  383|   421k|                     flags, el_channels);
  384|   421k|}
_Z26CChannel_CodebookTableInitP22CAacDecoderChannelInfo:
  387|   246k|    CAacDecoderChannelInfo *pAacDecoderChannelInfo) {
  388|   246k|  int b, w, maxBands, maxWindows;
  389|   246k|  int maxSfb = GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
  390|   246k|  UCHAR *pCodeBook = pAacDecoderChannelInfo->pDynData->aCodeBook;
  391|       |
  392|   246k|  if (IsLongBlock(&pAacDecoderChannelInfo->icsInfo)) {
  ------------------
  |  Branch (392:7): [True: 191k, False: 54.8k]
  ------------------
  393|   191k|    maxBands = 64;
  394|   191k|    maxWindows = 1;
  395|   191k|  } else {
  396|  54.8k|    maxBands = 16;
  397|  54.8k|    maxWindows = 8;
  398|  54.8k|  }
  399|       |
  400|   876k|  for (w = 0; w < maxWindows; w++) {
  ------------------
  |  Branch (400:15): [True: 630k, False: 246k]
  ------------------
  401|  2.54M|    for (b = 0; b < maxSfb; b++) {
  ------------------
  |  Branch (401:17): [True: 1.91M, False: 630k]
  ------------------
  402|  1.91M|      pCodeBook[b] = ESCBOOK;
  403|  1.91M|    }
  404|  17.9M|    for (; b < maxBands; b++) {
  ------------------
  |  Branch (404:12): [True: 17.3M, False: 630k]
  ------------------
  405|  17.3M|      pCodeBook[b] = ZERO_HCB;
  406|  17.3M|    }
  407|   630k|    pCodeBook += maxBands;
  408|   630k|  }
  409|   246k|}
_Z20CChannelElement_ReadP13FDK_BITSTREAMPP22CAacDecoderChannelInfoPP28CAacDecoderStaticChannelInfo17AUDIO_OBJECT_TYPEP16SamplingRateInfojjjhaP12TRANSPORTDEC:
  420|   430k|    HANDLE_TRANSPORTDEC pTpDec) {
  421|   430k|  AAC_DECODER_ERROR error = AAC_DEC_OK;
  422|   430k|  const element_list_t *list;
  423|   430k|  int i, ch, decision_bit;
  424|   430k|  int crcReg1 = -1, crcReg2 = -1;
  425|   430k|  int cplxPred;
  426|   430k|  int ind_sw_cce_flag = 0, num_gain_element_lists = 0;
  427|       |
  428|   430k|  FDK_ASSERT((numberOfChannels == 1) || (numberOfChannels == 2));
  ------------------
  |  |  221|   430k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (428:3): [True: 256k, False: 173k]
  |  Branch (428:3): [True: 173k, False: 0]
  |  Branch (428:3): [True: 430k, False: 0]
  ------------------
  429|       |
  430|       |  /* Get channel element sequence table */
  431|   430k|  list = getBitstreamElementList(aot, epConfig, numberOfChannels, 0, elFlags);
  432|   430k|  if (list == NULL) {
  ------------------
  |  Branch (432:7): [True: 0, False: 430k]
  ------------------
  433|      0|    error = AAC_DEC_UNSUPPORTED_FORMAT;
  434|      0|    goto bail;
  435|      0|  }
  436|       |
  437|   430k|  CTns_Reset(&pAacDecoderChannelInfo[0]->pDynData->TnsData);
  438|       |  /* Set common window to 0 by default. If signalized in the bit stream it will
  439|       |   * be overwritten later explicitely */
  440|   430k|  pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow = 0;
  441|   430k|  if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  307|   430k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  310|   430k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  308|   430k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (441:7): [True: 220k, False: 210k]
  ------------------
  442|   220k|    pAacDecoderChannelInfo[0]->pDynData->specificTo.usac.tns_active = 0;
  443|   220k|    pAacDecoderChannelInfo[0]->pDynData->specificTo.usac.tns_on_lr = 0;
  444|   220k|  }
  445|   430k|  if (numberOfChannels == 2) {
  ------------------
  |  Branch (445:7): [True: 173k, False: 256k]
  ------------------
  446|   173k|    CTns_Reset(&pAacDecoderChannelInfo[1]->pDynData->TnsData);
  447|   173k|    pAacDecoderChannelInfo[1]->pDynData->RawDataInfo.CommonWindow = 0;
  448|   173k|  }
  449|       |
  450|   430k|  cplxPred = 0;
  451|   430k|  if (pAacDecoderStaticChannelInfo != NULL) {
  ------------------
  |  Branch (451:7): [True: 429k, False: 973]
  ------------------
  452|   429k|    if (elFlags & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|   429k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (452:9): [True: 53.3k, False: 376k]
  ------------------
  453|  53.3k|      pAacDecoderChannelInfo[0]->pComData->jointStereoData.cplx_pred_flag = 0;
  454|  53.3k|      cplxPred = 1;
  455|  53.3k|    }
  456|   429k|  }
  457|       |
  458|   430k|  if (0 || (flags & (AC_ELD | AC_SCALABLE))) {
  ------------------
  |  |  303|   430k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                if (0 || (flags & (AC_ELD | AC_SCALABLE))) {
  ------------------
  |  |  302|   430k|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
  |  Branch (458:7): [Folded, False: 430k]
  |  Branch (458:12): [True: 188k, False: 242k]
  ------------------
  459|   188k|    pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow = 1;
  460|   188k|    if (numberOfChannels == 2) {
  ------------------
  |  Branch (460:9): [True: 99.9k, False: 88.2k]
  ------------------
  461|  99.9k|      pAacDecoderChannelInfo[1]->pDynData->RawDataInfo.CommonWindow =
  462|  99.9k|          pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow;
  463|  99.9k|    }
  464|   188k|  }
  465|       |
  466|       |  /* Iterate through sequence table */
  467|   430k|  i = 0;
  468|   430k|  ch = 0;
  469|   430k|  decision_bit = 0;
  470|  6.62M|  do {
  471|  6.62M|    switch (list->id[i]) {
  472|  22.1k|      case element_instance_tag:
  ------------------
  |  Branch (472:7): [True: 22.1k, False: 6.60M]
  ------------------
  473|  22.1k|        pAacDecoderChannelInfo[0]->ElementInstanceTag = FDKreadBits(hBs, 4);
  474|  22.1k|        if (numberOfChannels == 2) {
  ------------------
  |  Branch (474:13): [True: 4.74k, False: 17.4k]
  ------------------
  475|  4.74k|          pAacDecoderChannelInfo[1]->ElementInstanceTag =
  476|  4.74k|              pAacDecoderChannelInfo[0]->ElementInstanceTag;
  477|  4.74k|        }
  478|  22.1k|        break;
  479|  62.3k|      case common_window:
  ------------------
  |  Branch (479:7): [True: 62.3k, False: 6.56M]
  ------------------
  480|  62.3k|        decision_bit =
  481|  62.3k|            pAacDecoderChannelInfo[ch]->pDynData->RawDataInfo.CommonWindow =
  482|  62.3k|                FDKreadBits(hBs, 1);
  483|  62.3k|        if (numberOfChannels == 2) {
  ------------------
  |  Branch (483:13): [True: 62.3k, False: 0]
  ------------------
  484|  62.3k|          pAacDecoderChannelInfo[1]->pDynData->RawDataInfo.CommonWindow =
  485|  62.3k|              pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow;
  486|  62.3k|        }
  487|  62.3k|        break;
  488|   414k|      case ics_info:
  ------------------
  |  Branch (488:7): [True: 414k, False: 6.21M]
  ------------------
  489|       |        /* store last window sequence (utilized in complex stereo prediction)
  490|       |         * before reading new channel-info */
  491|   414k|        if (cplxPred) {
  ------------------
  |  Branch (491:13): [True: 51.5k, False: 363k]
  ------------------
  492|  51.5k|          if (pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow) {
  ------------------
  |  Branch (492:15): [True: 40.0k, False: 11.4k]
  ------------------
  493|  40.0k|            pAacDecoderStaticChannelInfo[0]
  494|  40.0k|                ->pCpeStaticData->jointStereoPersistentData.winSeqPrev =
  495|  40.0k|                pAacDecoderChannelInfo[0]->icsInfo.WindowSequence;
  496|  40.0k|            pAacDecoderStaticChannelInfo[0]
  497|  40.0k|                ->pCpeStaticData->jointStereoPersistentData.winShapePrev =
  498|  40.0k|                pAacDecoderChannelInfo[0]->icsInfo.WindowShape;
  499|  40.0k|          }
  500|  51.5k|        }
  501|       |        /* Read individual channel info */
  502|   414k|        error = IcsRead(hBs, &pAacDecoderChannelInfo[ch]->icsInfo,
  503|   414k|                        pSamplingRateInfo, flags);
  504|       |
  505|   414k|        if (elFlags & AC_EL_LFE &&
  ------------------
  |  |  359|   829k|#define AC_EL_LFE 0x002000              /*!< The element is of type LFE. */
  ------------------
  |  Branch (505:13): [True: 0, False: 414k]
  ------------------
  506|      0|            GetWindowSequence(&pAacDecoderChannelInfo[ch]->icsInfo) !=
  ------------------
  |  Branch (506:13): [True: 0, False: 0]
  ------------------
  507|      0|                BLOCK_LONG) {
  508|      0|          error = AAC_DEC_PARSE_ERROR;
  509|      0|          break;
  510|      0|        }
  511|       |
  512|   414k|        if (numberOfChannels == 2 &&
  ------------------
  |  Branch (512:13): [True: 185k, False: 229k]
  ------------------
  513|   185k|            pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow) {
  ------------------
  |  Branch (513:13): [True: 146k, False: 38.6k]
  ------------------
  514|   146k|          pAacDecoderChannelInfo[1]->icsInfo =
  515|   146k|              pAacDecoderChannelInfo[0]->icsInfo;
  516|   146k|        }
  517|   414k|        break;
  518|       |
  519|  45.1k|      case common_max_sfb:
  ------------------
  |  Branch (519:7): [True: 45.1k, False: 6.58M]
  ------------------
  520|  45.1k|        if (FDKreadBit(hBs) == 0) {
  ------------------
  |  Branch (520:13): [True: 20.9k, False: 24.1k]
  ------------------
  521|  20.9k|          error = IcsReadMaxSfb(hBs, &pAacDecoderChannelInfo[1]->icsInfo,
  522|  20.9k|                                pSamplingRateInfo);
  523|  20.9k|        }
  524|  45.1k|        break;
  525|       |
  526|  64.8k|      case ltp_data_present:
  ------------------
  |  Branch (526:7): [True: 64.8k, False: 6.56M]
  ------------------
  527|  64.8k|        if (FDKreadBits(hBs, 1) != 0) {
  ------------------
  |  Branch (527:13): [True: 52, False: 64.8k]
  ------------------
  528|     52|          error = AAC_DEC_UNSUPPORTED_PREDICTION;
  529|     52|        }
  530|  64.8k|        break;
  531|       |
  532|   146k|      case ms:
  ------------------
  |  Branch (532:7): [True: 146k, False: 6.48M]
  ------------------
  533|       |
  534|   146k|        INT max_sfb_ste;
  535|   146k|        INT max_sfb_ste_clear;
  536|       |
  537|   146k|        max_sfb_ste = GetScaleMaxFactorBandsTransmitted(
  538|   146k|            &pAacDecoderChannelInfo[0]->icsInfo,
  539|   146k|            &pAacDecoderChannelInfo[1]->icsInfo);
  540|       |
  541|   146k|        max_sfb_ste_clear = 64;
  542|       |
  543|   146k|        pAacDecoderChannelInfo[0]->icsInfo.max_sfb_ste = (UCHAR)max_sfb_ste;
  544|   146k|        pAacDecoderChannelInfo[1]->icsInfo.max_sfb_ste = (UCHAR)max_sfb_ste;
  545|       |
  546|   146k|        if (flags & (AC_USAC | AC_RSV603DA) &&
  ------------------
  |  |  307|   146k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      if (flags & (AC_USAC | AC_RSV603DA) &&
  ------------------
  |  |  308|   146k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (546:13): [True: 45.1k, False: 101k]
  ------------------
  547|  45.1k|            pAacDecoderChannelInfo[ch]->pDynData->RawDataInfo.CommonWindow ==
  ------------------
  |  Branch (547:13): [True: 0, False: 45.1k]
  ------------------
  548|  45.1k|                0) {
  549|      0|          Clean_Complex_Prediction_coefficients(
  550|      0|              &pAacDecoderStaticChannelInfo[0]
  551|      0|                   ->pCpeStaticData->jointStereoPersistentData,
  552|      0|              GetWindowGroups(&pAacDecoderChannelInfo[0]->icsInfo), 0, 64);
  553|      0|        }
  554|       |
  555|   146k|        if (CJointStereo_Read(
  ------------------
  |  Branch (555:13): [True: 4, False: 146k]
  ------------------
  556|   146k|                hBs, &pAacDecoderChannelInfo[0]->pComData->jointStereoData,
  557|   146k|                GetWindowGroups(&pAacDecoderChannelInfo[0]->icsInfo),
  558|   146k|                max_sfb_ste, max_sfb_ste_clear,
  559|       |                /* jointStereoPersistentData and cplxPredictionData are only
  560|       |                   available/allocated if cplxPred is active. */
  561|   146k|                ((cplxPred == 0) || (pAacDecoderStaticChannelInfo == NULL))
  ------------------
  |  Branch (561:18): [True: 106k, False: 40.0k]
  |  Branch (561:37): [True: 0, False: 40.0k]
  ------------------
  562|   146k|                    ? NULL
  563|   146k|                    : &pAacDecoderStaticChannelInfo[0]
  564|  40.0k|                           ->pCpeStaticData->jointStereoPersistentData,
  565|   146k|                ((cplxPred == 0) || (pAacDecoderChannelInfo[0] == NULL))
  ------------------
  |  Branch (565:18): [True: 106k, False: 40.0k]
  |  Branch (565:37): [True: 0, False: 40.0k]
  ------------------
  566|   146k|                    ? NULL
  567|   146k|                    : pAacDecoderChannelInfo[0]
  568|  40.0k|                          ->pComStaticData->cplxPredictionData,
  569|   146k|                cplxPred,
  570|   146k|                GetScaleFactorBandsTotal(&pAacDecoderChannelInfo[0]->icsInfo),
  571|   146k|                GetWindowSequence(&pAacDecoderChannelInfo[0]->icsInfo),
  572|   146k|                flags)) {
  573|      4|          error = AAC_DEC_PARSE_ERROR;
  574|      4|        }
  575|       |
  576|   146k|        break;
  577|       |
  578|   561k|      case global_gain:
  ------------------
  |  Branch (578:7): [True: 561k, False: 6.06M]
  ------------------
  579|   561k|        pAacDecoderChannelInfo[ch]->pDynData->RawDataInfo.GlobalGain =
  580|   561k|            (UCHAR)FDKreadBits(hBs, 8);
  581|   561k|        break;
  582|       |
  583|   314k|      case section_data:
  ------------------
  |  Branch (583:7): [True: 314k, False: 6.31M]
  ------------------
  584|   314k|        error = CBlock_ReadSectionData(hBs, pAacDecoderChannelInfo[ch],
  585|   314k|                                       pSamplingRateInfo, flags);
  586|   314k|        break;
  587|       |
  588|   246k|      case scale_factor_data_usac:
  ------------------
  |  Branch (588:7): [True: 246k, False: 6.38M]
  ------------------
  589|   246k|        pAacDecoderChannelInfo[ch]->currAliasingSymmetry = 0;
  590|       |        /* Set active sfb codebook indexes to HCB_ESC to make them "active" */
  591|   246k|        CChannel_CodebookTableInit(
  592|   246k|            pAacDecoderChannelInfo[ch]); /*  equals ReadSectionData(self,
  593|       |                                            bs) in float soft. block.c
  594|       |                                            line: ~599 */
  595|       |        /* Note: The missing "break" is intentional here, since we need to call
  596|       |         * CBlock_ReadScaleFactorData(). */
  597|   246k|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|   246k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  598|       |
  599|   560k|      case scale_factor_data:
  ------------------
  |  Branch (599:7): [True: 314k, False: 6.31M]
  ------------------
  600|   560k|        if (flags & AC_ER_RVLC) {
  ------------------
  |  |  297|   560k|  0x000002 /*!< aacSpectralDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (600:13): [True: 136k, False: 423k]
  ------------------
  601|       |          /* read RVLC data from bitstream (error sens. cat. 1) */
  602|   136k|          CRvlc_Read(pAacDecoderChannelInfo[ch], hBs);
  603|   423k|        } else {
  604|   423k|          error = CBlock_ReadScaleFactorData(pAacDecoderChannelInfo[ch], hBs,
  605|   423k|                                             flags);
  606|   423k|        }
  607|   560k|        break;
  608|       |
  609|  26.6k|      case pulse:
  ------------------
  |  Branch (609:7): [True: 26.6k, False: 6.60M]
  ------------------
  610|  26.6k|        if (CPulseData_Read(
  ------------------
  |  Branch (610:13): [True: 47, False: 26.6k]
  ------------------
  611|  26.6k|                hBs,
  612|  26.6k|                &pAacDecoderChannelInfo[ch]->pDynData->specificTo.aac.PulseData,
  613|  26.6k|                pSamplingRateInfo->ScaleFactorBands_Long, /* pulse data is only
  614|       |                                                             allowed to be
  615|       |                                                             present in long
  616|       |                                                             blocks! */
  617|  26.6k|                (void *)&pAacDecoderChannelInfo[ch]->icsInfo,
  618|  26.6k|                frame_length) != 0) {
  619|     47|          error = AAC_DEC_DECODE_FRAME_ERROR;
  620|     47|        }
  621|  26.6k|        break;
  622|   445k|      case tns_data_present:
  ------------------
  |  Branch (622:7): [True: 445k, False: 6.18M]
  ------------------
  623|   445k|        CTns_ReadDataPresentFlag(
  624|   445k|            hBs, &pAacDecoderChannelInfo[ch]->pDynData->TnsData);
  625|   445k|        if (elFlags & AC_EL_LFE &&
  ------------------
  |  |  359|   891k|#define AC_EL_LFE 0x002000              /*!< The element is of type LFE. */
  ------------------
  |  Branch (625:13): [True: 0, False: 445k]
  ------------------
  626|      0|            pAacDecoderChannelInfo[ch]->pDynData->TnsData.DataPresent) {
  ------------------
  |  Branch (626:13): [True: 0, False: 0]
  ------------------
  627|      0|          error = AAC_DEC_PARSE_ERROR;
  628|      0|        }
  629|   445k|        break;
  630|   560k|      case tns_data:
  ------------------
  |  Branch (630:7): [True: 560k, False: 6.06M]
  ------------------
  631|       |        /* tns_data_present is checked inside CTns_Read(). */
  632|   560k|        error = CTns_Read(hBs, &pAacDecoderChannelInfo[ch]->pDynData->TnsData,
  633|   560k|                          &pAacDecoderChannelInfo[ch]->icsInfo, flags);
  634|       |
  635|   560k|        break;
  636|       |
  637|    677|      case gain_control_data:
  ------------------
  |  Branch (637:7): [True: 677, False: 6.62M]
  ------------------
  638|    677|        break;
  639|       |
  640|  26.6k|      case gain_control_data_present:
  ------------------
  |  Branch (640:7): [True: 26.6k, False: 6.60M]
  ------------------
  641|  26.6k|        if (FDKreadBits(hBs, 1)) {
  ------------------
  |  Branch (641:13): [True: 39, False: 26.5k]
  ------------------
  642|     39|          error = AAC_DEC_UNSUPPORTED_GAIN_CONTROL_DATA;
  643|     39|        }
  644|  26.6k|        break;
  645|       |
  646|   201k|      case tw_data:
  ------------------
  |  Branch (646:7): [True: 201k, False: 6.42M]
  ------------------
  647|   201k|        break;
  648|  57.6k|      case common_tw:
  ------------------
  |  Branch (648:7): [True: 57.6k, False: 6.57M]
  ------------------
  649|  57.6k|        break;
  650|  57.6k|      case tns_data_present_usac:
  ------------------
  |  Branch (650:7): [True: 57.6k, False: 6.57M]
  ------------------
  651|  57.6k|        if (pAacDecoderChannelInfo[0]->pDynData->specificTo.usac.tns_active) {
  ------------------
  |  Branch (651:13): [True: 34.1k, False: 23.4k]
  ------------------
  652|  34.1k|          CTns_ReadDataPresentUsac(
  653|  34.1k|              hBs, &pAacDecoderChannelInfo[0]->pDynData->TnsData,
  654|  34.1k|              &pAacDecoderChannelInfo[1]->pDynData->TnsData,
  655|  34.1k|              &pAacDecoderChannelInfo[0]->pDynData->specificTo.usac.tns_on_lr,
  656|  34.1k|              &pAacDecoderChannelInfo[0]->icsInfo, flags, elFlags,
  657|  34.1k|              pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow);
  658|  34.1k|        } else {
  659|  23.4k|          pAacDecoderChannelInfo[0]->pDynData->specificTo.usac.tns_on_lr =
  660|  23.4k|              (UCHAR)1;
  661|  23.4k|        }
  662|  57.6k|        break;
  663|   289k|      case core_mode:
  ------------------
  |  Branch (663:7): [True: 289k, False: 6.33M]
  ------------------
  664|   289k|        decision_bit = FDKreadBits(hBs, 1);
  665|   289k|        pAacDecoderChannelInfo[ch]->data.usac.core_mode = decision_bit;
  666|   289k|        if ((ch == 1) && (pAacDecoderChannelInfo[0]->data.usac.core_mode !=
  ------------------
  |  Branch (666:13): [True: 69.0k, False: 220k]
  |  Branch (666:26): [True: 7.53k, False: 61.5k]
  ------------------
  667|  69.0k|                          pAacDecoderChannelInfo[1]->data.usac.core_mode)) {
  668|       |          /* StereoCoreToolInfo(core_mode[ch] ) */
  669|  7.53k|          pAacDecoderChannelInfo[0]->pDynData->RawDataInfo.CommonWindow = 0;
  670|  7.53k|          pAacDecoderChannelInfo[1]->pDynData->RawDataInfo.CommonWindow = 0;
  671|  7.53k|        }
  672|   289k|        break;
  673|  57.6k|      case tns_active:
  ------------------
  |  Branch (673:7): [True: 57.6k, False: 6.57M]
  ------------------
  674|  57.6k|        pAacDecoderChannelInfo[0]->pDynData->specificTo.usac.tns_active =
  675|  57.6k|            FDKreadBit(hBs);
  676|  57.6k|        break;
  677|   246k|      case noise:
  ------------------
  |  Branch (677:7): [True: 246k, False: 6.38M]
  ------------------
  678|   246k|        if (elFlags & AC_EL_USAC_NOISE) {
  ------------------
  |  |  344|   246k|#define AC_EL_USAC_NOISE 0x000002 /*!< USAC noise filling is active */
  ------------------
  |  Branch (678:13): [True: 10.4k, False: 235k]
  ------------------
  679|  10.4k|          pAacDecoderChannelInfo[ch]
  680|  10.4k|              ->pDynData->specificTo.usac.fd_noise_level_and_offset =
  681|  10.4k|              FDKreadBits(hBs, 3 + 5); /* Noise level */
  682|  10.4k|        }
  683|   246k|        break;
  684|  42.5k|      case lpd_channel_stream:
  ------------------
  |  Branch (684:7): [True: 42.5k, False: 6.58M]
  ------------------
  685|       |
  686|  42.5k|      {
  687|  42.5k|        error = CLpdChannelStream_Read(/* = lpd_channel_stream() */
  688|  42.5k|                                       hBs, pAacDecoderChannelInfo[ch],
  689|  42.5k|                                       pAacDecoderStaticChannelInfo[ch],
  690|  42.5k|                                       pSamplingRateInfo, flags);
  691|  42.5k|      }
  692|       |
  693|  42.5k|        pAacDecoderChannelInfo[ch]->renderMode = AACDEC_RENDER_LPD;
  694|  42.5k|        break;
  695|   245k|      case fac_data: {
  ------------------
  |  Branch (695:7): [True: 245k, False: 6.38M]
  ------------------
  696|   245k|        int fFacDatPresent = FDKreadBit(hBs);
  697|       |
  698|       |        /* Wee need a valid fac_data[0] even if no FAC data is present (as
  699|       |         * temporal buffer) */
  700|   245k|        pAacDecoderChannelInfo[ch]->data.usac.fac_data[0] =
  701|   245k|            pAacDecoderChannelInfo[ch]->data.usac.fac_data0;
  702|       |
  703|   245k|        if (fFacDatPresent) {
  ------------------
  |  Branch (703:13): [True: 33.7k, False: 211k]
  ------------------
  704|  33.7k|          if (elFlags & AC_EL_LFE) {
  ------------------
  |  |  359|  33.7k|#define AC_EL_LFE 0x002000              /*!< The element is of type LFE. */
  ------------------
  |  Branch (704:15): [True: 0, False: 33.7k]
  ------------------
  705|      0|            error = AAC_DEC_PARSE_ERROR;
  706|      0|            break;
  707|      0|          }
  708|       |          /* FAC data present, this frame is FD, so the last mode had to be
  709|       |           * ACELP. */
  710|  33.7k|          if (pAacDecoderStaticChannelInfo[ch]->last_core_mode != LPD ||
  ------------------
  |  Branch (710:15): [True: 26.7k, False: 7.00k]
  ------------------
  711|  27.2k|              pAacDecoderStaticChannelInfo[ch]->last_lpd_mode != 0) {
  ------------------
  |  Branch (711:15): [True: 501, False: 6.50k]
  ------------------
  712|  27.2k|            pAacDecoderChannelInfo[ch]->data.usac.core_mode_last = LPD;
  713|  27.2k|            pAacDecoderChannelInfo[ch]->data.usac.lpd_mode_last = 0;
  714|       |            /* We can't change the past! So look to the future and go ahead! */
  715|  27.2k|          }
  716|  33.7k|          CLpd_FAC_Read(hBs, pAacDecoderChannelInfo[ch]->data.usac.fac_data[0],
  717|  33.7k|                        pAacDecoderChannelInfo[ch]->data.usac.fac_data_e,
  718|  33.7k|                        CLpd_FAC_getLength(
  719|  33.7k|                            IsLongBlock(&pAacDecoderChannelInfo[ch]->icsInfo),
  720|  33.7k|                            pAacDecoderChannelInfo[ch]->granuleLength),
  721|  33.7k|                        1, 0);
  722|   211k|        } else {
  723|   211k|          if (pAacDecoderStaticChannelInfo[ch]->last_core_mode == LPD &&
  ------------------
  |  Branch (723:15): [True: 14.5k, False: 196k]
  ------------------
  724|  14.5k|              pAacDecoderStaticChannelInfo[ch]->last_lpd_mode == 0) {
  ------------------
  |  Branch (724:15): [True: 10.0k, False: 4.56k]
  ------------------
  725|       |            /* ACELP to FD transitons without FAC are possible. That is why we
  726|       |            zero it out (i.e FAC will not be considered in the subsequent
  727|       |            calculations */
  728|  10.0k|            FDKmemclear(pAacDecoderChannelInfo[ch]->data.usac.fac_data0,
  729|  10.0k|                        LFAC * sizeof(FIXP_DBL));
  ------------------
  |  |  199|  10.0k|#define LFAC LFAC_1024
  |  |  ------------------
  |  |  |  |  169|  10.0k|#define LFAC_1024 (L_DIV_1024 / 2) /* FAC frame length */
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  10.0k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|  10.0k|#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|  10.0k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  10.0k|          }
  731|   211k|        }
  732|   245k|      } break;
  733|   285k|      case esc2_rvlc:
  ------------------
  |  Branch (733:7): [True: 285k, False: 6.34M]
  ------------------
  734|   285k|        if (flags & AC_ER_RVLC) {
  ------------------
  |  |  297|   285k|  0x000002 /*!< aacSpectralDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (734:13): [True: 136k, False: 149k]
  ------------------
  735|   136k|          CRvlc_Decode(pAacDecoderChannelInfo[ch],
  736|   136k|                       pAacDecoderStaticChannelInfo[ch], hBs);
  737|   136k|        }
  738|   285k|        break;
  739|       |
  740|   290k|      case esc1_hcr:
  ------------------
  |  Branch (740:7): [True: 290k, False: 6.33M]
  ------------------
  741|   290k|        if (flags & AC_ER_HCR) {
  ------------------
  |  |  300|   290k|  0x000004 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (741:13): [True: 8.74k, False: 281k]
  ------------------
  742|  8.74k|          CHcr_Read(hBs, pAacDecoderChannelInfo[ch],
  743|  8.74k|                    numberOfChannels == 2 ? ID_CPE : ID_SCE);
  ------------------
  |  Branch (743:21): [True: 7.48k, False: 1.26k]
  ------------------
  744|  8.74k|        }
  745|   290k|        break;
  746|       |
  747|   313k|      case spectral_data:
  ------------------
  |  Branch (747:7): [True: 313k, False: 6.31M]
  ------------------
  748|   313k|        error = CBlock_ReadSpectralData(hBs, pAacDecoderChannelInfo[ch],
  749|   313k|                                        pSamplingRateInfo, flags);
  750|   313k|        if (flags & AC_ELD) {
  ------------------
  |  |  303|   313k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (750:13): [True: 222k, False: 91.0k]
  ------------------
  751|   222k|          pAacDecoderChannelInfo[ch]->renderMode = AACDEC_RENDER_ELDFB;
  752|   222k|        } else {
  753|  91.0k|          if (flags & AC_HDAAC) {
  ------------------
  |  |  309|  91.0k|#define AC_HDAAC 0x000400       /*!< HD-AAC */
  ------------------
  |  Branch (753:15): [True: 0, False: 91.0k]
  ------------------
  754|      0|            pAacDecoderChannelInfo[ch]->renderMode = AACDEC_RENDER_INTIMDCT;
  755|  91.0k|          } else {
  756|  91.0k|            pAacDecoderChannelInfo[ch]->renderMode = AACDEC_RENDER_IMDCT;
  757|  91.0k|          }
  758|  91.0k|        }
  759|   313k|        break;
  760|       |
  761|   246k|      case ac_spectral_data:
  ------------------
  |  Branch (761:7): [True: 246k, False: 6.38M]
  ------------------
  762|   246k|        error = CBlock_ReadAcSpectralData(
  763|   246k|            hBs, pAacDecoderChannelInfo[ch], pAacDecoderStaticChannelInfo[ch],
  764|   246k|            pSamplingRateInfo, frame_length, flags);
  765|   246k|        pAacDecoderChannelInfo[ch]->renderMode = AACDEC_RENDER_IMDCT;
  766|   246k|        break;
  767|       |
  768|    973|      case coupled_elements: {
  ------------------
  |  Branch (768:7): [True: 973, False: 6.62M]
  ------------------
  769|    973|        int num_coupled_elements, c;
  770|       |
  771|    973|        ind_sw_cce_flag = FDKreadBit(hBs);
  772|    973|        num_coupled_elements = FDKreadBits(hBs, 3);
  773|       |
  774|  4.97k|        for (c = 0; c < (num_coupled_elements + 1); c++) {
  ------------------
  |  Branch (774:21): [True: 3.99k, False: 973]
  ------------------
  775|  3.99k|          int cc_target_is_cpe;
  776|       |
  777|  3.99k|          num_gain_element_lists++;
  778|  3.99k|          cc_target_is_cpe = FDKreadBit(hBs); /* cc_target_is_cpe[c] */
  779|  3.99k|          FDKreadBits(hBs, 4);                /* cc_target_tag_select[c] */
  780|       |
  781|  3.99k|          if (cc_target_is_cpe) {
  ------------------
  |  Branch (781:15): [True: 1.12k, False: 2.86k]
  ------------------
  782|  1.12k|            int cc_l, cc_r;
  783|       |
  784|  1.12k|            cc_l = FDKreadBit(hBs); /* cc_l[c] */
  785|  1.12k|            cc_r = FDKreadBit(hBs); /* cc_r[c] */
  786|       |
  787|  1.12k|            if (cc_l && cc_r) {
  ------------------
  |  Branch (787:17): [True: 596, False: 533]
  |  Branch (787:25): [True: 479, False: 117]
  ------------------
  788|    479|              num_gain_element_lists++;
  789|    479|            }
  790|  1.12k|          }
  791|  3.99k|        }
  792|    973|        FDKreadBit(hBs);     /* cc_domain */
  793|    973|        FDKreadBit(hBs);     /* gain_element_sign  */
  794|    973|        FDKreadBits(hBs, 2); /* gain_element_scale */
  795|    973|      } break;
  796|       |
  797|    949|      case gain_element_lists: {
  ------------------
  |  Branch (797:7): [True: 949, False: 6.62M]
  ------------------
  798|    949|        const CodeBookDescription *hcb;
  799|    949|        UCHAR *pCodeBook;
  800|    949|        int c;
  801|       |
  802|    949|        hcb = &AACcodeBookDescriptionTable[BOOKSCL];
  803|    949|        pCodeBook = pAacDecoderChannelInfo[ch]->pDynData->aCodeBook;
  804|       |
  805|  4.35k|        for (c = 1; c < num_gain_element_lists; c++) {
  ------------------
  |  Branch (805:21): [True: 3.40k, False: 949]
  ------------------
  806|  3.40k|          int cge;
  807|  3.40k|          if (ind_sw_cce_flag) {
  ------------------
  |  Branch (807:15): [True: 1.02k, False: 2.38k]
  ------------------
  808|  1.02k|            cge = 1;
  809|  2.38k|          } else {
  810|  2.38k|            cge = FDKreadBits(hBs, 1); /* common_gain_element_present[c] */
  811|  2.38k|          }
  812|  3.40k|          if (cge) {
  ------------------
  |  Branch (812:15): [True: 1.46k, False: 1.93k]
  ------------------
  813|       |            /* Huffman */
  814|  1.46k|            CBlock_DecodeHuffmanWord(
  815|  1.46k|                hBs, hcb); /* hcod_sf[common_gain_element[c]] 1..19 */
  816|  1.93k|          } else {
  817|  1.93k|            int g, sfb;
  818|  1.93k|            for (g = 0;
  819|  5.45k|                 g < GetWindowGroups(&pAacDecoderChannelInfo[ch]->icsInfo);
  ------------------
  |  Branch (819:18): [True: 3.51k, False: 1.93k]
  ------------------
  820|  3.51k|                 g++) {
  821|  8.82k|              for (sfb = 0; sfb < GetScaleFactorBandsTransmitted(
  ------------------
  |  Branch (821:29): [True: 5.30k, False: 3.51k]
  ------------------
  822|  8.82k|                                      &pAacDecoderChannelInfo[ch]->icsInfo);
  823|  5.30k|                   sfb++) {
  824|  5.30k|                if (pCodeBook[sfb] != ZERO_HCB) {
  ------------------
  |  Branch (824:21): [True: 4.28k, False: 1.01k]
  ------------------
  825|       |                  /* Huffman */
  826|  4.28k|                  CBlock_DecodeHuffmanWord(
  827|  4.28k|                      hBs,
  828|  4.28k|                      hcb); /* hcod_sf[dpcm_gain_element[c][g][sfb]] 1..19 */
  829|  4.28k|                }
  830|  5.30k|              }
  831|  3.51k|            }
  832|  1.93k|          }
  833|  3.40k|        }
  834|    949|      } break;
  835|       |
  836|       |        /* CRC handling */
  837|  20.4k|      case adtscrc_start_reg1:
  ------------------
  |  Branch (837:7): [True: 20.4k, False: 6.60M]
  ------------------
  838|  20.4k|        if (pTpDec != NULL) {
  ------------------
  |  Branch (838:13): [True: 20.4k, False: 0]
  ------------------
  839|  20.4k|          crcReg1 = transportDec_CrcStartReg(pTpDec, 192);
  840|  20.4k|        }
  841|  20.4k|        break;
  842|  3.73k|      case adtscrc_start_reg2:
  ------------------
  |  Branch (842:7): [True: 3.73k, False: 6.62M]
  ------------------
  843|  3.73k|        if (pTpDec != NULL) {
  ------------------
  |  Branch (843:13): [True: 3.73k, False: 0]
  ------------------
  844|  3.73k|          crcReg2 = transportDec_CrcStartReg(pTpDec, 128);
  845|  3.73k|        }
  846|  3.73k|        break;
  847|  20.0k|      case adtscrc_end_reg1:
  ------------------
  |  Branch (847:7): [True: 20.0k, False: 6.60M]
  ------------------
  848|  20.0k|      case drmcrc_end_reg:
  ------------------
  |  Branch (848:7): [True: 0, False: 6.62M]
  ------------------
  849|  20.0k|        if (pTpDec != NULL) {
  ------------------
  |  Branch (849:13): [True: 20.0k, False: 0]
  ------------------
  850|  20.0k|          transportDec_CrcEndReg(pTpDec, crcReg1);
  851|  20.0k|          crcReg1 = -1;
  852|  20.0k|        }
  853|  20.0k|        break;
  854|  3.72k|      case adtscrc_end_reg2:
  ------------------
  |  Branch (854:7): [True: 3.72k, False: 6.62M]
  ------------------
  855|  3.72k|        if (crcReg1 != -1) {
  ------------------
  |  Branch (855:13): [True: 0, False: 3.72k]
  ------------------
  856|      0|          error = AAC_DEC_DECODE_FRAME_ERROR;
  857|  3.72k|        } else if (pTpDec != NULL) {
  ------------------
  |  Branch (857:20): [True: 3.72k, False: 0]
  ------------------
  858|  3.72k|          transportDec_CrcEndReg(pTpDec, crcReg2);
  859|  3.72k|          crcReg2 = -1;
  860|  3.72k|        }
  861|  3.72k|        break;
  862|      0|      case drmcrc_start_reg:
  ------------------
  |  Branch (862:7): [True: 0, False: 6.62M]
  ------------------
  863|      0|        if (pTpDec != NULL) {
  ------------------
  |  Branch (863:13): [True: 0, False: 0]
  ------------------
  864|      0|          crcReg1 = transportDec_CrcStartReg(pTpDec, 0);
  865|      0|        }
  866|      0|        break;
  867|       |
  868|       |        /* Non data cases */
  869|   583k|      case next_channel:
  ------------------
  |  Branch (869:7): [True: 583k, False: 6.04M]
  ------------------
  870|   583k|        ch = (ch + 1) % numberOfChannels;
  871|   583k|        break;
  872|   409k|      case link_sequence:
  ------------------
  |  Branch (872:7): [True: 409k, False: 6.21M]
  ------------------
  873|   409k|        list = list->next[decision_bit];
  874|   409k|        i = -1;
  875|   409k|        break;
  876|       |
  877|      0|      default:
  ------------------
  |  Branch (877:7): [True: 0, False: 6.62M]
  ------------------
  878|      0|        error = AAC_DEC_UNSUPPORTED_FORMAT;
  879|      0|        break;
  880|  6.62M|    }
  881|       |
  882|  6.62M|    if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (882:9): [True: 2.66k, False: 6.62M]
  ------------------
  883|  2.66k|      goto bail;
  884|  2.66k|    }
  885|       |
  886|  6.62M|    i++;
  887|       |
  888|  6.62M|  } while (list->id[i] != end_of_sequence);
  ------------------
  |  Branch (888:12): [True: 6.19M, False: 428k]
  ------------------
  889|       |
  890|  1.02M|  for (ch = 0; ch < numberOfChannels; ch++) {
  ------------------
  |  Branch (890:16): [True: 600k, False: 427k]
  ------------------
  891|   600k|    if (pAacDecoderChannelInfo[ch]->renderMode == AACDEC_RENDER_IMDCT ||
  ------------------
  |  Branch (891:9): [True: 335k, False: 264k]
  ------------------
  892|   558k|        pAacDecoderChannelInfo[ch]->renderMode == AACDEC_RENDER_ELDFB) {
  ------------------
  |  Branch (892:9): [True: 222k, False: 41.9k]
  ------------------
  893|       |      /* Shows which bands are empty. */
  894|   558k|      UCHAR *band_is_noise =
  895|   558k|          pAacDecoderChannelInfo[ch]->pDynData->band_is_noise;
  896|   558k|      FDKmemset(band_is_noise, (UCHAR)1, sizeof(UCHAR) * (8 * 16));
  897|       |
  898|   558k|      error = CBlock_InverseQuantizeSpectralData(
  899|   558k|          pAacDecoderChannelInfo[ch], pSamplingRateInfo, band_is_noise, 1);
  900|   558k|      if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (900:11): [True: 21, False: 558k]
  ------------------
  901|     21|        return error;
  902|     21|      }
  903|       |
  904|   558k|      if (elFlags & AC_EL_USAC_NOISE) {
  ------------------
  |  |  344|   558k|#define AC_EL_USAC_NOISE 0x000002 /*!< USAC noise filling is active */
  ------------------
  |  Branch (904:11): [True: 10.2k, False: 548k]
  ------------------
  905|  10.2k|        CBlock_ApplyNoise(pAacDecoderChannelInfo[ch], pSamplingRateInfo,
  906|  10.2k|                          &pAacDecoderStaticChannelInfo[ch]->nfRandomSeed,
  907|  10.2k|                          band_is_noise);
  908|       |
  909|  10.2k|      } /* if (elFlags & AC_EL_USAC_NOISE) */
  910|   558k|    }
  911|   600k|  }
  912|       |
  913|   430k|bail:
  914|   430k|  if (crcReg1 != -1 || crcReg2 != -1) {
  ------------------
  |  Branch (914:7): [True: 0, False: 430k]
  |  Branch (914:24): [True: 0, False: 430k]
  ------------------
  915|      0|    if (error == AAC_DEC_OK) {
  ------------------
  |  Branch (915:9): [True: 0, False: 0]
  ------------------
  916|      0|      error = AAC_DEC_DECODE_FRAME_ERROR;
  917|      0|    }
  918|      0|    if (crcReg1 != -1) {
  ------------------
  |  Branch (918:9): [True: 0, False: 0]
  ------------------
  919|      0|      transportDec_CrcEndReg(pTpDec, crcReg1);
  920|      0|    }
  921|      0|    if (crcReg2 != -1) {
  ------------------
  |  Branch (921:9): [True: 0, False: 0]
  ------------------
  922|      0|      transportDec_CrcEndReg(pTpDec, crcReg2);
  923|      0|    }
  924|      0|  }
  925|   430k|  return error;
  926|   428k|}
channel.cpp:_ZL30MapMidSideMaskToPnsCorrelationPP22CAacDecoderChannelInfo:
  119|  13.0k|    CAacDecoderChannelInfo *pAacDecoderChannelInfo[2]) {
  120|  13.0k|  int group;
  121|       |
  122|  65.1k|  for (group = 0; group < pAacDecoderChannelInfo[L]->icsInfo.WindowGroups;
  ------------------
  |  Branch (122:19): [True: 52.1k, False: 13.0k]
  ------------------
  123|  52.1k|       group++) {
  124|  52.1k|    UCHAR groupMask = 1 << group;
  125|       |
  126|   218k|    for (UCHAR band = 0; band < pAacDecoderChannelInfo[L]->icsInfo.MaxSfBands;
  ------------------
  |  Branch (126:26): [True: 166k, False: 52.1k]
  ------------------
  127|   166k|         band++) {
  128|   166k|      if (pAacDecoderChannelInfo[L]->pComData->jointStereoData.MsUsed[band] &
  ------------------
  |  Branch (128:11): [True: 12.2k, False: 154k]
  ------------------
  129|   166k|          groupMask) { /* channels are correlated */
  130|  12.2k|        CPns_SetCorrelation(&pAacDecoderChannelInfo[L]->data.aac.PnsData, group,
  131|  12.2k|                            band, 0);
  132|       |
  133|  12.2k|        if (CPns_IsPnsUsed(&pAacDecoderChannelInfo[L]->data.aac.PnsData, group,
  ------------------
  |  Branch (133:13): [True: 2.96k, False: 9.24k]
  ------------------
  134|  12.2k|                           band) &&
  135|  2.96k|            CPns_IsPnsUsed(&pAacDecoderChannelInfo[R]->data.aac.PnsData, group,
  ------------------
  |  Branch (135:13): [True: 1.19k, False: 1.76k]
  ------------------
  136|  2.96k|                           band))
  137|  1.19k|          pAacDecoderChannelInfo[L]->pComData->jointStereoData.MsUsed[band] ^=
  138|  1.19k|              groupMask; /* clear the groupMask-bit */
  139|  12.2k|      }
  140|   166k|    }
  141|  52.1k|  }
  142|  13.0k|}

_Z13IcsReadMaxSfbP13FDK_BITSTREAMP8CIcsInfoPK16SamplingRateInfo:
  109|   435k|                                const SamplingRateInfo *pSamplingRateInfo) {
  110|   435k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
  111|   435k|  int nbits;
  112|       |
  113|   435k|  if (IsLongBlock(pIcsInfo)) {
  ------------------
  |  Branch (113:7): [True: 369k, False: 66.3k]
  ------------------
  114|   369k|    nbits = 6;
  115|   369k|    pIcsInfo->TotalSfBands = pSamplingRateInfo->NumberOfScaleFactorBands_Long;
  116|   369k|  } else {
  117|  66.3k|    nbits = 4;
  118|  66.3k|    pIcsInfo->TotalSfBands = pSamplingRateInfo->NumberOfScaleFactorBands_Short;
  119|  66.3k|  }
  120|   435k|  pIcsInfo->MaxSfBands = (UCHAR)FDKreadBits(bs, nbits);
  121|       |
  122|   435k|  if (pIcsInfo->MaxSfBands > pIcsInfo->TotalSfBands) {
  ------------------
  |  Branch (122:7): [True: 399, False: 435k]
  ------------------
  123|    399|    ErrorStatus = AAC_DEC_PARSE_ERROR;
  124|    399|  }
  125|       |
  126|   435k|  return ErrorStatus;
  127|   435k|}
_Z7IcsReadP13FDK_BITSTREAMP8CIcsInfoPK16SamplingRateInfoj:
  131|   414k|                          const UINT flags) {
  132|   414k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
  133|       |
  134|   414k|  pIcsInfo->Valid = 0;
  135|       |
  136|   414k|  if (flags & AC_ELD) {
  ------------------
  |  |  303|   414k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (136:7): [True: 153k, False: 261k]
  ------------------
  137|   153k|    pIcsInfo->WindowSequence = BLOCK_LONG;
  138|   153k|    pIcsInfo->WindowShape = 0;
  139|   261k|  } else {
  140|   261k|    if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  307|   261k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  310|   261k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                  if (!(flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA))) {
  ------------------
  |  |  308|   261k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (140:9): [True: 60.1k, False: 201k]
  ------------------
  141|  60.1k|      FDKreadBits(bs, 1);
  142|  60.1k|    }
  143|   261k|    pIcsInfo->WindowSequence = (BLOCK_TYPE)FDKreadBits(bs, 2);
  144|   261k|    pIcsInfo->WindowShape = (UCHAR)FDKreadBits(bs, 1);
  145|   261k|    if (flags & AC_LD) {
  ------------------
  |  |  304|   261k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
  |  Branch (145:9): [True: 1.73k, False: 259k]
  ------------------
  146|  1.73k|      if (pIcsInfo->WindowShape) {
  ------------------
  |  Branch (146:11): [True: 59, False: 1.67k]
  ------------------
  147|     59|        pIcsInfo->WindowShape = 2; /* select low overlap instead of KBD */
  148|     59|      }
  149|  1.73k|    }
  150|   261k|  }
  151|       |
  152|       |  /* Sanity check */
  153|   414k|  if ((flags & (AC_ELD | AC_LD)) && pIcsInfo->WindowSequence != BLOCK_LONG) {
  ------------------
  |  |  303|   414k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                if ((flags & (AC_ELD | AC_LD)) && pIcsInfo->WindowSequence != BLOCK_LONG) {
  ------------------
  |  |  304|   414k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
  |  Branch (153:7): [True: 155k, False: 259k]
  |  Branch (153:37): [True: 5, False: 155k]
  ------------------
  154|      5|    pIcsInfo->WindowSequence = BLOCK_LONG;
  155|      5|    ErrorStatus = AAC_DEC_PARSE_ERROR;
  156|      5|    goto bail;
  157|      5|  }
  158|       |
  159|   414k|  ErrorStatus = IcsReadMaxSfb(bs, pIcsInfo, pSamplingRateInfo);
  160|   414k|  if (ErrorStatus != AAC_DEC_OK) {
  ------------------
  |  Branch (160:7): [True: 397, False: 414k]
  ------------------
  161|    397|    goto bail;
  162|    397|  }
  163|       |
  164|   414k|  if (IsLongBlock(pIcsInfo)) {
  ------------------
  |  Branch (164:7): [True: 349k, False: 65.0k]
  ------------------
  165|   349k|    if (!(flags & (AC_ELD | AC_SCALABLE | AC_BSAC | AC_USAC | AC_RSVD50 |
  ------------------
  |  |  303|   349k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                  if (!(flags & (AC_ELD | AC_SCALABLE | AC_BSAC | AC_USAC | AC_RSVD50 |
  ------------------
  |  |  302|   349k|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
                  if (!(flags & (AC_ELD | AC_SCALABLE | AC_BSAC | AC_USAC | AC_RSVD50 |
  ------------------
  |  |  306|   349k|#define AC_BSAC 0x000080        /*!< BSAC */
  ------------------
                  if (!(flags & (AC_ELD | AC_SCALABLE | AC_BSAC | AC_USAC | AC_RSVD50 |
  ------------------
  |  |  307|   349k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (!(flags & (AC_ELD | AC_SCALABLE | AC_BSAC | AC_USAC | AC_RSVD50 |
  ------------------
  |  |  310|   349k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
  |  Branch (165:9): [True: 18.9k, False: 330k]
  ------------------
  166|   349k|                   AC_RSV603DA))) /* If not ELD nor Scalable nor BSAC nor USAC
  ------------------
  |  |  308|   349k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  167|       |                                     syntax then ... */
  168|  18.9k|    {
  169|  18.9k|      if ((UCHAR)FDKreadBits(bs, 1) != 0) /* UCHAR PredictorDataPresent */
  ------------------
  |  Branch (169:11): [True: 71, False: 18.8k]
  ------------------
  170|     71|      {
  171|     71|        ErrorStatus = AAC_DEC_UNSUPPORTED_PREDICTION;
  172|     71|        goto bail;
  173|     71|      }
  174|  18.9k|    }
  175|       |
  176|   349k|    pIcsInfo->WindowGroups = 1;
  177|   349k|    pIcsInfo->WindowGroupLength[0] = 1;
  178|   349k|  } else {
  179|  65.0k|    INT i;
  180|  65.0k|    UINT mask;
  181|       |
  182|  65.0k|    pIcsInfo->ScaleFactorGrouping = (UCHAR)FDKreadBits(bs, 7);
  183|       |
  184|  65.0k|    pIcsInfo->WindowGroups = 0;
  185|       |
  186|   520k|    for (i = 0; i < (8 - 1); i++) {
  ------------------
  |  Branch (186:17): [True: 455k, False: 65.0k]
  ------------------
  187|   455k|      mask = 1 << (6 - i);
  188|   455k|      pIcsInfo->WindowGroupLength[i] = 1;
  189|       |
  190|   455k|      if (pIcsInfo->ScaleFactorGrouping & mask) {
  ------------------
  |  Branch (190:11): [True: 148k, False: 307k]
  ------------------
  191|   148k|        pIcsInfo->WindowGroupLength[pIcsInfo->WindowGroups]++;
  192|   307k|      } else {
  193|   307k|        pIcsInfo->WindowGroups++;
  194|   307k|      }
  195|   455k|    }
  196|       |
  197|       |    /* loop runs to i < 7 only */
  198|  65.0k|    pIcsInfo->WindowGroupLength[8 - 1] = 1;
  199|  65.0k|    pIcsInfo->WindowGroups++;
  200|  65.0k|  }
  201|       |
  202|   414k|bail:
  203|   414k|  if (ErrorStatus == AAC_DEC_OK) pIcsInfo->Valid = 1;
  ------------------
  |  Branch (203:7): [True: 414k, False: 473]
  ------------------
  204|       |
  205|   414k|  return ErrorStatus;
  206|   414k|}
_Z19getSamplingRateInfoP16SamplingRateInfojjj:
  227|   299k|                                      UINT samplingRate) {
  228|   299k|  int index = 0;
  229|       |
  230|       |  /* Search closest samplerate according to ISO/IEC 13818-7:2005(E) 8.2.4 (Table
  231|       |   * 38): */
  232|   299k|  if ((samplingRateIndex >= 15) || (samplesPerFrame == 768)) {
  ------------------
  |  Branch (232:7): [True: 25.9k, False: 273k]
  |  Branch (232:36): [True: 2.51k, False: 270k]
  ------------------
  233|  28.4k|    const UINT borders[] = {(UINT)-1, 92017, 75132, 55426, 46009, 37566,
  234|  28.4k|                            27713,    23004, 18783, 13856, 11502, 9391};
  235|  28.4k|    UINT i, samplingRateSearch = samplingRate;
  236|       |
  237|  28.4k|    if (samplesPerFrame == 768) {
  ------------------
  |  Branch (237:9): [True: 13.4k, False: 14.9k]
  ------------------
  238|  13.4k|      samplingRateSearch = (samplingRate * 4) / 3;
  239|  13.4k|    }
  240|       |
  241|   276k|    for (i = 0; i < 11; i++) {
  ------------------
  |  Branch (241:17): [True: 262k, False: 14.1k]
  ------------------
  242|   262k|      if (borders[i] > samplingRateSearch &&
  ------------------
  |  Branch (242:11): [True: 262k, False: 0]
  ------------------
  243|   262k|          samplingRateSearch >= borders[i + 1]) {
  ------------------
  |  Branch (243:11): [True: 14.2k, False: 248k]
  ------------------
  244|  14.2k|        break;
  245|  14.2k|      }
  246|   262k|    }
  247|  28.4k|    samplingRateIndex = i;
  248|  28.4k|  }
  249|       |
  250|   299k|  t->samplingRateIndex = samplingRateIndex;
  251|   299k|  t->samplingRate = samplingRate;
  252|       |
  253|   299k|  switch (samplesPerFrame) {
  254|   119k|    case 1024:
  ------------------
  |  Branch (254:5): [True: 119k, False: 180k]
  ------------------
  255|   119k|      index = 0;
  256|   119k|      break;
  257|   140k|    case 960:
  ------------------
  |  Branch (257:5): [True: 140k, False: 158k]
  ------------------
  258|   140k|      index = 1;
  259|   140k|      break;
  260|  13.4k|    case 768:
  ------------------
  |  Branch (260:5): [True: 13.4k, False: 285k]
  ------------------
  261|  13.4k|      index = 2;
  262|  13.4k|      break;
  263|  14.5k|    case 512:
  ------------------
  |  Branch (263:5): [True: 14.5k, False: 284k]
  ------------------
  264|  14.5k|      index = 3;
  265|  14.5k|      break;
  266|  11.8k|    case 480:
  ------------------
  |  Branch (266:5): [True: 11.8k, False: 287k]
  ------------------
  267|  11.8k|      index = 4;
  268|  11.8k|      break;
  269|       |
  270|      0|    default:
  ------------------
  |  Branch (270:5): [True: 0, False: 299k]
  ------------------
  271|      0|      return AAC_DEC_UNSUPPORTED_FORMAT;
  272|   299k|  }
  273|       |
  274|   299k|  t->ScaleFactorBands_Long =
  275|   299k|      sfbOffsetTables[index][samplingRateIndex].sfbOffsetLong;
  276|   299k|  t->ScaleFactorBands_Short =
  277|   299k|      sfbOffsetTables[index][samplingRateIndex].sfbOffsetShort;
  278|   299k|  t->NumberOfScaleFactorBands_Long =
  279|   299k|      sfbOffsetTables[index][samplingRateIndex].numberOfSfbLong;
  280|   299k|  t->NumberOfScaleFactorBands_Short =
  281|   299k|      sfbOffsetTables[index][samplingRateIndex].numberOfSfbShort;
  282|       |
  283|   299k|  if (t->ScaleFactorBands_Long == NULL ||
  ------------------
  |  Branch (283:7): [True: 0, False: 299k]
  ------------------
  284|   299k|      t->NumberOfScaleFactorBands_Long == 0) {
  ------------------
  |  Branch (284:7): [True: 0, False: 299k]
  ------------------
  285|      0|    t->samplingRate = 0;
  286|      0|    return AAC_DEC_UNSUPPORTED_FORMAT;
  287|      0|  }
  288|       |
  289|   299k|  FDK_ASSERT((UINT)t->ScaleFactorBands_Long[t->NumberOfScaleFactorBands_Long] ==
  ------------------
  |  |  221|   299k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 299k, False: 0]
  ------------------
  290|   299k|             samplesPerFrame);
  291|   299k|  FDK_ASSERT(
  ------------------
  |  |  221|   299k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (291:3): [True: 26.3k, False: 272k]
  |  Branch (291:3): [True: 272k, False: 0]
  |  Branch (291:3): [True: 299k, False: 0]
  ------------------
  292|   299k|      t->ScaleFactorBands_Short == NULL ||
  293|   299k|      (UINT)t->ScaleFactorBands_Short[t->NumberOfScaleFactorBands_Short] * 8 ==
  294|   299k|          samplesPerFrame);
  295|       |
  296|   299k|  return AAC_DEC_OK;
  297|   299k|}

_Z11IsLongBlockPK8CIcsInfo:
  499|  70.2M|inline UCHAR IsLongBlock(const CIcsInfo *pIcsInfo) {
  500|  70.2M|  return (pIcsInfo->WindowSequence != BLOCK_SHORT);
  501|  70.2M|}
_Z14GetWindowShapePK8CIcsInfo:
  503|  1.85M|inline UCHAR GetWindowShape(const CIcsInfo *pIcsInfo) {
  504|  1.85M|  return pIcsInfo->WindowShape;
  505|  1.85M|}
_Z17GetWindowSequencePK8CIcsInfo:
  507|  2.11M|inline BLOCK_TYPE GetWindowSequence(const CIcsInfo *pIcsInfo) {
  508|  2.11M|  return pIcsInfo->WindowSequence;
  509|  2.11M|}
_Z25GetScaleFactorBandOffsetsPK8CIcsInfoPK16SamplingRateInfo:
  512|  2.51M|    const CIcsInfo *pIcsInfo, const SamplingRateInfo *samplingRateInfo) {
  513|  2.51M|  if (IsLongBlock(pIcsInfo)) {
  ------------------
  |  Branch (513:7): [True: 1.84M, False: 662k]
  ------------------
  514|  1.84M|    return samplingRateInfo->ScaleFactorBands_Long;
  515|  1.84M|  } else {
  516|   662k|    return samplingRateInfo->ScaleFactorBands_Short;
  517|   662k|  }
  518|  2.51M|}
_Z27GetNumberOfScaleFactorBandsPK8CIcsInfoPK16SamplingRateInfo:
  521|   113k|    const CIcsInfo *pIcsInfo, const SamplingRateInfo *samplingRateInfo) {
  522|   113k|  if (IsLongBlock(pIcsInfo)) {
  ------------------
  |  Branch (522:7): [True: 31.6k, False: 81.4k]
  ------------------
  523|  31.6k|    return samplingRateInfo->NumberOfScaleFactorBands_Long;
  524|  81.4k|  } else {
  525|  81.4k|    return samplingRateInfo->NumberOfScaleFactorBands_Short;
  526|  81.4k|  }
  527|   113k|}
_Z18GetWindowsPerFramePK8CIcsInfo:
  529|   462k|inline int GetWindowsPerFrame(const CIcsInfo *pIcsInfo) {
  530|   462k|  return (pIcsInfo->WindowSequence == BLOCK_SHORT) ? 8 : 1;
  ------------------
  |  Branch (530:10): [True: 140k, False: 321k]
  ------------------
  531|   462k|}
_Z15GetWindowGroupsPK8CIcsInfo:
  533|  6.98M|inline UCHAR GetWindowGroups(const CIcsInfo *pIcsInfo) {
  534|  6.98M|  return pIcsInfo->WindowGroups;
  535|  6.98M|}
_Z20GetWindowGroupLengthPK8CIcsInfoi:
  537|  5.65M|inline UCHAR GetWindowGroupLength(const CIcsInfo *pIcsInfo, const INT index) {
  538|  5.65M|  return pIcsInfo->WindowGroupLength[index];
  539|  5.65M|}
_Z25GetWindowGroupLengthTablePK8CIcsInfo:
  541|   804k|inline const UCHAR *GetWindowGroupLengthTable(const CIcsInfo *pIcsInfo) {
  542|   804k|  return pIcsInfo->WindowGroupLength;
  543|   804k|}
_Z30GetScaleFactorBandsTransmittedPK8CIcsInfo:
  545|  4.37M|inline UCHAR GetScaleFactorBandsTransmitted(const CIcsInfo *pIcsInfo) {
  546|  4.37M|  return pIcsInfo->MaxSfBands;
  547|  4.37M|}
_Z33GetScaleMaxFactorBandsTransmittedPK8CIcsInfoS1_:
  550|   146k|                                               const CIcsInfo *pIcsInfo1) {
  551|   146k|  return fMax(pIcsInfo0->MaxSfBands, pIcsInfo1->MaxSfBands);
  552|   146k|}
_Z24GetScaleFactorBandsTotalPK8CIcsInfo:
  554|  1.44M|inline UCHAR GetScaleFactorBandsTotal(const CIcsInfo *pIcsInfo) {
  555|  1.44M|  return pIcsInfo->TotalSfBands;
  556|  1.44M|}
_Z18GetMaximumTnsBandsPK8CIcsInfoi:
  560|   299k|                                const int samplingRateIndex) {
  561|   299k|  return tns_max_bands_tbl[samplingRateIndex][!IsLongBlock(pIcsInfo)];
  562|   299k|}

_Z27CConcealment_InitCommonDataP14CConcealParams:
  265|  21.8k|void CConcealment_InitCommonData(CConcealParams *pConcealCommonData) {
  266|  21.8k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (266:7): [True: 21.8k, False: 0]
  ------------------
  267|  21.8k|    int i;
  268|       |
  269|       |    /* Set default error concealment technique */
  270|  21.8k|    pConcealCommonData->method = ConcealMethodInter;
  271|       |
  272|  21.8k|    pConcealCommonData->numFadeOutFrames = CONCEAL_DFLT_FADEOUT_FRAMES;
  ------------------
  |  |  161|  21.8k|#define CONCEAL_DFLT_FADEOUT_FRAMES (6)
  ------------------
  273|  21.8k|    pConcealCommonData->numFadeInFrames = CONCEAL_DFLT_FADEIN_FRAMES;
  ------------------
  |  |  162|  21.8k|#define CONCEAL_DFLT_FADEIN_FRAMES (5)
  ------------------
  274|  21.8k|    pConcealCommonData->numMuteReleaseFrames = CONCEAL_DFLT_MUTE_RELEASE_FRAMES;
  ------------------
  |  |  163|  21.8k|#define CONCEAL_DFLT_MUTE_RELEASE_FRAMES (0)
  ------------------
  275|       |
  276|  21.8k|    pConcealCommonData->comfortNoiseLevel =
  277|  21.8k|        (FIXP_DBL)CONCEAL_DFLT_COMF_NOISE_LEVEL;
  ------------------
  |  |  156|  21.8k|#define CONCEAL_DFLT_COMF_NOISE_LEVEL (0x100000)
  ------------------
  278|       |
  279|       |    /* Init fade factors (symetric) */
  280|  21.8k|    pConcealCommonData->fadeOutFactor[0] =
  281|  21.8k|        FL2FXCONST_SGL(CONCEAL_DFLT_FADE_FACTOR);
  ------------------
  |  |  180|  21.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  182|  21.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  21.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  183|  21.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  21.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  21.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  21.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  21.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  21.8k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  21.8k|    pConcealCommonData->fadeInFactor[0] = pConcealCommonData->fadeOutFactor[0];
  283|       |
  284|   699k|    for (i = 1; i < CONCEAL_MAX_NUM_FADE_FACTORS; i++) {
  ------------------
  |  |  113|   699k|#define CONCEAL_MAX_NUM_FADE_FACTORS (32)
  ------------------
  |  Branch (284:17): [True: 677k, False: 21.8k]
  ------------------
  285|   677k|      pConcealCommonData->fadeOutFactor[i] =
  286|   677k|          FX_DBL2FX_SGL(fMult(pConcealCommonData->fadeOutFactor[i - 1],
  ------------------
  |  |  220|  2.71M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   677k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   677k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 677k]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 677k, Folded]
  |  |  ------------------
  ------------------
  287|   677k|                              FL2FXCONST_SGL(CONCEAL_DFLT_FADE_FACTOR)));
  288|   677k|      pConcealCommonData->fadeInFactor[i] =
  289|   677k|          pConcealCommonData->fadeOutFactor[i];
  290|   677k|    }
  291|  21.8k|  }
  292|  21.8k|}
_Z22CConcealment_GetMethodP14CConcealParams:
  300|  58.3k|CConcealmentMethod CConcealment_GetMethod(CConcealParams *pConcealCommonData) {
  301|  58.3k|  CConcealmentMethod method = ConcealMethodNone;
  302|       |
  303|  58.3k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (303:7): [True: 58.3k, False: 0]
  ------------------
  304|  58.3k|    method = pConcealCommonData->method;
  305|  58.3k|  }
  306|       |
  307|  58.3k|  return (method);
  308|  58.3k|}
_Z28CConcealment_InitChannelDataP16CConcealmentInfoP14CConcealParams18AACDEC_RENDER_MODEi:
  322|  1.97M|                                  int samplesPerFrame) {
  323|  1.97M|  int i;
  324|  1.97M|  pConcealChannelInfo->TDNoiseSeed = 0;
  325|  1.97M|  FDKmemclear(pConcealChannelInfo->TDNoiseStates,
  326|  1.97M|              sizeof(pConcealChannelInfo->TDNoiseStates));
  327|  1.97M|  pConcealChannelInfo->TDNoiseCoef[0] = FL2FXCONST_SGL(0.05f);
  ------------------
  |  |  180|  1.97M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.97M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.97M, Folded]
  |  |  ------------------
  |  |  182|  1.97M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.97M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.97M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.97M]
  |  |  ------------------
  |  |  183|  1.97M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.97M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.97M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.97M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.97M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.97M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.97M|          : ((((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|  1.97M|  pConcealChannelInfo->TDNoiseCoef[1] = FL2FXCONST_SGL(0.5f);
  ------------------
  |  |  180|  1.97M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.97M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.97M, Folded]
  |  |  ------------------
  |  |  182|  1.97M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.97M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.97M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.97M]
  |  |  ------------------
  |  |  183|  1.97M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.97M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.97M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.97M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.97M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.97M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.97M|          : ((((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|  1.97M|  pConcealChannelInfo->TDNoiseCoef[2] = FL2FXCONST_SGL(0.45f);
  ------------------
  |  |  180|  1.97M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.97M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.97M, Folded]
  |  |  ------------------
  |  |  182|  1.97M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.97M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.97M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.97M]
  |  |  ------------------
  |  |  183|  1.97M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.97M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.97M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.97M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.97M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.97M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.97M|          : ((((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|  1.97M|  pConcealChannelInfo->pConcealParams = pConcealCommonData;
  332|       |
  333|  1.97M|  pConcealChannelInfo->lastRenderMode = initRenderMode;
  334|       |
  335|  1.97M|  pConcealChannelInfo->windowShape = CONCEAL_NOT_DEFINED;
  ------------------
  |  |  158|  1.97M|#define CONCEAL_NOT_DEFINED ((UCHAR)-1)
  ------------------
  336|  1.97M|  pConcealChannelInfo->windowSequence = BLOCK_LONG; /* default type */
  337|  1.97M|  pConcealChannelInfo->lastWinGrpLen = 1;
  338|       |
  339|  1.97M|  pConcealChannelInfo->concealState = ConcealState_Ok;
  340|       |
  341|  1.97M|  FDKmemclear(pConcealChannelInfo->spectralCoefficient,
  342|  1.97M|              1024 * sizeof(FIXP_CNCL));
  343|       |
  344|  17.7M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (344:15): [True: 15.7M, False: 1.97M]
  ------------------
  345|  15.7M|    pConcealChannelInfo->specScale[i] = 0;
  346|  15.7M|  }
  347|       |
  348|  1.97M|  pConcealChannelInfo->iRandomPhase = 0;
  349|       |
  350|  1.97M|  pConcealChannelInfo->prevFrameOk[0] = 1;
  351|  1.97M|  pConcealChannelInfo->prevFrameOk[1] = 1;
  352|       |
  353|  1.97M|  pConcealChannelInfo->cntFadeFrames = 0;
  354|  1.97M|  pConcealChannelInfo->cntValidFrames = 0;
  355|  1.97M|  pConcealChannelInfo->fade_old = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  1.97M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  356|  1.97M|  pConcealChannelInfo->winGrpOffset[0] = 0;
  357|  1.97M|  pConcealChannelInfo->winGrpOffset[1] = 0;
  358|  1.97M|  pConcealChannelInfo->attGrpOffset[0] = 0;
  359|  1.97M|  pConcealChannelInfo->attGrpOffset[1] = 0;
  360|  1.97M|}
_Z22CConcealment_SetParamsP14CConcealParamsiiiii:
  375|  36.5k|                       FIXP_DBL comfNoiseLevel) {
  376|       |  /* set concealment technique */
  377|  36.5k|  if (method != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (377:7): [True: 36.5k, False: 0]
  ------------------
  378|  36.5k|    switch ((CConcealmentMethod)method) {
  379|      0|      case ConcealMethodMute:
  ------------------
  |  Branch (379:7): [True: 0, False: 36.5k]
  ------------------
  380|  14.6k|      case ConcealMethodNoise:
  ------------------
  |  Branch (380:7): [True: 14.6k, False: 21.8k]
  ------------------
  381|  36.5k|      case ConcealMethodInter:
  ------------------
  |  Branch (381:7): [True: 21.8k, False: 14.6k]
  ------------------
  382|       |        /* Be sure to enable delay adjustment of SBR decoder! */
  383|  36.5k|        if (concealParams == NULL) {
  ------------------
  |  Branch (383:13): [True: 0, False: 36.5k]
  ------------------
  384|      0|          return AAC_DEC_INVALID_HANDLE;
  385|  36.5k|        } else {
  386|       |          /* set param */
  387|  36.5k|          concealParams->method = (CConcealmentMethod)method;
  388|  36.5k|        }
  389|  36.5k|        break;
  390|       |
  391|  36.5k|      default:
  ------------------
  |  Branch (391:7): [True: 0, False: 36.5k]
  ------------------
  392|      0|        return AAC_DEC_SET_PARAM_FAIL;
  393|  36.5k|    }
  394|  36.5k|  }
  395|       |
  396|       |  /* set number of frames for fade-out slope */
  397|  36.5k|  if (fadeOutSlope != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (397:7): [True: 0, False: 36.5k]
  ------------------
  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|  36.5k|  if (fadeInSlope != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (411:7): [True: 0, False: 36.5k]
  ------------------
  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|  36.5k|  if (muteRelease != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (425:7): [True: 0, False: 36.5k]
  ------------------
  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|  36.5k|  if (comfNoiseLevel != (FIXP_DBL)AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  36.5k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (440:7): [True: 0, False: 36.5k]
  ------------------
  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|  36.5k|  return (AAC_DEC_OK);
  453|  36.5k|}
_Z18CConcealment_StoreP16CConcealmentInfoP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfo:
  551|   592k|    CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo) {
  552|   592k|  UCHAR nbDiv = NB_DIV;
  ------------------
  |  |  145|   592k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
  553|       |
  554|   592k|  if (!(pAacDecoderChannelInfo->renderMode == AACDEC_RENDER_LPD &&
  ------------------
  |  Branch (554:9): [True: 41.5k, False: 550k]
  ------------------
  555|  41.5k|        pAacDecoderChannelInfo->data.usac.mod[nbDiv - 1] == 0))
  ------------------
  |  Branch (555:9): [True: 31.9k, False: 9.59k]
  ------------------
  556|       |
  557|   560k|  {
  558|   560k|    FIXP_DBL *pSpectralCoefficient =
  559|   560k|        SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient);
  ------------------
  |  |  114|   560k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  560|   560k|    SHORT *pSpecScale = pAacDecoderChannelInfo->specScale;
  561|   560k|    CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
  562|       |
  563|   560k|    SHORT tSpecScale[8];
  564|   560k|    UCHAR tWindowShape;
  565|   560k|    BLOCK_TYPE tWindowSequence;
  566|       |
  567|       |    /* store old window infos for swapping */
  568|   560k|    tWindowSequence = hConcealmentInfo->windowSequence;
  569|   560k|    tWindowShape = hConcealmentInfo->windowShape;
  570|       |
  571|       |    /* store old scale factors for swapping */
  572|   560k|    FDKmemcpy(tSpecScale, hConcealmentInfo->specScale, 8 * sizeof(SHORT));
  573|       |
  574|       |    /* store new window infos */
  575|   560k|    hConcealmentInfo->windowSequence = GetWindowSequence(pIcsInfo);
  576|   560k|    hConcealmentInfo->windowShape = GetWindowShape(pIcsInfo);
  577|   560k|    hConcealmentInfo->lastWinGrpLen =
  578|   560k|        *(GetWindowGroupLengthTable(pIcsInfo) + GetWindowGroups(pIcsInfo) - 1);
  579|       |
  580|       |    /* store new scale factors */
  581|   560k|    FDKmemcpy(hConcealmentInfo->specScale, pSpecScale, 8 * sizeof(SHORT));
  582|       |
  583|   560k|    if (hConcealmentInfo->pConcealParams->method < ConcealMethodInter) {
  ------------------
  |  Branch (583:9): [True: 487k, False: 72.3k]
  ------------------
  584|       |    /* store new spectral bins */
  585|   487k|#if (CNCL_FRACT_BITS == DFRACT_BITS)
  586|   487k|      FDKmemcpy(hConcealmentInfo->spectralCoefficient, pSpectralCoefficient,
  587|   487k|                1024 * sizeof(FIXP_CNCL));
  588|       |#else
  589|       |      FIXP_CNCL *RESTRICT pCncl =
  590|       |          &hConcealmentInfo->spectralCoefficient[1024 - 1];
  591|       |      FIXP_DBL *RESTRICT pSpec = &pSpectralCoefficient[1024 - 1];
  592|       |      int i;
  593|       |      for (i = 1024; i != 0; i--) {
  594|       |        *pCncl-- = FX_DBL2FX_CNCL(*pSpec--);
  595|       |      }
  596|       |#endif
  597|   487k|    } else {
  598|       |    /* swap spectral data */
  599|  72.3k|#if (FIXP_CNCL == FIXP_DBL)
  600|  72.3k|      C_ALLOC_SCRATCH_START(pSpecTmp, FIXP_DBL, 1024);
  ------------------
  |  |  324|  72.3k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  601|  72.3k|      FDKmemcpy(pSpecTmp, pSpectralCoefficient, 1024 * sizeof(FIXP_DBL));
  602|  72.3k|      FDKmemcpy(pSpectralCoefficient, hConcealmentInfo->spectralCoefficient,
  603|  72.3k|                1024 * sizeof(FIXP_DBL));
  604|  72.3k|      FDKmemcpy(hConcealmentInfo->spectralCoefficient, pSpecTmp,
  605|  72.3k|                1024 * sizeof(FIXP_DBL));
  606|  72.3k|      C_ALLOC_SCRATCH_END(pSpecTmp, FIXP_DBL, 1024);
  607|       |#else
  608|       |      FIXP_CNCL *RESTRICT pCncl =
  609|       |          &hConcealmentInfo->spectralCoefficient[1024 - 1];
  610|       |      FIXP_DBL *RESTRICT pSpec = &pSpectralCoefficient[1024 - 1];
  611|       |      FIXP_DBL tSpec;
  612|       |
  613|       |      for (int i = 1024; i != 0; i--) {
  614|       |        tSpec = *pSpec;
  615|       |        *pSpec-- = FX_CNCL2FX_DBL(*pCncl);
  616|       |        *pCncl-- = FX_DBL2FX_CNCL(tSpec);
  617|       |      }
  618|       |#endif
  619|       |
  620|       |      /* complete swapping of window infos */
  621|  72.3k|      pIcsInfo->WindowSequence = tWindowSequence;
  622|  72.3k|      pIcsInfo->WindowShape = tWindowShape;
  623|       |
  624|       |      /* complete swapping of scale factors */
  625|  72.3k|      FDKmemcpy(pSpecScale, tSpecScale, 8 * sizeof(SHORT));
  626|  72.3k|    }
  627|   560k|  }
  628|       |
  629|   592k|  if (pAacDecoderChannelInfo->renderMode == AACDEC_RENDER_LPD) {
  ------------------
  |  Branch (629:7): [True: 41.5k, False: 550k]
  ------------------
  630|       |    /* Store LSF4 */
  631|  41.5k|    FDKmemcpy(hConcealmentInfo->lsf4, pAacDecoderStaticChannelInfo->lpc4_lsf,
  632|  41.5k|              sizeof(hConcealmentInfo->lsf4));
  633|       |    /* Store TCX gain */
  634|  41.5k|    hConcealmentInfo->last_tcx_gain =
  635|  41.5k|        pAacDecoderStaticChannelInfo->last_tcx_gain;
  636|  41.5k|    hConcealmentInfo->last_tcx_gain_e =
  637|  41.5k|        pAacDecoderStaticChannelInfo->last_tcx_gain_e;
  638|  41.5k|  }
  639|   592k|}
_Z18CConcealment_ApplyP16CConcealmentInfoP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoPK16SamplingRateInfoihij:
  651|   601k|    const UCHAR lastLpdMode, const int frameOk, const UINT flags) {
  652|   601k|  int appliedProcessing = 0;
  653|   601k|  const int mute_release_active =
  654|   601k|      frameOk && (hConcealmentInfo->concealState >= ConcealState_Mute) &&
  ------------------
  |  Branch (654:7): [True: 592k, False: 9.64k]
  |  Branch (654:18): [True: 0, False: 592k]
  ------------------
  655|      0|      (hConcealmentInfo->cntValidFrames + 1 <=
  ------------------
  |  Branch (655:7): [True: 0, False: 0]
  ------------------
  656|      0|       hConcealmentInfo->pConcealParams->numMuteReleaseFrames);
  657|       |
  658|   601k|  if (hConcealmentInfo->windowShape == CONCEAL_NOT_DEFINED) {
  ------------------
  |  |  158|   601k|#define CONCEAL_NOT_DEFINED ((UCHAR)-1)
  ------------------
  |  Branch (658:7): [True: 62.1k, False: 539k]
  ------------------
  659|       |    /* Initialize window_shape with same value as in the current (parsed) frame.
  660|       |       Because section 4.6.11.3.2 (Windowing and block switching) of ISO/IEC
  661|       |       14496-3:2009 says: For the first raw_data_block() to be decoded the
  662|       |       window_shape of the left and right half of the window are identical. */
  663|  62.1k|    hConcealmentInfo->windowShape = pAacDecoderChannelInfo->icsInfo.WindowShape;
  664|  62.1k|  }
  665|       |
  666|   601k|  if (frameOk && !mute_release_active) {
  ------------------
  |  Branch (666:7): [True: 592k, False: 9.64k]
  |  Branch (666:18): [True: 592k, False: 0]
  ------------------
  667|       |    /* Update render mode if frameOk except for ongoing mute release state. */
  668|   592k|    hConcealmentInfo->lastRenderMode =
  669|   592k|        (SCHAR)pAacDecoderChannelInfo->renderMode;
  670|       |
  671|       |    /* Rescue current data for concealment in future frames */
  672|   592k|    CConcealment_Store(hConcealmentInfo, pAacDecoderChannelInfo,
  673|   592k|                       pAacDecoderStaticChannelInfo);
  674|       |    /* Reset index to random sign vector to make sign calculation frame agnostic
  675|       |       (only depends on number of subsequently concealed spectral blocks) */
  676|   592k|    hConcealmentInfo->iRandomPhase = 0;
  677|   592k|  } else {
  678|  9.64k|    if (hConcealmentInfo->lastRenderMode == AACDEC_RENDER_INVALID) {
  ------------------
  |  Branch (678:9): [True: 0, False: 9.64k]
  ------------------
  679|      0|      hConcealmentInfo->lastRenderMode = AACDEC_RENDER_IMDCT;
  680|      0|    }
  681|  9.64k|    pAacDecoderChannelInfo->renderMode =
  682|  9.64k|        (AACDEC_RENDER_MODE)hConcealmentInfo->lastRenderMode;
  683|  9.64k|  }
  684|       |
  685|       |  /* hand current frame status to the state machine */
  686|   601k|  CConcealment_UpdateState(hConcealmentInfo, frameOk,
  687|   601k|                           pAacDecoderStaticChannelInfo, samplesPerFrame,
  688|   601k|                           pAacDecoderChannelInfo);
  689|       |
  690|   601k|  {
  691|   601k|    if (!frameOk && pAacDecoderChannelInfo->renderMode == AACDEC_RENDER_IMDCT) {
  ------------------
  |  Branch (691:9): [True: 9.64k, False: 592k]
  |  Branch (691:21): [True: 5.98k, False: 3.66k]
  ------------------
  692|       |      /* LPC extrapolation */
  693|  5.98k|      CLpc_Conceal(pAacDecoderChannelInfo->data.usac.lsp_coeff,
  694|  5.98k|                   pAacDecoderStaticChannelInfo->lpc4_lsf,
  695|  5.98k|                   pAacDecoderStaticChannelInfo->lsf_adaptive_mean,
  696|  5.98k|                   hConcealmentInfo->lastRenderMode == AACDEC_RENDER_IMDCT);
  697|  5.98k|      FDKmemcpy(hConcealmentInfo->lsf4, pAacDecoderStaticChannelInfo->lpc4_lsf,
  698|  5.98k|                sizeof(pAacDecoderStaticChannelInfo->lpc4_lsf));
  699|  5.98k|    }
  700|       |
  701|       |    /* Create data for signal rendering according to the selected concealment
  702|       |     * method and decoder operating mode. */
  703|       |
  704|   601k|    if ((!frameOk || mute_release_active) &&
  ------------------
  |  Branch (704:10): [True: 9.64k, False: 592k]
  |  Branch (704:22): [True: 0, False: 592k]
  ------------------
  705|  9.64k|        (pAacDecoderChannelInfo->renderMode == AACDEC_RENDER_LPD)) {
  ------------------
  |  Branch (705:9): [True: 929, False: 8.71k]
  ------------------
  706|       |      /* Restore old LSF4 */
  707|    929|      FDKmemcpy(pAacDecoderStaticChannelInfo->lpc4_lsf, hConcealmentInfo->lsf4,
  708|    929|                sizeof(pAacDecoderStaticChannelInfo->lpc4_lsf));
  709|       |      /* Restore old TCX gain */
  710|    929|      pAacDecoderStaticChannelInfo->last_tcx_gain =
  711|    929|          hConcealmentInfo->last_tcx_gain;
  712|    929|      pAacDecoderStaticChannelInfo->last_tcx_gain_e =
  713|    929|          hConcealmentInfo->last_tcx_gain_e;
  714|    929|    }
  715|       |
  716|   601k|    if (!(pAacDecoderChannelInfo->renderMode == AACDEC_RENDER_LPD &&
  ------------------
  |  Branch (716:11): [True: 42.4k, False: 559k]
  ------------------
  717|   592k|          pAacDecoderStaticChannelInfo->last_lpd_mode == 0)) {
  ------------------
  |  Branch (717:11): [True: 9.65k, False: 32.8k]
  ------------------
  718|   592k|      switch (hConcealmentInfo->pConcealParams->method) {
  719|      0|        default:
  ------------------
  |  Branch (719:9): [True: 0, False: 592k]
  ------------------
  720|      0|        case ConcealMethodMute:
  ------------------
  |  Branch (720:9): [True: 0, False: 592k]
  ------------------
  721|      0|          if (!frameOk) {
  ------------------
  |  Branch (721:15): [True: 0, False: 0]
  ------------------
  722|       |            /* Mute spectral data in case of errors */
  723|      0|            FDKmemclear(pAacDecoderChannelInfo->pSpectralCoefficient,
  724|      0|                        samplesPerFrame * sizeof(FIXP_DBL));
  725|       |            /* Set last window shape */
  726|      0|            pAacDecoderChannelInfo->icsInfo.WindowShape =
  727|      0|                hConcealmentInfo->windowShape;
  728|      0|            appliedProcessing = 1;
  729|      0|          }
  730|      0|          break;
  731|       |
  732|   517k|        case ConcealMethodNoise:
  ------------------
  |  Branch (732:9): [True: 517k, False: 74.2k]
  ------------------
  733|       |          /* Noise substitution error concealment technique */
  734|   517k|          appliedProcessing = CConcealment_ApplyNoise(
  735|   517k|              hConcealmentInfo, pAacDecoderChannelInfo,
  736|   517k|              pAacDecoderStaticChannelInfo, pSamplingRateInfo, samplesPerFrame,
  737|   517k|              flags);
  738|   517k|          break;
  739|       |
  740|  74.2k|        case ConcealMethodInter:
  ------------------
  |  Branch (740:9): [True: 74.2k, False: 517k]
  ------------------
  741|       |          /* Energy interpolation concealment based on 3GPP */
  742|  74.2k|          appliedProcessing = CConcealment_ApplyInter(
  743|  74.2k|              hConcealmentInfo, pAacDecoderChannelInfo, pSamplingRateInfo,
  744|  74.2k|              samplesPerFrame, 0, /* don't use tonal improvement */
  745|  74.2k|              frameOk, mute_release_active);
  746|  74.2k|          break;
  747|   592k|      }
  748|   592k|    } else if (!frameOk || mute_release_active) {
  ------------------
  |  Branch (748:16): [True: 491, False: 9.16k]
  |  Branch (748:28): [True: 0, False: 9.16k]
  ------------------
  749|       |      /* simply restore the buffer */
  750|    491|      FIXP_DBL *pSpectralCoefficient =
  751|    491|          SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient);
  ------------------
  |  |  114|    491|#define SPEC_LONG(ptr) (ptr)
  ------------------
  752|    491|      SHORT *pSpecScale = pAacDecoderChannelInfo->specScale;
  753|    491|      CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
  754|       |#if (CNCL_FRACT_BITS != DFRACT_BITS)
  755|       |      FIXP_CNCL *RESTRICT pCncl =
  756|       |          &hConcealmentInfo->spectralCoefficient[1024 - 1];
  757|       |      FIXP_DBL *RESTRICT pSpec = &pSpectralCoefficient[1024 - 1];
  758|       |      int i;
  759|       |#endif
  760|       |
  761|       |      /* restore window infos (gri) do we need that? */
  762|    491|      pIcsInfo->WindowSequence = hConcealmentInfo->windowSequence;
  763|    491|      pIcsInfo->WindowShape = hConcealmentInfo->windowShape;
  764|       |
  765|    491|      if (hConcealmentInfo->concealState != ConcealState_Mute) {
  ------------------
  |  Branch (765:11): [True: 491, False: 0]
  ------------------
  766|       |        /* restore scale factors */
  767|    491|        FDKmemcpy(pSpecScale, hConcealmentInfo->specScale, 8 * sizeof(SHORT));
  768|       |
  769|       |        /* restore spectral bins */
  770|    491|#if (CNCL_FRACT_BITS == DFRACT_BITS)
  771|    491|        FDKmemcpy(pSpectralCoefficient, hConcealmentInfo->spectralCoefficient,
  772|    491|                  1024 * sizeof(FIXP_DBL));
  773|       |#else
  774|       |        for (i = 1024; i != 0; i--) {
  775|       |          *pSpec-- = FX_CNCL2FX_DBL(*pCncl--);
  776|       |        }
  777|       |#endif
  778|    491|      } else {
  779|       |        /* clear scale factors */
  780|      0|        FDKmemclear(pSpecScale, 8 * sizeof(SHORT));
  781|       |
  782|       |        /* clear buffer */
  783|      0|        FDKmemclear(pSpectralCoefficient, 1024 * sizeof(FIXP_CNCL));
  784|      0|      }
  785|    491|    }
  786|   601k|  }
  787|       |  /* update history */
  788|   601k|  hConcealmentInfo->prevFrameOk[0] = hConcealmentInfo->prevFrameOk[1];
  789|   601k|  hConcealmentInfo->prevFrameOk[1] = frameOk;
  790|       |
  791|   601k|  return mute_release_active ? -1 : appliedProcessing;
  ------------------
  |  Branch (791:10): [True: 0, False: 601k]
  ------------------
  792|   601k|}
_Z27CConcealment_GetLastFrameOkP16CConcealmentInfoi:
 1636|   416k|                                const int fBeforeApply) {
 1637|   416k|  int prevFrameOk = 1;
 1638|       |
 1639|   416k|  if (hConcealmentInfo != NULL) {
  ------------------
  |  Branch (1639:7): [True: 416k, False: 0]
  ------------------
 1640|   416k|    prevFrameOk = hConcealmentInfo->prevFrameOk[fBeforeApply & 0x1];
 1641|   416k|  }
 1642|       |
 1643|   416k|  return prevFrameOk;
 1644|   416k|}
_Z21CConcealment_GetDelayP14CConcealParams:
 1651|   714k|UINT CConcealment_GetDelay(CConcealParams *pConcealCommonData) {
 1652|   714k|  UINT frameDelay = 0;
 1653|       |
 1654|   714k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (1654:7): [True: 714k, False: 0]
  ------------------
 1655|   714k|    switch (pConcealCommonData->method) {
 1656|      0|      case ConcealMethodTonal:
  ------------------
  |  Branch (1656:7): [True: 0, False: 714k]
  ------------------
 1657|   132k|      case ConcealMethodInter:
  ------------------
  |  Branch (1657:7): [True: 132k, False: 581k]
  ------------------
 1658|   132k|        frameDelay = 1;
 1659|   132k|        break;
 1660|   581k|      default:
  ------------------
  |  Branch (1660:7): [True: 581k, False: 132k]
  ------------------
 1661|   581k|        break;
 1662|   714k|    }
 1663|   714k|  }
 1664|       |
 1665|   714k|  return frameDelay;
 1666|   714k|}
_Z21CConcealment_TDFadingiPP28CAacDecoderStaticChannelInfoiPiS2_:
 1849|   601k|    const INT aacOutDataHeadroom, PCM_DEC *pcmdata, PCM_DEC *pcmdata_1) {
 1850|       |  /*
 1851|       |  Do the fading in Time domain based on concealment states and core mode
 1852|       |  */
 1853|   601k|  FIXP_DBL fadeStop, attMute = (FIXP_DBL)0;
 1854|   601k|  int idx = 0, ii;
 1855|   601k|  CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo =
 1856|   601k|      *ppAacDecoderStaticChannelInfo;
 1857|   601k|  CConcealmentInfo *pConcealmentInfo =
 1858|   601k|      &pAacDecoderStaticChannelInfo->concealmentInfo;
 1859|   601k|  CConcealParams *pConcealParams = pConcealmentInfo->pConcealParams;
 1860|   601k|  const CConcealmentState concealState = pConcealmentInfo->concealState;
 1861|   601k|  TDfadingType fadingType;
 1862|   601k|  FIXP_DBL fadingStations[9] = {0};
 1863|   601k|  int fadingSteps[8] = {0};
 1864|   601k|  const FIXP_DBL fadeStart =
 1865|   601k|      pConcealmentInfo
 1866|   601k|          ->fade_old; /* start fading at last end-of-frame attenuation */
 1867|   601k|  FIXP_SGL *fadeFactor = pConcealParams->fadeOutFactor;
 1868|   601k|  const INT cntFadeFrames = pConcealmentInfo->cntFadeFrames;
 1869|   601k|  int TDFadeOutStopBeforeMute = 1;
 1870|   601k|  int TDFadeInStopBeforeFullLevel = 1;
 1871|       |
 1872|       |  /*
 1873|       |  determine Fading behaviour (end-of-frame attenuation and fading type) (1.)
 1874|       |  */
 1875|       |
 1876|   601k|  switch (concealState) {
 1877|  7.26k|    case ConcealState_Single:
  ------------------
  |  Branch (1877:5): [True: 7.26k, False: 594k]
  ------------------
 1878|  7.27k|    case ConcealState_Mute:
  ------------------
  |  Branch (1878:5): [True: 3, False: 601k]
  ------------------
 1879|  7.79k|    case ConcealState_FadeOut:
  ------------------
  |  Branch (1879:5): [True: 522, False: 601k]
  ------------------
 1880|  7.79k|      idx = (pConcealParams->method == ConcealMethodNoise) ? cntFadeFrames - 1
  ------------------
  |  Branch (1880:13): [True: 7.71k, False: 75]
  ------------------
 1881|  7.79k|                                                           : cntFadeFrames;
 1882|  7.79k|      fadingType = FADE_TIMEDOMAIN;
 1883|       |
 1884|  7.79k|      if (concealState == ConcealState_Mute ||
  ------------------
  |  Branch (1884:11): [True: 3, False: 7.78k]
  ------------------
 1885|  7.78k|          (cntFadeFrames + TDFadeOutStopBeforeMute) >
  ------------------
  |  Branch (1885:11): [True: 11, False: 7.77k]
  ------------------
 1886|  7.78k|              pConcealmentInfo->pConcealParams->numFadeOutFrames) {
 1887|     14|        fadingType = FADE_TIMEDOMAIN_TOSPECTRALMUTE;
 1888|     14|      }
 1889|       |
 1890|  7.79k|      break;
 1891|      0|    case ConcealState_FadeIn:
  ------------------
  |  Branch (1891:5): [True: 0, False: 601k]
  ------------------
 1892|      0|      idx = cntFadeFrames;
 1893|      0|      idx -= TDFadeInStopBeforeFullLevel;
 1894|      0|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|      0|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1895|   594k|    case ConcealState_Ok:
  ------------------
  |  Branch (1895:5): [True: 594k, False: 7.79k]
  ------------------
 1896|   594k|      fadeFactor = pConcealParams->fadeInFactor;
 1897|   594k|      idx = (concealState == ConcealState_Ok) ? -1 : idx;
  ------------------
  |  Branch (1897:13): [True: 594k, False: 0]
  ------------------
 1898|   594k|      fadingType = (pConcealmentInfo->concealState_old == ConcealState_Mute)
  ------------------
  |  Branch (1898:20): [True: 0, False: 594k]
  ------------------
 1899|   594k|                       ? FADE_TIMEDOMAIN_FROMSPECTRALMUTE
 1900|   594k|                       : FADE_TIMEDOMAIN;
 1901|   594k|      break;
 1902|      0|    default:
  ------------------
  |  Branch (1902:5): [True: 0, False: 601k]
  ------------------
 1903|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1903:7): [Folded, False: 0]
  ------------------
 1904|      0|      fadingType = FADE_TIMEDOMAIN_TOSPECTRALMUTE;
 1905|      0|      break;
 1906|   601k|  }
 1907|       |
 1908|       |  /* determine Target end-of-frame fading level and fading slope */
 1909|   601k|  switch (fadingType) {
  ------------------
  |  Branch (1909:11): [True: 601k, False: 0]
  ------------------
 1910|      0|    case FADE_TIMEDOMAIN_FROMSPECTRALMUTE:
  ------------------
  |  Branch (1910:5): [True: 0, False: 601k]
  ------------------
 1911|      0|      fadeStop =
 1912|      0|          (idx < 0) ? (FIXP_DBL)MAXVAL_DBL : FX_SGL2FX_DBL(fadeFactor[idx]);
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
                        (idx < 0) ? (FIXP_DBL)MAXVAL_DBL : FX_SGL2FX_DBL(fadeFactor[idx]);
  ------------------
  |  |  219|      0|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  |  Branch (1912:11): [True: 0, False: 0]
  ------------------
 1913|      0|      if (pConcealmentInfo->pConcealParams->numFadeInFrames == 0) {
  ------------------
  |  Branch (1913:11): [True: 0, False: 0]
  ------------------
 1914|       |        /* do step as fast as possible */
 1915|      0|        fadingSteps[0] = 1;
 1916|      0|        break;
 1917|      0|      }
 1918|      0|      CConcealment_TDFading_doLinearFadingSteps(&fadingSteps[0]);
 1919|      0|      break;
 1920|   601k|    case FADE_TIMEDOMAIN:
  ------------------
  |  Branch (1920:5): [True: 601k, False: 14]
  ------------------
 1921|   601k|      fadeStop =
 1922|   601k|          (idx < 0) ? (FIXP_DBL)MAXVAL_DBL : FX_SGL2FX_DBL(fadeFactor[idx]);
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
                        (idx < 0) ? (FIXP_DBL)MAXVAL_DBL : FX_SGL2FX_DBL(fadeFactor[idx]);
  ------------------
  |  |  219|   609k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  7.77k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  7.77k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  |  Branch (1922:11): [True: 594k, False: 7.77k]
  ------------------
 1923|   601k|      CConcealment_TDFading_doLinearFadingSteps(&fadingSteps[0]);
 1924|   601k|      break;
 1925|     14|    case FADE_TIMEDOMAIN_TOSPECTRALMUTE:
  ------------------
  |  Branch (1925:5): [True: 14, False: 601k]
  ------------------
 1926|     14|      fadeStop = attMute;
 1927|     14|      if (pConcealmentInfo->pConcealParams->numFadeOutFrames == 0) {
  ------------------
  |  Branch (1927:11): [True: 0, False: 14]
  ------------------
 1928|       |        /* do step as fast as possible */
 1929|      0|        fadingSteps[0] = 1;
 1930|      0|        break;
 1931|      0|      }
 1932|     14|      CConcealment_TDFading_doLinearFadingSteps(&fadingSteps[0]);
 1933|     14|      break;
 1934|   601k|  }
 1935|       |
 1936|       |  /*
 1937|       |  Render fading levels within current frame and do the final fading (2.)
 1938|       |  */
 1939|       |
 1940|   601k|  len >>= 3;
 1941|   601k|  CConcealment_TDFadeFillFadingStations(fadingStations, fadingSteps, fadeStop,
 1942|   601k|                                        fadeStart, fadingType);
 1943|       |
 1944|   601k|  if ((fadingStations[8] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   601k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1944:7): [True: 7.79k, False: 594k]
  ------------------
 1945|   594k|      (fadingStations[7] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1945:7): [True: 0, False: 594k]
  ------------------
 1946|   594k|      (fadingStations[6] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1946:7): [True: 0, False: 594k]
  ------------------
 1947|   594k|      (fadingStations[5] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1947:7): [True: 0, False: 594k]
  ------------------
 1948|   594k|      (fadingStations[4] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1948:7): [True: 0, False: 594k]
  ------------------
 1949|   594k|      (fadingStations[3] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1949:7): [True: 0, False: 594k]
  ------------------
 1950|   594k|      (fadingStations[2] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1950:7): [True: 0, False: 594k]
  ------------------
 1951|   594k|      (fadingStations[1] != (FIXP_DBL)MAXVAL_DBL) ||
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1951:7): [True: 0, False: 594k]
  ------------------
 1952|   594k|      (fadingStations[0] !=
  ------------------
  |  Branch (1952:7): [True: 0, False: 594k]
  ------------------
 1953|   594k|       (FIXP_DBL)MAXVAL_DBL)) /* if there's something to fade */
  ------------------
  |  |  156|   594k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1954|  7.79k|  {
 1955|  7.79k|    int start = 0;
 1956|  70.1k|    for (ii = 0; ii < 8; ii++) {
  ------------------
  |  Branch (1956:18): [True: 62.3k, False: 7.79k]
  ------------------
 1957|  62.3k|      CConcealment_TDFadePcmAtt(start, len, fadingStations[ii],
 1958|  62.3k|                                fadingStations[ii + 1], pcmdata);
 1959|  62.3k|      start += len;
 1960|  62.3k|    }
 1961|  7.79k|  }
 1962|   601k|  CConcealment_TDNoise_Apply(pConcealmentInfo, len, aacOutDataHeadroom,
 1963|   601k|                             pcmdata);
 1964|       |
 1965|       |  /* Save end-of-frame attenuation and fading type */
 1966|   601k|  pConcealmentInfo->lastFadingType = fadingType;
 1967|   601k|  pConcealmentInfo->fade_old = fadeStop;
 1968|   601k|  pConcealmentInfo->concealState_old = concealState;
 1969|       |
 1970|   601k|  return 1;
 1971|   601k|}
conceal.cpp:_ZL23CConcealment_ApplyNoiseP16CConcealmentInfoP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoPK16SamplingRateInfoij:
  805|   517k|    const UINT flags) {
  806|   517k|  FIXP_DBL *pSpectralCoefficient =
  807|   517k|      SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient);
  ------------------
  |  |  114|   517k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  808|   517k|  CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
  809|       |
  810|   517k|  int appliedProcessing = 0;
  811|       |
  812|   517k|  FDK_ASSERT(pConcealmentInfo != NULL);
  ------------------
  |  |  221|   517k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (812:3): [True: 517k, False: 0]
  ------------------
  813|   517k|  FDK_ASSERT((samplesPerFrame >= 120) && (samplesPerFrame <= 1024));
  ------------------
  |  |  221|   517k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (813:3): [True: 517k, False: 0]
  |  Branch (813:3): [True: 517k, False: 0]
  |  Branch (813:3): [True: 517k, False: 0]
  ------------------
  814|       |
  815|   517k|  switch (pConcealmentInfo->concealState) {
  816|   510k|    case ConcealState_Ok:
  ------------------
  |  Branch (816:5): [True: 510k, False: 7.24k]
  ------------------
  817|       |      /* Nothing to do here! */
  818|   510k|      break;
  819|       |
  820|  6.93k|    case ConcealState_Single:
  ------------------
  |  Branch (820:5): [True: 6.93k, False: 511k]
  ------------------
  821|  7.23k|    case ConcealState_FadeOut:
  ------------------
  |  Branch (821:5): [True: 302, False: 517k]
  ------------------
  822|  7.23k|      appliedProcessing = CConcealment_ApplyFadeOut(
  823|  7.23k|          /*mode =*/1, pConcealmentInfo, pAacDecoderStaticChannelInfo,
  824|  7.23k|          samplesPerFrame, pAacDecoderChannelInfo);
  825|  7.23k|      break;
  826|       |
  827|      6|    case ConcealState_Mute: {
  ------------------
  |  Branch (827:5): [True: 6, False: 517k]
  ------------------
  828|       |      /* set dummy window parameters */
  829|      6|      pIcsInfo->Valid = 0; /* Trigger the generation of a consitent IcsInfo */
  830|      6|      pIcsInfo->WindowShape =
  831|      6|          pConcealmentInfo->windowShape; /* Prevent an invalid WindowShape
  832|       |                                            (required for F/T transform) */
  833|      6|      pIcsInfo->WindowSequence =
  834|      6|          CConcealment_GetWinSeq(pConcealmentInfo->windowSequence);
  835|      6|      pConcealmentInfo->windowSequence =
  836|      6|          pIcsInfo->WindowSequence; /* Store for next frame
  837|       |                                       (spectrum in concealment
  838|       |                                       buffer can't be used at
  839|       |                                       all) */
  840|       |
  841|       |      /* mute spectral data */
  842|      6|      FDKmemclear(pSpectralCoefficient, samplesPerFrame * sizeof(FIXP_DBL));
  843|      6|      FDKmemclear(pConcealmentInfo->spectralCoefficient,
  844|      6|                  samplesPerFrame * sizeof(FIXP_DBL));
  845|       |
  846|      6|      appliedProcessing = 1;
  847|      6|    } break;
  848|       |
  849|      0|    case ConcealState_FadeIn: {
  ------------------
  |  Branch (849:5): [True: 0, False: 517k]
  ------------------
  850|       |      /* TimeDomainFading:                                        */
  851|       |      /* Attenuation of signal is done in CConcealment_TDFading() */
  852|       |
  853|      0|      appliedProcessing = 1;
  854|      0|    } break;
  855|       |
  856|      0|    default:
  ------------------
  |  Branch (856:5): [True: 0, False: 517k]
  ------------------
  857|       |      /* we shouldn't come here anyway */
  858|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (858:7): [Folded, False: 0]
  ------------------
  859|      0|      break;
  860|   517k|  }
  861|       |
  862|   517k|  return appliedProcessing;
  863|   517k|}
conceal.cpp:_ZL25CConcealment_ApplyFadeOutiP16CConcealmentInfoP28CAacDecoderStaticChannelInfoiP22CAacDecoderChannelInfo:
 1671|  14.9k|    const int samplesPerFrame, CAacDecoderChannelInfo *pAacDecoderChannelInfo) {
 1672|       |  /* mode 1 = apply RandomSign and mute spectral coefficients if necessary,  *
 1673|       |   * mode 0 = Update cntFadeFrames                                            */
 1674|       |
 1675|       |  /* restore frequency coefficients from buffer with a specific muting */
 1676|  14.9k|  int srcWin, dstWin, numWindows = 1;
 1677|  14.9k|  int windowLen = samplesPerFrame;
 1678|  14.9k|  int srcGrpStart = 0;
 1679|  14.9k|  int winIdxStride = 1;
 1680|  14.9k|  int numWinGrpPerFac, attIdx, attIdxStride;
 1681|  14.9k|  int i;
 1682|  14.9k|  int appliedProcessing = 0;
 1683|       |
 1684|  14.9k|  CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
 1685|  14.9k|  FIXP_DBL *pSpectralCoefficient =
 1686|  14.9k|      SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient);
  ------------------
  |  |  114|  14.9k|#define SPEC_LONG(ptr) (ptr)
  ------------------
 1687|  14.9k|  SHORT *pSpecScale = pAacDecoderChannelInfo->specScale;
 1688|       |
 1689|       |  /* set old window parameters */
 1690|  14.9k|  if (pConcealmentInfo->lastRenderMode == AACDEC_RENDER_LPD) {
  ------------------
  |  Branch (1690:7): [True: 1.36k, False: 13.5k]
  ------------------
 1691|  1.36k|    switch (pAacDecoderStaticChannelInfo->last_lpd_mode) {
  ------------------
  |  Branch (1691:13): [True: 702, False: 665]
  ------------------
 1692|    532|      case 1:
  ------------------
  |  Branch (1692:7): [True: 532, False: 835]
  ------------------
 1693|    532|        numWindows = 4;
 1694|    532|        srcGrpStart = 3;
 1695|    532|        windowLen = samplesPerFrame >> 2;
 1696|    532|        break;
 1697|     82|      case 2:
  ------------------
  |  Branch (1697:7): [True: 82, False: 1.28k]
  ------------------
 1698|     82|        numWindows = 2;
 1699|     82|        srcGrpStart = 1;
 1700|     82|        windowLen = samplesPerFrame >> 1;
 1701|     82|        winIdxStride = 2;
 1702|     82|        break;
 1703|     88|      case 3:
  ------------------
  |  Branch (1703:7): [True: 88, False: 1.27k]
  ------------------
 1704|     88|        numWindows = 1;
 1705|     88|        srcGrpStart = 0;
 1706|     88|        windowLen = samplesPerFrame;
 1707|     88|        winIdxStride = 4;
 1708|     88|        break;
 1709|  1.36k|    }
 1710|  1.36k|    pConcealmentInfo->lastWinGrpLen = 1;
 1711|  13.5k|  } else {
 1712|  13.5k|    pIcsInfo->WindowShape = pConcealmentInfo->windowShape;
 1713|  13.5k|    pIcsInfo->WindowSequence = pConcealmentInfo->windowSequence;
 1714|       |
 1715|  13.5k|    if (pConcealmentInfo->windowSequence == BLOCK_SHORT) {
  ------------------
  |  Branch (1715:9): [True: 1.29k, False: 12.3k]
  ------------------
 1716|       |      /* short block handling */
 1717|  1.29k|      numWindows = 8;
 1718|  1.29k|      windowLen = samplesPerFrame >> 3;
 1719|  1.29k|      srcGrpStart = numWindows - pConcealmentInfo->lastWinGrpLen;
 1720|  1.29k|    }
 1721|  13.5k|  }
 1722|       |
 1723|  14.9k|  attIdxStride =
 1724|  14.9k|      fMax(1, (int)(numWindows / (pConcealmentInfo->lastWinGrpLen + 1)));
 1725|       |
 1726|       |  /* load last state */
 1727|  14.9k|  attIdx = pConcealmentInfo->cntFadeFrames;
 1728|  14.9k|  numWinGrpPerFac = pConcealmentInfo->attGrpOffset[mode];
 1729|  14.9k|  srcWin = srcGrpStart + pConcealmentInfo->winGrpOffset[mode];
 1730|       |
 1731|  14.9k|  FDK_ASSERT((srcGrpStart * windowLen + windowLen) <= samplesPerFrame);
  ------------------
  |  |  221|  14.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1731:3): [True: 14.9k, False: 0]
  ------------------
 1732|  14.9k|  FDK_ASSERT((srcWin * windowLen + windowLen) <= 1024);
  ------------------
  |  |  221|  14.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1732:3): [True: 14.9k, False: 0]
  ------------------
 1733|       |
 1734|  40.6k|  for (dstWin = 0; dstWin < numWindows; dstWin += 1) {
  ------------------
  |  Branch (1734:20): [True: 25.6k, False: 14.9k]
  ------------------
 1735|  25.6k|    FIXP_CNCL *pCncl =
  ------------------
  |  |  115|  25.6k|#define FIXP_CNCL FIXP_DBL
  ------------------
 1736|  25.6k|        pConcealmentInfo->spectralCoefficient + (srcWin * windowLen);
 1737|  25.6k|    FIXP_DBL *pOut = pSpectralCoefficient + (dstWin * windowLen);
 1738|       |
 1739|  25.6k|    if (mode == 1) {
  ------------------
  |  Branch (1739:9): [True: 12.6k, False: 13.0k]
  ------------------
 1740|       |      /* mute if attIdx gets large enaugh */
 1741|  12.6k|      if (attIdx > pConcealmentInfo->pConcealParams->numFadeOutFrames) {
  ------------------
  |  Branch (1741:11): [True: 47, False: 12.5k]
  ------------------
 1742|     47|        FDKmemclear(pCncl, sizeof(FIXP_DBL) * windowLen);
 1743|     47|      }
 1744|       |
 1745|       |      /* restore frequency coefficients from buffer - attenuation is done later
 1746|       |       */
 1747|  5.30M|      for (i = 0; i < windowLen; i++) {
  ------------------
  |  Branch (1747:19): [True: 5.29M, False: 12.6k]
  ------------------
 1748|  5.29M|        pOut[i] = pCncl[i];
 1749|  5.29M|      }
 1750|       |
 1751|       |      /* apply random change of sign for spectral coefficients */
 1752|  12.6k|      CConcealment_ApplyRandomSign(pConcealmentInfo->iRandomPhase, pOut,
 1753|  12.6k|                                   windowLen);
 1754|       |
 1755|       |      /* Increment random phase index to avoid repetition artifacts. */
 1756|  12.6k|      pConcealmentInfo->iRandomPhase =
 1757|  12.6k|          (pConcealmentInfo->iRandomPhase + 1) & (AAC_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  125|  12.6k|  512 /*!< Size of random number array for noise floor */
  ------------------
 1758|       |
 1759|       |      /* set old scale factors */
 1760|  12.6k|      pSpecScale[dstWin * winIdxStride] =
 1761|  12.6k|          pConcealmentInfo->specScale[srcWin * winIdxStride];
 1762|  12.6k|    }
 1763|       |
 1764|  25.6k|    srcWin += 1;
 1765|       |
 1766|  25.6k|    if (srcWin >= numWindows) {
  ------------------
  |  Branch (1766:9): [True: 24.4k, False: 1.25k]
  ------------------
 1767|       |      /* end of sequence -> rewind to first window of group */
 1768|  24.4k|      srcWin = srcGrpStart;
 1769|  24.4k|      numWinGrpPerFac += 1;
 1770|  24.4k|      if (numWinGrpPerFac >= attIdxStride) {
  ------------------
  |  Branch (1770:11): [True: 16.7k, False: 7.67k]
  ------------------
 1771|  16.7k|        numWinGrpPerFac = 0;
 1772|  16.7k|        attIdx += 1;
 1773|  16.7k|      }
 1774|  24.4k|    }
 1775|  25.6k|  }
 1776|       |
 1777|       |  /* store current state */
 1778|       |
 1779|  14.9k|  pConcealmentInfo->winGrpOffset[mode] = srcWin - srcGrpStart;
 1780|  14.9k|  FDK_ASSERT((pConcealmentInfo->winGrpOffset[mode] >= 0) &&
  ------------------
  |  |  221|  14.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1780:3): [True: 14.9k, False: 0]
  |  Branch (1780:3): [True: 14.9k, False: 0]
  |  Branch (1780:3): [True: 14.9k, False: 0]
  ------------------
 1781|  14.9k|             (pConcealmentInfo->winGrpOffset[mode] < 8));
 1782|  14.9k|  pConcealmentInfo->attGrpOffset[mode] = numWinGrpPerFac;
 1783|  14.9k|  FDK_ASSERT((pConcealmentInfo->attGrpOffset[mode] >= 0) &&
  ------------------
  |  |  221|  14.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1783:3): [True: 14.9k, False: 0]
  |  Branch (1783:3): [True: 14.9k, False: 0]
  |  Branch (1783:3): [True: 14.9k, False: 0]
  ------------------
 1784|  14.9k|             (pConcealmentInfo->attGrpOffset[mode] < attIdxStride));
 1785|       |
 1786|  14.9k|  if (mode == 0) {
  ------------------
  |  Branch (1786:7): [True: 7.72k, False: 7.23k]
  ------------------
 1787|  7.72k|    pConcealmentInfo->cntFadeFrames = attIdx;
 1788|  7.72k|  }
 1789|       |
 1790|  14.9k|  appliedProcessing = 1;
 1791|       |
 1792|  14.9k|  return appliedProcessing;
 1793|  14.9k|}
conceal.cpp:_ZL28CConcealment_ApplyRandomSigniPii:
 1601|  12.8k|                                         int samplesPerFrame) {
 1602|  12.8k|  int i;
 1603|  12.8k|  USHORT packedSign = 0;
 1604|       |
 1605|       |  /* random table 512x16bit has been reduced to 512 packed sign bits = 32x16 bit
 1606|       |   */
 1607|       |
 1608|       |  /* read current packed sign word */
 1609|  12.8k|  packedSign = AacDec_randomSign[randomPhase >> 4];
 1610|  12.8k|  packedSign >>= (randomPhase & 0xf);
 1611|       |
 1612|  5.51M|  for (i = 0; i < samplesPerFrame; i++) {
  ------------------
  |  Branch (1612:15): [True: 5.50M, False: 12.8k]
  ------------------
 1613|  5.50M|    if ((randomPhase & 0xf) == 0) {
  ------------------
  |  Branch (1613:9): [True: 343k, False: 5.16M]
  ------------------
 1614|   343k|      packedSign = AacDec_randomSign[randomPhase >> 4];
 1615|   343k|    }
 1616|       |
 1617|  5.50M|    if (packedSign & 0x1) {
  ------------------
  |  Branch (1617:9): [True: 2.82M, False: 2.68M]
  ------------------
 1618|  2.82M|      spec[i] = -fMax(spec[i], (FIXP_DBL)(MINVAL_DBL + 1));
  ------------------
  |  |  158|  2.82M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1619|  2.82M|    }
 1620|  5.50M|    packedSign >>= 1;
 1621|       |
 1622|  5.50M|    randomPhase = (randomPhase + 1) & (AAC_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  125|  5.50M|  512 /*!< Size of random number array for noise floor */
  ------------------
 1623|  5.50M|  }
 1624|  12.8k|}
conceal.cpp:_ZL22CConcealment_GetWinSeqi:
  249|      6|static BLOCK_TYPE CConcealment_GetWinSeq(int prevWinSeq) {
  250|      6|  BLOCK_TYPE newWinSeq = BLOCK_LONG;
  251|       |
  252|       |  /* Try to have only long blocks */
  253|      6|  if (prevWinSeq == BLOCK_START || prevWinSeq == BLOCK_SHORT) {
  ------------------
  |  Branch (253:7): [True: 0, False: 6]
  |  Branch (253:36): [True: 3, False: 3]
  ------------------
  254|      3|    newWinSeq = BLOCK_STOP;
  255|      3|  }
  256|       |
  257|      6|  return (newWinSeq);
  258|      6|}
conceal.cpp:_ZL23CConcealment_ApplyInterP16CConcealmentInfoP22CAacDecoderChannelInfoPK16SamplingRateInfoiiii:
  876|  74.2k|    const int improveTonal, const int frameOk, const int mute_release_active) {
  877|  74.2k|#if defined(FDK_ASSERT_ENABLE)
  878|  74.2k|  CConcealParams *pConcealCommonData = pConcealmentInfo->pConcealParams;
  879|  74.2k|#endif
  880|       |
  881|  74.2k|  FIXP_DBL *pSpectralCoefficient =
  882|  74.2k|      SPEC_LONG(pAacDecoderChannelInfo->pSpectralCoefficient);
  ------------------
  |  |  114|  74.2k|#define SPEC_LONG(ptr) (ptr)
  ------------------
  883|  74.2k|  CIcsInfo *pIcsInfo = &pAacDecoderChannelInfo->icsInfo;
  884|  74.2k|  SHORT *pSpecScale = pAacDecoderChannelInfo->specScale;
  885|       |
  886|  74.2k|  int sfbEnergyPrev[64];
  887|  74.2k|  int sfbEnergyAct[64];
  888|       |
  889|  74.2k|  int i, appliedProcessing = 0;
  890|       |
  891|       |  /* clear/init */
  892|  74.2k|  FDKmemclear(sfbEnergyPrev, 64 * sizeof(int));
  893|  74.2k|  FDKmemclear(sfbEnergyAct, 64 * sizeof(int));
  894|       |
  895|  74.2k|  if (!frameOk || mute_release_active) {
  ------------------
  |  Branch (895:7): [True: 1.91k, False: 72.3k]
  |  Branch (895:19): [True: 0, False: 72.3k]
  ------------------
  896|       |    /* Restore last frame from concealment buffer */
  897|  1.91k|    pIcsInfo->WindowShape = pConcealmentInfo->windowShape;
  898|  1.91k|    pIcsInfo->WindowSequence = pConcealmentInfo->windowSequence;
  899|       |
  900|       |    /* Restore spectral data */
  901|  1.90M|    for (i = 0; i < samplesPerFrame; i++) {
  ------------------
  |  Branch (901:17): [True: 1.89M, False: 1.91k]
  ------------------
  902|  1.89M|      pSpectralCoefficient[i] =
  903|  1.89M|          FX_CNCL2FX_DBL(pConcealmentInfo->spectralCoefficient[i]);
  904|  1.89M|    }
  905|       |
  906|       |    /* Restore scale factors */
  907|  1.91k|    FDKmemcpy(pSpecScale, pConcealmentInfo->specScale, 8 * sizeof(SHORT));
  908|  1.91k|  }
  909|       |
  910|       |  /* if previous frame was not ok */
  911|  74.2k|  if (!pConcealmentInfo->prevFrameOk[1] || mute_release_active) {
  ------------------
  |  Branch (911:7): [True: 211, False: 74.0k]
  |  Branch (911:44): [True: 0, False: 74.0k]
  ------------------
  912|       |    /* if current frame (f_n) is ok and the last but one frame (f_(n-2))
  913|       |       was ok, too, then interpolate both frames in order to generate
  914|       |       the current output frame (f_(n-1)). Otherwise, use the last stored
  915|       |       frame (f_(n-2) or f_(n-3) or ...). */
  916|    211|    if (frameOk && pConcealmentInfo->prevFrameOk[0] && !mute_release_active) {
  ------------------
  |  Branch (916:9): [True: 0, False: 211]
  |  Branch (916:20): [True: 0, False: 0]
  |  Branch (916:56): [True: 0, False: 0]
  ------------------
  917|      0|      appliedProcessing = 1;
  918|       |
  919|       |      /* Interpolate both frames in order to generate the current output frame
  920|       |       * (f_(n-1)). */
  921|      0|      if (pIcsInfo->WindowSequence == BLOCK_SHORT) {
  ------------------
  |  Branch (921:11): [True: 0, False: 0]
  ------------------
  922|       |        /* f_(n-2) == BLOCK_SHORT */
  923|       |        /* short--??????--short, short--??????--long interpolation */
  924|       |        /* short--short---short, short---long---long interpolation */
  925|       |
  926|      0|        int wnd;
  927|       |
  928|      0|        if (pConcealmentInfo->windowSequence ==
  ------------------
  |  Branch (928:13): [True: 0, False: 0]
  ------------------
  929|      0|            BLOCK_SHORT) { /* f_n == BLOCK_SHORT */
  930|       |          /* short--short---short interpolation */
  931|       |
  932|      0|          int scaleFactorBandsTotal =
  933|      0|              pSamplingRateInfo->NumberOfScaleFactorBands_Short;
  934|      0|          const SHORT *pSfbOffset = pSamplingRateInfo->ScaleFactorBands_Short;
  935|      0|          pIcsInfo->WindowShape = (samplesPerFrame <= 512) ? 2 : 1;
  ------------------
  |  Branch (935:35): [True: 0, False: 0]
  ------------------
  936|      0|          pIcsInfo->WindowSequence = BLOCK_SHORT;
  937|       |
  938|      0|          for (wnd = 0; wnd < 8; wnd++) {
  ------------------
  |  Branch (938:25): [True: 0, False: 0]
  ------------------
  939|      0|            CConcealment_CalcBandEnergy(
  940|      0|                &pSpectralCoefficient[wnd *
  941|      0|                                      (samplesPerFrame / 8)], /* spec_(n-2) */
  942|      0|                pSamplingRateInfo, BLOCK_SHORT, CConcealment_NoExpand,
  943|      0|                sfbEnergyPrev);
  944|       |
  945|      0|            CConcealment_CalcBandEnergy(
  946|      0|                &pConcealmentInfo->spectralCoefficient[wnd * (samplesPerFrame /
  947|      0|                                                              8)], /* spec_n */
  948|      0|                pSamplingRateInfo, BLOCK_SHORT, CConcealment_NoExpand,
  949|      0|                sfbEnergyAct);
  950|       |
  951|      0|            CConcealment_InterpolateBuffer(
  952|      0|                &pSpectralCoefficient[wnd *
  953|      0|                                      (samplesPerFrame / 8)], /* spec_(n-1) */
  954|      0|                &pSpecScale[wnd], &pConcealmentInfo->specScale[wnd],
  955|      0|                &pSpecScale[wnd], sfbEnergyPrev, sfbEnergyAct,
  956|      0|                scaleFactorBandsTotal, pSfbOffset);
  957|      0|          }
  958|      0|        } else { /* f_n != BLOCK_SHORT */
  959|       |          /* short---long---long interpolation */
  960|       |
  961|      0|          int scaleFactorBandsTotal =
  962|      0|              pSamplingRateInfo->NumberOfScaleFactorBands_Long;
  963|      0|          const SHORT *pSfbOffset = pSamplingRateInfo->ScaleFactorBands_Long;
  964|      0|          SHORT specScaleOut;
  965|       |
  966|      0|          CConcealment_CalcBandEnergy(
  967|      0|              &pSpectralCoefficient[samplesPerFrame -
  968|      0|                                    (samplesPerFrame /
  969|      0|                                     8)], /* [wnd] spec_(n-2) */
  970|      0|              pSamplingRateInfo, BLOCK_SHORT, CConcealment_Expand,
  971|      0|              sfbEnergyAct);
  972|       |
  973|      0|          CConcealment_CalcBandEnergy(
  974|      0|              pConcealmentInfo->spectralCoefficient, /* spec_n */
  975|      0|              pSamplingRateInfo, BLOCK_LONG, CConcealment_NoExpand,
  976|      0|              sfbEnergyPrev);
  977|       |
  978|      0|          pIcsInfo->WindowShape = 0;
  979|      0|          pIcsInfo->WindowSequence = BLOCK_STOP;
  980|       |
  981|      0|          for (i = 0; i < samplesPerFrame; i++) {
  ------------------
  |  Branch (981:23): [True: 0, False: 0]
  ------------------
  982|      0|            pSpectralCoefficient[i] =
  983|      0|                pConcealmentInfo->spectralCoefficient[i]; /* spec_n */
  984|      0|          }
  985|       |
  986|      0|          for (i = 0; i < 8; i++) { /* search for max(specScale) */
  ------------------
  |  Branch (986:23): [True: 0, False: 0]
  ------------------
  987|      0|            if (pSpecScale[i] > pSpecScale[0]) {
  ------------------
  |  Branch (987:17): [True: 0, False: 0]
  ------------------
  988|      0|              pSpecScale[0] = pSpecScale[i];
  989|      0|            }
  990|      0|          }
  991|       |
  992|      0|          CConcealment_InterpolateBuffer(
  993|      0|              pSpectralCoefficient, /* spec_(n-1) */
  994|      0|              &pConcealmentInfo->specScale[0], &pSpecScale[0], &specScaleOut,
  995|      0|              sfbEnergyPrev, sfbEnergyAct, scaleFactorBandsTotal, pSfbOffset);
  996|       |
  997|      0|          pSpecScale[0] = specScaleOut;
  998|      0|        }
  999|      0|      } else {
 1000|       |        /* long--??????--short, long--??????--long interpolation */
 1001|       |        /* long---long---short, long---long---long interpolation */
 1002|       |
 1003|      0|        int scaleFactorBandsTotal =
 1004|      0|            pSamplingRateInfo->NumberOfScaleFactorBands_Long;
 1005|      0|        const SHORT *pSfbOffset = pSamplingRateInfo->ScaleFactorBands_Long;
 1006|      0|        SHORT specScaleAct = pConcealmentInfo->specScale[0];
 1007|       |
 1008|      0|        CConcealment_CalcBandEnergy(pSpectralCoefficient, /* spec_(n-2) */
 1009|      0|                                    pSamplingRateInfo, BLOCK_LONG,
 1010|      0|                                    CConcealment_NoExpand, sfbEnergyPrev);
 1011|       |
 1012|      0|        if (pConcealmentInfo->windowSequence ==
  ------------------
  |  Branch (1012:13): [True: 0, False: 0]
  ------------------
 1013|      0|            BLOCK_SHORT) { /* f_n == BLOCK_SHORT */
 1014|       |          /* long---long---short interpolation */
 1015|       |
 1016|      0|          pIcsInfo->WindowShape = (samplesPerFrame <= 512) ? 2 : 1;
  ------------------
  |  Branch (1016:35): [True: 0, False: 0]
  ------------------
 1017|      0|          pIcsInfo->WindowSequence = BLOCK_START;
 1018|       |
 1019|      0|          for (i = 1; i < 8; i++) { /* search for max(specScale) */
  ------------------
  |  Branch (1019:23): [True: 0, False: 0]
  ------------------
 1020|      0|            if (pConcealmentInfo->specScale[i] > specScaleAct) {
  ------------------
  |  Branch (1020:17): [True: 0, False: 0]
  ------------------
 1021|      0|              specScaleAct = pConcealmentInfo->specScale[i];
 1022|      0|            }
 1023|      0|          }
 1024|       |
 1025|       |          /* Expand first short spectrum */
 1026|      0|          CConcealment_CalcBandEnergy(
 1027|      0|              pConcealmentInfo->spectralCoefficient,               /* spec_n */
 1028|      0|              pSamplingRateInfo, BLOCK_SHORT, CConcealment_Expand, /* !!! */
 1029|      0|              sfbEnergyAct);
 1030|      0|        } else {
 1031|       |          /* long---long---long interpolation */
 1032|       |
 1033|      0|          pIcsInfo->WindowShape = 0;
 1034|      0|          pIcsInfo->WindowSequence = BLOCK_LONG;
 1035|       |
 1036|      0|          CConcealment_CalcBandEnergy(
 1037|      0|              pConcealmentInfo->spectralCoefficient, /* spec_n */
 1038|      0|              pSamplingRateInfo, BLOCK_LONG, CConcealment_NoExpand,
 1039|      0|              sfbEnergyAct);
 1040|      0|        }
 1041|       |
 1042|      0|        CConcealment_InterpolateBuffer(
 1043|      0|            pSpectralCoefficient, /* spec_(n-1) */
 1044|      0|            &pSpecScale[0], &specScaleAct, &pSpecScale[0], sfbEnergyPrev,
 1045|      0|            sfbEnergyAct, scaleFactorBandsTotal, pSfbOffset);
 1046|      0|      }
 1047|      0|    }
 1048|       |
 1049|       |    /* Noise substitution of sign of the output spectral coefficients */
 1050|    211|    CConcealment_ApplyRandomSign(pConcealmentInfo->iRandomPhase,
 1051|    211|                                 pSpectralCoefficient, samplesPerFrame);
 1052|       |    /* Increment random phase index to avoid repetition artifacts. */
 1053|    211|    pConcealmentInfo->iRandomPhase =
 1054|    211|        (pConcealmentInfo->iRandomPhase + 1) & (AAC_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  125|    211|  512 /*!< Size of random number array for noise floor */
  ------------------
 1055|    211|  }
 1056|       |
 1057|       |  /* scale spectrum according to concealment state */
 1058|  74.2k|  switch (pConcealmentInfo->concealState) {
 1059|      0|    case ConcealState_Single:
  ------------------
  |  Branch (1059:5): [True: 0, False: 74.2k]
  ------------------
 1060|      0|      appliedProcessing = 1;
 1061|      0|      break;
 1062|       |
 1063|    211|    case ConcealState_FadeOut: {
  ------------------
  |  Branch (1063:5): [True: 211, False: 74.0k]
  ------------------
 1064|    211|      FDK_ASSERT(pConcealmentInfo->cntFadeFrames >= 0);
  ------------------
  |  |  221|    211|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1064:7): [True: 211, False: 0]
  ------------------
 1065|    211|      FDK_ASSERT(pConcealmentInfo->cntFadeFrames <
  ------------------
  |  |  221|    211|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1065:7): [True: 211, False: 0]
  ------------------
 1066|    211|                 CONCEAL_MAX_NUM_FADE_FACTORS);
 1067|    211|      FDK_ASSERT(pConcealmentInfo->cntFadeFrames <
  ------------------
  |  |  221|    211|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1067:7): [True: 211, False: 0]
  ------------------
 1068|    211|                 pConcealCommonData->numFadeOutFrames);
 1069|       |
 1070|       |      /* TimeDomainFading:                                        */
 1071|       |      /* Attenuation of signal is done in CConcealment_TDFading() */
 1072|       |
 1073|    211|      appliedProcessing = 1;
 1074|    211|    } break;
 1075|       |
 1076|      0|    case ConcealState_FadeIn: {
  ------------------
  |  Branch (1076:5): [True: 0, False: 74.2k]
  ------------------
 1077|      0|      FDK_ASSERT(pConcealmentInfo->cntFadeFrames >= 0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1077:7): [True: 0, False: 0]
  ------------------
 1078|      0|      FDK_ASSERT(pConcealmentInfo->cntFadeFrames <
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1078:7): [True: 0, False: 0]
  ------------------
 1079|      0|                 CONCEAL_MAX_NUM_FADE_FACTORS);
 1080|      0|      FDK_ASSERT(pConcealmentInfo->cntFadeFrames <
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1080:7): [True: 0, False: 0]
  ------------------
 1081|      0|                 pConcealCommonData->numFadeInFrames);
 1082|       |
 1083|       |      /* TimeDomainFading:                                        */
 1084|       |      /* Attenuation of signal is done in CConcealment_TDFading() */
 1085|       |
 1086|      0|      appliedProcessing = 1;
 1087|      0|    } break;
 1088|       |
 1089|      0|    case ConcealState_Mute: {
  ------------------
  |  Branch (1089:5): [True: 0, False: 74.2k]
  ------------------
 1090|       |      /* set dummy window parameters */
 1091|      0|      pIcsInfo->Valid = 0; /* Trigger the generation of a consitent IcsInfo */
 1092|      0|      pIcsInfo->WindowShape =
 1093|      0|          pConcealmentInfo->windowShape; /* Prevent an invalid WindowShape
 1094|       |                                            (required for F/T transform) */
 1095|      0|      pIcsInfo->WindowSequence =
 1096|      0|          CConcealment_GetWinSeq(pConcealmentInfo->windowSequence);
 1097|      0|      pConcealmentInfo->windowSequence =
 1098|      0|          pIcsInfo->WindowSequence; /* Store for next frame
 1099|       |                                       (spectrum in concealment
 1100|       |                                       buffer can't be used at
 1101|       |                                       all) */
 1102|       |
 1103|       |      /* mute spectral data */
 1104|      0|      FDKmemclear(pSpectralCoefficient, samplesPerFrame * sizeof(FIXP_DBL));
 1105|       |
 1106|      0|      appliedProcessing = 1;
 1107|      0|    } break;
 1108|       |
 1109|  74.0k|    default:
  ------------------
  |  Branch (1109:5): [True: 74.0k, False: 211]
  ------------------
 1110|       |      /* nothing to do here */
 1111|  74.0k|      break;
 1112|  74.2k|  }
 1113|       |
 1114|  74.2k|  return appliedProcessing;
 1115|  74.2k|}
conceal.cpp:_ZL24CConcealment_UpdateStateP16CConcealmentInfoiP28CAacDecoderStaticChannelInfoiP22CAacDecoderChannelInfo:
 1326|   601k|    const int samplesPerFrame, CAacDecoderChannelInfo *pAacDecoderChannelInfo) {
 1327|   601k|  CConcealParams *pConcealCommonData = pConcealmentInfo->pConcealParams;
 1328|       |
 1329|   601k|  switch (pConcealCommonData->method) {
 1330|   527k|    case ConcealMethodNoise: {
  ------------------
  |  Branch (1330:5): [True: 527k, False: 74.2k]
  ------------------
 1331|   527k|      if (pConcealmentInfo->concealState != ConcealState_Ok) {
  ------------------
  |  Branch (1331:11): [True: 462, False: 527k]
  ------------------
 1332|       |        /* count the valid frames during concealment process */
 1333|    462|        if (frameOk) {
  ------------------
  |  Branch (1333:13): [True: 0, False: 462]
  ------------------
 1334|      0|          pConcealmentInfo->cntValidFrames += 1;
 1335|    462|        } else {
 1336|    462|          pConcealmentInfo->cntValidFrames = 0;
 1337|    462|        }
 1338|    462|      }
 1339|       |
 1340|       |      /* -- STATE MACHINE for Noise Substitution -- */
 1341|   527k|      switch (pConcealmentInfo->concealState) {
 1342|   527k|        case ConcealState_Ok:
  ------------------
  |  Branch (1342:9): [True: 527k, False: 462]
  ------------------
 1343|   527k|          if (!frameOk) {
  ------------------
  |  Branch (1343:15): [True: 7.27k, False: 519k]
  ------------------
 1344|  7.27k|            pConcealmentInfo->cntFadeFrames = 0;
 1345|  7.27k|            pConcealmentInfo->cntValidFrames = 0;
 1346|  7.27k|            pConcealmentInfo->attGrpOffset[0] = 0;
 1347|  7.27k|            pConcealmentInfo->attGrpOffset[1] = 0;
 1348|  7.27k|            pConcealmentInfo->winGrpOffset[0] = 0;
 1349|  7.27k|            pConcealmentInfo->winGrpOffset[1] = 0;
 1350|  7.27k|            if (pConcealCommonData->numFadeOutFrames > 0) {
  ------------------
  |  Branch (1350:17): [True: 7.27k, False: 0]
  ------------------
 1351|       |              /* change to state SINGLE-FRAME-LOSS */
 1352|  7.27k|              pConcealmentInfo->concealState = ConcealState_Single;
 1353|       |              /* mode 0 just updates the Fading counter */
 1354|  7.27k|              CConcealment_ApplyFadeOut(
 1355|  7.27k|                  /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo,
 1356|  7.27k|                  samplesPerFrame, pAacDecoderChannelInfo);
 1357|       |
 1358|  7.27k|            } else {
 1359|       |              /* change to state MUTE */
 1360|      0|              pConcealmentInfo->concealState = ConcealState_Mute;
 1361|      0|            }
 1362|  7.27k|          }
 1363|   527k|          break;
 1364|       |
 1365|    270|        case ConcealState_Single: /* Just a pre-stage before fade-out begins.
  ------------------
  |  Branch (1365:9): [True: 270, False: 527k]
  ------------------
 1366|       |                                     Stay here only one frame! */
 1367|    270|          if (frameOk) {
  ------------------
  |  Branch (1367:15): [True: 0, False: 270]
  ------------------
 1368|       |            /* change to state OK */
 1369|      0|            pConcealmentInfo->concealState = ConcealState_Ok;
 1370|    270|          } else {
 1371|    270|            if (pConcealmentInfo->cntFadeFrames >=
  ------------------
  |  Branch (1371:17): [True: 0, False: 270]
  ------------------
 1372|    270|                pConcealCommonData->numFadeOutFrames) {
 1373|       |              /* change to state MUTE */
 1374|      0|              pConcealmentInfo->concealState = ConcealState_Mute;
 1375|    270|            } else {
 1376|       |              /* change to state FADE-OUT */
 1377|    270|              pConcealmentInfo->concealState = ConcealState_FadeOut;
 1378|       |              /* mode 0 just updates the Fading counter */
 1379|    270|              CConcealment_ApplyFadeOut(
 1380|    270|                  /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo,
 1381|    270|                  samplesPerFrame, pAacDecoderChannelInfo);
 1382|    270|            }
 1383|    270|          }
 1384|    270|          break;
 1385|       |
 1386|    189|        case ConcealState_FadeOut:
  ------------------
  |  Branch (1386:9): [True: 189, False: 527k]
  ------------------
 1387|    189|          if (pConcealmentInfo->cntValidFrames >
  ------------------
  |  Branch (1387:15): [True: 0, False: 189]
  ------------------
 1388|    189|              pConcealCommonData->numMuteReleaseFrames) {
 1389|      0|            if (pConcealCommonData->numFadeInFrames > 0) {
  ------------------
  |  Branch (1389:17): [True: 0, False: 0]
  ------------------
 1390|       |              /* change to state FADE-IN */
 1391|      0|              pConcealmentInfo->concealState = ConcealState_FadeIn;
 1392|      0|              pConcealmentInfo->cntFadeFrames = findEquiFadeFrame(
 1393|      0|                  pConcealCommonData, pConcealmentInfo->cntFadeFrames,
 1394|      0|                  0 /* FadeOut -> FadeIn */);
 1395|      0|            } else {
 1396|       |              /* change to state OK */
 1397|      0|              pConcealmentInfo->concealState = ConcealState_Ok;
 1398|      0|            }
 1399|    189|          } else {
 1400|    189|            if (frameOk) {
  ------------------
  |  Branch (1400:17): [True: 0, False: 189]
  ------------------
 1401|       |              /* we have good frame information but stay fully in concealment -
 1402|       |               * reset winGrpOffset/attGrpOffset */
 1403|      0|              pConcealmentInfo->winGrpOffset[0] = 0;
 1404|      0|              pConcealmentInfo->winGrpOffset[1] = 0;
 1405|      0|              pConcealmentInfo->attGrpOffset[0] = 0;
 1406|      0|              pConcealmentInfo->attGrpOffset[1] = 0;
 1407|      0|            }
 1408|    189|            if (pConcealmentInfo->cntFadeFrames >=
  ------------------
  |  Branch (1408:17): [True: 3, False: 186]
  ------------------
 1409|    189|                pConcealCommonData->numFadeOutFrames) {
 1410|       |              /* change to state MUTE */
 1411|      3|              pConcealmentInfo->concealState = ConcealState_Mute;
 1412|      3|            } else /* Stay in FADE-OUT */
 1413|    186|            {
 1414|       |              /* mode 0 just updates the Fading counter */
 1415|    186|              CConcealment_ApplyFadeOut(
 1416|    186|                  /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo,
 1417|    186|                  samplesPerFrame, pAacDecoderChannelInfo);
 1418|    186|            }
 1419|    189|          }
 1420|    189|          break;
 1421|       |
 1422|      3|        case ConcealState_Mute:
  ------------------
  |  Branch (1422:9): [True: 3, False: 527k]
  ------------------
 1423|      3|          if (pConcealmentInfo->cntValidFrames >
  ------------------
  |  Branch (1423:15): [True: 0, False: 3]
  ------------------
 1424|      3|              pConcealCommonData->numMuteReleaseFrames) {
 1425|      0|            if (pConcealCommonData->numFadeInFrames > 0) {
  ------------------
  |  Branch (1425:17): [True: 0, False: 0]
  ------------------
 1426|       |              /* change to state FADE-IN */
 1427|      0|              pConcealmentInfo->concealState = ConcealState_FadeIn;
 1428|      0|              pConcealmentInfo->cntFadeFrames =
 1429|      0|                  pConcealCommonData->numFadeInFrames - 1;
 1430|      0|            } else {
 1431|       |              /* change to state OK */
 1432|      0|              pConcealmentInfo->concealState = ConcealState_Ok;
 1433|      0|            }
 1434|      3|          } else {
 1435|      3|            if (frameOk) {
  ------------------
  |  Branch (1435:17): [True: 0, False: 3]
  ------------------
 1436|       |              /* we have good frame information but stay fully in concealment -
 1437|       |               * reset winGrpOffset/attGrpOffset */
 1438|      0|              pConcealmentInfo->winGrpOffset[0] = 0;
 1439|      0|              pConcealmentInfo->winGrpOffset[1] = 0;
 1440|      0|              pConcealmentInfo->attGrpOffset[0] = 0;
 1441|      0|              pConcealmentInfo->attGrpOffset[1] = 0;
 1442|      0|            }
 1443|      3|          }
 1444|      3|          break;
 1445|       |
 1446|      0|        case ConcealState_FadeIn:
  ------------------
  |  Branch (1446:9): [True: 0, False: 527k]
  ------------------
 1447|      0|          pConcealmentInfo->cntFadeFrames -= 1;
 1448|      0|          if (frameOk) {
  ------------------
  |  Branch (1448:15): [True: 0, False: 0]
  ------------------
 1449|      0|            if (pConcealmentInfo->cntFadeFrames < 0) {
  ------------------
  |  Branch (1449:17): [True: 0, False: 0]
  ------------------
 1450|       |              /* change to state OK */
 1451|      0|              pConcealmentInfo->concealState = ConcealState_Ok;
 1452|      0|            }
 1453|      0|          } else {
 1454|      0|            if (pConcealCommonData->numFadeOutFrames > 0) {
  ------------------
  |  Branch (1454:17): [True: 0, False: 0]
  ------------------
 1455|       |              /* change to state FADE-OUT */
 1456|      0|              pConcealmentInfo->concealState = ConcealState_FadeOut;
 1457|      0|              pConcealmentInfo->cntFadeFrames = findEquiFadeFrame(
 1458|      0|                  pConcealCommonData, pConcealmentInfo->cntFadeFrames + 1,
 1459|      0|                  1 /* FadeIn -> FadeOut */);
 1460|      0|              pConcealmentInfo->winGrpOffset[0] = 0;
 1461|      0|              pConcealmentInfo->winGrpOffset[1] = 0;
 1462|      0|              pConcealmentInfo->attGrpOffset[0] = 0;
 1463|      0|              pConcealmentInfo->attGrpOffset[1] = 0;
 1464|       |
 1465|      0|              pConcealmentInfo
 1466|      0|                  ->cntFadeFrames--; /* decrease because
 1467|       |                                        CConcealment_ApplyFadeOut() will
 1468|       |                                        increase, accordingly */
 1469|       |              /* mode 0 just updates the Fading counter */
 1470|      0|              CConcealment_ApplyFadeOut(
 1471|      0|                  /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo,
 1472|      0|                  samplesPerFrame, pAacDecoderChannelInfo);
 1473|      0|            } else {
 1474|       |              /* change to state MUTE */
 1475|      0|              pConcealmentInfo->concealState = ConcealState_Mute;
 1476|      0|            }
 1477|      0|          }
 1478|      0|          break;
 1479|       |
 1480|      0|        default:
  ------------------
  |  Branch (1480:9): [True: 0, False: 527k]
  ------------------
 1481|      0|          FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1481:11): [Folded, False: 0]
  ------------------
 1482|      0|          break;
 1483|   527k|      }
 1484|   527k|    } break;
 1485|       |
 1486|   527k|    case ConcealMethodInter:
  ------------------
  |  Branch (1486:5): [True: 74.2k, False: 527k]
  ------------------
 1487|  74.2k|    case ConcealMethodTonal: {
  ------------------
  |  Branch (1487:5): [True: 0, False: 601k]
  ------------------
 1488|  74.2k|      if (pConcealmentInfo->concealState != ConcealState_Ok) {
  ------------------
  |  Branch (1488:11): [True: 136, False: 74.1k]
  ------------------
 1489|       |        /* count the valid frames during concealment process */
 1490|    136|        if (pConcealmentInfo->prevFrameOk[1] ||
  ------------------
  |  Branch (1490:13): [True: 0, False: 136]
  ------------------
 1491|    136|            (pConcealmentInfo->prevFrameOk[0] &&
  ------------------
  |  Branch (1491:14): [True: 0, False: 136]
  ------------------
 1492|      0|             !pConcealmentInfo->prevFrameOk[1] && frameOk)) {
  ------------------
  |  Branch (1492:14): [True: 0, False: 0]
  |  Branch (1492:51): [True: 0, False: 0]
  ------------------
 1493|       |          /* The frame is OK even if it can be estimated by the energy
 1494|       |           * interpolation algorithm */
 1495|      0|          pConcealmentInfo->cntValidFrames += 1;
 1496|    136|        } else {
 1497|    136|          pConcealmentInfo->cntValidFrames = 0;
 1498|    136|        }
 1499|    136|      }
 1500|       |
 1501|       |      /* -- STATE MACHINE for energy interpolation -- */
 1502|  74.2k|      switch (pConcealmentInfo->concealState) {
  ------------------
  |  Branch (1502:15): [True: 74.2k, False: 0]
  ------------------
 1503|  74.1k|        case ConcealState_Ok:
  ------------------
  |  Branch (1503:9): [True: 74.1k, False: 136]
  ------------------
 1504|  74.1k|          if (!(pConcealmentInfo->prevFrameOk[1] ||
  ------------------
  |  Branch (1504:17): [True: 74.0k, False: 75]
  ------------------
 1505|     75|                (pConcealmentInfo->prevFrameOk[0] &&
  ------------------
  |  Branch (1505:18): [True: 75, False: 0]
  ------------------
 1506|     75|                 !pConcealmentInfo->prevFrameOk[1] && frameOk))) {
  ------------------
  |  Branch (1506:18): [True: 75, False: 0]
  |  Branch (1506:55): [True: 0, False: 75]
  ------------------
 1507|     75|            if (pConcealCommonData->numFadeOutFrames > 0) {
  ------------------
  |  Branch (1507:17): [True: 75, False: 0]
  ------------------
 1508|       |              /* Fade out only if the energy interpolation algorithm can not be
 1509|       |               * applied! */
 1510|     75|              pConcealmentInfo->concealState = ConcealState_FadeOut;
 1511|     75|            } else {
 1512|       |              /* change to state MUTE */
 1513|      0|              pConcealmentInfo->concealState = ConcealState_Mute;
 1514|      0|            }
 1515|     75|            pConcealmentInfo->cntFadeFrames = 0;
 1516|     75|            pConcealmentInfo->cntValidFrames = 0;
 1517|     75|          }
 1518|  74.1k|          break;
 1519|       |
 1520|      0|        case ConcealState_Single:
  ------------------
  |  Branch (1520:9): [True: 0, False: 74.2k]
  ------------------
 1521|      0|          pConcealmentInfo->concealState = ConcealState_Ok;
 1522|      0|          break;
 1523|       |
 1524|    136|        case ConcealState_FadeOut:
  ------------------
  |  Branch (1524:9): [True: 136, False: 74.1k]
  ------------------
 1525|    136|          pConcealmentInfo->cntFadeFrames += 1;
 1526|       |
 1527|    136|          if (pConcealmentInfo->cntValidFrames >
  ------------------
  |  Branch (1527:15): [True: 0, False: 136]
  ------------------
 1528|    136|              pConcealCommonData->numMuteReleaseFrames) {
 1529|      0|            if (pConcealCommonData->numFadeInFrames > 0) {
  ------------------
  |  Branch (1529:17): [True: 0, False: 0]
  ------------------
 1530|       |              /* change to state FADE-IN */
 1531|      0|              pConcealmentInfo->concealState = ConcealState_FadeIn;
 1532|      0|              pConcealmentInfo->cntFadeFrames = findEquiFadeFrame(
 1533|      0|                  pConcealCommonData, pConcealmentInfo->cntFadeFrames - 1,
 1534|      0|                  0 /* FadeOut -> FadeIn */);
 1535|      0|            } else {
 1536|       |              /* change to state OK */
 1537|      0|              pConcealmentInfo->concealState = ConcealState_Ok;
 1538|      0|            }
 1539|    136|          } else {
 1540|    136|            if (pConcealmentInfo->cntFadeFrames >=
  ------------------
  |  Branch (1540:17): [True: 0, False: 136]
  ------------------
 1541|    136|                pConcealCommonData->numFadeOutFrames) {
 1542|       |              /* change to state MUTE */
 1543|      0|              pConcealmentInfo->concealState = ConcealState_Mute;
 1544|      0|            }
 1545|    136|          }
 1546|    136|          break;
 1547|       |
 1548|      0|        case ConcealState_Mute:
  ------------------
  |  Branch (1548:9): [True: 0, False: 74.2k]
  ------------------
 1549|      0|          if (pConcealmentInfo->cntValidFrames >
  ------------------
  |  Branch (1549:15): [True: 0, False: 0]
  ------------------
 1550|      0|              pConcealCommonData->numMuteReleaseFrames) {
 1551|      0|            if (pConcealCommonData->numFadeInFrames > 0) {
  ------------------
  |  Branch (1551:17): [True: 0, False: 0]
  ------------------
 1552|       |              /* change to state FADE-IN */
 1553|      0|              pConcealmentInfo->concealState = ConcealState_FadeIn;
 1554|      0|              pConcealmentInfo->cntFadeFrames =
 1555|      0|                  pConcealCommonData->numFadeInFrames - 1;
 1556|      0|            } else {
 1557|       |              /* change to state OK */
 1558|      0|              pConcealmentInfo->concealState = ConcealState_Ok;
 1559|      0|            }
 1560|      0|          }
 1561|      0|          break;
 1562|       |
 1563|      0|        case ConcealState_FadeIn:
  ------------------
  |  Branch (1563:9): [True: 0, False: 74.2k]
  ------------------
 1564|      0|          pConcealmentInfo->cntFadeFrames -=
 1565|      0|              1; /* used to address the fade-in factors */
 1566|       |
 1567|      0|          if (frameOk || pConcealmentInfo->prevFrameOk[1]) {
  ------------------
  |  Branch (1567:15): [True: 0, False: 0]
  |  Branch (1567:26): [True: 0, False: 0]
  ------------------
 1568|      0|            if (pConcealmentInfo->cntFadeFrames < 0) {
  ------------------
  |  Branch (1568:17): [True: 0, False: 0]
  ------------------
 1569|       |              /* change to state OK */
 1570|      0|              pConcealmentInfo->concealState = ConcealState_Ok;
 1571|      0|            }
 1572|      0|          } else {
 1573|      0|            if (pConcealCommonData->numFadeOutFrames > 0) {
  ------------------
  |  Branch (1573:17): [True: 0, False: 0]
  ------------------
 1574|       |              /* change to state FADE-OUT */
 1575|      0|              pConcealmentInfo->concealState = ConcealState_FadeOut;
 1576|      0|              pConcealmentInfo->cntFadeFrames = findEquiFadeFrame(
 1577|      0|                  pConcealCommonData, pConcealmentInfo->cntFadeFrames + 1,
 1578|      0|                  1 /* FadeIn -> FadeOut */);
 1579|      0|            } else {
 1580|       |              /* change to state MUTE */
 1581|      0|              pConcealmentInfo->concealState = ConcealState_Mute;
 1582|      0|            }
 1583|      0|          }
 1584|      0|          break;
 1585|  74.2k|      } /* End switch(pConcealmentInfo->concealState) */
 1586|  74.2k|    } break;
 1587|       |
 1588|  74.2k|    default:
  ------------------
  |  Branch (1588:5): [True: 0, False: 601k]
  ------------------
 1589|       |      /* Don't need a state machine for other concealment methods. */
 1590|      0|      break;
 1591|   601k|  }
 1592|   601k|}
conceal.cpp:_ZL25CConcealment_TDFadePcmAttiiiiPi:
 1975|  62.3k|                                      FIXP_DBL fadeStop, PCM_DEC *pcmdata) {
 1976|  62.3k|  int i;
 1977|  62.3k|  FIXP_DBL dStep;
 1978|  62.3k|  FIXP_DBL dGain;
 1979|  62.3k|  FIXP_DBL dGain_apply;
 1980|       |
 1981|       |  /* set start energy */
 1982|  62.3k|  dGain = fadeStart;
 1983|       |  /* determine energy steps from sample to sample */
 1984|  62.3k|  dStep = (FIXP_DBL)((int)((fadeStart >> 1) - (fadeStop >> 1)) / len) << 1;
 1985|       |
 1986|  5.83M|  for (i = start; i < (start + len); i++) {
  ------------------
  |  Branch (1986:19): [True: 5.76M, False: 62.3k]
  ------------------
 1987|  5.76M|    dGain -= dStep;
 1988|       |    /* prevent gain from getting negative due to possible fixpoint inaccuracies
 1989|       |     */
 1990|  5.76M|    dGain_apply = fMax((FIXP_DBL)0, dGain);
 1991|       |    /* finally, attenuate samples */
 1992|  5.76M|    pcmdata[i] = FIXP_DBL2PCM_DEC(fMult(pcmdata[i], dGain_apply));
  ------------------
  |  |  115|  5.76M|#define FIXP_DBL2PCM_DEC(x) (x)
  ------------------
 1993|  5.76M|  }
 1994|  62.3k|}
conceal.cpp:_ZL37CConcealment_TDFadeFillFadingStationsPiS_ii12TDfadingType:
 2024|   601k|                                                  TDfadingType fadingType) {
 2025|   601k|  int i;
 2026|   601k|  INT fadingSteps_sum = 0;
 2027|   601k|  INT fadeDiff;
 2028|       |
 2029|   601k|  fadingSteps_sum = fadingSteps[0] + fadingSteps[1] + fadingSteps[2] +
 2030|   601k|                    fadingSteps[3] + fadingSteps[4] + fadingSteps[5] +
 2031|   601k|                    fadingSteps[6] + fadingSteps[7];
 2032|   601k|  fadeDiff = ((INT)(fadeStop - fadeStart) / fMax(fadingSteps_sum, (INT)1));
 2033|   601k|  fadingStations[0] = fadeStart;
 2034|  4.81M|  for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (2034:15): [True: 4.21M, False: 601k]
  ------------------
 2035|  4.21M|    fadingStations[i] =
 2036|  4.21M|        fadingStations[i - 1] + (FIXP_DBL)(fadeDiff * fadingSteps[i - 1]);
 2037|  4.21M|  }
 2038|   601k|  fadingStations[8] = fadeStop;
 2039|   601k|}
conceal.cpp:_ZL41CConcealment_TDFading_doLinearFadingStepsPi:
 2041|   601k|static void CConcealment_TDFading_doLinearFadingSteps(int *fadingSteps) {
 2042|   601k|  fadingSteps[0] = fadingSteps[1] = fadingSteps[2] = fadingSteps[3] =
 2043|   601k|      fadingSteps[4] = fadingSteps[5] = fadingSteps[6] = fadingSteps[7] = 1;
 2044|   601k|}
conceal.cpp:_ZL26CConcealment_TDNoise_ApplyP16CConcealmentInfoiiPi:
 2057|   601k|                                       PCM_DEC *const pcmdata) {
 2058|   601k|  PCM_DEC *states = pConcealmentInfo->TDNoiseStates;
  ------------------
  |  |  112|   601k|#define PCM_DEC FIXP_DBL
  ------------------
 2059|   601k|  PCM_DEC noiseVal;
  ------------------
  |  |  112|   601k|#define PCM_DEC FIXP_DBL
  ------------------
 2060|   601k|  FIXP_DBL noiseValLong;
 2061|   601k|  FIXP_SGL *coef = pConcealmentInfo->TDNoiseCoef;
 2062|   601k|  FIXP_DBL TDNoiseAtt;
 2063|   601k|  ULONG seed = pConcealmentInfo->TDNoiseSeed =
  ------------------
  |  |  182|   601k|#define ULONG UINT
  ------------------
 2064|   601k|      (ULONG)CConcealment_TDNoise_Random(&pConcealmentInfo->TDNoiseSeed) + 1;
 2065|       |
 2066|   601k|  TDNoiseAtt = pConcealmentInfo->pConcealParams->comfortNoiseLevel;
 2067|       |
 2068|   601k|  int ii;
 2069|       |
 2070|   601k|  if ((pConcealmentInfo->concealState != ConcealState_Ok ||
  ------------------
  |  Branch (2070:8): [True: 7.79k, False: 594k]
  ------------------
 2071|   594k|       pConcealmentInfo->concealState_old != ConcealState_Ok) &&
  ------------------
  |  Branch (2071:8): [True: 0, False: 594k]
  ------------------
 2072|  7.79k|      TDNoiseAtt != (FIXP_DBL)0) {
  ------------------
  |  Branch (2072:7): [True: 7.79k, False: 0]
  ------------------
 2073|  5.77M|    for (ii = 0; ii < (len << 3); ii++) {
  ------------------
  |  Branch (2073:18): [True: 5.76M, False: 7.79k]
  ------------------
 2074|       |      /* create filtered noise */
 2075|  5.76M|      states[2] = states[1];
 2076|  5.76M|      states[1] = states[0];
 2077|  5.76M|      states[0] =
 2078|  5.76M|          FIXP_DBL2PCM_DEC((FIXP_DBL)CConcealment_TDNoise_Random(&seed));
  ------------------
  |  |  115|  5.76M|#define FIXP_DBL2PCM_DEC(x) (x)
  ------------------
 2079|  5.76M|      noiseValLong = fMult(states[0], coef[0]) + fMult(states[1], coef[1]) +
 2080|  5.76M|                     fMult(states[2], coef[2]);
 2081|  5.76M|      noiseVal = FIXP_DBL2PCM_DEC(fMult(noiseValLong, TDNoiseAtt) >>
  ------------------
  |  |  115|  5.76M|#define FIXP_DBL2PCM_DEC(x) (x)
  ------------------
 2082|  5.76M|                                  aacOutDataHeadroom);
 2083|       |
 2084|       |      /* add filtered noise - check for clipping, before */
 2085|  5.76M|      if (noiseVal > (PCM_DEC)0 &&
  ------------------
  |  Branch (2085:11): [True: 2.91M, False: 2.85M]
  ------------------
 2086|  2.91M|          pcmdata[ii] > (PCM_DEC)MAXVAL_PCM_DEC - noiseVal) {
  ------------------
  |  |  113|  2.91M|#define MAXVAL_PCM_DEC MAXVAL_DBL
  |  |  ------------------
  |  |  |  |  156|  2.91M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  ------------------
  |  Branch (2086:11): [True: 0, False: 2.91M]
  ------------------
 2087|      0|        noiseVal = noiseVal * (PCM_DEC)-1;
 2088|  5.76M|      } else if (noiseVal < (PCM_DEC)0 &&
  ------------------
  |  Branch (2088:18): [True: 2.85M, False: 2.91M]
  ------------------
 2089|  2.85M|                 pcmdata[ii] < (PCM_DEC)MINVAL_PCM_DEC - noiseVal) {
  ------------------
  |  |  114|  2.85M|#define MINVAL_PCM_DEC MINVAL_DBL
  |  |  ------------------
  |  |  |  |  158|  2.85M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  ------------------
  |  Branch (2089:18): [True: 0, False: 2.85M]
  ------------------
 2090|      0|        noiseVal = noiseVal * (PCM_DEC)-1;
 2091|      0|      }
 2092|       |
 2093|  5.76M|      pcmdata[ii] += noiseVal;
 2094|  5.76M|    }
 2095|  7.79k|  }
 2096|   601k|}
conceal.cpp:_ZL27CConcealment_TDNoise_RandomPj:
 2049|  6.36M|static int CConcealment_TDNoise_Random(ULONG *seed) {
 2050|  6.36M|  *seed = (ULONG)(((UINT64)(*seed) * 69069) + 5);
 2051|  6.36M|  return (int)(*seed);
 2052|  6.36M|}

_Z28InvMdctTransformLowDelay_fdkPiiS_S_i:
  220|   222k|                                 const int N) {
  221|   222k|  const FIXP_WTB *coef;
  222|   222k|  FIXP_DBL gain = (FIXP_DBL)0;
  223|   222k|  int scale = mdctData_e + MDCT_OUT_HEADROOM -
  ------------------
  |  |  108|   222k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  ------------------
  224|   222k|              LDFB_HEADROOM; /* The LDFB_HEADROOM is compensated inside
  ------------------
  |  |  110|   222k|#define LDFB_HEADROOM 2
  ------------------
  225|       |                                multE2_DinvF_fdk() below */
  226|   222k|  int i;
  227|       |
  228|       |  /* Select LD window slope */
  229|   222k|  switch (N) {
  230|  4.45k|    case 256:
  ------------------
  |  Branch (230:5): [True: 4.45k, False: 218k]
  ------------------
  231|  4.45k|      coef = LowDelaySynthesis256;
  232|  4.45k|      break;
  233|  3.52k|    case 240:
  ------------------
  |  Branch (233:5): [True: 3.52k, False: 219k]
  ------------------
  234|  3.52k|      coef = LowDelaySynthesis240;
  235|  3.52k|      break;
  236|    132|    case 160:
  ------------------
  |  Branch (236:5): [True: 132, False: 222k]
  ------------------
  237|    132|      coef = LowDelaySynthesis160;
  238|    132|      break;
  239|    305|    case 128:
  ------------------
  |  Branch (239:5): [True: 305, False: 222k]
  ------------------
  240|    305|      coef = LowDelaySynthesis128;
  241|    305|      break;
  242|  1.02k|    case 120:
  ------------------
  |  Branch (242:5): [True: 1.02k, False: 221k]
  ------------------
  243|  1.02k|      coef = LowDelaySynthesis120;
  244|  1.02k|      break;
  245|  57.4k|    case 512:
  ------------------
  |  Branch (245:5): [True: 57.4k, False: 165k]
  ------------------
  246|  57.4k|      coef = LowDelaySynthesis512;
  247|  57.4k|      break;
  248|   155k|    case 480:
  ------------------
  |  Branch (248:5): [True: 155k, False: 66.9k]
  ------------------
  249|   155k|    default:
  ------------------
  |  Branch (249:5): [True: 0, False: 222k]
  ------------------
  250|   155k|      coef = LowDelaySynthesis480;
  251|   155k|      break;
  252|   222k|  }
  253|       |
  254|       |  /*
  255|       |     Apply exponent and 1/N factor.
  256|       |     Note: "scale" is off by one because for LD_MDCT the window length is twice
  257|       |     the window length of a regular MDCT. This is corrected inside
  258|       |     multE2_DinvF_fdk(). Refer to ISO/IEC 14496-3:2009 page 277,
  259|       |     chapter 4.6.20.2 "Low Delay Window".
  260|       |   */
  261|   222k|  imdct_gain(&gain, &scale, N);
  262|       |
  263|   222k|  dct_IV(mdctData, N, &scale);
  264|       |
  265|   222k|  if (N == 256 || N == 240 || N == 160) {
  ------------------
  |  Branch (265:7): [True: 4.45k, False: 218k]
  |  Branch (265:19): [True: 3.52k, False: 214k]
  |  Branch (265:31): [True: 132, False: 214k]
  ------------------
  266|  8.11k|    scale -= 1;
  267|   214k|  } else if (N == 128 || N == 120) {
  ------------------
  |  Branch (267:14): [True: 305, False: 214k]
  |  Branch (267:26): [True: 1.02k, False: 213k]
  ------------------
  268|  1.32k|    scale -= 2;
  269|  1.32k|  }
  270|       |
  271|   222k|  if (gain != (FIXP_DBL)0) {
  ------------------
  |  Branch (271:7): [True: 160k, False: 62.2k]
  ------------------
  272|  75.9M|    for (i = 0; i < N; i++) {
  ------------------
  |  Branch (272:17): [True: 75.8M, False: 160k]
  ------------------
  273|  75.8M|      mdctData[i] = fMult(mdctData[i], gain);
  274|  75.8M|    }
  275|   160k|  }
  276|   222k|  scaleValuesSaturate(mdctData, N, scale);
  277|       |
  278|       |  /* Since all exponent and factors have been applied, current exponent is zero.
  279|       |   */
  280|   222k|  multE2_DinvF_fdk(output, mdctData, coef, fs_buffer, N);
  281|       |
  282|   222k|  return (1);
  283|   222k|}
ldfiltbank.cpp:_ZL16multE2_DinvF_fdkPiS_PKsS_i:
  116|   222k|                             FIXP_DBL *z, const int N) {
  117|   222k|  int i;
  118|       |
  119|       |  /*  scale for FIXP_DBL -> PCM_DEC conversion:       */
  120|   222k|  const int scale = (DFRACT_BITS - PCM_OUT_BITS) - LDFB_HEADROOM + (3);
  ------------------
  |  |  113|   222k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                const int scale = (DFRACT_BITS - PCM_OUT_BITS) - LDFB_HEADROOM + (3);
  ------------------
  |  |  110|   222k|#define PCM_OUT_BITS DFRACT_BITS
  |  |  ------------------
  |  |  |  |  113|   222k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  ------------------
                const int scale = (DFRACT_BITS - PCM_OUT_BITS) - LDFB_HEADROOM + (3);
  ------------------
  |  |  110|   222k|#define LDFB_HEADROOM 2
  ------------------
  121|       |
  122|       |#if ((DFRACT_BITS - PCM_OUT_BITS - LDFB_HEADROOM + (3) - 1) > 0)
  123|       |  FIXP_DBL rnd_val_wts0 = (FIXP_DBL)0;
  124|       |  FIXP_DBL rnd_val_wts1 = (FIXP_DBL)0;
  125|       |#if ((DFRACT_BITS - PCM_OUT_BITS - LDFB_HEADROOM + (3) - WTS0 - 1) > 0)
  126|       |  if (-WTS0 - 1 + scale)
  127|       |    rnd_val_wts0 = (FIXP_DBL)(1 << (-WTS0 - 1 + scale - 1));
  128|       |#endif
  129|       |  if (-WTS1 - 1 + scale)
  130|       |    rnd_val_wts1 = (FIXP_DBL)(1 << (-WTS1 - 1 + scale - 1));
  131|       |#endif
  132|       |
  133|  26.8M|  for (i = 0; i < N / 4; i++) {
  ------------------
  |  Branch (133:15): [True: 26.6M, False: 222k]
  ------------------
  134|  26.6M|    FIXP_DBL z0, z2, tmp;
  135|       |
  136|  26.6M|    z2 = x[N / 2 + i];
  137|  26.6M|    z0 = fAddSaturate(z2,
  138|  26.6M|                      (fMultDiv2(z[N / 2 + i], fb[2 * N + i]) >> (-WTS2 - 1)));
  ------------------
  |  |  138|  26.6M|#define WTS2 (-2)
  ------------------
  139|       |
  140|  26.6M|    z[N / 2 + i] = fAddSaturate(
  141|  26.6M|        x[N / 2 - 1 - i],
  142|  26.6M|        (fMultDiv2(z[N + i], fb[2 * N + N / 2 + i]) >> (-WTS2 - 1)));
  ------------------
  |  |  138|  26.6M|#define WTS2 (-2)
  ------------------
  143|       |
  144|  26.6M|    tmp = (fMultDiv2(z[N / 2 + i], fb[N + N / 2 - 1 - i]) +
  145|  26.6M|           fMultDiv2(z[i], fb[N + N / 2 + i]));
  146|       |
  147|       |#if ((DFRACT_BITS - PCM_OUT_BITS - LDFB_HEADROOM + (3) - 1) > 0)
  148|       |    FDK_ASSERT((-WTS1 - 1 + scale) >= 0);
  149|       |    FDK_ASSERT(tmp <= ((FIXP_DBL)0x7FFFFFFF -
  150|       |                       rnd_val_wts1)); /* rounding must not cause overflow */
  151|       |    output[(N * 3 / 4 - 1 - i)] = (PCM_DEC)SATURATE_RIGHT_SHIFT(
  152|       |        tmp + rnd_val_wts1, -WTS1 - 1 + scale, PCM_OUT_BITS);
  153|       |#else
  154|  26.6M|    FDK_ASSERT((WTS1 + 1 - scale) >= 0);
  ------------------
  |  |  221|  26.6M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (154:5): [True: 26.6M, Folded]
  ------------------
  155|  26.6M|    output[(N * 3 / 4 - 1 - i)] =
  156|  26.6M|        (PCM_DEC)SATURATE_LEFT_SHIFT(tmp, WTS1 + 1 - scale, PCM_OUT_BITS);
  ------------------
  |  |  251|  26.6M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  252|  26.6M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  26.6M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  254|  26.6M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  26.6M|             : ((LONG)(src) << (scale)))
  ------------------
  157|  26.6M|#endif
  158|       |
  159|  26.6M|    z[i] = z0;
  160|  26.6M|    z[N + i] = z2;
  161|  26.6M|  }
  162|       |
  163|  26.8M|  for (i = N / 4; i < N / 2; i++) {
  ------------------
  |  Branch (163:19): [True: 26.6M, False: 222k]
  ------------------
  164|  26.6M|    FIXP_DBL z0, z2, tmp0, tmp1;
  165|       |
  166|  26.6M|    z2 = x[N / 2 + i];
  167|  26.6M|    z0 = fAddSaturate(z2,
  168|  26.6M|                      (fMultDiv2(z[N / 2 + i], fb[2 * N + i]) >> (-WTS2 - 1)));
  ------------------
  |  |  138|  26.6M|#define WTS2 (-2)
  ------------------
  169|       |
  170|  26.6M|    z[N / 2 + i] = fAddSaturate(
  171|  26.6M|        x[N / 2 - 1 - i],
  172|  26.6M|        (fMultDiv2(z[N + i], fb[2 * N + N / 2 + i]) >> (-WTS2 - 1)));
  ------------------
  |  |  138|  26.6M|#define WTS2 (-2)
  ------------------
  173|       |
  174|  26.6M|    tmp0 = (fMultDiv2(z[N / 2 + i], fb[N / 2 - 1 - i]) +
  175|  26.6M|            fMultDiv2(z[i], fb[N / 2 + i]));
  176|  26.6M|    tmp1 = (fMultDiv2(z[N / 2 + i], fb[N + N / 2 - 1 - i]) +
  177|  26.6M|            fMultDiv2(z[i], fb[N + N / 2 + i]));
  178|       |
  179|       |#if ((DFRACT_BITS - PCM_OUT_BITS - LDFB_HEADROOM + (3) - 1) > 0)
  180|       |    FDK_ASSERT((-WTS0 - 1 + scale) >= 0);
  181|       |    FDK_ASSERT(tmp0 <= ((FIXP_DBL)0x7FFFFFFF -
  182|       |                        rnd_val_wts0)); /* rounding must not cause overflow */
  183|       |    FDK_ASSERT(tmp1 <= ((FIXP_DBL)0x7FFFFFFF -
  184|       |                        rnd_val_wts1)); /* rounding must not cause overflow */
  185|       |    output[(i - N / 4)] = (PCM_DEC)SATURATE_RIGHT_SHIFT(
  186|       |        tmp0 + rnd_val_wts0, -WTS0 - 1 + scale, PCM_OUT_BITS);
  187|       |    output[(N * 3 / 4 - 1 - i)] = (PCM_DEC)SATURATE_RIGHT_SHIFT(
  188|       |        tmp1 + rnd_val_wts1, -WTS1 - 1 + scale, PCM_OUT_BITS);
  189|       |#else
  190|  26.6M|    FDK_ASSERT((WTS0 + 1 - scale) >= 0);
  ------------------
  |  |  221|  26.6M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (190:5): [True: 26.6M, Folded]
  ------------------
  191|  26.6M|    output[(i - N / 4)] =
  192|  26.6M|        (PCM_DEC)SATURATE_LEFT_SHIFT(tmp0, WTS0 + 1 - scale, PCM_OUT_BITS);
  ------------------
  |  |  251|  26.6M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  252|  26.6M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  26.6M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  254|  26.6M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  26.6M|             : ((LONG)(src) << (scale)))
  ------------------
  193|  26.6M|    output[(N * 3 / 4 - 1 - i)] =
  194|  26.6M|        (PCM_DEC)SATURATE_LEFT_SHIFT(tmp1, WTS1 + 1 - scale, PCM_OUT_BITS);
  ------------------
  |  |  251|  26.6M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  252|  26.6M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  26.6M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  254|  26.6M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  26.6M|             : ((LONG)(src) << (scale)))
  ------------------
  195|  26.6M|#endif
  196|  26.6M|    z[i] = z0;
  197|  26.6M|    z[N + i] = z2;
  198|  26.6M|  }
  199|       |
  200|       |  /* Exchange quarter parts of x to bring them in the "right" order */
  201|  26.8M|  for (i = 0; i < N / 4; i++) {
  ------------------
  |  Branch (201:15): [True: 26.6M, False: 222k]
  ------------------
  202|  26.6M|    FIXP_DBL tmp0 = fMultDiv2(z[i], fb[N / 2 + i]);
  203|       |
  204|       |#if ((DFRACT_BITS - PCM_OUT_BITS - LDFB_HEADROOM + (3) - 1) > 0)
  205|       |    FDK_ASSERT((-WTS0 - 1 + scale) >= 0);
  206|       |    FDK_ASSERT(tmp0 <= ((FIXP_DBL)0x7FFFFFFF -
  207|       |                        rnd_val_wts0)); /* rounding must not cause overflow */
  208|       |    output[(N * 3 / 4 + i)] = (PCM_DEC)SATURATE_RIGHT_SHIFT(
  209|       |        tmp0 + rnd_val_wts0, -WTS0 - 1 + scale, PCM_OUT_BITS);
  210|       |#else
  211|  26.6M|    FDK_ASSERT((WTS0 + 1 - scale) >= 0);
  ------------------
  |  |  221|  26.6M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (211:5): [True: 26.6M, Folded]
  ------------------
  212|  26.6M|    output[(N * 3 / 4 + i)] =
  213|  26.6M|        (PCM_DEC)SATURATE_LEFT_SHIFT(tmp0, WTS0 + 1 - scale, PCM_OUT_BITS);
  ------------------
  |  |  251|  26.6M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  252|  26.6M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  26.6M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 26.6M]
  |  |  ------------------
  |  |  254|  26.6M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  26.6M|             : ((LONG)(src) << (scale)))
  ------------------
  214|  26.6M|#endif
  215|  26.6M|  }
  216|   222k|}

_Z15CPulseData_ReadP13FDK_BITSTREAMP10CPulseDataPKsPKvs:
  109|  26.6k|                    const SHORT frame_length) {
  110|  26.6k|  int i, k = 0;
  111|  26.6k|  const UINT MaxSfBands =
  112|  26.6k|      GetScaleFactorBandsTransmitted((const CIcsInfo *)pIcsInfo);
  113|       |
  114|       |  /* reset pulse data flag */
  115|  26.6k|  PulseData->PulseDataPresent = 0;
  116|       |
  117|  26.6k|  if ((PulseData->PulseDataPresent = (UCHAR)FDKreadBit(bs)) != 0) {
  ------------------
  |  Branch (117:7): [True: 984, False: 25.6k]
  ------------------
  118|    984|    if (!IsLongBlock((const CIcsInfo *)pIcsInfo)) {
  ------------------
  |  Branch (118:9): [True: 14, False: 970]
  ------------------
  119|     14|      return AAC_DEC_DECODE_FRAME_ERROR;
  120|     14|    }
  121|       |
  122|    970|    PulseData->NumberPulse = (UCHAR)FDKreadBits(bs, 2);
  123|    970|    PulseData->PulseStartBand = (UCHAR)FDKreadBits(bs, 6);
  124|       |
  125|    970|    if (PulseData->PulseStartBand >= MaxSfBands) {
  ------------------
  |  Branch (125:9): [True: 32, False: 938]
  ------------------
  126|     32|      return AAC_DEC_DECODE_FRAME_ERROR;
  127|     32|    }
  128|       |
  129|    938|    k = sfb_startlines[PulseData->PulseStartBand];
  130|       |
  131|  3.51k|    for (i = 0; i <= PulseData->NumberPulse; i++) {
  ------------------
  |  Branch (131:17): [True: 2.58k, False: 938]
  ------------------
  132|  2.58k|      PulseData->PulseOffset[i] = (UCHAR)FDKreadBits(bs, 5);
  133|  2.58k|      PulseData->PulseAmp[i] = (UCHAR)FDKreadBits(bs, 4);
  134|  2.58k|      k += PulseData->PulseOffset[i];
  135|  2.58k|    }
  136|       |
  137|    938|    if (k >= frame_length) {
  ------------------
  |  Branch (137:9): [True: 1, False: 937]
  ------------------
  138|      1|      return AAC_DEC_DECODE_FRAME_ERROR;
  139|      1|    }
  140|    938|  }
  141|       |
  142|  26.6k|  return 0;
  143|  26.6k|}
_Z16CPulseData_ApplyP10CPulseDataPKsPi:
  150|  19.4k|{
  151|  19.4k|  int i, k;
  152|       |
  153|  19.4k|  if (PulseData->PulseDataPresent) {
  ------------------
  |  Branch (153:7): [True: 933, False: 18.5k]
  ------------------
  154|    933|    k = pScaleFactorBandOffsets[PulseData->PulseStartBand];
  155|       |
  156|  3.49k|    for (i = 0; i <= PulseData->NumberPulse; i++) {
  ------------------
  |  Branch (156:17): [True: 2.56k, False: 933]
  ------------------
  157|  2.56k|      k += PulseData->PulseOffset[i];
  158|  2.56k|      if (coef[k] > (FIXP_DBL)0)
  ------------------
  |  Branch (158:11): [True: 110, False: 2.45k]
  ------------------
  159|    110|        coef[k] += (FIXP_DBL)(int)PulseData->PulseAmp[i];
  160|  2.45k|      else
  161|  2.45k|        coef[k] -= (FIXP_DBL)(int)PulseData->PulseAmp[i];
  162|  2.56k|    }
  163|    933|  }
  164|  19.4k|}

_Z17decodeRVLCodewordP13FDK_BITSTREAMP11CErRvlcInfo:
  362|   576k|SCHAR decodeRVLCodeword(HANDLE_FDK_BITSTREAM bs, CErRvlcInfo *pRvlc) {
  363|   576k|  int i;
  364|   576k|  SCHAR value;
  365|   576k|  UCHAR carryBit;
  366|   576k|  UINT branchValue;
  367|   576k|  UINT branchNode;
  368|       |
  369|   576k|  const UINT *pRvlCodeTree = pRvlc->pHuffTreeRvlCodewds;
  370|   576k|  UCHAR direction = pRvlc->direction;
  371|   576k|  INT *pBitstrIndxRvl = pRvlc->pBitstrIndxRvl_RVL;
  372|   576k|  UINT treeNode = *pRvlCodeTree;
  373|       |
  374|  1.06M|  for (i = MAX_LEN_RVLC_CODE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |  122|   576k|#define MAX_LEN_RVLC_CODE_WORD 9 /* max length of a RVL codeword in bits */
  ------------------
  |  Branch (374:40): [True: 1.06M, False: 0]
  ------------------
  375|  1.06M|    carryBit =
  376|  1.06M|        rvlcReadBitFromBitstream(bs, /* get next bit */
  377|  1.06M|                                 pRvlc->bsAnchor, pBitstrIndxRvl, direction);
  378|       |
  379|  1.06M|    CarryBitToBranchValue(carryBit, /* huffman decoding, do a single step in
  380|       |                                       huffman decoding tree */
  381|  1.06M|                          treeNode, &branchValue, &branchNode);
  382|       |
  383|  1.06M|    if ((branchNode & TEST_BIT_10) ==
  ------------------
  |  |  167|  1.06M|#define TEST_BIT_10 0x400
  ------------------
  |  Branch (383:9): [True: 576k, False: 483k]
  ------------------
  384|  1.06M|        TEST_BIT_10) { /* test bit 10 ; if set --> a
  ------------------
  |  |  167|  1.06M|#define TEST_BIT_10 0x400
  ------------------
  385|       |                          RVLC-codeword is completely decoded
  386|       |                        */
  387|   576k|      value = (SCHAR)(branchNode & CLR_BIT_10);
  ------------------
  |  |  166|   576k|#define CLR_BIT_10 0x3FF
  ------------------
  388|   576k|      *pRvlc->pRvlBitCnt_RVL -= (MAX_LEN_RVLC_CODE_WORD - i);
  ------------------
  |  |  122|   576k|#define MAX_LEN_RVLC_CODE_WORD 9 /* max length of a RVL codeword in bits */
  ------------------
  389|       |
  390|       |      /* check available bits for decoding */
  391|   576k|      if (*pRvlc->pRvlBitCnt_RVL < 0) {
  ------------------
  |  Branch (391:11): [True: 33.3k, False: 543k]
  ------------------
  392|  33.3k|        if (direction == FWD) {
  ------------------
  |  |  111|  33.3k|#define FWD 0 /* bitstream decoding direction forward (RVL coded part) */
  ------------------
  |  Branch (392:13): [True: 16.8k, False: 16.4k]
  ------------------
  393|  16.8k|          pRvlc->errorLogRvlc |= RVLC_ERROR_RVL_SUM_BIT_COUNTER_BELOW_ZERO_FWD;
  ------------------
  |  |  124|  16.8k|  0x40000000 /*  RVL-Dec  negative sum-bitcounter during RVL-fwd-decoding \
  ------------------
  394|  16.8k|        } else {
  395|  16.4k|          pRvlc->errorLogRvlc |= RVLC_ERROR_RVL_SUM_BIT_COUNTER_BELOW_ZERO_BWD;
  ------------------
  |  |  127|  16.4k|  0x20000000 /*  RVL-Dec  negative sum-bitcounter during RVL-fwd-decoding \
  ------------------
  396|  16.4k|        }
  397|  33.3k|        value = -1; /* signalize an error in return value, because too many bits
  398|       |                       was decoded */
  399|  33.3k|      }
  400|       |
  401|       |      /* check max value of dpcm value */
  402|   576k|      if (value > MAX_ALLOWED_DPCM_INDEX) {
  ------------------
  |  |  117|   576k|  14 /* the maximum allowed index of a decoded dpcm value (offset \
  ------------------
  |  Branch (402:11): [True: 22.7k, False: 553k]
  ------------------
  403|  22.7k|        if (direction == FWD) {
  ------------------
  |  |  111|  22.7k|#define FWD 0 /* bitstream decoding direction forward (RVL coded part) */
  ------------------
  |  Branch (403:13): [True: 15.3k, False: 7.45k]
  ------------------
  404|  15.3k|          pRvlc->errorLogRvlc |= RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD;
  ------------------
  |  |  130|  15.3k|  0x08000000 /*  RVL-Dec  forbidden codeword detected fwd (long+shrt) */
  ------------------
  405|  15.3k|        } else {
  406|  7.45k|          pRvlc->errorLogRvlc |= RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD;
  ------------------
  |  |  132|  7.45k|  0x04000000 /*  RVL-Dec  forbidden codeword detected bwd (long+shrt) */
  ------------------
  407|  7.45k|        }
  408|  22.7k|        value = -1; /* signalize an error in return value, because a forbidden
  409|       |                       cw was detected*/
  410|  22.7k|      }
  411|       |
  412|   576k|      return value; /* return a dpcm value with offset +7 or an error status */
  413|   576k|    } else {
  414|   483k|      treeNode = *(
  415|   483k|          pRvlCodeTree +
  416|   483k|          branchValue); /* update treeNode for further step in decoding tree */
  417|   483k|    }
  418|  1.06M|  }
  419|       |
  420|      0|  return -1;
  421|   576k|}
_Z10CRvlc_ReadP22CAacDecoderChannelInfoP13FDK_BITSTREAM:
 1062|   136k|                HANDLE_FDK_BITSTREAM bs) {
 1063|   136k|  CErRvlcInfo *pRvlc =
 1064|   136k|      &pAacDecoderChannelInfo->pComData->overlay.aac.erRvlcInfo;
 1065|       |
 1066|   136k|  int group, band;
 1067|       |
 1068|       |  /* RVLC long specific initialization  Init part 1 of 2 */
 1069|   136k|  pRvlc->numWindowGroups = GetWindowGroups(&pAacDecoderChannelInfo->icsInfo);
 1070|   136k|  pRvlc->maxSfbTransmitted =
 1071|   136k|      GetScaleFactorBandsTransmitted(&pAacDecoderChannelInfo->icsInfo);
 1072|   136k|  pRvlc->noise_used = 0;               /* noise detection */
 1073|   136k|  pRvlc->dpcm_noise_nrg = 0;           /* only for debugging */
 1074|   136k|  pRvlc->dpcm_noise_last_position = 0; /* only for debugging */
 1075|   136k|  pRvlc->length_of_rvlc_escapes =
 1076|   136k|      -1; /* default value is used for error detection and concealment */
 1077|       |
 1078|       |  /* read only error sensitivity class 1 data (ESC 1 - data) */
 1079|   136k|  pRvlc->sf_concealment = FDKreadBits(bs, 1);  /* #1 */
 1080|   136k|  pRvlc->rev_global_gain = FDKreadBits(bs, 8); /* #2 */
 1081|       |
 1082|   136k|  if (GetWindowSequence(&pAacDecoderChannelInfo->icsInfo) == BLOCK_SHORT) {
  ------------------
  |  Branch (1082:7): [True: 16.3k, False: 119k]
  ------------------
 1083|  16.3k|    pRvlc->length_of_rvlc_sf = FDKreadBits(bs, 11); /* #3 */
 1084|   119k|  } else {
 1085|   119k|    pRvlc->length_of_rvlc_sf = FDKreadBits(bs, 9); /* #3 */
 1086|   119k|  }
 1087|       |
 1088|       |  /* check if noise codebook is used */
 1089|   350k|  for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (1089:19): [True: 213k, False: 136k]
  ------------------
 1090|   877k|    for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (1090:20): [True: 680k, False: 196k]
  ------------------
 1091|   680k|      if (pAacDecoderChannelInfo->pDynData->aCodeBook[16 * group + band] ==
  ------------------
  |  Branch (1091:11): [True: 17.6k, False: 663k]
  ------------------
 1092|   680k|          NOISE_HCB) {
 1093|  17.6k|        pRvlc->noise_used = 1;
 1094|  17.6k|        break;
 1095|  17.6k|      }
 1096|   680k|    }
 1097|   213k|  }
 1098|       |
 1099|   136k|  if (pRvlc->noise_used)
  ------------------
  |  Branch (1099:7): [True: 16.9k, False: 119k]
  ------------------
 1100|  16.9k|    pRvlc->dpcm_noise_nrg = FDKreadBits(bs, 9); /* #4  PNS */
 1101|       |
 1102|   136k|  pRvlc->sf_escapes_present = FDKreadBits(bs, 1); /* #5      */
 1103|       |
 1104|   136k|  if (pRvlc->sf_escapes_present) {
  ------------------
  |  Branch (1104:7): [True: 31.4k, False: 104k]
  ------------------
 1105|  31.4k|    pRvlc->length_of_rvlc_escapes = FDKreadBits(bs, 8); /* #6      */
 1106|  31.4k|  }
 1107|       |
 1108|   136k|  if (pRvlc->noise_used) {
  ------------------
  |  Branch (1108:7): [True: 16.9k, False: 119k]
  ------------------
 1109|  16.9k|    pRvlc->dpcm_noise_last_position = FDKreadBits(bs, 9); /* #7  PNS */
 1110|  16.9k|    pRvlc->length_of_rvlc_sf -= 9;
 1111|  16.9k|  }
 1112|       |
 1113|   136k|  pRvlc->length_of_rvlc_sf_fwd = pRvlc->length_of_rvlc_sf;
 1114|   136k|  pRvlc->length_of_rvlc_sf_bwd = pRvlc->length_of_rvlc_sf;
 1115|   136k|}
_Z12CRvlc_DecodeP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoP13FDK_BITSTREAM:
 1138|   136k|                  HANDLE_FDK_BITSTREAM bs) {
 1139|   136k|  CErRvlcInfo *pRvlc =
 1140|   136k|      &pAacDecoderChannelInfo->pComData->overlay.aac.erRvlcInfo;
 1141|   136k|  INT bitCntOffst;
 1142|   136k|  INT saveBitCnt;
 1143|       |
 1144|   136k|  rvlcInit(pRvlc, pAacDecoderChannelInfo, bs);
 1145|       |
 1146|       |  /* save bitstream position */
 1147|   136k|  saveBitCnt = (INT)FDKgetValidBits(bs);
 1148|       |
 1149|   136k|  if (pRvlc->sf_escapes_present)
  ------------------
  |  Branch (1149:7): [True: 31.6k, False: 104k]
  ------------------
 1150|  31.6k|    rvlcDecodeEscapes(
 1151|  31.6k|        pRvlc, pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfEsc, bs);
 1152|       |
 1153|   136k|  rvlcDecodeForward(pRvlc, pAacDecoderChannelInfo, bs);
 1154|   136k|  rvlcDecodeBackward(pRvlc, pAacDecoderChannelInfo, bs);
 1155|   136k|  rvlcFinalErrorDetection(pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo);
 1156|       |
 1157|   136k|  pAacDecoderChannelInfo->pDynData->specificTo.aac.rvlcIntensityUsed =
 1158|   136k|      pRvlc->intensity_used;
 1159|   136k|  pAacDecoderChannelInfo->data.aac.PnsData.PnsActive = pRvlc->noise_used;
 1160|       |
 1161|       |  /* restore bitstream position */
 1162|   136k|  bitCntOffst = (INT)FDKgetValidBits(bs) - saveBitCnt;
 1163|   136k|  if (bitCntOffst) {
  ------------------
  |  Branch (1163:7): [True: 62.9k, False: 73.3k]
  ------------------
 1164|  62.9k|    FDKpushBiDirectional(bs, bitCntOffst);
 1165|  62.9k|  }
 1166|   136k|}
_Z18CRvlc_ElementCheckPP22CAacDecoderChannelInfoPP28CAacDecoderStaticChannelInfoji:
 1171|   421k|    const UINT flags, const INT elChannels) {
 1172|   421k|  int ch;
 1173|       |
 1174|       |  /* Required for MPS residuals. */
 1175|   421k|  if (pAacDecoderStaticChannelInfo == NULL) {
  ------------------
  |  Branch (1175:7): [True: 0, False: 421k]
  ------------------
 1176|      0|    return;
 1177|      0|  }
 1178|       |
 1179|       |  /* RVLC specific sanity checks */
 1180|   421k|  if ((flags & AC_ER_RVLC) && (elChannels == 2)) { /* to be reviewed */
  ------------------
  |  |  297|   421k|  0x000002 /*!< aacSpectralDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1180:7): [True: 81.4k, False: 340k]
  |  Branch (1180:31): [True: 52.5k, False: 28.8k]
  ------------------
 1181|  52.5k|    if (((pAacDecoderChannelInfo[0]
  ------------------
  |  Branch (1181:10): [True: 10.7k, False: 41.8k]
  ------------------
 1182|  52.5k|              ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK == 0) ||
 1183|  41.8k|         (pAacDecoderChannelInfo[1]
  ------------------
  |  Branch (1183:10): [True: 7.26k, False: 34.5k]
  ------------------
 1184|  41.8k|              ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK == 0)) &&
 1185|  18.0k|        pAacDecoderChannelInfo[0]->pComData->jointStereoData.MsMaskPresent) {
  ------------------
  |  Branch (1185:9): [True: 8.85k, False: 9.15k]
  ------------------
 1186|  8.85k|      pAacDecoderChannelInfo[0]
 1187|  8.85k|          ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK = 0;
 1188|  8.85k|      pAacDecoderChannelInfo[1]
 1189|  8.85k|          ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK = 0;
 1190|  8.85k|    }
 1191|       |
 1192|  52.5k|    if ((pAacDecoderChannelInfo[0]
  ------------------
  |  Branch (1192:9): [True: 12.7k, False: 39.8k]
  ------------------
 1193|  52.5k|             ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK == 0) &&
 1194|  12.7k|        (pAacDecoderChannelInfo[1]
  ------------------
  |  Branch (1194:9): [True: 1.21k, False: 11.5k]
  ------------------
 1195|  12.7k|             ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK == 1) &&
 1196|  1.21k|        (pAacDecoderChannelInfo[1]
  ------------------
  |  Branch (1196:9): [True: 909, False: 310]
  ------------------
 1197|  1.21k|             ->pDynData->specificTo.aac.rvlcIntensityUsed == 1)) {
 1198|    909|      pAacDecoderChannelInfo[1]
 1199|    909|          ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK = 0;
 1200|    909|    }
 1201|  52.5k|  }
 1202|       |
 1203|  1.01M|  for (ch = 0; ch < elChannels; ch++) {
  ------------------
  |  Branch (1203:16): [True: 592k, False: 421k]
  ------------------
 1204|   592k|    pAacDecoderStaticChannelInfo[ch]->concealmentInfo.rvlcPreviousBlockType =
 1205|   592k|        (GetWindowSequence(&pAacDecoderChannelInfo[ch]->icsInfo) == BLOCK_SHORT)
  ------------------
  |  Branch (1205:9): [True: 120k, False: 471k]
  ------------------
 1206|   592k|            ? 0
 1207|   592k|            : 1;
 1208|   592k|    if (flags & AC_ER_RVLC) {
  ------------------
  |  |  297|   592k|  0x000002 /*!< aacSpectralDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1208:9): [True: 134k, False: 458k]
  ------------------
 1209|   134k|      pAacDecoderStaticChannelInfo[ch]
 1210|   134k|          ->concealmentInfo.rvlcPreviousScaleFactorOK =
 1211|   134k|          pAacDecoderChannelInfo[ch]
 1212|   134k|              ->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK;
 1213|   458k|    } else {
 1214|   458k|      pAacDecoderStaticChannelInfo[ch]
 1215|   458k|          ->concealmentInfo.rvlcPreviousScaleFactorOK = 0;
 1216|   458k|    }
 1217|   592k|  }
 1218|   421k|}
rvlc.cpp:_ZL8rvlcInitP11CErRvlcInfoP22CAacDecoderChannelInfoP13FDK_BITSTREAM:
  134|   136k|                     HANDLE_FDK_BITSTREAM bs) {
  135|       |  /* RVLC common initialization part 2 of 2 */
  136|   136k|  SHORT *pScfEsc = pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfEsc;
  137|   136k|  SHORT *pScfFwd = pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd;
  138|   136k|  SHORT *pScfBwd = pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd;
  139|   136k|  SHORT *pScaleFactor = pAacDecoderChannelInfo->pDynData->aScaleFactor;
  140|   136k|  int bnds;
  141|       |
  142|   136k|  pAacDecoderChannelInfo->pDynData->specificTo.aac.rvlcIntensityUsed = 0;
  143|       |
  144|   136k|  pRvlc->numDecodedEscapeWordsEsc = 0;
  145|   136k|  pRvlc->numDecodedEscapeWordsFwd = 0;
  146|   136k|  pRvlc->numDecodedEscapeWordsBwd = 0;
  147|       |
  148|   136k|  pRvlc->intensity_used = 0;
  149|   136k|  pRvlc->errorLogRvlc = 0;
  150|       |
  151|   136k|  pRvlc->conceal_max = CONCEAL_MAX_INIT;
  ------------------
  |  |  129|   136k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  152|   136k|  pRvlc->conceal_min = CONCEAL_MIN_INIT;
  ------------------
  |  |  130|   136k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  153|       |
  154|   136k|  pRvlc->conceal_max_esc = CONCEAL_MAX_INIT;
  ------------------
  |  |  129|   136k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  155|   136k|  pRvlc->conceal_min_esc = CONCEAL_MIN_INIT;
  ------------------
  |  |  130|   136k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  156|       |
  157|   136k|  pRvlc->pHuffTreeRvlcEscape = aHuffTreeRvlcEscape;
  158|   136k|  pRvlc->pHuffTreeRvlCodewds = aHuffTreeRvlCodewds;
  159|       |
  160|       |  /* init scf arrays (for savety (in case of there are only zero codebooks)) */
  161|  17.5M|  for (bnds = 0; bnds < RVLC_MAX_SFB; bnds++) {
  ------------------
  |  |  132|  17.5M|#define RVLC_MAX_SFB ((8) * (16))
  ------------------
  |  Branch (161:18): [True: 17.4M, False: 136k]
  ------------------
  162|  17.4M|    pScfFwd[bnds] = 0;
  163|  17.4M|    pScfBwd[bnds] = 0;
  164|  17.4M|    pScfEsc[bnds] = 0;
  165|  17.4M|    pScaleFactor[bnds] = 0;
  166|  17.4M|  }
  167|       |
  168|       |  /* set base bitstream ptr to the RVL-coded part (start of RVLC data (ESC 2))
  169|       |   */
  170|   136k|  FDKsyncCache(bs);
  171|   136k|  pRvlc->bsAnchor = (INT)FDKgetValidBits(bs);
  172|       |
  173|   136k|  pRvlc->bitstreamIndexRvlFwd =
  174|   136k|      0; /* first bit within RVL coded block as start address for  forward
  175|       |            decoding */
  176|   136k|  pRvlc->bitstreamIndexRvlBwd =
  177|   136k|      pRvlc->length_of_rvlc_sf - 1; /* last bit within RVL coded block as start
  178|       |                                       address for backward decoding */
  179|       |
  180|       |  /* skip RVLC-bitstream-part -- pointing now to escapes (if present) or to TNS
  181|       |   * data (if present) */
  182|   136k|  FDKpushFor(bs, pRvlc->length_of_rvlc_sf);
  183|       |
  184|   136k|  if (pRvlc->sf_escapes_present != 0) {
  ------------------
  |  Branch (184:7): [True: 31.6k, False: 104k]
  ------------------
  185|       |    /* locate internal bitstream ptr at escapes (which is the second part) */
  186|  31.6k|    FDKsyncCache(bs);
  187|  31.6k|    pRvlc->bitstreamIndexEsc = pRvlc->bsAnchor - (INT)FDKgetValidBits(bs);
  188|       |
  189|       |    /* skip escapeRVLC-bitstream-part -- pointing to TNS data (if present)   to
  190|       |     * make decoder continue */
  191|       |    /* decoding of RVLC should work despite this second pushFor during
  192|       |     * initialization because        */
  193|       |    /* bitstream initialization is valid for both ESC2 data parts (RVL-coded
  194|       |     * values and ESC-coded values) */
  195|  31.6k|    FDKpushFor(bs, pRvlc->length_of_rvlc_escapes);
  196|  31.6k|  }
  197|   136k|}
rvlc.cpp:_ZL17rvlcDecodeEscapesP11CErRvlcInfoPsP13FDK_BITSTREAM:
  323|  31.6k|                              HANDLE_FDK_BITSTREAM bs) {
  324|  31.6k|  SCHAR escWord;
  325|  31.6k|  SCHAR escCnt = 0;
  326|  31.6k|  SHORT *pEscBitCntSum;
  327|       |
  328|  31.6k|  pEscBitCntSum = &(pRvlc->length_of_rvlc_escapes);
  329|       |
  330|       |  /* Decode all RVLC-Escape words with a plain Huffman-Decoder */
  331|  1.31M|  while (*pEscBitCntSum > 0) {
  ------------------
  |  Branch (331:10): [True: 1.29M, False: 19.4k]
  ------------------
  332|  1.29M|    escWord = rvlcDecodeEscapeWord(pRvlc, bs);
  333|       |
  334|  1.29M|    if (escWord >= 0) {
  ------------------
  |  Branch (334:9): [True: 1.27M, False: 12.2k]
  ------------------
  335|  1.27M|      pEsc[escCnt] = escWord;
  336|  1.27M|      escCnt++;
  337|  1.27M|    } else {
  338|  12.2k|      pRvlc->errorLogRvlc |= RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID;
  ------------------
  |  |  121|  12.2k|  0x80000000 /*  ESC-Dec  During RVLC-Escape-decoding there have been more \
  ------------------
  339|  12.2k|      pRvlc->numDecodedEscapeWordsEsc = escCnt;
  340|       |
  341|  12.2k|      return;
  342|  12.2k|    }
  343|  1.29M|  } /* all RVLC escapes decoded */
  344|       |
  345|  19.4k|  pRvlc->numDecodedEscapeWordsEsc = escCnt;
  346|  19.4k|}
rvlc.cpp:_ZL20rvlcDecodeEscapeWordP11CErRvlcInfoP13FDK_BITSTREAM:
  247|  1.29M|static SCHAR rvlcDecodeEscapeWord(CErRvlcInfo *pRvlc, HANDLE_FDK_BITSTREAM bs) {
  248|  1.29M|  int i;
  249|  1.29M|  SCHAR value;
  250|  1.29M|  UCHAR carryBit;
  251|  1.29M|  UINT treeNode;
  252|  1.29M|  UINT branchValue;
  253|  1.29M|  UINT branchNode;
  254|       |
  255|  1.29M|  INT *pBitstreamIndexEsc;
  256|  1.29M|  const UINT *pEscTree;
  257|       |
  258|  1.29M|  pEscTree = pRvlc->pHuffTreeRvlcEscape;
  259|  1.29M|  pBitstreamIndexEsc = &(pRvlc->bitstreamIndexEsc);
  260|  1.29M|  treeNode = *pEscTree; /* init at starting node */
  261|       |
  262|  3.20M|  for (i = MAX_LEN_RVLC_ESCAPE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |  124|  1.29M|  20 /* max length of huffman coded RVLC escape word in bits */
  ------------------
  |  Branch (262:42): [True: 3.20M, False: 0]
  ------------------
  263|  3.20M|    carryBit =
  264|  3.20M|        rvlcReadBitFromBitstream(bs, /* get next bit */
  265|  3.20M|                                 pRvlc->bsAnchor, pBitstreamIndexEsc, FWD);
  ------------------
  |  |  111|  3.20M|#define FWD 0 /* bitstream decoding direction forward (RVL coded part) */
  ------------------
  266|       |
  267|  3.20M|    CarryBitToBranchValue(carryBit, /* huffman decoding, do a single step in
  268|       |                                       huffman decoding tree */
  269|  3.20M|                          treeNode, &branchValue, &branchNode);
  270|       |
  271|  3.20M|    if ((branchNode & TEST_BIT_10) ==
  ------------------
  |  |  167|  3.20M|#define TEST_BIT_10 0x400
  ------------------
  |  Branch (271:9): [True: 1.29M, False: 1.91M]
  ------------------
  272|  3.20M|        TEST_BIT_10) { /* test bit 10 ; if set --> a RVLC-escape-word is
  ------------------
  |  |  167|  3.20M|#define TEST_BIT_10 0x400
  ------------------
  273|       |                          completely decoded */
  274|  1.29M|      value = (SCHAR)branchNode & CLR_BIT_10;
  ------------------
  |  |  166|  1.29M|#define CLR_BIT_10 0x3FF
  ------------------
  275|  1.29M|      pRvlc->length_of_rvlc_escapes -= (MAX_LEN_RVLC_ESCAPE_WORD - i);
  ------------------
  |  |  124|  1.29M|  20 /* max length of huffman coded RVLC escape word in bits */
  ------------------
  276|       |
  277|  1.29M|      if (pRvlc->length_of_rvlc_escapes < 0) {
  ------------------
  |  Branch (277:11): [True: 12.2k, False: 1.27M]
  ------------------
  278|  12.2k|        pRvlc->errorLogRvlc |= RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID;
  ------------------
  |  |  121|  12.2k|  0x80000000 /*  ESC-Dec  During RVLC-Escape-decoding there have been more \
  ------------------
  279|  12.2k|        value = -1;
  280|  12.2k|      }
  281|       |
  282|  1.29M|      return value;
  283|  1.91M|    } else {
  284|  1.91M|      treeNode = *(
  285|  1.91M|          pEscTree +
  286|  1.91M|          branchValue); /* update treeNode for further step in decoding tree */
  287|  1.91M|    }
  288|  3.20M|  }
  289|       |
  290|      0|  pRvlc->errorLogRvlc |= RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID;
  ------------------
  |  |  121|      0|  0x80000000 /*  ESC-Dec  During RVLC-Escape-decoding there have been more \
  ------------------
  291|       |
  292|      0|  return -1; /* should not be reached */
  293|  1.29M|}
rvlc.cpp:_ZL17rvlcDecodeForwardP11CErRvlcInfoP22CAacDecoderChannelInfoP13FDK_BITSTREAM:
  438|   136k|                              HANDLE_FDK_BITSTREAM bs) {
  439|   136k|  int band = 0;
  440|   136k|  int group = 0;
  441|   136k|  int bnds = 0;
  442|       |
  443|   136k|  SHORT dpcm;
  444|       |
  445|   136k|  SHORT factor =
  446|   136k|      pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain - SF_OFFSET;
  ------------------
  |  |  127|   136k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  447|   136k|  SHORT position = -SF_OFFSET;
  ------------------
  |  |  127|   136k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  448|   136k|  SHORT noisenrg = pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain -
  449|   136k|                   SF_OFFSET - 90 - 256;
  ------------------
  |  |  127|   136k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  450|       |
  451|   136k|  SHORT *pScfFwd = pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd;
  452|   136k|  SHORT *pScfEsc = pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfEsc;
  453|   136k|  UCHAR *pEscFwdCnt = &(pRvlc->numDecodedEscapeWordsFwd);
  454|       |
  455|   136k|  pRvlc->pRvlBitCnt_RVL = &(pRvlc->length_of_rvlc_sf_fwd);
  456|   136k|  pRvlc->pBitstrIndxRvl_RVL = &(pRvlc->bitstreamIndexRvlFwd);
  457|       |
  458|   136k|  *pEscFwdCnt = 0;
  459|   136k|  pRvlc->direction = FWD;
  ------------------
  |  |  111|   136k|#define FWD 0 /* bitstream decoding direction forward (RVL coded part) */
  ------------------
  460|   136k|  pRvlc->noise_used = 0;
  461|   136k|  pRvlc->sf_used = 0;
  462|   136k|  pRvlc->lastScf = 0;
  463|   136k|  pRvlc->lastNrg = 0;
  464|   136k|  pRvlc->lastIs = 0;
  465|       |
  466|   136k|  rvlcCheckIntensityCb(pRvlc, pAacDecoderChannelInfo);
  467|       |
  468|       |  /* main loop fwd long */
  469|   286k|  for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (469:19): [True: 184k, False: 102k]
  ------------------
  470|   664k|    for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (470:20): [True: 513k, False: 150k]
  ------------------
  471|   513k|      bnds = 16 * group + band;
  472|       |
  473|   513k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  474|   213k|        case ZERO_HCB:
  ------------------
  |  Branch (474:9): [True: 213k, False: 300k]
  ------------------
  475|   213k|          pScfFwd[bnds] = 0;
  476|   213k|          break;
  477|       |
  478|  38.5k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (478:9): [True: 38.5k, False: 475k]
  ------------------
  479|  52.6k|        case INTENSITY_HCB:
  ------------------
  |  Branch (479:9): [True: 14.0k, False: 499k]
  ------------------
  480|       |          /* store dpcm_is_position */
  481|  52.6k|          dpcm = decodeRVLCodeword(bs, pRvlc);
  482|  52.6k|          if (dpcm < 0) {
  ------------------
  |  Branch (482:15): [True: 7.87k, False: 44.7k]
  ------------------
  483|  7.87k|            pRvlc->conceal_max = bnds;
  484|  7.87k|            return;
  485|  7.87k|          }
  486|  44.7k|          dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|  44.7k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  487|  44.7k|          if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|  44.7k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                        if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|  44.6k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (487:15): [True: 121, False: 44.6k]
  |  Branch (487:36): [True: 412, False: 44.2k]
  ------------------
  488|    533|            if (pRvlc->length_of_rvlc_escapes) {
  ------------------
  |  Branch (488:17): [True: 271, False: 262]
  ------------------
  489|    271|              pRvlc->conceal_max = bnds;
  490|    271|              return;
  491|    271|            } else {
  492|    262|              if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|    262|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (492:19): [True: 107, False: 155]
  ------------------
  493|    107|                dpcm -= *pScfEsc++;
  494|    155|              } else {
  495|    155|                dpcm += *pScfEsc++;
  496|    155|              }
  497|    262|              (*pEscFwdCnt)++;
  498|    262|              if (pRvlc->conceal_max_esc == CONCEAL_MAX_INIT) {
  ------------------
  |  |  129|    262|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (498:19): [True: 81, False: 181]
  ------------------
  499|     81|                pRvlc->conceal_max_esc = bnds;
  500|     81|              }
  501|    262|            }
  502|    533|          }
  503|  44.4k|          position += dpcm;
  504|  44.4k|          pScfFwd[bnds] = position;
  505|  44.4k|          pRvlc->lastIs = position;
  506|  44.4k|          break;
  507|       |
  508|  40.3k|        case NOISE_HCB:
  ------------------
  |  Branch (508:9): [True: 40.3k, False: 473k]
  ------------------
  509|  40.3k|          if (pRvlc->noise_used == 0) {
  ------------------
  |  Branch (509:15): [True: 14.9k, False: 25.4k]
  ------------------
  510|  14.9k|            pRvlc->noise_used = 1;
  511|  14.9k|            pRvlc->first_noise_band = bnds;
  512|  14.9k|            noisenrg += pRvlc->dpcm_noise_nrg;
  513|  14.9k|            pScfFwd[bnds] = 100 + noisenrg;
  514|  14.9k|            pRvlc->lastNrg = noisenrg;
  515|  25.4k|          } else {
  516|  25.4k|            dpcm = decodeRVLCodeword(bs, pRvlc);
  517|  25.4k|            if (dpcm < 0) {
  ------------------
  |  Branch (517:17): [True: 3.16k, False: 22.2k]
  ------------------
  518|  3.16k|              pRvlc->conceal_max = bnds;
  519|  3.16k|              return;
  520|  3.16k|            }
  521|  22.2k|            dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|  22.2k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  522|  22.2k|            if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|  22.2k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                          if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|  22.0k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (522:17): [True: 208, False: 22.0k]
  |  Branch (522:38): [True: 388, False: 21.6k]
  ------------------
  523|    596|              if (pRvlc->length_of_rvlc_escapes) {
  ------------------
  |  Branch (523:19): [True: 356, False: 240]
  ------------------
  524|    356|                pRvlc->conceal_max = bnds;
  525|    356|                return;
  526|    356|              } else {
  527|    240|                if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|    240|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (527:21): [True: 123, False: 117]
  ------------------
  528|    123|                  dpcm -= *pScfEsc++;
  529|    123|                } else {
  530|    117|                  dpcm += *pScfEsc++;
  531|    117|                }
  532|    240|                (*pEscFwdCnt)++;
  533|    240|                if (pRvlc->conceal_max_esc == CONCEAL_MAX_INIT) {
  ------------------
  |  |  129|    240|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (533:21): [True: 60, False: 180]
  ------------------
  534|     60|                  pRvlc->conceal_max_esc = bnds;
  535|     60|                }
  536|    240|              }
  537|    596|            }
  538|  21.8k|            noisenrg += dpcm;
  539|  21.8k|            pScfFwd[bnds] = 100 + noisenrg;
  540|  21.8k|            pRvlc->lastNrg = noisenrg;
  541|  21.8k|          }
  542|  36.8k|          pAacDecoderChannelInfo->data.aac.PnsData.pnsUsed[bnds] = 1;
  543|  36.8k|          break;
  544|       |
  545|   207k|        default:
  ------------------
  |  Branch (545:9): [True: 207k, False: 306k]
  ------------------
  546|   207k|          pRvlc->sf_used = 1;
  547|   207k|          dpcm = decodeRVLCodeword(bs, pRvlc);
  548|   207k|          if (dpcm < 0) {
  ------------------
  |  Branch (548:15): [True: 19.8k, False: 187k]
  ------------------
  549|  19.8k|            pRvlc->conceal_max = bnds;
  550|  19.8k|            return;
  551|  19.8k|          }
  552|   187k|          dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|   187k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  553|   187k|          if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|   187k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                        if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|   187k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (553:15): [True: 310, False: 187k]
  |  Branch (553:36): [True: 3.01k, False: 184k]
  ------------------
  554|  3.32k|            if (pRvlc->length_of_rvlc_escapes) {
  ------------------
  |  Branch (554:17): [True: 2.13k, False: 1.18k]
  ------------------
  555|  2.13k|              pRvlc->conceal_max = bnds;
  556|  2.13k|              return;
  557|  2.13k|            } else {
  558|  1.18k|              if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|  1.18k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (558:19): [True: 203, False: 981]
  ------------------
  559|    203|                dpcm -= *pScfEsc++;
  560|    981|              } else {
  561|    981|                dpcm += *pScfEsc++;
  562|    981|              }
  563|  1.18k|              (*pEscFwdCnt)++;
  564|  1.18k|              if (pRvlc->conceal_max_esc == CONCEAL_MAX_INIT) {
  ------------------
  |  |  129|  1.18k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (564:19): [True: 901, False: 283]
  ------------------
  565|    901|                pRvlc->conceal_max_esc = bnds;
  566|    901|              }
  567|  1.18k|            }
  568|  3.32k|          }
  569|   185k|          factor += dpcm;
  570|   185k|          pScfFwd[bnds] = factor;
  571|   185k|          pRvlc->lastScf = factor;
  572|   185k|          break;
  573|   513k|      }
  574|   513k|    }
  575|   184k|  }
  576|       |
  577|       |  /* postfetch fwd long */
  578|   102k|  if (pRvlc->intensity_used) {
  ------------------
  |  Branch (578:7): [True: 7.80k, False: 94.8k]
  ------------------
  579|  7.80k|    dpcm = decodeRVLCodeword(bs, pRvlc); /* dpcm_is_last_position */
  580|  7.80k|    if (dpcm < 0) {
  ------------------
  |  Branch (580:9): [True: 1.34k, False: 6.46k]
  ------------------
  581|  1.34k|      pRvlc->conceal_max = bnds;
  582|  1.34k|      return;
  583|  1.34k|    }
  584|  6.46k|    dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|  6.46k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  585|  6.46k|    if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|  6.46k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                  if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|  6.31k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (585:9): [True: 149, False: 6.31k]
  |  Branch (585:30): [True: 155, False: 6.15k]
  ------------------
  586|    304|      if (pRvlc->length_of_rvlc_escapes) {
  ------------------
  |  Branch (586:11): [True: 248, False: 56]
  ------------------
  587|    248|        pRvlc->conceal_max = bnds;
  588|    248|        return;
  589|    248|      } else {
  590|     56|        if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|     56|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (590:13): [True: 37, False: 19]
  ------------------
  591|     37|          dpcm -= *pScfEsc++;
  592|     37|        } else {
  593|     19|          dpcm += *pScfEsc++;
  594|     19|        }
  595|     56|        (*pEscFwdCnt)++;
  596|     56|        if (pRvlc->conceal_max_esc == CONCEAL_MAX_INIT) {
  ------------------
  |  |  129|     56|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (596:13): [True: 36, False: 20]
  ------------------
  597|     36|          pRvlc->conceal_max_esc = bnds;
  598|     36|        }
  599|     56|      }
  600|    304|    }
  601|  6.21k|    pRvlc->dpcm_is_last_position = dpcm;
  602|  6.21k|  }
  603|   102k|}
rvlc.cpp:_ZL20rvlcCheckIntensityCbP11CErRvlcInfoP22CAacDecoderChannelInfo:
  215|   136k|    CErRvlcInfo *pRvlc, CAacDecoderChannelInfo *pAacDecoderChannelInfo) {
  216|   136k|  int group, band, bnds;
  217|       |
  218|   136k|  pRvlc->intensity_used = 0;
  219|       |
  220|   350k|  for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (220:19): [True: 214k, False: 136k]
  ------------------
  221|   836k|    for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (221:20): [True: 648k, False: 188k]
  ------------------
  222|   648k|      bnds = 16 * group + band;
  223|   648k|      if ((pAacDecoderChannelInfo->pDynData->aCodeBook[bnds] ==
  ------------------
  |  Branch (223:11): [True: 11.0k, False: 637k]
  ------------------
  224|   648k|           INTENSITY_HCB) ||
  225|   637k|          (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds] ==
  ------------------
  |  Branch (225:11): [True: 14.6k, False: 622k]
  ------------------
  226|   637k|           INTENSITY_HCB2)) {
  227|  25.6k|        pRvlc->intensity_used = 1;
  228|  25.6k|        break;
  229|  25.6k|      }
  230|   648k|    }
  231|   214k|  }
  232|   136k|}
rvlc.cpp:_ZL18rvlcDecodeBackwardP11CErRvlcInfoP22CAacDecoderChannelInfoP13FDK_BITSTREAM:
  620|   136k|                               HANDLE_FDK_BITSTREAM bs) {
  621|   136k|  SHORT band, group, dpcm, offset;
  622|   136k|  SHORT bnds = pRvlc->maxSfbTransmitted - 1;
  623|       |
  624|   136k|  SHORT factor = pRvlc->rev_global_gain - SF_OFFSET;
  ------------------
  |  |  127|   136k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  625|   136k|  SHORT position = pRvlc->dpcm_is_last_position - SF_OFFSET;
  ------------------
  |  |  127|   136k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  626|   136k|  SHORT noisenrg = pRvlc->rev_global_gain + pRvlc->dpcm_noise_last_position -
  627|   136k|                   SF_OFFSET - 90 - 256;
  ------------------
  |  |  127|   136k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  628|       |
  629|   136k|  SHORT *pScfBwd = pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd;
  630|   136k|  SHORT *pScfEsc = pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfEsc;
  631|   136k|  UCHAR escEscCnt = pRvlc->numDecodedEscapeWordsEsc;
  632|   136k|  UCHAR *pEscBwdCnt = &(pRvlc->numDecodedEscapeWordsBwd);
  633|       |
  634|   136k|  pRvlc->pRvlBitCnt_RVL = &(pRvlc->length_of_rvlc_sf_bwd);
  635|   136k|  pRvlc->pBitstrIndxRvl_RVL = &(pRvlc->bitstreamIndexRvlBwd);
  636|       |
  637|   136k|  *pEscBwdCnt = 0;
  638|   136k|  pRvlc->direction = BWD;
  ------------------
  |  |  112|   136k|#define BWD 1 /* bitstream decoding direction backward (RVL coded part) */
  ------------------
  639|   136k|  pScfEsc += escEscCnt - 1; /* set pScfEsc to last entry */
  640|   136k|  pRvlc->firstScf = 0;
  641|   136k|  pRvlc->firstNrg = 0;
  642|   136k|  pRvlc->firstIs = 0;
  643|       |
  644|       |  /* prefetch long BWD */
  645|   136k|  if (pRvlc->intensity_used) {
  ------------------
  |  Branch (645:7): [True: 24.6k, False: 111k]
  ------------------
  646|  24.6k|    dpcm = decodeRVLCodeword(bs, pRvlc); /* dpcm_is_last_position */
  647|  24.6k|    if (dpcm < 0) {
  ------------------
  |  Branch (647:9): [True: 5.82k, False: 18.8k]
  ------------------
  648|  5.82k|      pRvlc->dpcm_is_last_position = 0;
  649|  5.82k|      pRvlc->conceal_min = bnds;
  650|  5.82k|      return;
  651|  5.82k|    }
  652|  18.8k|    dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|  18.8k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  653|  18.8k|    if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|  18.8k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                  if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|  16.7k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (653:9): [True: 2.14k, False: 16.7k]
  |  Branch (653:30): [True: 73, False: 16.6k]
  ------------------
  654|  2.21k|      if ((pRvlc->length_of_rvlc_escapes) || (*pEscBwdCnt >= escEscCnt)) {
  ------------------
  |  Branch (654:11): [True: 2.16k, False: 53]
  |  Branch (654:46): [True: 21, False: 32]
  ------------------
  655|  2.18k|        pRvlc->conceal_min = bnds;
  656|  2.18k|        return;
  657|  2.18k|      } else {
  658|     32|        if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|     32|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (658:13): [True: 21, False: 11]
  ------------------
  659|     21|          dpcm -= *pScfEsc--;
  660|     21|        } else {
  661|     11|          dpcm += *pScfEsc--;
  662|     11|        }
  663|     32|        (*pEscBwdCnt)++;
  664|     32|        if (pRvlc->conceal_min_esc == CONCEAL_MIN_INIT) {
  ------------------
  |  |  130|     32|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (664:13): [True: 32, False: 0]
  ------------------
  665|     32|          pRvlc->conceal_min_esc = bnds;
  666|     32|        }
  667|     32|      }
  668|  2.21k|    }
  669|  16.6k|    pRvlc->dpcm_is_last_position = dpcm;
  670|  16.6k|  }
  671|       |
  672|       |  /* main loop long BWD */
  673|   263k|  for (group = pRvlc->numWindowGroups - 1; group >= 0; group--) {
  ------------------
  |  Branch (673:44): [True: 160k, False: 103k]
  ------------------
  674|   565k|    for (band = pRvlc->maxSfbTransmitted - 1; band >= 0; band--) {
  ------------------
  |  Branch (674:47): [True: 430k, False: 135k]
  ------------------
  675|   430k|      bnds = 16 * group + band;
  676|   430k|      if ((band == 0) && (pRvlc->numWindowGroups != 1))
  ------------------
  |  Branch (676:11): [True: 67.7k, False: 362k]
  |  Branch (676:26): [True: 33.8k, False: 33.8k]
  ------------------
  677|  33.8k|        offset = 16 - pRvlc->maxSfbTransmitted + 1;
  678|   396k|      else
  679|   396k|        offset = 1;
  680|       |
  681|   430k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  682|   167k|        case ZERO_HCB:
  ------------------
  |  Branch (682:9): [True: 167k, False: 263k]
  ------------------
  683|   167k|          pScfBwd[bnds] = 0;
  684|   167k|          break;
  685|       |
  686|  34.1k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (686:9): [True: 34.1k, False: 396k]
  ------------------
  687|  56.8k|        case INTENSITY_HCB:
  ------------------
  |  Branch (687:9): [True: 22.7k, False: 407k]
  ------------------
  688|       |          /* store dpcm_is_position */
  689|  56.8k|          dpcm = decodeRVLCodeword(bs, pRvlc);
  690|  56.8k|          if (dpcm < 0) {
  ------------------
  |  Branch (690:15): [True: 1.01k, False: 55.8k]
  ------------------
  691|  1.01k|            pScfBwd[bnds] = position;
  692|  1.01k|            pRvlc->conceal_min = fMax(0, bnds - offset);
  693|  1.01k|            return;
  694|  1.01k|          }
  695|  55.8k|          dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|  55.8k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  696|  55.8k|          if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|  55.8k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                        if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|  55.0k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (696:15): [True: 875, False: 55.0k]
  |  Branch (696:36): [True: 285, False: 54.7k]
  ------------------
  697|  1.16k|            if ((pRvlc->length_of_rvlc_escapes) || (*pEscBwdCnt >= escEscCnt)) {
  ------------------
  |  Branch (697:17): [True: 827, False: 333]
  |  Branch (697:52): [True: 34, False: 299]
  ------------------
  698|    861|              pScfBwd[bnds] = position;
  699|    861|              pRvlc->conceal_min = fMax(0, bnds - offset);
  700|    861|              return;
  701|    861|            } else {
  702|    299|              if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|    299|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (702:19): [True: 109, False: 190]
  ------------------
  703|    109|                dpcm -= *pScfEsc--;
  704|    190|              } else {
  705|    190|                dpcm += *pScfEsc--;
  706|    190|              }
  707|    299|              (*pEscBwdCnt)++;
  708|    299|              if (pRvlc->conceal_min_esc == CONCEAL_MIN_INIT) {
  ------------------
  |  |  130|    299|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (708:19): [True: 49, False: 250]
  ------------------
  709|     49|                pRvlc->conceal_min_esc = fMax(0, bnds - offset);
  710|     49|              }
  711|    299|            }
  712|  1.16k|          }
  713|  55.0k|          pScfBwd[bnds] = position;
  714|  55.0k|          position -= dpcm;
  715|  55.0k|          pRvlc->firstIs = position;
  716|  55.0k|          break;
  717|       |
  718|  17.3k|        case NOISE_HCB:
  ------------------
  |  Branch (718:9): [True: 17.3k, False: 413k]
  ------------------
  719|  17.3k|          if (bnds == pRvlc->first_noise_band) {
  ------------------
  |  Branch (719:15): [True: 4.42k, False: 12.9k]
  ------------------
  720|  4.42k|            pScfBwd[bnds] =
  721|  4.42k|                pRvlc->dpcm_noise_nrg +
  722|  4.42k|                pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain -
  723|  4.42k|                SF_OFFSET - 90 - 256;
  ------------------
  |  |  127|  4.42k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  724|  4.42k|            pRvlc->firstNrg = pScfBwd[bnds];
  725|  12.9k|          } else {
  726|  12.9k|            dpcm = decodeRVLCodeword(bs, pRvlc);
  727|  12.9k|            if (dpcm < 0) {
  ------------------
  |  Branch (727:17): [True: 2.35k, False: 10.5k]
  ------------------
  728|  2.35k|              pScfBwd[bnds] = noisenrg;
  729|  2.35k|              pRvlc->conceal_min = fMax(0, bnds - offset);
  730|  2.35k|              return;
  731|  2.35k|            }
  732|  10.5k|            dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|  10.5k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  733|  10.5k|            if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|  10.5k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                          if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|  10.2k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (733:17): [True: 252, False: 10.2k]
  |  Branch (733:38): [True: 179, False: 10.1k]
  ------------------
  734|    431|              if ((pRvlc->length_of_rvlc_escapes) ||
  ------------------
  |  Branch (734:19): [True: 202, False: 229]
  ------------------
  735|    229|                  (*pEscBwdCnt >= escEscCnt)) {
  ------------------
  |  Branch (735:19): [True: 18, False: 211]
  ------------------
  736|    220|                pScfBwd[bnds] = noisenrg;
  737|    220|                pRvlc->conceal_min = fMax(0, bnds - offset);
  738|    220|                return;
  739|    220|              } else {
  740|    211|                if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|    211|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (740:21): [True: 136, False: 75]
  ------------------
  741|    136|                  dpcm -= *pScfEsc--;
  742|    136|                } else {
  743|     75|                  dpcm += *pScfEsc--;
  744|     75|                }
  745|    211|                (*pEscBwdCnt)++;
  746|    211|                if (pRvlc->conceal_min_esc == CONCEAL_MIN_INIT) {
  ------------------
  |  |  130|    211|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (746:21): [True: 26, False: 185]
  ------------------
  747|     26|                  pRvlc->conceal_min_esc = fMax(0, bnds - offset);
  748|     26|                }
  749|    211|              }
  750|    431|            }
  751|  10.3k|            pScfBwd[bnds] = noisenrg;
  752|  10.3k|            noisenrg -= dpcm;
  753|  10.3k|            pRvlc->firstNrg = noisenrg;
  754|  10.3k|          }
  755|  14.7k|          break;
  756|       |
  757|   189k|        default:
  ------------------
  |  Branch (757:9): [True: 189k, False: 241k]
  ------------------
  758|   189k|          dpcm = decodeRVLCodeword(bs, pRvlc);
  759|   189k|          if (dpcm < 0) {
  ------------------
  |  Branch (759:15): [True: 14.6k, False: 174k]
  ------------------
  760|  14.6k|            pScfBwd[bnds] = factor;
  761|  14.6k|            pRvlc->conceal_min = fMax(0, bnds - offset);
  762|  14.6k|            return;
  763|  14.6k|          }
  764|   174k|          dpcm -= TABLE_OFFSET;
  ------------------
  |  |  120|   174k|  7 /* dpcm offset of valid output values of rvl table decoding, the rvl table \
  ------------------
  765|   174k|          if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  115|   174k|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
                        if ((dpcm == MIN_RVL) || (dpcm == MAX_RVL)) {
  ------------------
  |  |  114|   174k|#define MAX_RVL 7  /* positive RVLC escape */
  ------------------
  |  Branch (765:15): [True: 435, False: 174k]
  |  Branch (765:36): [True: 6.32k, False: 167k]
  ------------------
  766|  6.76k|            if ((pRvlc->length_of_rvlc_escapes) || (*pEscBwdCnt >= escEscCnt)) {
  ------------------
  |  Branch (766:17): [True: 5.65k, False: 1.11k]
  |  Branch (766:52): [True: 200, False: 910]
  ------------------
  767|  5.85k|              pScfBwd[bnds] = factor;
  768|  5.85k|              pRvlc->conceal_min = fMax(0, bnds - offset);
  769|  5.85k|              return;
  770|  5.85k|            } else {
  771|    910|              if (dpcm == MIN_RVL) {
  ------------------
  |  |  115|    910|#define MIN_RVL -7 /* negative RVLC escape */
  ------------------
  |  Branch (771:19): [True: 137, False: 773]
  ------------------
  772|    137|                dpcm -= *pScfEsc--;
  773|    773|              } else {
  774|    773|                dpcm += *pScfEsc--;
  775|    773|              }
  776|    910|              (*pEscBwdCnt)++;
  777|    910|              if (pRvlc->conceal_min_esc == CONCEAL_MIN_INIT) {
  ------------------
  |  |  130|    910|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (777:19): [True: 655, False: 255]
  ------------------
  778|    655|                pRvlc->conceal_min_esc = fMax(0, bnds - offset);
  779|    655|              }
  780|    910|            }
  781|  6.76k|          }
  782|   168k|          pScfBwd[bnds] = factor;
  783|   168k|          factor -= dpcm;
  784|   168k|          pRvlc->firstScf = factor;
  785|   168k|          break;
  786|   430k|      }
  787|   430k|    }
  788|   160k|  }
  789|   128k|}
rvlc.cpp:_ZL23rvlcFinalErrorDetectionP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfo:
  806|   136k|    CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo) {
  807|   136k|  CErRvlcInfo *pRvlc =
  808|   136k|      &pAacDecoderChannelInfo->pComData->overlay.aac.erRvlcInfo;
  809|   136k|  UCHAR ErrorStatusComplete = 0;
  810|   136k|  UCHAR ErrorStatusLengthFwd = 0;
  811|   136k|  UCHAR ErrorStatusLengthBwd = 0;
  812|   136k|  UCHAR ErrorStatusLengthEscapes = 0;
  813|   136k|  UCHAR ErrorStatusFirstScf = 0;
  814|   136k|  UCHAR ErrorStatusLastScf = 0;
  815|   136k|  UCHAR ErrorStatusFirstNrg = 0;
  816|   136k|  UCHAR ErrorStatusLastNrg = 0;
  817|   136k|  UCHAR ErrorStatusFirstIs = 0;
  818|   136k|  UCHAR ErrorStatusLastIs = 0;
  819|   136k|  UCHAR ErrorStatusForbiddenCwFwd = 0;
  820|   136k|  UCHAR ErrorStatusForbiddenCwBwd = 0;
  821|   136k|  UCHAR ErrorStatusNumEscapesFwd = 0;
  822|   136k|  UCHAR ErrorStatusNumEscapesBwd = 0;
  823|   136k|  UCHAR ConcealStatus = 1;
  824|   136k|  UCHAR currentBlockType; /* short: 0, not short: 1*/
  825|       |
  826|   136k|  pAacDecoderChannelInfo->pDynData->specificTo.aac.rvlcCurrentScaleFactorOK = 1;
  827|       |
  828|       |  /* invalid escape words, bit counter unequal zero, forbidden codeword detected
  829|       |   */
  830|   136k|  if (pRvlc->errorLogRvlc & RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD)
  ------------------
  |  |  130|   136k|  0x08000000 /*  RVL-Dec  forbidden codeword detected fwd (long+shrt) */
  ------------------
  |  Branch (830:7): [True: 15.3k, False: 120k]
  ------------------
  831|  15.3k|    ErrorStatusForbiddenCwFwd = 1;
  832|       |
  833|   136k|  if (pRvlc->errorLogRvlc & RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD)
  ------------------
  |  |  132|   136k|  0x04000000 /*  RVL-Dec  forbidden codeword detected bwd (long+shrt) */
  ------------------
  |  Branch (833:7): [True: 7.45k, False: 128k]
  ------------------
  834|  7.45k|    ErrorStatusForbiddenCwBwd = 1;
  835|       |
  836|       |  /* bit counter forward unequal zero */
  837|   136k|  if (pRvlc->length_of_rvlc_sf_fwd) ErrorStatusLengthFwd = 1;
  ------------------
  |  Branch (837:7): [True: 105k, False: 30.6k]
  ------------------
  838|       |
  839|       |  /* bit counter backward unequal zero */
  840|   136k|  if (pRvlc->length_of_rvlc_sf_bwd) ErrorStatusLengthBwd = 1;
  ------------------
  |  Branch (840:7): [True: 105k, False: 31.0k]
  ------------------
  841|       |
  842|       |  /* bit counter escape sequences unequal zero */
  843|   136k|  if (pRvlc->sf_escapes_present)
  ------------------
  |  Branch (843:7): [True: 31.6k, False: 104k]
  ------------------
  844|  31.6k|    if (pRvlc->length_of_rvlc_escapes) ErrorStatusLengthEscapes = 1;
  ------------------
  |  Branch (844:9): [True: 15.0k, False: 16.6k]
  ------------------
  845|       |
  846|   136k|  if (pRvlc->sf_used) {
  ------------------
  |  Branch (846:7): [True: 52.8k, False: 83.4k]
  ------------------
  847|       |    /* first decoded scf does not match to global gain in backward direction */
  848|  52.8k|    if (pRvlc->firstScf !=
  ------------------
  |  Branch (848:9): [True: 45.5k, False: 7.33k]
  ------------------
  849|  52.8k|        (pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain - SF_OFFSET))
  ------------------
  |  |  127|  52.8k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  850|  45.5k|      ErrorStatusFirstScf = 1;
  851|       |
  852|       |    /* last decoded scf does not match to rev global gain in forward direction
  853|       |     */
  854|  52.8k|    if (pRvlc->lastScf != (pRvlc->rev_global_gain - SF_OFFSET))
  ------------------
  |  |  127|  52.8k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  |  Branch (854:9): [True: 47.9k, False: 4.90k]
  ------------------
  855|  47.9k|      ErrorStatusLastScf = 1;
  856|  52.8k|  }
  857|       |
  858|   136k|  if (pRvlc->noise_used) {
  ------------------
  |  Branch (858:7): [True: 14.9k, False: 121k]
  ------------------
  859|       |    /* first decoded nrg does not match to dpcm_noise_nrg in backward direction
  860|       |     */
  861|  14.9k|    if (pRvlc->firstNrg !=
  ------------------
  |  Branch (861:9): [True: 10.4k, False: 4.44k]
  ------------------
  862|  14.9k|        (pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain +
  863|  14.9k|         pRvlc->dpcm_noise_nrg - SF_OFFSET - 90 - 256))
  ------------------
  |  |  127|  14.9k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  864|  10.4k|      ErrorStatusFirstNrg = 1;
  865|       |
  866|       |    /* last decoded nrg does not match to dpcm_noise_last_position in forward
  867|       |     * direction */
  868|  14.9k|    if (pRvlc->lastNrg !=
  ------------------
  |  Branch (868:9): [True: 14.7k, False: 173]
  ------------------
  869|  14.9k|        (pRvlc->rev_global_gain + pRvlc->dpcm_noise_last_position - SF_OFFSET -
  ------------------
  |  |  127|  14.9k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  870|  14.9k|         90 - 256))
  871|  14.7k|      ErrorStatusLastNrg = 1;
  872|  14.9k|  }
  873|       |
  874|   136k|  if (pRvlc->intensity_used) {
  ------------------
  |  Branch (874:7): [True: 24.6k, False: 111k]
  ------------------
  875|       |    /* first decoded is position does not match in backward direction */
  876|  24.6k|    if (pRvlc->firstIs != (-SF_OFFSET)) ErrorStatusFirstIs = 1;
  ------------------
  |  |  127|  24.6k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  |  Branch (876:9): [True: 11.8k, False: 12.8k]
  ------------------
  877|       |
  878|       |    /* last decoded is position does not match in forward direction */
  879|  24.6k|    if (pRvlc->lastIs != (pRvlc->dpcm_is_last_position - SF_OFFSET))
  ------------------
  |  |  127|  24.6k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  |  Branch (879:9): [True: 17.8k, False: 6.85k]
  ------------------
  880|  17.8k|      ErrorStatusLastIs = 1;
  881|  24.6k|  }
  882|       |
  883|       |  /* decoded escapes and used escapes in forward direction do not fit */
  884|   136k|  if ((pRvlc->numDecodedEscapeWordsFwd != pRvlc->numDecodedEscapeWordsEsc) &&
  ------------------
  |  Branch (884:7): [True: 26.4k, False: 109k]
  ------------------
  885|  26.4k|      (pRvlc->conceal_max == CONCEAL_MAX_INIT)) {
  ------------------
  |  |  129|  26.4k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (885:7): [True: 21.6k, False: 4.84k]
  ------------------
  886|  21.6k|    ErrorStatusNumEscapesFwd = 1;
  887|  21.6k|  }
  888|       |
  889|       |  /* decoded escapes and used escapes in backward direction do not fit */
  890|   136k|  if ((pRvlc->numDecodedEscapeWordsBwd != pRvlc->numDecodedEscapeWordsEsc) &&
  ------------------
  |  Branch (890:7): [True: 25.5k, False: 110k]
  ------------------
  891|  25.5k|      (pRvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |  130|  25.5k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (891:7): [True: 21.1k, False: 4.44k]
  ------------------
  892|  21.1k|    ErrorStatusNumEscapesBwd = 1;
  893|  21.1k|  }
  894|       |
  895|   136k|  if (ErrorStatusLengthEscapes ||
  ------------------
  |  Branch (895:7): [True: 15.0k, False: 121k]
  ------------------
  896|   121k|      (((pRvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |  129|   121k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (896:9): [True: 89.6k, False: 31.5k]
  ------------------
  897|  89.6k|        (pRvlc->numDecodedEscapeWordsFwd != pRvlc->numDecodedEscapeWordsEsc) &&
  ------------------
  |  Branch (897:9): [True: 12.5k, False: 77.1k]
  ------------------
  898|  12.5k|        (ErrorStatusLastScf || ErrorStatusLastNrg || ErrorStatusLastIs))
  ------------------
  |  Branch (898:10): [True: 2.64k, False: 9.90k]
  |  Branch (898:32): [True: 112, False: 9.79k]
  |  Branch (898:54): [True: 25, False: 9.77k]
  ------------------
  899|       |
  900|  2.77k|       &&
  901|       |
  902|  2.77k|       ((pRvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |  130|  2.77k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (902:9): [True: 1.76k, False: 1.01k]
  ------------------
  903|  1.76k|        (pRvlc->numDecodedEscapeWordsBwd != pRvlc->numDecodedEscapeWordsEsc) &&
  ------------------
  |  Branch (903:9): [True: 945, False: 817]
  ------------------
  904|    945|        (ErrorStatusFirstScf || ErrorStatusFirstNrg || ErrorStatusFirstIs))) ||
  ------------------
  |  Branch (904:10): [True: 840, False: 105]
  |  Branch (904:33): [True: 0, False: 105]
  |  Branch (904:56): [True: 10, False: 95]
  ------------------
  905|   120k|      ((pRvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |  129|   120k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (905:8): [True: 88.8k, False: 31.5k]
  ------------------
  906|  88.8k|       ((pRvlc->rev_global_gain - SF_OFFSET - pRvlc->lastScf) < -15)) ||
  ------------------
  |  |  127|  88.8k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  |  Branch (906:8): [True: 19.5k, False: 69.2k]
  ------------------
  907|   100k|      ((pRvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |  130|   100k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (907:8): [True: 70.4k, False: 30.3k]
  ------------------
  908|  70.4k|       ((pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain - SF_OFFSET -
  ------------------
  |  |  127|  70.4k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  |  Branch (908:8): [True: 54.5k, False: 15.8k]
  ------------------
  909|  90.0k|         pRvlc->firstScf) < -15))) {
  910|  90.0k|    if ((pRvlc->conceal_max == CONCEAL_MAX_INIT) ||
  ------------------
  |  |  129|  90.0k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (910:9): [True: 83.6k, False: 6.40k]
  ------------------
  911|  87.7k|        (pRvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |  130|  6.40k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (911:9): [True: 4.14k, False: 2.26k]
  ------------------
  912|  87.7k|      pRvlc->conceal_max = 0;
  913|  87.7k|      pRvlc->conceal_min = fMax(
  914|  87.7k|          0, (pRvlc->numWindowGroups - 1) * 16 + pRvlc->maxSfbTransmitted - 1);
  915|  87.7k|    } else {
  916|  2.26k|      pRvlc->conceal_max = fMin(pRvlc->conceal_max, pRvlc->conceal_max_esc);
  917|  2.26k|      pRvlc->conceal_min = fMax(pRvlc->conceal_min, pRvlc->conceal_min_esc);
  918|  2.26k|    }
  919|  90.0k|  }
  920|       |
  921|   136k|  ErrorStatusComplete = ErrorStatusLastScf || ErrorStatusFirstScf ||
  ------------------
  |  Branch (921:25): [True: 47.9k, False: 88.3k]
  |  Branch (921:47): [True: 960, False: 87.3k]
  ------------------
  922|  87.3k|                        ErrorStatusLastNrg || ErrorStatusFirstNrg ||
  ------------------
  |  Branch (922:25): [True: 4.29k, False: 83.0k]
  |  Branch (922:47): [True: 76, False: 82.9k]
  ------------------
  923|  82.9k|                        ErrorStatusLastIs || ErrorStatusFirstIs ||
  ------------------
  |  Branch (923:25): [True: 1.59k, False: 81.4k]
  |  Branch (923:46): [True: 1.01k, False: 80.3k]
  ------------------
  924|  80.3k|                        ErrorStatusForbiddenCwFwd ||
  ------------------
  |  Branch (924:25): [True: 95, False: 80.2k]
  ------------------
  925|  80.2k|                        ErrorStatusForbiddenCwBwd || ErrorStatusLengthFwd ||
  ------------------
  |  Branch (925:25): [True: 98, False: 80.1k]
  |  Branch (925:54): [True: 49.7k, False: 30.4k]
  ------------------
  926|  30.4k|                        ErrorStatusLengthBwd || ErrorStatusLengthEscapes ||
  ------------------
  |  Branch (926:25): [True: 4, False: 30.4k]
  |  Branch (926:49): [True: 1.34k, False: 29.1k]
  ------------------
  927|  29.1k|                        ErrorStatusNumEscapesFwd || ErrorStatusNumEscapesBwd;
  ------------------
  |  Branch (927:25): [True: 502, False: 28.6k]
  |  Branch (927:53): [True: 0, False: 28.6k]
  ------------------
  928|       |
  929|   136k|  currentBlockType =
  930|   136k|      (GetWindowSequence(&pAacDecoderChannelInfo->icsInfo) == BLOCK_SHORT) ? 0
  ------------------
  |  Branch (930:7): [True: 16.3k, False: 119k]
  ------------------
  931|   136k|                                                                           : 1;
  932|       |
  933|   136k|  if (!ErrorStatusComplete) {
  ------------------
  |  Branch (933:7): [True: 28.6k, False: 107k]
  ------------------
  934|  28.6k|    int band;
  935|  28.6k|    int group;
  936|  28.6k|    int bnds;
  937|  28.6k|    int lastSfbIndex;
  938|       |
  939|  28.6k|    lastSfbIndex = (pRvlc->numWindowGroups > 1) ? 16 : 64;
  ------------------
  |  Branch (939:20): [True: 264, False: 28.3k]
  ------------------
  940|       |
  941|  58.6k|    for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (941:21): [True: 30.0k, False: 28.6k]
  ------------------
  942|  43.9k|      for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (942:22): [True: 13.8k, False: 30.0k]
  ------------------
  943|  13.8k|        bnds = 16 * group + band;
  944|  13.8k|        pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  945|  13.8k|            pAacDecoderStaticChannelInfo->concealmentInfo
  946|  13.8k|                .aRvlcPreviousScaleFactor[bnds] =
  947|  13.8k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  948|  13.8k|      }
  949|  30.0k|    }
  950|       |
  951|  58.6k|    for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (951:21): [True: 30.0k, False: 28.6k]
  ------------------
  952|  43.9k|      for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (952:22): [True: 13.8k, False: 30.0k]
  ------------------
  953|  13.8k|        bnds = 16 * group + band;
  954|  13.8k|        pAacDecoderStaticChannelInfo->concealmentInfo
  955|  13.8k|            .aRvlcPreviousCodebook[bnds] =
  956|  13.8k|            pAacDecoderChannelInfo->pDynData->aCodeBook[bnds];
  957|  13.8k|      }
  958|  1.85M|      for (; band < lastSfbIndex; band++) {
  ------------------
  |  Branch (958:14): [True: 1.82M, False: 30.0k]
  ------------------
  959|  1.82M|        bnds = 16 * group + band;
  960|  1.82M|        FDK_ASSERT(bnds >= 0 && bnds < RVLC_MAX_SFB);
  ------------------
  |  |  221|  1.82M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (960:9): [True: 1.82M, False: 0]
  |  Branch (960:9): [True: 1.82M, False: 0]
  |  Branch (960:9): [True: 1.82M, False: 0]
  ------------------
  961|  1.82M|        pAacDecoderStaticChannelInfo->concealmentInfo
  962|  1.82M|            .aRvlcPreviousCodebook[bnds] = ZERO_HCB;
  963|  1.82M|      }
  964|  30.0k|    }
  965|   107k|  } else {
  966|   107k|    int band;
  967|   107k|    int group;
  968|       |
  969|       |    /* A single bit error was detected in decoding of dpcm values. It also could
  970|       |       be an error with more bits in decoding of escapes and dpcm values whereby
  971|       |       an illegal codeword followed not directly after the corrupted bits but
  972|       |       just after decoding some more (wrong) scalefactors. Use the smaller
  973|       |       scalefactor from forward decoding, backward decoding and previous frame.
  974|       |     */
  975|   107k|    if (((pRvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |  130|   107k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (975:10): [True: 92.4k, False: 15.1k]
  ------------------
  976|  15.1k|         (pRvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |  129|  15.1k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (976:10): [True: 3.69k, False: 11.4k]
  ------------------
  977|  96.1k|        (pRvlc->conceal_min <= pRvlc->conceal_max) &&
  ------------------
  |  Branch (977:9): [True: 70.4k, False: 25.7k]
  ------------------
  978|  70.4k|        (pAacDecoderStaticChannelInfo->concealmentInfo.rvlcPreviousBlockType ==
  ------------------
  |  Branch (978:9): [True: 60.5k, False: 9.90k]
  ------------------
  979|  70.4k|         currentBlockType) &&
  980|  60.5k|        pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (980:9): [True: 48.0k, False: 12.4k]
  ------------------
  981|  60.5k|            .rvlcPreviousScaleFactorOK &&
  982|  48.0k|        pRvlc->sf_concealment && ConcealStatus) {
  ------------------
  |  Branch (982:9): [True: 28.2k, False: 19.8k]
  |  Branch (982:34): [True: 28.2k, False: 0]
  ------------------
  983|  28.2k|      BidirectionalEstimation_UseScfOfPrevFrameAsReference(
  984|  28.2k|          pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo);
  985|  28.2k|      ConcealStatus = 0;
  986|  28.2k|    }
  987|       |
  988|       |    /* A single bit error was detected in decoding of dpcm values. It also could
  989|       |       be an error with more bits in decoding of escapes and dpcm values whereby
  990|       |       an illegal codeword followed not directly after the corrupted bits but
  991|       |       just after decoding some more (wrong) scalefactors. Use the smaller
  992|       |       scalefactor from forward and backward decoding. */
  993|   107k|    if ((pRvlc->conceal_min <= pRvlc->conceal_max) &&
  ------------------
  |  Branch (993:9): [True: 81.9k, False: 25.7k]
  ------------------
  994|  81.9k|        ((pRvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |  130|  81.9k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (994:10): [True: 69.5k, False: 12.3k]
  ------------------
  995|  12.3k|         (pRvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |  129|  12.3k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (995:10): [True: 877, False: 11.4k]
  ------------------
  996|  70.4k|        !(pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (996:11): [True: 48.1k, False: 22.3k]
  ------------------
  997|  70.4k|              .rvlcPreviousScaleFactorOK &&
  998|  48.1k|          pRvlc->sf_concealment &&
  ------------------
  |  Branch (998:11): [True: 28.2k, False: 19.8k]
  ------------------
  999|  28.2k|          (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (999:11): [True: 28.2k, False: 43]
  ------------------
 1000|  28.2k|               .rvlcPreviousBlockType == currentBlockType)) &&
 1001|  42.2k|        ConcealStatus) {
  ------------------
  |  Branch (1001:9): [True: 42.2k, False: 0]
  ------------------
 1002|  42.2k|      BidirectionalEstimation_UseLowerScfOfCurrentFrame(pAacDecoderChannelInfo);
 1003|  42.2k|      ConcealStatus = 0;
 1004|  42.2k|    }
 1005|       |
 1006|       |    /* No errors were detected in decoding of escapes and dpcm values however
 1007|       |       the first and last value of a group (is,nrg,sf) is incorrect */
 1008|   107k|    if ((pRvlc->conceal_min <= pRvlc->conceal_max) &&
  ------------------
  |  Branch (1008:9): [True: 81.9k, False: 25.7k]
  ------------------
 1009|  81.9k|        ((ErrorStatusLastScf && ErrorStatusFirstScf) ||
  ------------------
  |  Branch (1009:11): [True: 27.6k, False: 54.3k]
  |  Branch (1009:33): [True: 24.5k, False: 3.09k]
  ------------------
 1010|  57.4k|         (ErrorStatusLastNrg && ErrorStatusFirstNrg) ||
  ------------------
  |  Branch (1010:11): [True: 3.46k, False: 53.9k]
  |  Branch (1010:33): [True: 2.47k, False: 989]
  ------------------
 1011|  54.9k|         (ErrorStatusLastIs && ErrorStatusFirstIs)) &&
  ------------------
  |  Branch (1011:11): [True: 3.58k, False: 51.3k]
  |  Branch (1011:32): [True: 437, False: 3.15k]
  ------------------
 1012|  27.4k|        !(ErrorStatusForbiddenCwFwd || ErrorStatusForbiddenCwBwd ||
  ------------------
  |  Branch (1012:11): [True: 6.31k, False: 21.1k]
  |  Branch (1012:40): [True: 4.79k, False: 16.3k]
  ------------------
 1013|  16.3k|          ErrorStatusLengthEscapes) &&
  ------------------
  |  Branch (1013:11): [True: 2.17k, False: 14.1k]
  ------------------
 1014|  14.1k|        ConcealStatus) {
  ------------------
  |  Branch (1014:9): [True: 2.95k, False: 11.1k]
  ------------------
 1015|  2.95k|      StatisticalEstimation(pAacDecoderChannelInfo);
 1016|  2.95k|      ConcealStatus = 0;
 1017|  2.95k|    }
 1018|       |
 1019|       |    /* A error with more bits in decoding of escapes and dpcm values was
 1020|       |       detected. Use the smaller scalefactor from forward decoding, backward
 1021|       |       decoding and previous frame. */
 1022|   107k|    if ((pRvlc->conceal_min <= pRvlc->conceal_max) &&
  ------------------
  |  Branch (1022:9): [True: 81.9k, False: 25.7k]
  ------------------
 1023|  81.9k|        pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (1023:9): [True: 55.7k, False: 26.1k]
  ------------------
 1024|  81.9k|            .rvlcPreviousScaleFactorOK &&
 1025|  55.7k|        pRvlc->sf_concealment &&
  ------------------
  |  Branch (1025:9): [True: 34.3k, False: 21.4k]
  ------------------
 1026|  34.3k|        (pAacDecoderStaticChannelInfo->concealmentInfo.rvlcPreviousBlockType ==
  ------------------
  |  Branch (1026:9): [True: 34.3k, False: 44]
  ------------------
 1027|  34.3k|         currentBlockType) &&
 1028|  34.3k|        ConcealStatus) {
  ------------------
  |  Branch (1028:9): [True: 6.02k, False: 28.2k]
  ------------------
 1029|  6.02k|      PredictiveInterpolation(pAacDecoderChannelInfo,
 1030|  6.02k|                              pAacDecoderStaticChannelInfo);
 1031|  6.02k|      ConcealStatus = 0;
 1032|  6.02k|    }
 1033|       |
 1034|       |    /* Call frame concealment, because no better strategy was found. Setting the
 1035|       |       scalefactors to zero is done for debugging purposes */
 1036|   107k|    if (ConcealStatus) {
  ------------------
  |  Branch (1036:9): [True: 28.2k, False: 79.4k]
  ------------------
 1037|  75.1k|      for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (1037:23): [True: 46.9k, False: 28.2k]
  ------------------
 1038|   394k|        for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (1038:24): [True: 347k, False: 46.9k]
  ------------------
 1039|   347k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[16 * group + band] = 0;
 1040|   347k|        }
 1041|  46.9k|      }
 1042|  28.2k|      pAacDecoderChannelInfo->pDynData->specificTo.aac
 1043|  28.2k|          .rvlcCurrentScaleFactorOK = 0;
 1044|  28.2k|    }
 1045|   107k|  }
 1046|   136k|}

_Z24rvlcReadBitFromBitstreamP13FDK_BITSTREAMiPih:
  127|  4.26M|                               INT *pPosition, UCHAR readDirection) {
  128|  4.26M|  UINT bit;
  129|  4.26M|  INT readBitOffset = (INT)FDKgetValidBits(bs) - bsAnchor + *pPosition;
  130|       |
  131|  4.26M|  if (readBitOffset) {
  ------------------
  |  Branch (131:7): [True: 136k, False: 4.13M]
  ------------------
  132|   136k|    FDKpushBiDirectional(bs, readBitOffset);
  133|   136k|  }
  134|       |
  135|  4.26M|  if (readDirection == FWD) {
  ------------------
  |  |  111|  4.26M|#define FWD 0 /* bitstream decoding direction forward (RVL coded part) */
  ------------------
  |  Branch (135:7): [True: 3.78M, False: 485k]
  ------------------
  136|  3.78M|    bit = FDKreadBits(bs, 1);
  137|       |
  138|  3.78M|    *pPosition += 1;
  139|  3.78M|  } else {
  140|       |    /* to be replaced with a brother function of FDKreadBits() */
  141|   485k|    bit = FDKreadBits(bs, 1);
  142|   485k|    FDKpushBack(bs, 2);
  143|       |
  144|   485k|    *pPosition -= 1;
  145|   485k|  }
  146|       |
  147|  4.26M|  return (bit);
  148|  4.26M|}

_Z49BidirectionalEstimation_UseLowerScfOfCurrentFrameP22CAacDecoderChannelInfo:
  287|  42.2k|    CAacDecoderChannelInfo *pAacDecoderChannelInfo) {
  288|  42.2k|  CErRvlcInfo *pRvlc =
  289|  42.2k|      &pAacDecoderChannelInfo->pComData->overlay.aac.erRvlcInfo;
  290|  42.2k|  int band, bnds, startBand, endBand, group;
  291|  42.2k|  int conceal_min, conceal_max;
  292|  42.2k|  int conceal_group_min, conceal_group_max;
  293|  42.2k|  int MaximumScaleFactorBands;
  294|       |
  295|  42.2k|  if (GetWindowSequence(&pAacDecoderChannelInfo->icsInfo) == BLOCK_SHORT) {
  ------------------
  |  Branch (295:7): [True: 6.83k, False: 35.3k]
  ------------------
  296|  6.83k|    MaximumScaleFactorBands = 16;
  297|  35.3k|  } else {
  298|  35.3k|    MaximumScaleFactorBands = 64;
  299|  35.3k|  }
  300|       |
  301|       |  /* If an error was detected just in forward or backward direction, set the
  302|       |     corresponding border for concealment to a appropriate scalefactor band. The
  303|       |     border is set to first or last sfb respectively, because the error will
  304|       |     possibly not follow directly after the corrupt bit but just after decoding
  305|       |     some more (wrong) scalefactors. */
  306|  42.2k|  if (pRvlc->conceal_min == CONCEAL_MIN_INIT) pRvlc->conceal_min = 0;
  ------------------
  |  |  130|  42.2k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (306:7): [True: 877, False: 41.3k]
  ------------------
  307|       |
  308|  42.2k|  if (pRvlc->conceal_max == CONCEAL_MAX_INIT)
  ------------------
  |  |  129|  42.2k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (308:7): [True: 3.42k, False: 38.7k]
  ------------------
  309|  3.42k|    pRvlc->conceal_max =
  310|  3.42k|        (pRvlc->numWindowGroups - 1) * 16 + pRvlc->maxSfbTransmitted - 1;
  311|       |
  312|  42.2k|  conceal_min = pRvlc->conceal_min % MaximumScaleFactorBands;
  313|  42.2k|  conceal_group_min = pRvlc->conceal_min / MaximumScaleFactorBands;
  314|  42.2k|  conceal_max = pRvlc->conceal_max % MaximumScaleFactorBands;
  315|  42.2k|  conceal_group_max = pRvlc->conceal_max / MaximumScaleFactorBands;
  316|       |
  317|  42.2k|  if (pRvlc->conceal_min == pRvlc->conceal_max) {
  ------------------
  |  Branch (317:7): [True: 33.5k, False: 8.68k]
  ------------------
  318|  33.5k|    int refIsFwd, refNrgFwd, refScfFwd;
  319|  33.5k|    int refIsBwd, refNrgBwd, refScfBwd;
  320|       |
  321|  33.5k|    bnds = pRvlc->conceal_min;
  322|  33.5k|    calcRefValFwd(pRvlc, pAacDecoderChannelInfo, &refIsFwd, &refNrgFwd,
  323|  33.5k|                  &refScfFwd);
  324|  33.5k|    calcRefValBwd(pRvlc, pAacDecoderChannelInfo, &refIsBwd, &refNrgBwd,
  325|  33.5k|                  &refScfBwd);
  326|       |
  327|  33.5k|    switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  328|  21.9k|      case ZERO_HCB:
  ------------------
  |  Branch (328:7): [True: 21.9k, False: 11.5k]
  ------------------
  329|  21.9k|        break;
  330|  1.02k|      case INTENSITY_HCB:
  ------------------
  |  Branch (330:7): [True: 1.02k, False: 32.5k]
  ------------------
  331|  1.17k|      case INTENSITY_HCB2:
  ------------------
  |  Branch (331:7): [True: 155, False: 33.3k]
  ------------------
  332|  1.17k|        if (refIsFwd < refIsBwd)
  ------------------
  |  Branch (332:13): [True: 130, False: 1.04k]
  ------------------
  333|    130|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = refIsFwd;
  334|  1.04k|        else
  335|  1.04k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = refIsBwd;
  336|  1.17k|        break;
  337|  1.08k|      case NOISE_HCB:
  ------------------
  |  Branch (337:7): [True: 1.08k, False: 32.4k]
  ------------------
  338|  1.08k|        if (refNrgFwd < refNrgBwd)
  ------------------
  |  Branch (338:13): [True: 801, False: 284]
  ------------------
  339|    801|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = refNrgFwd;
  340|    284|        else
  341|    284|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = refNrgBwd;
  342|  1.08k|        break;
  343|  9.29k|      default:
  ------------------
  |  Branch (343:7): [True: 9.29k, False: 24.2k]
  ------------------
  344|  9.29k|        if (refScfFwd < refScfBwd)
  ------------------
  |  Branch (344:13): [True: 7.93k, False: 1.35k]
  ------------------
  345|  7.93k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = refScfFwd;
  346|  1.35k|        else
  347|  1.35k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = refScfBwd;
  348|  9.29k|        break;
  349|  33.5k|    }
  350|  33.5k|  } else {
  351|  8.68k|    pAacDecoderChannelInfo->pComData->overlay.aac
  352|  8.68k|        .aRvlcScfFwd[pRvlc->conceal_max] =
  353|  8.68k|        pAacDecoderChannelInfo->pComData->overlay.aac
  354|  8.68k|            .aRvlcScfBwd[pRvlc->conceal_max];
  355|  8.68k|    pAacDecoderChannelInfo->pComData->overlay.aac
  356|  8.68k|        .aRvlcScfBwd[pRvlc->conceal_min] =
  357|  8.68k|        pAacDecoderChannelInfo->pComData->overlay.aac
  358|  8.68k|            .aRvlcScfFwd[pRvlc->conceal_min];
  359|       |
  360|       |    /* consider the smaller of the forward and backward decoded value as the
  361|       |     * correct one */
  362|  8.68k|    startBand = conceal_min;
  363|  8.68k|    if (conceal_group_min == conceal_group_max)
  ------------------
  |  Branch (363:9): [True: 4.48k, False: 4.20k]
  ------------------
  364|  4.48k|      endBand = conceal_max;
  365|  4.20k|    else
  366|  4.20k|      endBand = pRvlc->maxSfbTransmitted - 1;
  367|       |
  368|  24.2k|    for (group = conceal_group_min; group <= conceal_group_max; group++) {
  ------------------
  |  Branch (368:37): [True: 15.5k, False: 8.68k]
  ------------------
  369|  62.1k|      for (band = startBand; band <= endBand; band++) {
  ------------------
  |  Branch (369:30): [True: 46.5k, False: 15.5k]
  ------------------
  370|  46.5k|        bnds = 16 * group + band;
  371|  46.5k|        if (pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds] <
  ------------------
  |  Branch (371:13): [True: 17.1k, False: 29.3k]
  ------------------
  372|  46.5k|            pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds])
  373|  17.1k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  374|  17.1k|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  375|  29.3k|        else
  376|  29.3k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  377|  29.3k|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  378|  46.5k|      }
  379|  15.5k|      startBand = 0;
  380|  15.5k|      if ((group + 1) == conceal_group_max) endBand = conceal_max;
  ------------------
  |  Branch (380:11): [True: 4.20k, False: 11.3k]
  ------------------
  381|  15.5k|    }
  382|  8.68k|  }
  383|       |
  384|       |  /* now copy all data to the output buffer which needs not to be concealed */
  385|  42.2k|  if (conceal_group_min == 0)
  ------------------
  |  Branch (385:7): [True: 38.9k, False: 3.24k]
  ------------------
  386|  38.9k|    endBand = conceal_min;
  387|  3.24k|  else
  388|  3.24k|    endBand = pRvlc->maxSfbTransmitted;
  389|  96.1k|  for (group = 0; group <= conceal_group_min; group++) {
  ------------------
  |  Branch (389:19): [True: 53.9k, False: 42.2k]
  ------------------
  390|   121k|    for (band = 0; band < endBand; band++) {
  ------------------
  |  Branch (390:20): [True: 68.0k, False: 53.9k]
  ------------------
  391|  68.0k|      bnds = 16 * group + band;
  392|  68.0k|      pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  393|  68.0k|          pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  394|  68.0k|    }
  395|  53.9k|    if ((group + 1) == conceal_group_min) endBand = conceal_min;
  ------------------
  |  Branch (395:9): [True: 3.24k, False: 50.6k]
  ------------------
  396|  53.9k|  }
  397|       |
  398|  42.2k|  startBand = conceal_max + 1;
  399|  98.3k|  for (group = conceal_group_max; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (399:35): [True: 56.0k, False: 42.2k]
  ------------------
  400|   122k|    for (band = startBand; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (400:28): [True: 66.8k, False: 56.0k]
  ------------------
  401|  66.8k|      bnds = 16 * group + band;
  402|  66.8k|      pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  403|  66.8k|          pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  404|  66.8k|    }
  405|  56.0k|    startBand = 0;
  406|  56.0k|  }
  407|  42.2k|}
_Z52BidirectionalEstimation_UseScfOfPrevFrameAsReferenceP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfo:
  434|  28.2k|    CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo) {
  435|  28.2k|  CErRvlcInfo *pRvlc =
  436|  28.2k|      &pAacDecoderChannelInfo->pComData->overlay.aac.erRvlcInfo;
  437|  28.2k|  int band, bnds, startBand, endBand, group;
  438|  28.2k|  int conceal_min, conceal_max;
  439|  28.2k|  int conceal_group_min, conceal_group_max;
  440|  28.2k|  int MaximumScaleFactorBands;
  441|  28.2k|  SHORT commonMin;
  442|       |
  443|  28.2k|  if (GetWindowSequence(&pAacDecoderChannelInfo->icsInfo) == BLOCK_SHORT) {
  ------------------
  |  Branch (443:7): [True: 4.85k, False: 23.3k]
  ------------------
  444|  4.85k|    MaximumScaleFactorBands = 16;
  445|  23.3k|  } else {
  446|  23.3k|    MaximumScaleFactorBands = 64;
  447|  23.3k|  }
  448|       |
  449|       |  /* If an error was detected just in forward or backward direction, set the
  450|       |     corresponding border for concealment to a appropriate scalefactor band. The
  451|       |     border is set to first or last sfb respectively, because the error will
  452|       |     possibly not follow directly after the corrupt bit but just after decoding
  453|       |     some more (wrong) scalefactors. */
  454|  28.2k|  if (pRvlc->conceal_min == CONCEAL_MIN_INIT) pRvlc->conceal_min = 0;
  ------------------
  |  |  130|  28.2k|#define CONCEAL_MIN_INIT -1311 /* arbitrary value */
  ------------------
  |  Branch (454:7): [True: 2.82k, False: 25.3k]
  ------------------
  455|       |
  456|  28.2k|  if (pRvlc->conceal_max == CONCEAL_MAX_INIT)
  ------------------
  |  |  129|  28.2k|#define CONCEAL_MAX_INIT 1311  /* arbitrary value */
  ------------------
  |  Branch (456:7): [True: 1.79k, False: 26.4k]
  ------------------
  457|  1.79k|    pRvlc->conceal_max =
  458|  1.79k|        (pRvlc->numWindowGroups - 1) * 16 + pRvlc->maxSfbTransmitted - 1;
  459|       |
  460|  28.2k|  conceal_min = pRvlc->conceal_min % MaximumScaleFactorBands;
  461|  28.2k|  conceal_group_min = pRvlc->conceal_min / MaximumScaleFactorBands;
  462|  28.2k|  conceal_max = pRvlc->conceal_max % MaximumScaleFactorBands;
  463|  28.2k|  conceal_group_max = pRvlc->conceal_max / MaximumScaleFactorBands;
  464|       |
  465|  28.2k|  pAacDecoderChannelInfo->pComData->overlay.aac
  466|  28.2k|      .aRvlcScfFwd[pRvlc->conceal_max] =
  467|  28.2k|      pAacDecoderChannelInfo->pComData->overlay.aac
  468|  28.2k|          .aRvlcScfBwd[pRvlc->conceal_max];
  469|  28.2k|  pAacDecoderChannelInfo->pComData->overlay.aac
  470|  28.2k|      .aRvlcScfBwd[pRvlc->conceal_min] =
  471|  28.2k|      pAacDecoderChannelInfo->pComData->overlay.aac
  472|  28.2k|          .aRvlcScfFwd[pRvlc->conceal_min];
  473|       |
  474|       |  /* consider the smaller of the forward and backward decoded value as the
  475|       |   * correct one */
  476|  28.2k|  startBand = conceal_min;
  477|  28.2k|  if (conceal_group_min == conceal_group_max)
  ------------------
  |  Branch (477:7): [True: 23.9k, False: 4.24k]
  ------------------
  478|  23.9k|    endBand = conceal_max;
  479|  4.24k|  else
  480|  4.24k|    endBand = pRvlc->maxSfbTransmitted - 1;
  481|       |
  482|  63.9k|  for (group = conceal_group_min; group <= conceal_group_max; group++) {
  ------------------
  |  Branch (482:35): [True: 35.7k, False: 28.2k]
  ------------------
  483|   104k|    for (band = startBand; band <= endBand; band++) {
  ------------------
  |  Branch (483:28): [True: 68.8k, False: 35.7k]
  ------------------
  484|  68.8k|      bnds = 16 * group + band;
  485|  68.8k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  486|  20.5k|        case ZERO_HCB:
  ------------------
  |  Branch (486:9): [True: 20.5k, False: 48.3k]
  ------------------
  487|  20.5k|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = 0;
  488|  20.5k|          break;
  489|       |
  490|  3.48k|        case INTENSITY_HCB:
  ------------------
  |  Branch (490:9): [True: 3.48k, False: 65.3k]
  ------------------
  491|  11.5k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (491:9): [True: 8.03k, False: 60.8k]
  ------------------
  492|  11.5k|          if ((pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (492:15): [True: 10, False: 11.5k]
  ------------------
  493|  11.5k|                   .aRvlcPreviousCodebook[bnds] == INTENSITY_HCB) ||
  494|  11.5k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (494:15): [True: 2.94k, False: 8.57k]
  ------------------
  495|  11.5k|                   .aRvlcPreviousCodebook[bnds] == INTENSITY_HCB2)) {
  496|  2.95k|            commonMin = fMin(
  497|  2.95k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  498|  2.95k|                pAacDecoderChannelInfo->pComData->overlay.aac
  499|  2.95k|                    .aRvlcScfBwd[bnds]);
  500|  2.95k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  501|  2.95k|                fMin(commonMin, pAacDecoderStaticChannelInfo->concealmentInfo
  502|  2.95k|                                    .aRvlcPreviousScaleFactor[bnds]);
  503|  8.57k|          } else {
  504|  8.57k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = fMin(
  505|  8.57k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  506|  8.57k|                pAacDecoderChannelInfo->pComData->overlay.aac
  507|  8.57k|                    .aRvlcScfBwd[bnds]);
  508|  8.57k|          }
  509|  11.5k|          break;
  510|       |
  511|  3.42k|        case NOISE_HCB:
  ------------------
  |  Branch (511:9): [True: 3.42k, False: 65.4k]
  ------------------
  512|  3.42k|          if (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (512:15): [True: 211, False: 3.21k]
  ------------------
  513|  3.42k|                  .aRvlcPreviousCodebook[bnds] == NOISE_HCB) {
  514|    211|            commonMin = fMin(
  515|    211|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  516|    211|                pAacDecoderChannelInfo->pComData->overlay.aac
  517|    211|                    .aRvlcScfBwd[bnds]);
  518|    211|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  519|    211|                fMin(commonMin, pAacDecoderStaticChannelInfo->concealmentInfo
  520|    211|                                    .aRvlcPreviousScaleFactor[bnds]);
  521|  3.21k|          } else {
  522|  3.21k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = fMin(
  523|  3.21k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  524|  3.21k|                pAacDecoderChannelInfo->pComData->overlay.aac
  525|  3.21k|                    .aRvlcScfBwd[bnds]);
  526|  3.21k|          }
  527|  3.42k|          break;
  528|       |
  529|  33.3k|        default:
  ------------------
  |  Branch (529:9): [True: 33.3k, False: 35.4k]
  ------------------
  530|  33.3k|          if ((pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (530:15): [True: 4.92k, False: 28.4k]
  ------------------
  531|  33.3k|                   .aRvlcPreviousCodebook[bnds] != ZERO_HCB) &&
  532|  4.92k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (532:15): [True: 4.42k, False: 500]
  ------------------
  533|  4.92k|                   .aRvlcPreviousCodebook[bnds] != NOISE_HCB) &&
  534|  4.42k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (534:15): [True: 4.22k, False: 196]
  ------------------
  535|  4.42k|                   .aRvlcPreviousCodebook[bnds] != INTENSITY_HCB) &&
  536|  4.22k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (536:15): [True: 3.99k, False: 230]
  ------------------
  537|  4.22k|                   .aRvlcPreviousCodebook[bnds] != INTENSITY_HCB2)) {
  538|  3.99k|            commonMin = fMin(
  539|  3.99k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  540|  3.99k|                pAacDecoderChannelInfo->pComData->overlay.aac
  541|  3.99k|                    .aRvlcScfBwd[bnds]);
  542|  3.99k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  543|  3.99k|                fMin(commonMin, pAacDecoderStaticChannelInfo->concealmentInfo
  544|  3.99k|                                    .aRvlcPreviousScaleFactor[bnds]);
  545|  29.4k|          } else {
  546|  29.4k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = fMin(
  547|  29.4k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  548|  29.4k|                pAacDecoderChannelInfo->pComData->overlay.aac
  549|  29.4k|                    .aRvlcScfBwd[bnds]);
  550|  29.4k|          }
  551|  33.3k|          break;
  552|  68.8k|      }
  553|  68.8k|    }
  554|  35.7k|    startBand = 0;
  555|  35.7k|    if ((group + 1) == conceal_group_max) endBand = conceal_max;
  ------------------
  |  Branch (555:9): [True: 4.24k, False: 31.4k]
  ------------------
  556|  35.7k|  }
  557|       |
  558|       |  /* now copy all data to the output buffer which needs not to be concealed */
  559|  28.2k|  if (conceal_group_min == 0)
  ------------------
  |  Branch (559:7): [True: 23.4k, False: 4.77k]
  ------------------
  560|  23.4k|    endBand = conceal_min;
  561|  4.77k|  else
  562|  4.77k|    endBand = pRvlc->maxSfbTransmitted;
  563|  67.9k|  for (group = 0; group <= conceal_group_min; group++) {
  ------------------
  |  Branch (563:19): [True: 39.7k, False: 28.2k]
  ------------------
  564|  79.0k|    for (band = 0; band < endBand; band++) {
  ------------------
  |  Branch (564:20): [True: 39.2k, False: 39.7k]
  ------------------
  565|  39.2k|      bnds = 16 * group + band;
  566|  39.2k|      pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  567|  39.2k|          pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  568|  39.2k|    }
  569|  39.7k|    if ((group + 1) == conceal_group_min) endBand = conceal_min;
  ------------------
  |  Branch (569:9): [True: 4.77k, False: 35.0k]
  ------------------
  570|  39.7k|  }
  571|       |
  572|  28.2k|  startBand = conceal_max + 1;
  573|  61.8k|  for (group = conceal_group_max; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (573:35): [True: 33.5k, False: 28.2k]
  ------------------
  574|  62.3k|    for (band = startBand; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (574:28): [True: 28.7k, False: 33.5k]
  ------------------
  575|  28.7k|      bnds = 16 * group + band;
  576|  28.7k|      pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  577|  28.7k|          pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  578|  28.7k|    }
  579|  33.5k|    startBand = 0;
  580|  33.5k|  }
  581|  28.2k|}
_Z21StatisticalEstimationP22CAacDecoderChannelInfo:
  604|  2.95k|void StatisticalEstimation(CAacDecoderChannelInfo *pAacDecoderChannelInfo) {
  605|  2.95k|  CErRvlcInfo *pRvlc =
  606|  2.95k|      &pAacDecoderChannelInfo->pComData->overlay.aac.erRvlcInfo;
  607|  2.95k|  int band, bnds, group;
  608|  2.95k|  int sumIsFwd, sumIsBwd;   /* sum of intensity data forward/backward */
  609|  2.95k|  int sumNrgFwd, sumNrgBwd; /* sum of noise energy data forward/backward */
  610|  2.95k|  int sumScfFwd, sumScfBwd; /* sum of scalefactor data forward/backward */
  611|  2.95k|  int useIsFwd, useNrgFwd, useScfFwd; /* the flags signals the elements which
  612|       |                                         are used for the final result */
  613|       |
  614|  2.95k|  sumIsFwd = sumIsBwd = sumNrgFwd = sumNrgBwd = sumScfFwd = sumScfBwd = 0;
  615|  2.95k|  useIsFwd = useNrgFwd = useScfFwd = 0;
  616|       |
  617|       |  /* calculate sum of each group (scf,nrg,is) of forward and backward direction
  618|       |   */
  619|  6.42k|  for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (619:19): [True: 3.47k, False: 2.95k]
  ------------------
  620|  24.5k|    for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (620:20): [True: 21.0k, False: 3.47k]
  ------------------
  621|  21.0k|      bnds = 16 * group + band;
  622|  21.0k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  623|  7.94k|        case ZERO_HCB:
  ------------------
  |  Branch (623:9): [True: 7.94k, False: 13.1k]
  ------------------
  624|  7.94k|          break;
  625|       |
  626|    681|        case INTENSITY_HCB:
  ------------------
  |  Branch (626:9): [True: 681, False: 20.3k]
  ------------------
  627|  1.40k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (627:9): [True: 725, False: 20.3k]
  ------------------
  628|  1.40k|          sumIsFwd +=
  629|  1.40k|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  630|  1.40k|          sumIsBwd +=
  631|  1.40k|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  632|  1.40k|          break;
  633|       |
  634|    865|        case NOISE_HCB:
  ------------------
  |  Branch (634:9): [True: 865, False: 20.1k]
  ------------------
  635|    865|          sumNrgFwd +=
  636|    865|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  637|    865|          sumNrgBwd +=
  638|    865|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  639|    865|          break;
  640|       |
  641|  10.8k|        default:
  ------------------
  |  Branch (641:9): [True: 10.8k, False: 10.2k]
  ------------------
  642|  10.8k|          sumScfFwd +=
  643|  10.8k|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  644|  10.8k|          sumScfBwd +=
  645|  10.8k|              pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  646|  10.8k|          break;
  647|  21.0k|      }
  648|  21.0k|    }
  649|  3.47k|  }
  650|       |
  651|       |  /* find for each group (scf,nrg,is) the correct direction */
  652|  2.95k|  if (sumIsFwd < sumIsBwd) useIsFwd = 1;
  ------------------
  |  Branch (652:7): [True: 38, False: 2.91k]
  ------------------
  653|       |
  654|  2.95k|  if (sumNrgFwd < sumNrgBwd) useNrgFwd = 1;
  ------------------
  |  Branch (654:7): [True: 12, False: 2.93k]
  ------------------
  655|       |
  656|  2.95k|  if (sumScfFwd < sumScfBwd) useScfFwd = 1;
  ------------------
  |  Branch (656:7): [True: 1.22k, False: 1.73k]
  ------------------
  657|       |
  658|       |  /* conceal each group (scf,nrg,is) */
  659|  6.42k|  for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (659:19): [True: 3.47k, False: 2.95k]
  ------------------
  660|  24.5k|    for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (660:20): [True: 21.0k, False: 3.47k]
  ------------------
  661|  21.0k|      bnds = 16 * group + band;
  662|  21.0k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  663|  7.94k|        case ZERO_HCB:
  ------------------
  |  Branch (663:9): [True: 7.94k, False: 13.1k]
  ------------------
  664|  7.94k|          break;
  665|       |
  666|    681|        case INTENSITY_HCB:
  ------------------
  |  Branch (666:9): [True: 681, False: 20.3k]
  ------------------
  667|  1.40k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (667:9): [True: 725, False: 20.3k]
  ------------------
  668|  1.40k|          if (useIsFwd)
  ------------------
  |  Branch (668:15): [True: 499, False: 907]
  ------------------
  669|    499|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  670|    499|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  671|    907|          else
  672|    907|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  673|    907|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  674|  1.40k|          break;
  675|       |
  676|    865|        case NOISE_HCB:
  ------------------
  |  Branch (676:9): [True: 865, False: 20.1k]
  ------------------
  677|    865|          if (useNrgFwd)
  ------------------
  |  Branch (677:15): [True: 244, False: 621]
  ------------------
  678|    244|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  679|    244|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  680|    621|          else
  681|    621|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  682|    621|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  683|    865|          break;
  684|       |
  685|  10.8k|        default:
  ------------------
  |  Branch (685:9): [True: 10.8k, False: 10.2k]
  ------------------
  686|  10.8k|          if (useScfFwd)
  ------------------
  |  Branch (686:15): [True: 3.99k, False: 6.85k]
  ------------------
  687|  3.99k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  688|  3.99k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  689|  6.85k|          else
  690|  6.85k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  691|  6.85k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  692|  10.8k|          break;
  693|  21.0k|      }
  694|  21.0k|    }
  695|  3.47k|  }
  696|  2.95k|}
_Z23PredictiveInterpolationP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfo:
  717|  6.02k|    CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo) {
  718|  6.02k|  CErRvlcInfo *pRvlc =
  719|  6.02k|      &pAacDecoderChannelInfo->pComData->overlay.aac.erRvlcInfo;
  720|  6.02k|  int band, bnds, group;
  721|  6.02k|  SHORT commonMin;
  722|       |
  723|  12.4k|  for (group = 0; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (723:19): [True: 6.42k, False: 6.02k]
  ------------------
  724|  31.7k|    for (band = 0; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (724:20): [True: 25.3k, False: 6.42k]
  ------------------
  725|  25.3k|      bnds = 16 * group + band;
  726|  25.3k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  727|    191|        case ZERO_HCB:
  ------------------
  |  Branch (727:9): [True: 191, False: 25.1k]
  ------------------
  728|    191|          pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = 0;
  729|    191|          break;
  730|       |
  731|    122|        case INTENSITY_HCB:
  ------------------
  |  Branch (731:9): [True: 122, False: 25.2k]
  ------------------
  732|  13.6k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (732:9): [True: 13.5k, False: 11.8k]
  ------------------
  733|  13.6k|          if ((pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (733:15): [True: 26, False: 13.6k]
  ------------------
  734|  13.6k|                   .aRvlcPreviousCodebook[bnds] == INTENSITY_HCB) ||
  735|  13.6k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (735:15): [True: 12.3k, False: 1.26k]
  ------------------
  736|  13.6k|                   .aRvlcPreviousCodebook[bnds] == INTENSITY_HCB2)) {
  737|  12.3k|            commonMin = fMin(
  738|  12.3k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  739|  12.3k|                pAacDecoderChannelInfo->pComData->overlay.aac
  740|  12.3k|                    .aRvlcScfBwd[bnds]);
  741|  12.3k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  742|  12.3k|                fMin(commonMin, pAacDecoderStaticChannelInfo->concealmentInfo
  743|  12.3k|                                    .aRvlcPreviousScaleFactor[bnds]);
  744|  12.3k|          } else {
  745|  1.26k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = -110;
  746|  1.26k|          }
  747|  13.6k|          break;
  748|       |
  749|    360|        case NOISE_HCB:
  ------------------
  |  Branch (749:9): [True: 360, False: 25.0k]
  ------------------
  750|    360|          if (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (750:15): [True: 190, False: 170]
  ------------------
  751|    360|                  .aRvlcPreviousCodebook[bnds] == NOISE_HCB) {
  752|    190|            commonMin = fMin(
  753|    190|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  754|    190|                pAacDecoderChannelInfo->pComData->overlay.aac
  755|    190|                    .aRvlcScfBwd[bnds]);
  756|    190|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  757|    190|                fMin(commonMin, pAacDecoderStaticChannelInfo->concealmentInfo
  758|    190|                                    .aRvlcPreviousScaleFactor[bnds]);
  759|    190|          } else {
  760|    170|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = -110;
  761|    170|          }
  762|    360|          break;
  763|       |
  764|  11.1k|        default:
  ------------------
  |  Branch (764:9): [True: 11.1k, False: 14.1k]
  ------------------
  765|  11.1k|          if ((pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (765:15): [True: 9.95k, False: 1.23k]
  ------------------
  766|  11.1k|                   .aRvlcPreviousCodebook[bnds] != ZERO_HCB) &&
  767|  9.95k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (767:15): [True: 9.60k, False: 349]
  ------------------
  768|  9.95k|                   .aRvlcPreviousCodebook[bnds] != NOISE_HCB) &&
  769|  9.60k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (769:15): [True: 9.46k, False: 137]
  ------------------
  770|  9.60k|                   .aRvlcPreviousCodebook[bnds] != INTENSITY_HCB) &&
  771|  9.46k|              (pAacDecoderStaticChannelInfo->concealmentInfo
  ------------------
  |  Branch (771:15): [True: 9.38k, False: 84]
  ------------------
  772|  9.46k|                   .aRvlcPreviousCodebook[bnds] != INTENSITY_HCB2)) {
  773|  9.38k|            commonMin = fMin(
  774|  9.38k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds],
  775|  9.38k|                pAacDecoderChannelInfo->pComData->overlay.aac
  776|  9.38k|                    .aRvlcScfBwd[bnds]);
  777|  9.38k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] =
  778|  9.38k|                fMin(commonMin, pAacDecoderStaticChannelInfo->concealmentInfo
  779|  9.38k|                                    .aRvlcPreviousScaleFactor[bnds]);
  780|  9.38k|          } else {
  781|  1.80k|            pAacDecoderChannelInfo->pDynData->aScaleFactor[bnds] = 0;
  782|  1.80k|          }
  783|  11.1k|          break;
  784|  25.3k|      }
  785|  25.3k|    }
  786|  6.42k|  }
  787|  6.02k|}
rvlcconceal.cpp:_ZL13calcRefValFwdP11CErRvlcInfoP22CAacDecoderChannelInfoPiS3_S3_:
  131|  33.5k|                          int *refIsFwd, int *refNrgFwd, int *refScfFwd) {
  132|  33.5k|  int band, bnds, group, startBand;
  133|  33.5k|  int idIs, idNrg, idScf;
  134|  33.5k|  int conceal_min, conceal_group_min;
  135|  33.5k|  int MaximumScaleFactorBands;
  136|       |
  137|  33.5k|  if (GetWindowSequence(&pAacDecoderChannelInfo->icsInfo) == BLOCK_SHORT)
  ------------------
  |  Branch (137:7): [True: 1.06k, False: 32.4k]
  ------------------
  138|  1.06k|    MaximumScaleFactorBands = 16;
  139|  32.4k|  else
  140|  32.4k|    MaximumScaleFactorBands = 64;
  141|       |
  142|  33.5k|  conceal_min = pRvlc->conceal_min % MaximumScaleFactorBands;
  143|  33.5k|  conceal_group_min = pRvlc->conceal_min / MaximumScaleFactorBands;
  144|       |
  145|       |  /* calculate first reference value for approach in forward direction */
  146|  33.5k|  idIs = idNrg = idScf = 1;
  147|       |
  148|       |  /* set reference values */
  149|  33.5k|  *refIsFwd = -SF_OFFSET;
  ------------------
  |  |  127|  33.5k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  150|  33.5k|  *refNrgFwd = pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain -
  151|  33.5k|               SF_OFFSET - 90 - 256;
  ------------------
  |  |  127|  33.5k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  152|  33.5k|  *refScfFwd =
  153|  33.5k|      pAacDecoderChannelInfo->pDynData->RawDataInfo.GlobalGain - SF_OFFSET;
  ------------------
  |  |  127|  33.5k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  154|       |
  155|  33.5k|  startBand = conceal_min - 1;
  156|  68.2k|  for (group = conceal_group_min; group >= 0; group--) {
  ------------------
  |  Branch (156:35): [True: 34.6k, False: 33.5k]
  ------------------
  157|  55.6k|    for (band = startBand; band >= 0; band--) {
  ------------------
  |  Branch (157:28): [True: 20.9k, False: 34.6k]
  ------------------
  158|  20.9k|      bnds = 16 * group + band;
  159|  20.9k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  160|  3.61k|        case ZERO_HCB:
  ------------------
  |  Branch (160:9): [True: 3.61k, False: 17.3k]
  ------------------
  161|  3.61k|          break;
  162|  1.03k|        case INTENSITY_HCB:
  ------------------
  |  Branch (162:9): [True: 1.03k, False: 19.9k]
  ------------------
  163|  1.47k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (163:9): [True: 443, False: 20.5k]
  ------------------
  164|  1.47k|          if (idIs) {
  ------------------
  |  Branch (164:15): [True: 629, False: 844]
  ------------------
  165|    629|            *refIsFwd =
  166|    629|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  167|    629|            idIs = 0; /* reference value has been set */
  168|    629|          }
  169|  1.47k|          break;
  170|  1.45k|        case NOISE_HCB:
  ------------------
  |  Branch (170:9): [True: 1.45k, False: 19.5k]
  ------------------
  171|  1.45k|          if (idNrg) {
  ------------------
  |  Branch (171:15): [True: 495, False: 959]
  ------------------
  172|    495|            *refNrgFwd =
  173|    495|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  174|    495|            idNrg = 0; /* reference value has been set */
  175|    495|          }
  176|  1.45k|          break;
  177|  14.4k|        default:
  ------------------
  |  Branch (177:9): [True: 14.4k, False: 6.54k]
  ------------------
  178|  14.4k|          if (idScf) {
  ------------------
  |  Branch (178:15): [True: 5.91k, False: 8.50k]
  ------------------
  179|  5.91k|            *refScfFwd =
  180|  5.91k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfFwd[bnds];
  181|  5.91k|            idScf = 0; /* reference value has been set */
  182|  5.91k|          }
  183|  14.4k|          break;
  184|  20.9k|      }
  185|  20.9k|    }
  186|  34.6k|    startBand = pRvlc->maxSfbTransmitted - 1;
  187|  34.6k|  }
  188|  33.5k|}
rvlcconceal.cpp:_ZL13calcRefValBwdP11CErRvlcInfoP22CAacDecoderChannelInfoPiS3_S3_:
  207|  33.5k|                          int *refIsBwd, int *refNrgBwd, int *refScfBwd) {
  208|  33.5k|  int band, bnds, group, startBand;
  209|  33.5k|  int idIs, idNrg, idScf;
  210|  33.5k|  int conceal_max, conceal_group_max;
  211|  33.5k|  int MaximumScaleFactorBands;
  212|       |
  213|  33.5k|  if (GetWindowSequence(&pAacDecoderChannelInfo->icsInfo) == BLOCK_SHORT)
  ------------------
  |  Branch (213:7): [True: 1.06k, False: 32.4k]
  ------------------
  214|  1.06k|    MaximumScaleFactorBands = 16;
  215|  32.4k|  else
  216|  32.4k|    MaximumScaleFactorBands = 64;
  217|       |
  218|  33.5k|  conceal_max = pRvlc->conceal_max % MaximumScaleFactorBands;
  219|  33.5k|  conceal_group_max = pRvlc->conceal_max / MaximumScaleFactorBands;
  220|       |
  221|       |  /* calculate first reference value for approach in backward direction */
  222|  33.5k|  idIs = idNrg = idScf = 1;
  223|       |
  224|       |  /* set reference values */
  225|  33.5k|  *refIsBwd = pRvlc->dpcm_is_last_position - SF_OFFSET;
  ------------------
  |  |  127|  33.5k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  226|  33.5k|  *refNrgBwd = pRvlc->rev_global_gain + pRvlc->dpcm_noise_last_position -
  227|  33.5k|               SF_OFFSET - 90 - 256 + pRvlc->dpcm_noise_nrg;
  ------------------
  |  |  127|  33.5k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  228|  33.5k|  *refScfBwd = pRvlc->rev_global_gain - SF_OFFSET;
  ------------------
  |  |  127|  33.5k|#define SF_OFFSET 100 /* offset for correcting scf value */
  ------------------
  229|       |
  230|  33.5k|  startBand = conceal_max + 1;
  231|       |
  232|       |  /* if needed, re-set reference values */
  233|  69.4k|  for (group = conceal_group_max; group < pRvlc->numWindowGroups; group++) {
  ------------------
  |  Branch (233:35): [True: 35.9k, False: 33.5k]
  ------------------
  234|  59.4k|    for (band = startBand; band < pRvlc->maxSfbTransmitted; band++) {
  ------------------
  |  Branch (234:28): [True: 23.5k, False: 35.9k]
  ------------------
  235|  23.5k|      bnds = 16 * group + band;
  236|  23.5k|      switch (pAacDecoderChannelInfo->pDynData->aCodeBook[bnds]) {
  237|  4.90k|        case ZERO_HCB:
  ------------------
  |  Branch (237:9): [True: 4.90k, False: 18.6k]
  ------------------
  238|  4.90k|          break;
  239|    931|        case INTENSITY_HCB:
  ------------------
  |  Branch (239:9): [True: 931, False: 22.5k]
  ------------------
  240|  2.22k|        case INTENSITY_HCB2:
  ------------------
  |  Branch (240:9): [True: 1.29k, False: 22.2k]
  ------------------
  241|  2.22k|          if (idIs) {
  ------------------
  |  Branch (241:15): [True: 630, False: 1.59k]
  ------------------
  242|    630|            *refIsBwd =
  243|    630|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  244|    630|            idIs = 0; /* reference value has been set */
  245|    630|          }
  246|  2.22k|          break;
  247|    860|        case NOISE_HCB:
  ------------------
  |  Branch (247:9): [True: 860, False: 22.6k]
  ------------------
  248|    860|          if (idNrg) {
  ------------------
  |  Branch (248:15): [True: 181, False: 679]
  ------------------
  249|    181|            *refNrgBwd =
  250|    181|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  251|    181|            idNrg = 0; /* reference value has been set */
  252|    181|          }
  253|    860|          break;
  254|  15.5k|        default:
  ------------------
  |  Branch (254:9): [True: 15.5k, False: 7.98k]
  ------------------
  255|  15.5k|          if (idScf) {
  ------------------
  |  Branch (255:15): [True: 6.16k, False: 9.37k]
  ------------------
  256|  6.16k|            *refScfBwd =
  257|  6.16k|                pAacDecoderChannelInfo->pComData->overlay.aac.aRvlcScfBwd[bnds];
  258|  6.16k|            idScf = 0; /* reference value has been set */
  259|  6.16k|          }
  260|  15.5k|          break;
  261|  23.5k|      }
  262|  23.5k|    }
  263|  35.9k|    startBand = 0;
  264|  35.9k|  }
  265|  33.5k|}

_Z17CJointStereo_ReadP13FDK_BITSTREAMP16CJointStereoDataiiiP26CJointStereoPersistentDataP19CCplxPredictionDataiiij:
  122|   146k|                      int windowSequence, const UINT flags) {
  123|   146k|  int group, band;
  124|       |
  125|   146k|  pJointStereoData->MsMaskPresent = (UCHAR)FDKreadBits(bs, 2);
  126|       |
  127|   146k|  FDKmemclear(pJointStereoData->MsUsed,
  128|   146k|              scaleFactorBandsTransmitted * sizeof(UCHAR));
  129|       |
  130|   146k|  pJointStereoData->cplx_pred_flag = 0;
  131|   146k|  if (cplxPredictionActiv) {
  ------------------
  |  Branch (131:7): [True: 40.0k, False: 106k]
  ------------------
  132|  40.0k|    cplxPredictionData->pred_dir = 0;
  133|  40.0k|    cplxPredictionData->complex_coef = 0;
  134|  40.0k|    cplxPredictionData->use_prev_frame = 0;
  135|  40.0k|    cplxPredictionData->igf_pred_dir = 0;
  136|  40.0k|  }
  137|       |
  138|   146k|  switch (pJointStereoData->MsMaskPresent) {
  ------------------
  |  Branch (138:11): [True: 146k, False: 0]
  ------------------
  139|  64.8k|    case 0: /* no M/S */
  ------------------
  |  Branch (139:5): [True: 64.8k, False: 81.7k]
  ------------------
  140|       |      /* all flags are already cleared */
  141|  64.8k|      break;
  142|       |
  143|  14.5k|    case 1: /* read ms_used */
  ------------------
  |  Branch (143:5): [True: 14.5k, False: 132k]
  ------------------
  144|  33.7k|      for (group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (144:23): [True: 19.2k, False: 14.5k]
  ------------------
  145|  70.1k|        for (band = 0; band < scaleFactorBandsTransmitted; band++) {
  ------------------
  |  Branch (145:24): [True: 50.8k, False: 19.2k]
  ------------------
  146|  50.8k|          pJointStereoData->MsUsed[band] |= (FDKreadBits(bs, 1) << group);
  147|  50.8k|        }
  148|  19.2k|      }
  149|  14.5k|      break;
  150|       |
  151|  24.5k|    case 2: /* full spectrum M/S */
  ------------------
  |  Branch (151:5): [True: 24.5k, False: 121k]
  ------------------
  152|  92.7k|      for (band = 0; band < scaleFactorBandsTransmitted; band++) {
  ------------------
  |  Branch (152:22): [True: 68.1k, False: 24.5k]
  ------------------
  153|  68.1k|        pJointStereoData->MsUsed[band] = 255; /* set all flags to 1 */
  154|  68.1k|      }
  155|  24.5k|      break;
  156|       |
  157|  42.6k|    case 3:
  ------------------
  |  Branch (157:5): [True: 42.6k, False: 103k]
  ------------------
  158|       |      /* M/S coding is disabled, complex stereo prediction is enabled */
  159|  42.6k|      if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  307|  42.6k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  310|  42.6k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                    if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA)) {
  ------------------
  |  |  308|  42.6k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (159:11): [True: 36.7k, False: 5.90k]
  ------------------
  160|  36.7k|        if (cplxPredictionActiv) { /* 'if (stereoConfigIndex == 0)' */
  ------------------
  |  Branch (160:13): [True: 36.7k, False: 3]
  ------------------
  161|       |
  162|  36.7k|          pJointStereoData->cplx_pred_flag = 1;
  163|       |
  164|       |          /* cplx_pred_data()  cp. ISO/IEC FDIS 23003-3:2011(E)  Table 26 */
  165|  36.7k|          int cplx_pred_all = 0; /* local use only */
  166|  36.7k|          cplx_pred_all = FDKreadBits(bs, 1);
  167|       |
  168|  36.7k|          if (cplx_pred_all) {
  ------------------
  |  Branch (168:15): [True: 17.8k, False: 18.8k]
  ------------------
  169|   136k|            for (group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (169:29): [True: 118k, False: 17.8k]
  ------------------
  170|   118k|              UCHAR groupmask = ((UCHAR)1 << group);
  171|   164k|              for (band = 0; band < scaleFactorBandsTransmitted; band++) {
  ------------------
  |  Branch (171:30): [True: 46.1k, False: 118k]
  ------------------
  172|  46.1k|                pJointStereoData->MsUsed[band] |= groupmask;
  173|  46.1k|              }
  174|   118k|            }
  175|  18.8k|          } else {
  176|  46.5k|            for (group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (176:29): [True: 27.7k, False: 18.8k]
  ------------------
  177|  91.2k|              for (band = 0; band < scaleFactorBandsTransmitted;
  ------------------
  |  Branch (177:30): [True: 63.4k, False: 27.7k]
  ------------------
  178|  63.4k|                   band += SFB_PER_PRED_BAND) {
  ------------------
  |  |  110|  63.4k|#define SFB_PER_PRED_BAND 2
  ------------------
  179|  63.4k|                pJointStereoData->MsUsed[band] |= (FDKreadBits(bs, 1) << group);
  180|  63.4k|                if ((band + 1) < scaleFactorBandsTotal) {
  ------------------
  |  Branch (180:21): [True: 62.5k, False: 964]
  ------------------
  181|  62.5k|                  pJointStereoData->MsUsed[band + 1] |=
  182|  62.5k|                      (pJointStereoData->MsUsed[band] & ((UCHAR)1 << group));
  183|  62.5k|                }
  184|  63.4k|              }
  185|  27.7k|            }
  186|  18.8k|          }
  187|  36.7k|        } else {
  188|      3|          return -1;
  189|      3|        }
  190|  36.7k|      }
  191|  42.6k|      break;
  192|   146k|  }
  193|       |
  194|   146k|  if (cplxPredictionActiv) {
  ------------------
  |  Branch (194:7): [True: 40.0k, False: 106k]
  ------------------
  195|       |    /* If all sfb are MS-ed then no complex prediction */
  196|  40.0k|    if (pJointStereoData->MsMaskPresent == 3) {
  ------------------
  |  Branch (196:9): [True: 36.7k, False: 3.28k]
  ------------------
  197|  36.7k|      if (pJointStereoData->cplx_pred_flag) {
  ------------------
  |  Branch (197:11): [True: 36.7k, False: 0]
  ------------------
  198|  36.7k|        int delta_code_time = 0;
  199|       |
  200|       |        /* set pointer to Huffman codebooks */
  201|  36.7k|        const CodeBookDescription *hcb = &AACcodeBookDescriptionTable[BOOKSCL];
  202|       |        /* set predictors to zero in case of a transition from long to short
  203|       |         * window sequences and vice versa */
  204|  36.7k|        if (((windowSequence == BLOCK_SHORT) &&
  ------------------
  |  Branch (204:14): [True: 18.8k, False: 17.8k]
  ------------------
  205|  18.8k|             (pJointStereoPersistentData->winSeqPrev != BLOCK_SHORT)) ||
  ------------------
  |  Branch (205:14): [True: 1.23k, False: 17.6k]
  ------------------
  206|  35.4k|            ((pJointStereoPersistentData->winSeqPrev == BLOCK_SHORT) &&
  ------------------
  |  Branch (206:14): [True: 18.4k, False: 17.0k]
  ------------------
  207|  18.4k|             (windowSequence != BLOCK_SHORT))) {
  ------------------
  |  Branch (207:14): [True: 777, False: 17.6k]
  ------------------
  208|  2.00k|          FDKmemclear(pJointStereoPersistentData->alpha_q_re_prev,
  209|  2.00k|                      JointStereoMaximumGroups * JointStereoMaximumBands *
  210|  2.00k|                          sizeof(SHORT));
  211|  2.00k|          FDKmemclear(pJointStereoPersistentData->alpha_q_im_prev,
  212|  2.00k|                      JointStereoMaximumGroups * JointStereoMaximumBands *
  213|  2.00k|                          sizeof(SHORT));
  214|  2.00k|        }
  215|  36.7k|        {
  216|  36.7k|          FDKmemclear(cplxPredictionData->alpha_q_re,
  217|  36.7k|                      JointStereoMaximumGroups * JointStereoMaximumBands *
  218|  36.7k|                          sizeof(SHORT));
  219|  36.7k|          FDKmemclear(cplxPredictionData->alpha_q_im,
  220|  36.7k|                      JointStereoMaximumGroups * JointStereoMaximumBands *
  221|  36.7k|                          sizeof(SHORT));
  222|  36.7k|        }
  223|       |
  224|       |        /* 0 = mid->side prediction, 1 = side->mid prediction */
  225|  36.7k|        cplxPredictionData->pred_dir = FDKreadBits(bs, 1);
  226|  36.7k|        cplxPredictionData->complex_coef = FDKreadBits(bs, 1);
  227|       |
  228|  36.7k|        if (cplxPredictionData->complex_coef) {
  ------------------
  |  Branch (228:13): [True: 31.3k, False: 5.32k]
  ------------------
  229|  31.3k|          if (flags & AC_INDEP) {
  ------------------
  |  |  319|  31.3k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
  |  Branch (229:15): [True: 30.4k, False: 902]
  ------------------
  230|  30.4k|            cplxPredictionData->use_prev_frame = 0;
  231|  30.4k|          } else {
  232|    902|            cplxPredictionData->use_prev_frame = FDKreadBits(bs, 1);
  233|    902|          }
  234|  31.3k|        }
  235|       |
  236|  36.7k|        if (flags & AC_INDEP) {
  ------------------
  |  |  319|  36.7k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
  |  Branch (236:13): [True: 35.6k, False: 1.12k]
  ------------------
  237|  35.6k|          delta_code_time = 0;
  238|  35.6k|        } else {
  239|  1.12k|          delta_code_time = FDKreadBits(bs, 1);
  240|  1.12k|        }
  241|       |
  242|  36.7k|        {
  243|  36.7k|          int last_alpha_q_re = 0, last_alpha_q_im = 0;
  244|       |
  245|   182k|          for (group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (245:27): [True: 146k, False: 36.7k]
  ------------------
  246|   233k|            for (band = 0; band < scaleFactorBandsTransmitted;
  ------------------
  |  Branch (246:28): [True: 86.9k, False: 146k]
  ------------------
  247|   146k|                 band += SFB_PER_PRED_BAND) {
  ------------------
  |  |  110|  86.9k|#define SFB_PER_PRED_BAND 2
  ------------------
  248|  86.9k|              if (delta_code_time == 1) {
  ------------------
  |  Branch (248:19): [True: 8.66k, False: 78.3k]
  ------------------
  249|  8.66k|                if (group > 0) {
  ------------------
  |  Branch (249:21): [True: 6.84k, False: 1.82k]
  ------------------
  250|  6.84k|                  last_alpha_q_re =
  251|  6.84k|                      cplxPredictionData->alpha_q_re[group - 1][band];
  252|  6.84k|                  last_alpha_q_im =
  253|  6.84k|                      cplxPredictionData->alpha_q_im[group - 1][band];
  254|  6.84k|                } else if ((windowSequence == BLOCK_SHORT) &&
  ------------------
  |  Branch (254:28): [True: 1.25k, False: 564]
  ------------------
  255|  1.25k|                           (pJointStereoPersistentData->winSeqPrev ==
  ------------------
  |  Branch (255:28): [True: 402, False: 854]
  ------------------
  256|  1.25k|                            BLOCK_SHORT)) {
  257|       |                  /* Included for error-robustness */
  258|    402|                  if (pJointStereoPersistentData->winGroupsPrev == 0) return -1;
  ------------------
  |  Branch (258:23): [True: 1, False: 401]
  ------------------
  259|       |
  260|    401|                  last_alpha_q_re =
  261|    401|                      pJointStereoPersistentData->alpha_q_re_prev
  262|    401|                          [pJointStereoPersistentData->winGroupsPrev - 1][band];
  263|    401|                  last_alpha_q_im =
  264|    401|                      pJointStereoPersistentData->alpha_q_im_prev
  265|    401|                          [pJointStereoPersistentData->winGroupsPrev - 1][band];
  266|  1.41k|                } else {
  267|  1.41k|                  last_alpha_q_re =
  268|  1.41k|                      pJointStereoPersistentData->alpha_q_re_prev[group][band];
  269|  1.41k|                  last_alpha_q_im =
  270|  1.41k|                      pJointStereoPersistentData->alpha_q_im_prev[group][band];
  271|  1.41k|                }
  272|       |
  273|  78.3k|              } else {
  274|  78.3k|                if (band > 0) {
  ------------------
  |  Branch (274:21): [True: 48.3k, False: 30.0k]
  ------------------
  275|  48.3k|                  last_alpha_q_re =
  276|  48.3k|                      cplxPredictionData->alpha_q_re[group][band - 1];
  277|  48.3k|                  last_alpha_q_im =
  278|  48.3k|                      cplxPredictionData->alpha_q_im[group][band - 1];
  279|  48.3k|                } else {
  280|  30.0k|                  last_alpha_q_re = 0;
  281|  30.0k|                  last_alpha_q_im = 0;
  282|  30.0k|                }
  283|       |
  284|  78.3k|              } /* if (delta_code_time == 1) */
  285|       |
  286|  86.9k|              if (pJointStereoData->MsUsed[band] & ((UCHAR)1 << group)) {
  ------------------
  |  Branch (286:19): [True: 47.3k, False: 39.6k]
  ------------------
  287|  47.3k|                int dpcm_alpha_re, dpcm_alpha_im;
  288|       |
  289|  47.3k|                dpcm_alpha_re = CBlock_DecodeHuffmanWord(bs, hcb);
  290|  47.3k|                dpcm_alpha_re -= 60;
  291|  47.3k|                dpcm_alpha_re *= -1;
  292|       |
  293|  47.3k|                cplxPredictionData->alpha_q_re[group][band] =
  294|  47.3k|                    dpcm_alpha_re + last_alpha_q_re;
  295|       |
  296|  47.3k|                if (cplxPredictionData->complex_coef) {
  ------------------
  |  Branch (296:21): [True: 34.9k, False: 12.4k]
  ------------------
  297|  34.9k|                  dpcm_alpha_im = CBlock_DecodeHuffmanWord(bs, hcb);
  298|  34.9k|                  dpcm_alpha_im -= 60;
  299|  34.9k|                  dpcm_alpha_im *= -1;
  300|       |
  301|  34.9k|                  cplxPredictionData->alpha_q_im[group][band] =
  302|  34.9k|                      dpcm_alpha_im + last_alpha_q_im;
  303|  34.9k|                } else {
  304|  12.4k|                  cplxPredictionData->alpha_q_im[group][band] = 0;
  305|  12.4k|                }
  306|       |
  307|  47.3k|              } else {
  308|  39.6k|                cplxPredictionData->alpha_q_re[group][band] = 0;
  309|  39.6k|                cplxPredictionData->alpha_q_im[group][band] = 0;
  310|  39.6k|              } /* if (pJointStereoData->MsUsed[band] & ((UCHAR)1 << group)) */
  311|       |
  312|  86.9k|              if ((band + 1) <
  ------------------
  |  Branch (312:19): [True: 60.1k, False: 26.8k]
  ------------------
  313|  86.9k|                  scaleFactorBandsTransmitted) { /* <= this should be the
  314|       |                                                    correct way (cp.
  315|       |                                                    ISO_IEC_FDIS_23003-0(E) */
  316|       |                /*    7.7.2.3.2 Decoding of prediction coefficients) */
  317|  60.1k|                cplxPredictionData->alpha_q_re[group][band + 1] =
  318|  60.1k|                    cplxPredictionData->alpha_q_re[group][band];
  319|  60.1k|                cplxPredictionData->alpha_q_im[group][band + 1] =
  320|  60.1k|                    cplxPredictionData->alpha_q_im[group][band];
  321|  60.1k|              } /* if ((band+1)<scaleFactorBandsTotal) */
  322|       |
  323|  86.9k|              pJointStereoPersistentData->alpha_q_re_prev[group][band] =
  324|  86.9k|                  cplxPredictionData->alpha_q_re[group][band];
  325|  86.9k|              pJointStereoPersistentData->alpha_q_im_prev[group][band] =
  326|  86.9k|                  cplxPredictionData->alpha_q_im[group][band];
  327|  86.9k|            }
  328|       |
  329|  9.34M|            for (band = scaleFactorBandsTransmitted; band < max_sfb_ste_clear;
  ------------------
  |  Branch (329:54): [True: 9.20M, False: 146k]
  ------------------
  330|  9.20M|                 band++) {
  331|  9.20M|              cplxPredictionData->alpha_q_re[group][band] = 0;
  332|  9.20M|              cplxPredictionData->alpha_q_im[group][band] = 0;
  333|  9.20M|              pJointStereoPersistentData->alpha_q_re_prev[group][band] = 0;
  334|  9.20M|              pJointStereoPersistentData->alpha_q_im_prev[group][band] = 0;
  335|  9.20M|            }
  336|   146k|          }
  337|  36.7k|        }
  338|  36.7k|      }
  339|  36.7k|    } else {
  340|  17.9k|      for (group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (340:23): [True: 14.6k, False: 3.28k]
  ------------------
  341|   951k|        for (band = 0; band < max_sfb_ste_clear; band++) {
  ------------------
  |  Branch (341:24): [True: 936k, False: 14.6k]
  ------------------
  342|   936k|          pJointStereoPersistentData->alpha_q_re_prev[group][band] = 0;
  343|   936k|          pJointStereoPersistentData->alpha_q_im_prev[group][band] = 0;
  344|   936k|        }
  345|  14.6k|      }
  346|  3.28k|    }
  347|       |
  348|  40.0k|    pJointStereoPersistentData->winGroupsPrev = windowGroups;
  349|  40.0k|  }
  350|       |
  351|   146k|  return 0;
  352|   146k|}
_Z20CJointStereo_ApplyMSPP22CAacDecoderChannelInfoPP28CAacDecoderStaticChannelInfoPiS5_PsS6_S6_S6_PKsPKhiiiiS5_S6_i:
  552|   144k|    SHORT *store_dmx_re_prev_e, const int mainband_flag) {
  553|   144k|  int window, group, band;
  554|   144k|  UCHAR groupMask;
  555|   144k|  CJointStereoData *pJointStereoData =
  556|   144k|      &pAacDecoderChannelInfo[L]->pComData->jointStereoData;
  557|   144k|  CCplxPredictionData *cplxPredictionData =
  558|   144k|      pAacDecoderChannelInfo[L]->pComStaticData->cplxPredictionData;
  559|       |
  560|   144k|  int max_sfb_ste =
  561|   144k|      fMax(scaleFactorBandsTransmittedL, scaleFactorBandsTransmittedR);
  562|   144k|  int min_sfb_ste =
  563|   144k|      fMin(scaleFactorBandsTransmittedL, scaleFactorBandsTransmittedR);
  564|   144k|  int scaleFactorBandsTransmitted = min_sfb_ste;
  565|       |
  566|   144k|  if (pJointStereoData->cplx_pred_flag) {
  ------------------
  |  Branch (566:7): [True: 36.5k, False: 107k]
  ------------------
  567|  36.5k|    int windowLen, groupwin, frameMaxScale;
  568|  36.5k|    CJointStereoPersistentData *pJointStereoPersistentData =
  569|  36.5k|        &pAacDecoderStaticChannelInfo[L]
  570|  36.5k|             ->pCpeStaticData->jointStereoPersistentData;
  571|  36.5k|    FIXP_DBL *const staticSpectralCoeffsL =
  572|  36.5k|        pAacDecoderStaticChannelInfo[L]
  573|  36.5k|            ->pCpeStaticData->jointStereoPersistentData.spectralCoeffs[L];
  574|  36.5k|    FIXP_DBL *const staticSpectralCoeffsR =
  575|  36.5k|        pAacDecoderStaticChannelInfo[L]
  576|  36.5k|            ->pCpeStaticData->jointStereoPersistentData.spectralCoeffs[R];
  577|  36.5k|    SHORT *const staticSpecScaleL =
  578|  36.5k|        pAacDecoderStaticChannelInfo[L]
  579|  36.5k|            ->pCpeStaticData->jointStereoPersistentData.specScale[L];
  580|  36.5k|    SHORT *const staticSpecScaleR =
  581|  36.5k|        pAacDecoderStaticChannelInfo[L]
  582|  36.5k|            ->pCpeStaticData->jointStereoPersistentData.specScale[R];
  583|       |
  584|  36.5k|    FIXP_DBL *dmx_re =
  585|  36.5k|        pAacDecoderStaticChannelInfo[L]
  586|  36.5k|            ->pCpeStaticData->jointStereoPersistentData.scratchBuffer;
  587|  36.5k|    FIXP_DBL *dmx_re_prev =
  588|  36.5k|        pAacDecoderStaticChannelInfo[L]
  589|  36.5k|            ->pCpeStaticData->jointStereoPersistentData.scratchBuffer +
  590|  36.5k|        1024;
  591|       |
  592|       |    /* When MS is applied over the main band this value gets computed. Otherwise
  593|       |     * (for the tiles) it uses the assigned value */
  594|  36.5k|    SHORT dmx_re_prev_e = *store_dmx_re_prev_e;
  595|       |
  596|  36.5k|    const FIXP_FILT *pCoeff;
  597|  36.5k|    const FIXP_FILT *pCoeffPrev;
  598|  36.5k|    int coeffPointerOffset;
  599|       |
  600|  36.5k|    int previousShape = (int)pJointStereoPersistentData->winShapePrev;
  601|  36.5k|    int currentShape = (int)pAacDecoderChannelInfo[L]->icsInfo.WindowShape;
  602|       |
  603|       |    /* complex stereo prediction */
  604|       |
  605|       |    /* 0. preparations */
  606|       |
  607|       |    /* 0.0. get scratch buffer for downmix MDST */
  608|  36.5k|    C_AALLOC_SCRATCH_START(dmx_im, FIXP_DBL, 1024);
  ------------------
  |  |  319|  36.5k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  36.5k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  36.5k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  36.5k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  36.5k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  36.5k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  36.5k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  36.5k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  36.5k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  36.5k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  609|       |
  610|       |    /* 0.1. window lengths */
  611|       |
  612|       |    /* get length of short window for current configuration */
  613|  36.5k|    windowLen =
  614|  36.5k|        pAacDecoderChannelInfo[L]->granuleLength; /* framelength 768 => 96,
  615|       |                                                     framelength 1024 => 128 */
  616|       |
  617|       |    /* if this is no short-block set length for long-block */
  618|  36.5k|    if (pAacDecoderChannelInfo[L]->icsInfo.WindowSequence != BLOCK_SHORT) {
  ------------------
  |  Branch (618:9): [True: 17.7k, False: 18.7k]
  ------------------
  619|  17.7k|      windowLen *= 8;
  620|  17.7k|    }
  621|       |
  622|       |    /* 0.2. set pointer to filter-coefficients for MDST excitation including
  623|       |     * previous frame portions */
  624|       |    /*      cp. ISO/IEC FDIS 23003-3:2011(E) table 125 */
  625|       |
  626|       |    /* set pointer to default-position */
  627|  36.5k|    pCoeffPrev = mdst_filt_coef_prev[previousShape];
  628|       |
  629|  36.5k|    if (cplxPredictionData->complex_coef == 1) {
  ------------------
  |  Branch (629:9): [True: 31.3k, False: 5.26k]
  ------------------
  630|  31.3k|      switch (pAacDecoderChannelInfo[L]
  631|  31.3k|                  ->icsInfo.WindowSequence) { /* current window sequence */
  632|  17.9k|        case BLOCK_SHORT:
  ------------------
  |  Branch (632:9): [True: 17.9k, False: 13.3k]
  ------------------
  633|  27.1k|        case BLOCK_LONG:
  ------------------
  |  Branch (633:9): [True: 9.11k, False: 22.2k]
  ------------------
  634|  27.1k|          pCoeffPrev = mdst_filt_coef_prev[previousShape];
  635|  27.1k|          break;
  636|       |
  637|  3.02k|        case BLOCK_START:
  ------------------
  |  Branch (637:9): [True: 3.02k, False: 28.2k]
  ------------------
  638|  3.02k|          if ((pJointStereoPersistentData->winSeqPrev == BLOCK_SHORT) ||
  ------------------
  |  Branch (638:15): [True: 66, False: 2.96k]
  ------------------
  639|  2.96k|              (pJointStereoPersistentData->winSeqPrev == BLOCK_START)) {
  ------------------
  |  Branch (639:15): [True: 2.09k, False: 871]
  ------------------
  640|       |            /* a stop-start-sequence can only follow on an eight-short-sequence
  641|       |             * or a start-sequence */
  642|  2.15k|            pCoeffPrev = mdst_filt_coef_prev[2 + previousShape];
  643|  2.15k|          } else {
  644|    871|            pCoeffPrev = mdst_filt_coef_prev[previousShape];
  645|    871|          }
  646|  3.02k|          break;
  647|       |
  648|  1.18k|        case BLOCK_STOP:
  ------------------
  |  Branch (648:9): [True: 1.18k, False: 30.1k]
  ------------------
  649|  1.18k|          pCoeffPrev = mdst_filt_coef_prev[2 + previousShape];
  650|  1.18k|          break;
  651|       |
  652|      0|        default:
  ------------------
  |  Branch (652:9): [True: 0, False: 31.3k]
  ------------------
  653|      0|          pCoeffPrev = mdst_filt_coef_prev[previousShape];
  654|      0|          break;
  655|  31.3k|      }
  656|  31.3k|    }
  657|       |
  658|       |    /* 0.3. set pointer to filter-coefficients for MDST excitation */
  659|       |
  660|       |    /* define offset of pointer to filter-coefficients for MDST exitation
  661|       |     * employing only the current frame */
  662|  36.5k|    if ((previousShape == SHAPE_SINE) && (currentShape == SHAPE_SINE)) {
  ------------------
  |  Branch (662:9): [True: 32.3k, False: 4.26k]
  |  Branch (662:42): [True: 30.3k, False: 1.94k]
  ------------------
  663|  30.3k|      coeffPointerOffset = 0;
  664|  30.3k|    } else if ((previousShape == SHAPE_SINE) && (currentShape == SHAPE_KBD)) {
  ------------------
  |  Branch (664:16): [True: 1.94k, False: 4.26k]
  |  Branch (664:49): [True: 1.94k, False: 0]
  ------------------
  665|  1.94k|      coeffPointerOffset = 2;
  666|  4.26k|    } else if ((previousShape == SHAPE_KBD) && (currentShape == SHAPE_KBD)) {
  ------------------
  |  Branch (666:16): [True: 4.26k, False: 0]
  |  Branch (666:48): [True: 388, False: 3.88k]
  ------------------
  667|    388|      coeffPointerOffset = 1;
  668|    388|    } else /* if ( (previousShape == SHAPE_KBD) && (currentShape == SHAPE_SINE)
  669|       |              ) */
  670|  3.88k|    {
  671|  3.88k|      coeffPointerOffset = 3;
  672|  3.88k|    }
  673|       |
  674|       |    /* set pointer to filter-coefficient table cp. ISO/IEC FDIS 23003-3:2011(E)
  675|       |     * table 124 */
  676|  36.5k|    switch (pAacDecoderChannelInfo[L]
  677|  36.5k|                ->icsInfo.WindowSequence) { /* current window sequence */
  678|  18.7k|      case BLOCK_SHORT:
  ------------------
  |  Branch (678:7): [True: 18.7k, False: 17.7k]
  ------------------
  679|  30.5k|      case BLOCK_LONG:
  ------------------
  |  Branch (679:7): [True: 11.7k, False: 24.7k]
  ------------------
  680|  30.5k|        pCoeff = mdst_filt_coef_curr[coeffPointerOffset];
  681|  30.5k|        break;
  682|       |
  683|  4.78k|      case BLOCK_START:
  ------------------
  |  Branch (683:7): [True: 4.78k, False: 31.7k]
  ------------------
  684|  4.78k|        if ((pJointStereoPersistentData->winSeqPrev == BLOCK_SHORT) ||
  ------------------
  |  Branch (684:13): [True: 113, False: 4.67k]
  ------------------
  685|  4.67k|            (pJointStereoPersistentData->winSeqPrev == BLOCK_START)) {
  ------------------
  |  Branch (685:13): [True: 3.26k, False: 1.41k]
  ------------------
  686|       |          /* a stop-start-sequence can only follow on an eight-short-sequence or
  687|       |           * a start-sequence */
  688|  3.37k|          pCoeff = mdst_filt_coef_curr[12 + coeffPointerOffset];
  689|  3.37k|        } else {
  690|  1.41k|          pCoeff = mdst_filt_coef_curr[4 + coeffPointerOffset];
  691|  1.41k|        }
  692|  4.78k|        break;
  693|       |
  694|  1.21k|      case BLOCK_STOP:
  ------------------
  |  Branch (694:7): [True: 1.21k, False: 35.3k]
  ------------------
  695|  1.21k|        pCoeff = mdst_filt_coef_curr[8 + coeffPointerOffset];
  696|  1.21k|        break;
  697|       |
  698|      0|      default:
  ------------------
  |  Branch (698:7): [True: 0, False: 36.5k]
  ------------------
  699|      0|        pCoeff = mdst_filt_coef_curr[coeffPointerOffset];
  700|  36.5k|    }
  701|       |
  702|       |    /* 0.4. find maximum common (l/r) band-scaling-factor for whole sequence
  703|       |     * (all windows) */
  704|  36.5k|    frameMaxScale = 0;
  705|   182k|    for (window = 0, group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (705:33): [True: 145k, False: 36.5k]
  ------------------
  706|   313k|      for (groupwin = 0; groupwin < pWindowGroupLength[group];
  ------------------
  |  Branch (706:26): [True: 168k, False: 145k]
  ------------------
  707|   168k|           groupwin++, window++) {
  708|   168k|        SHORT *leftScale = &SFBleftScale[window * 16];
  709|   168k|        SHORT *rightScale = &SFBrightScale[window * 16];
  710|   168k|        int windowMaxScale = 0;
  711|       |
  712|       |        /* find maximum scaling factor of all bands in this window */
  713|   185k|        for (band = 0; band < min_sfb_ste; band++) {
  ------------------
  |  Branch (713:24): [True: 17.4k, False: 168k]
  ------------------
  714|  17.4k|          int lScale = leftScale[band];
  715|  17.4k|          int rScale = rightScale[band];
  716|  17.4k|          int commonScale = ((lScale > rScale) ? lScale : rScale);
  ------------------
  |  Branch (716:30): [True: 15.7k, False: 1.72k]
  ------------------
  717|  17.4k|          windowMaxScale =
  718|  17.4k|              (windowMaxScale < commonScale) ? commonScale : windowMaxScale;
  ------------------
  |  Branch (718:15): [True: 1.78k, False: 15.6k]
  ------------------
  719|  17.4k|        }
  720|   168k|        if (scaleFactorBandsTransmittedL >
  ------------------
  |  Branch (720:13): [True: 832, False: 167k]
  ------------------
  721|   168k|            min_sfb_ste) { /* i.e. scaleFactorBandsTransmittedL == max_sfb_ste
  722|       |                            */
  723|  6.64k|          for (; band < max_sfb_ste; band++) {
  ------------------
  |  Branch (723:18): [True: 5.80k, False: 832]
  ------------------
  724|  5.80k|            int lScale = leftScale[band];
  725|  5.80k|            windowMaxScale =
  726|  5.80k|                (windowMaxScale < lScale) ? lScale : windowMaxScale;
  ------------------
  |  Branch (726:17): [True: 342, False: 5.46k]
  ------------------
  727|  5.80k|          }
  728|   167k|        } else {
  729|   167k|          if (scaleFactorBandsTransmittedR >
  ------------------
  |  Branch (729:15): [True: 23.1k, False: 144k]
  ------------------
  730|   167k|              min_sfb_ste) { /* i.e. scaleFactorBandsTransmittedR == max_sfb_ste
  731|       |                              */
  732|   158k|            for (; band < max_sfb_ste; band++) {
  ------------------
  |  Branch (732:20): [True: 135k, False: 23.1k]
  ------------------
  733|   135k|              int rScale = rightScale[band];
  734|   135k|              windowMaxScale =
  735|   135k|                  (windowMaxScale < rScale) ? rScale : windowMaxScale;
  ------------------
  |  Branch (735:19): [True: 16.4k, False: 118k]
  ------------------
  736|   135k|            }
  737|  23.1k|          }
  738|   167k|        }
  739|       |
  740|       |        /* find maximum common SF of all windows */
  741|   168k|        frameMaxScale =
  742|   168k|            (frameMaxScale < windowMaxScale) ? windowMaxScale : frameMaxScale;
  ------------------
  |  Branch (742:13): [True: 13.9k, False: 154k]
  ------------------
  743|   168k|      }
  744|   145k|    }
  745|       |
  746|       |    /* add some headroom for overflow protection during filter and add operation
  747|       |     */
  748|  36.5k|    frameMaxScale += 2;
  749|       |
  750|       |    /* process on window-basis (i.e. iterate over all groups and corresponding
  751|       |     * windows) */
  752|   182k|    for (window = 0, group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (752:33): [True: 145k, False: 36.5k]
  ------------------
  753|   145k|      groupMask = 1 << group;
  754|       |
  755|   313k|      for (groupwin = 0; groupwin < pWindowGroupLength[group];
  ------------------
  |  Branch (755:26): [True: 168k, False: 145k]
  ------------------
  756|   168k|           groupwin++, window++) {
  757|       |        /* initialize the MDST with zeros */
  758|   168k|        FDKmemclear(&dmx_im[windowLen * window], windowLen * sizeof(FIXP_DBL));
  759|       |
  760|       |        /* 1. calculate the previous downmix MDCT. We do this once just for the
  761|       |         * Main band. */
  762|   168k|        if (cplxPredictionData->complex_coef == 1) {
  ------------------
  |  Branch (762:13): [True: 157k, False: 10.7k]
  ------------------
  763|   157k|          if ((cplxPredictionData->use_prev_frame == 1) && (mainband_flag)) {
  ------------------
  |  Branch (763:15): [True: 5.34k, False: 151k]
  |  Branch (763:60): [True: 5.34k, False: 0]
  ------------------
  764|       |            /* if this is a long-block or the first window of a short-block
  765|       |               calculate the downmix MDCT of the previous frame.
  766|       |               use_prev_frame is assumed not to change during a frame!
  767|       |            */
  768|       |
  769|       |            /* first determine shiftfactors to scale left and right channel */
  770|  5.34k|            if ((pAacDecoderChannelInfo[L]->icsInfo.WindowSequence !=
  ------------------
  |  Branch (770:17): [True: 213, False: 5.13k]
  ------------------
  771|  5.34k|                 BLOCK_SHORT) ||
  772|  5.13k|                (window == 0)) {
  ------------------
  |  Branch (772:17): [True: 642, False: 4.49k]
  ------------------
  773|    855|              int index_offset = 0;
  774|    855|              int srLeftChan = 0;
  775|    855|              int srRightChan = 0;
  776|    855|              if (pAacDecoderChannelInfo[L]->icsInfo.WindowSequence ==
  ------------------
  |  Branch (776:19): [True: 642, False: 213]
  ------------------
  777|    855|                  BLOCK_SHORT) {
  778|       |                /* use the last window of the previous frame for MDCT
  779|       |                 * calculation if this is a short-block. */
  780|    642|                index_offset = windowLen * 7;
  781|    642|                if (staticSpecScaleL[7] > staticSpecScaleR[7]) {
  ------------------
  |  Branch (781:21): [True: 46, False: 596]
  ------------------
  782|     46|                  srRightChan = staticSpecScaleL[7] - staticSpecScaleR[7];
  783|     46|                  dmx_re_prev_e = staticSpecScaleL[7];
  784|    596|                } else {
  785|    596|                  srLeftChan = staticSpecScaleR[7] - staticSpecScaleL[7];
  786|    596|                  dmx_re_prev_e = staticSpecScaleR[7];
  787|    596|                }
  788|    642|              } else {
  789|    213|                if (staticSpecScaleL[0] > staticSpecScaleR[0]) {
  ------------------
  |  Branch (789:21): [True: 37, False: 176]
  ------------------
  790|     37|                  srRightChan = staticSpecScaleL[0] - staticSpecScaleR[0];
  791|     37|                  dmx_re_prev_e = staticSpecScaleL[0];
  792|    176|                } else {
  793|    176|                  srLeftChan = staticSpecScaleR[0] - staticSpecScaleL[0];
  794|    176|                  dmx_re_prev_e = staticSpecScaleR[0];
  795|    176|                }
  796|    213|              }
  797|       |
  798|       |              /* now scale channels and determine downmix MDCT of previous frame
  799|       |               */
  800|    855|              if (pAacDecoderStaticChannelInfo[L]
  ------------------
  |  Branch (800:19): [True: 0, False: 855]
  ------------------
  801|    855|                      ->pCpeStaticData->jointStereoPersistentData
  802|    855|                      .clearSpectralCoeffs == 1) {
  803|      0|                FDKmemclear(dmx_re_prev, windowLen * sizeof(FIXP_DBL));
  804|      0|                dmx_re_prev_e = 0;
  805|    855|              } else {
  806|    855|                if (cplxPredictionData->pred_dir == 0) {
  ------------------
  |  Branch (806:21): [True: 634, False: 221]
  ------------------
  807|   142k|                  for (int i = 0; i < windowLen; i++) {
  ------------------
  |  Branch (807:35): [True: 141k, False: 634]
  ------------------
  808|   141k|                    dmx_re_prev[i] =
  809|   141k|                        ((staticSpectralCoeffsL[index_offset + i] >>
  810|   141k|                          fMin(DFRACT_BITS - 1, srLeftChan + 1)) +
  ------------------
  |  |  113|   141k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  811|   141k|                         (staticSpectralCoeffsR[index_offset + i] >>
  812|   141k|                          fMin(DFRACT_BITS - 1, srRightChan + 1)));
  ------------------
  |  |  113|   141k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  813|   141k|                  }
  814|    634|                } else {
  815|   100k|                  for (int i = 0; i < windowLen; i++) {
  ------------------
  |  Branch (815:35): [True: 100k, False: 221]
  ------------------
  816|   100k|                    dmx_re_prev[i] =
  817|   100k|                        ((staticSpectralCoeffsL[index_offset + i] >>
  818|   100k|                          fMin(DFRACT_BITS - 1, srLeftChan + 1)) -
  ------------------
  |  |  113|   100k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  819|   100k|                         (staticSpectralCoeffsR[index_offset + i] >>
  820|   100k|                          fMin(DFRACT_BITS - 1, srRightChan + 1)));
  ------------------
  |  |  113|   100k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  821|   100k|                  }
  822|    221|                }
  823|    855|              }
  824|       |
  825|       |              /* In case that we use INF we have to preserve the state of the
  826|       |              "dmx_re_prev" (original or computed). This is necessary because we
  827|       |              have to apply MS over the separate IGF tiles. */
  828|    855|              FDKmemcpy(store_dmx_re_prev, &dmx_re_prev[0],
  829|    855|                        windowLen * sizeof(FIXP_DBL));
  830|       |
  831|       |              /* Particular exponent of the computed/original "dmx_re_prev" must
  832|       |               * be kept for the tile MS calculations if necessary.*/
  833|    855|              *store_dmx_re_prev_e = dmx_re_prev_e;
  834|       |
  835|    855|            } /* if ( (pAacDecoderChannelInfo[L]->icsInfo.WindowSequence !=
  836|       |                 BLOCK_SHORT) || (window == 0) ) */
  837|       |
  838|  5.34k|          } /* if ( pJointStereoData->use_prev_frame == 1 ) */
  839|       |
  840|   157k|        } /* if ( pJointStereoData->complex_coef == 1 ) */
  841|       |
  842|       |        /* 2. calculate downmix MDCT of current frame */
  843|       |
  844|       |        /* set pointer to scale-factor-bands of current window */
  845|   168k|        SHORT *leftScale = &SFBleftScale[window * 16];
  846|   168k|        SHORT *rightScale = &SFBrightScale[window * 16];
  847|       |
  848|   168k|        specScaleL[window] = specScaleR[window] = frameMaxScale;
  849|       |
  850|       |        /* adapt scaling-factors to previous frame */
  851|   168k|        if (cplxPredictionData->use_prev_frame == 1) {
  ------------------
  |  Branch (851:13): [True: 5.34k, False: 162k]
  ------------------
  852|  5.34k|          if (window == 0) {
  ------------------
  |  Branch (852:15): [True: 855, False: 4.49k]
  ------------------
  853|    855|            if (dmx_re_prev_e < frameMaxScale) {
  ------------------
  |  Branch (853:17): [True: 610, False: 245]
  ------------------
  854|    610|              if (mainband_flag == 0) {
  ------------------
  |  Branch (854:19): [True: 0, False: 610]
  ------------------
  855|      0|                scaleValues(
  856|      0|                    dmx_re_prev, store_dmx_re_prev, windowLen,
  857|      0|                    -fMin(DFRACT_BITS - 1, (frameMaxScale - dmx_re_prev_e)));
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  858|    610|              } else {
  859|    610|                scaleValues(
  860|    610|                    dmx_re_prev, windowLen,
  861|    610|                    -fMin(DFRACT_BITS - 1, (frameMaxScale - dmx_re_prev_e)));
  ------------------
  |  |  113|    610|#define DFRACT_BITS 32 /* double precision */
  ------------------
  862|    610|              }
  863|    610|            } else {
  864|    245|              if (mainband_flag == 0) {
  ------------------
  |  Branch (864:19): [True: 0, False: 245]
  ------------------
  865|      0|                FDKmemcpy(dmx_re_prev, store_dmx_re_prev,
  866|      0|                          windowLen * sizeof(FIXP_DBL));
  867|      0|              }
  868|    245|              specScaleL[0] = dmx_re_prev_e;
  869|    245|              specScaleR[0] = dmx_re_prev_e;
  870|    245|            }
  871|  4.49k|          } else { /* window != 0 */
  872|  4.49k|            FDK_ASSERT(pAacDecoderChannelInfo[L]->icsInfo.WindowSequence ==
  ------------------
  |  |  221|  4.49k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (872:13): [True: 4.49k, False: 0]
  ------------------
  873|  4.49k|                       BLOCK_SHORT);
  874|  4.49k|            if (specScaleL[window - 1] < frameMaxScale) {
  ------------------
  |  Branch (874:17): [True: 0, False: 4.49k]
  ------------------
  875|      0|              scaleValues(&dmx_re[windowLen * (window - 1)], windowLen,
  876|      0|                          -fMin(DFRACT_BITS - 1,
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  877|      0|                                (frameMaxScale - specScaleL[window - 1])));
  878|  4.49k|            } else {
  879|  4.49k|              specScaleL[window] = specScaleL[window - 1];
  880|  4.49k|              specScaleR[window] = specScaleR[window - 1];
  881|  4.49k|            }
  882|  4.49k|          }
  883|  5.34k|        } /* if ( pJointStereoData->use_prev_frame == 1 ) */
  884|       |
  885|       |        /* scaling factors of both channels ought to be equal now */
  886|   168k|        FDK_ASSERT(specScaleL[window] == specScaleR[window]);
  ------------------
  |  |  221|   168k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (886:9): [True: 168k, False: 0]
  ------------------
  887|       |
  888|       |        /* rescale signal and calculate downmix MDCT */
  889|   326k|        for (band = 0; band < max_sfb_ste; band++) {
  ------------------
  |  Branch (889:24): [True: 158k, False: 168k]
  ------------------
  890|       |          /* first adapt scaling of current band to scaling of current window =>
  891|       |           * shift signal right */
  892|   158k|          int lScale = leftScale[band];
  893|   158k|          int rScale = rightScale[band];
  894|       |
  895|   158k|          lScale = fMin(DFRACT_BITS - 1, specScaleL[window] - lScale);
  ------------------
  |  |  113|   158k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  896|   158k|          rScale = fMin(DFRACT_BITS - 1,
  ------------------
  |  |  113|   158k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  897|   158k|                        specScaleL[window] - rScale); /* L or R doesn't
  898|       |                                                         matter,
  899|       |                                                         specScales are
  900|       |                                                         equal at this
  901|       |                                                         point */
  902|       |
  903|       |          /* Write back to sfb scale to cover the case when max_sfb_ste <
  904|       |           * max_sfb */
  905|   158k|          leftScale[band] = rightScale[band] = specScaleL[window];
  906|       |
  907|   158k|          for (int i = pScaleFactorBandOffsets[band];
  908|  1.87M|               i < pScaleFactorBandOffsets[band + 1]; i++) {
  ------------------
  |  Branch (908:16): [True: 1.71M, False: 158k]
  ------------------
  909|  1.71M|            spectrumL[windowLen * window + i] >>= lScale;
  910|  1.71M|            spectrumR[windowLen * window + i] >>= rScale;
  911|  1.71M|          }
  912|       |
  913|       |          /* now calculate downmix MDCT */
  914|   158k|          if (pJointStereoData->MsUsed[band] & groupMask) {
  ------------------
  |  Branch (914:15): [True: 96.5k, False: 61.7k]
  ------------------
  915|  96.5k|            for (int i = pScaleFactorBandOffsets[band];
  916|   854k|                 i < pScaleFactorBandOffsets[band + 1]; i++) {
  ------------------
  |  Branch (916:18): [True: 757k, False: 96.5k]
  ------------------
  917|   757k|              dmx_re[windowLen * window + i] =
  918|   757k|                  spectrumL[windowLen * window + i];
  919|   757k|            }
  920|  96.5k|          } else {
  921|  61.7k|            if (cplxPredictionData->pred_dir == 0) {
  ------------------
  |  Branch (921:17): [True: 35.4k, False: 26.3k]
  ------------------
  922|  35.4k|              for (int i = pScaleFactorBandOffsets[band];
  923|   745k|                   i < pScaleFactorBandOffsets[band + 1]; i++) {
  ------------------
  |  Branch (923:20): [True: 710k, False: 35.4k]
  ------------------
  924|   710k|                dmx_re[windowLen * window + i] =
  925|   710k|                    (spectrumL[windowLen * window + i] +
  926|   710k|                     spectrumR[windowLen * window + i]) >>
  927|   710k|                    1;
  928|   710k|              }
  929|  35.4k|            } else {
  930|  26.3k|              for (int i = pScaleFactorBandOffsets[band];
  931|   277k|                   i < pScaleFactorBandOffsets[band + 1]; i++) {
  ------------------
  |  Branch (931:20): [True: 251k, False: 26.3k]
  ------------------
  932|   251k|                dmx_re[windowLen * window + i] =
  933|   251k|                    (spectrumL[windowLen * window + i] -
  934|   251k|                     spectrumR[windowLen * window + i]) >>
  935|   251k|                    1;
  936|   251k|              }
  937|  26.3k|            }
  938|  61.7k|          }
  939|       |
  940|   158k|        } /* for ( band=0; band<max_sfb_ste; band++ ) */
  941|       |        /* Clean until the end */
  942|   168k|        for (int i = pScaleFactorBandOffsets[max_sfb_ste_outside];
  943|  26.9M|             i < windowLen; i++) {
  ------------------
  |  Branch (943:14): [True: 26.8M, False: 168k]
  ------------------
  944|  26.8M|          dmx_re[windowLen * window + i] = (FIXP_DBL)0;
  945|  26.8M|        }
  946|       |
  947|       |        /* 3. calculate MDST-portion corresponding to the current frame. */
  948|   168k|        if (cplxPredictionData->complex_coef == 1) {
  ------------------
  |  Branch (948:13): [True: 157k, False: 10.7k]
  ------------------
  949|   157k|          {
  950|       |            /* 3.1 move pointer in filter-coefficient table in case of short
  951|       |             * window sequence */
  952|       |            /*     (other coefficients are utilized for the last 7 short
  953|       |             * windows)            */
  954|   157k|            if ((pAacDecoderChannelInfo[L]->icsInfo.WindowSequence ==
  ------------------
  |  Branch (954:17): [True: 143k, False: 13.3k]
  ------------------
  955|   157k|                 BLOCK_SHORT) &&
  956|   143k|                (window != 0)) {
  ------------------
  |  Branch (956:17): [True: 125k, False: 17.9k]
  ------------------
  957|   125k|              pCoeff = mdst_filt_coef_curr[currentShape];
  958|   125k|              pCoeffPrev = mdst_filt_coef_prev[currentShape];
  959|   125k|            }
  960|       |
  961|       |            /* The length of the filter processing must be extended because of
  962|       |             * filter boundary problems */
  963|   157k|            int extended_band = fMin(
  964|   157k|                pScaleFactorBandOffsets[max_sfb_ste_outside] + 7, windowLen);
  965|       |
  966|       |            /* 3.2. estimate downmix MDST from current frame downmix MDCT */
  967|   157k|            if ((pAacDecoderChannelInfo[L]->icsInfo.WindowSequence ==
  ------------------
  |  Branch (967:17): [True: 143k, False: 13.3k]
  ------------------
  968|   157k|                 BLOCK_SHORT) &&
  969|   143k|                (window != 0)) {
  ------------------
  |  Branch (969:17): [True: 125k, False: 17.9k]
  ------------------
  970|   125k|              CJointStereo_filterAndAdd(&dmx_re[windowLen * window],
  971|   125k|                                        extended_band, windowLen, pCoeff,
  972|   125k|                                        &dmx_im[windowLen * window], 1);
  973|       |
  974|   125k|              CJointStereo_filterAndAdd(&dmx_re[windowLen * (window - 1)],
  975|   125k|                                        extended_band, windowLen, pCoeffPrev,
  976|   125k|                                        &dmx_im[windowLen * window], 0);
  977|   125k|            } else {
  978|  31.3k|              CJointStereo_filterAndAdd(dmx_re, extended_band, windowLen,
  979|  31.3k|                                        pCoeff, dmx_im, 1);
  980|       |
  981|  31.3k|              if (cplxPredictionData->use_prev_frame == 1) {
  ------------------
  |  Branch (981:19): [True: 855, False: 30.4k]
  ------------------
  982|    855|                CJointStereo_filterAndAdd(dmx_re_prev, extended_band, windowLen,
  983|    855|                                          pCoeffPrev,
  984|    855|                                          &dmx_im[windowLen * window], 0);
  985|    855|              }
  986|  31.3k|            }
  987|       |
  988|   157k|          } /* if(pAacDecoderChannelInfo[L]->transform_splitting_active) */
  989|   157k|        }   /* if ( pJointStereoData->complex_coef == 1 ) */
  990|       |
  991|       |        /* 4. upmix process */
  992|   168k|        LONG pred_dir = cplxPredictionData->pred_dir ? -1 : 1;
  ------------------
  |  |  181|   168k|#define LONG INT
  ------------------
  |  Branch (992:25): [True: 154k, False: 13.4k]
  ------------------
  993|       |        /* 0.1 in Q-3.34 */
  994|   168k|        const FIXP_DBL pointOne = 0x66666666; /* 0.8 */
  995|       |        /* Shift value for the downmix */
  996|   168k|        const INT shift_dmx = SF_FNA_COEFFS + 1;
  ------------------
  |  |  218|   168k|  1 /* Compile-time prescaler for MDST-filter coefficients. */
  ------------------
  997|       |
  998|   326k|        for (band = 0; band < max_sfb_ste_outside; band++) {
  ------------------
  |  Branch (998:24): [True: 158k, False: 168k]
  ------------------
  999|   158k|          if (pJointStereoData->MsUsed[band] & groupMask) {
  ------------------
  |  Branch (999:15): [True: 96.5k, False: 61.7k]
  ------------------
 1000|  96.5k|            FIXP_SGL tempRe =
 1001|  96.5k|                (FIXP_SGL)cplxPredictionData->alpha_q_re[group][band];
 1002|  96.5k|            FIXP_SGL tempIm =
 1003|  96.5k|                (FIXP_SGL)cplxPredictionData->alpha_q_im[group][band];
 1004|       |
 1005|       |            /* Find the minimum common headroom for alpha_re and alpha_im */
 1006|  96.5k|            int alpha_re_headroom = CountLeadingBits((INT)tempRe) - 16;
  ------------------
  |  |  309|  96.5k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
 1007|  96.5k|            if (tempRe == (FIXP_SGL)0) alpha_re_headroom = 15;
  ------------------
  |  Branch (1007:17): [True: 54.8k, False: 41.7k]
  ------------------
 1008|  96.5k|            int alpha_im_headroom = CountLeadingBits((INT)tempIm) - 16;
  ------------------
  |  |  309|  96.5k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
 1009|  96.5k|            if (tempIm == (FIXP_SGL)0) alpha_im_headroom = 15;
  ------------------
  |  Branch (1009:17): [True: 54.7k, False: 41.8k]
  ------------------
 1010|  96.5k|            int val = fMin(alpha_re_headroom, alpha_im_headroom);
 1011|       |
 1012|       |            /* Multiply alpha by 0.1 with maximum precision */
 1013|  96.5k|            FDK_ASSERT(val >= 0);
  ------------------
  |  |  221|  96.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1013:13): [True: 96.5k, False: 0]
  ------------------
 1014|  96.5k|            FIXP_DBL alpha_re_tmp = fMult((FIXP_SGL)(tempRe << val), pointOne);
 1015|  96.5k|            FIXP_DBL alpha_im_tmp = fMult((FIXP_SGL)(tempIm << val), pointOne);
 1016|       |
 1017|       |            /* Calculate alpha exponent */
 1018|       |            /* (Q-3.34 * Q15.0) shifted left by "val" */
 1019|  96.5k|            int alpha_re_exp = -3 + 15 - val;
 1020|       |
 1021|  96.5k|            int help3_shift = alpha_re_exp + 1;
 1022|       |
 1023|  96.5k|            FIXP_DBL *p2CoeffL = &(
 1024|  96.5k|                spectrumL[windowLen * window + pScaleFactorBandOffsets[band]]);
 1025|  96.5k|            FIXP_DBL *p2CoeffR = &(
 1026|  96.5k|                spectrumR[windowLen * window + pScaleFactorBandOffsets[band]]);
 1027|  96.5k|            FIXP_DBL *p2dmxIm =
 1028|  96.5k|                &(dmx_im[windowLen * window + pScaleFactorBandOffsets[band]]);
 1029|  96.5k|            FIXP_DBL *p2dmxRe =
 1030|  96.5k|                &(dmx_re[windowLen * window + pScaleFactorBandOffsets[band]]);
 1031|       |
 1032|  96.5k|            for (int i = pScaleFactorBandOffsets[band];
 1033|   854k|                 i < pScaleFactorBandOffsets[band + 1]; i++) {
  ------------------
  |  Branch (1033:18): [True: 757k, False: 96.5k]
  ------------------
 1034|       |              /* Calculating helper term:
 1035|       |                    side = specR[i] - alpha_re[i] * dmx_re[i] - alpha_im[i] *
 1036|       |                dmx_im[i];
 1037|       |
 1038|       |                Here "dmx_re" may be the same as "specL" or alternatively keep
 1039|       |                the downmix. "dmx_re" and "specL" are two different pointers
 1040|       |                pointing to separate arrays, which may or may not contain the
 1041|       |                same data (with different scaling).
 1042|       |
 1043|       |                specL[i] =   + (specL[i] + side);
 1044|       |                specR[i] = -/+ (specL[i] - side);
 1045|       |              */
 1046|   757k|              FIXP_DBL side, left, right;
 1047|       |
 1048|   757k|              side = fMultAddDiv2(fMultDiv2(alpha_re_tmp, *p2dmxRe++),
 1049|   757k|                                  alpha_im_tmp, (*p2dmxIm++) << shift_dmx);
 1050|   757k|              side = ((*p2CoeffR) >> 2) -
 1051|   757k|                     (FIXP_DBL)SATURATE_SHIFT(side, -(help3_shift - 2),
  ------------------
  |  |  260|   757k|  (((scale) < 0) ? SATURATE_LEFT_SHIFT((src), -(scale), (dBits)) \
  |  |  ------------------
  |  |  |  |  251|  83.0k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (251:4): [True: 692, False: 82.3k]
  |  |  |  |  ------------------
  |  |  |  |  252|  83.0k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  |  |  253|  83.0k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (253:10): [True: 804, False: 81.5k]
  |  |  |  |  ------------------
  |  |  |  |  254|  82.3k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  |  |  255|  82.3k|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  |  |  |  Branch (260:4): [True: 83.0k, False: 674k]
  |  |  ------------------
  |  |  261|   757k|                 : SATURATE_RIGHT_SHIFT((src), (scale), (dBits)))
  |  |  ------------------
  |  |  |  |  242|   674k|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (242:4): [True: 0, False: 674k]
  |  |  |  |  ------------------
  |  |  |  |  243|   674k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  |  |  244|   674k|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:10): [True: 0, False: 674k]
  |  |  |  |  ------------------
  |  |  |  |  245|   674k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  |  |  246|   674k|             : ((LONG)(src) >> (scale)))
  |  |  ------------------
  ------------------
 1052|   757k|                                              DFRACT_BITS - 2);
 1053|       |
 1054|   757k|              left = ((*p2CoeffL) >> 2) + side;
 1055|   757k|              right = ((*p2CoeffL) >> 2) - side;
 1056|   757k|              right = (FIXP_DBL)((LONG)right * pred_dir);
 1057|       |
 1058|   757k|              *p2CoeffL++ = SATURATE_LEFT_SHIFT_ALT(left, 2, DFRACT_BITS);
  ------------------
  |  |  270|   757k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  ------------------
  |  |  |  Branch (270:4): [True: 411, False: 757k]
  |  |  ------------------
  |  |  271|   757k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  272|   757k|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (272:10): [True: 556, False: 756k]
  |  |  ------------------
  |  |  273|   757k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  274|   757k|             : ((LONG)(src) << (scale)))
  ------------------
 1059|   757k|              *p2CoeffR++ = SATURATE_LEFT_SHIFT_ALT(right, 2, DFRACT_BITS);
  ------------------
  |  |  270|   757k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  ------------------
  |  |  |  Branch (270:4): [True: 876, False: 756k]
  |  |  ------------------
  |  |  271|   757k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  272|   757k|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (272:10): [True: 827, False: 756k]
  |  |  ------------------
  |  |  273|   756k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  274|   756k|             : ((LONG)(src) << (scale)))
  ------------------
 1060|   757k|            }
 1061|  96.5k|          }
 1062|       |
 1063|   158k|        } /* for ( band=0; band < max_sfb_ste; band++ ) */
 1064|   168k|      }   /* for ( groupwin=0; groupwin<pWindowGroupLength[group]; groupwin++,
 1065|       |             window++ ) */
 1066|       |
 1067|   145k|    } /* for ( window = 0, group = 0; group < windowGroups; group++ ) */
 1068|       |
 1069|       |    /* free scratch buffer */
 1070|  36.5k|    C_AALLOC_SCRATCH_END(dmx_im, FIXP_DBL, 1024);
  ------------------
  |  |  327|  36.5k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
 1071|       |
 1072|   107k|  } else {
 1073|       |    /* MS stereo */
 1074|       |
 1075|   332k|    for (window = 0, group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (1075:33): [True: 225k, False: 107k]
  ------------------
 1076|   225k|      groupMask = 1 << group;
 1077|       |
 1078|   519k|      for (int groupwin = 0; groupwin < pWindowGroupLength[group];
  ------------------
  |  Branch (1078:30): [True: 294k, False: 225k]
  ------------------
 1079|   294k|           groupwin++, window++) {
 1080|   294k|        FIXP_DBL *leftSpectrum, *rightSpectrum;
 1081|   294k|        SHORT *leftScale = &SFBleftScale[window * 16];
 1082|   294k|        SHORT *rightScale = &SFBrightScale[window * 16];
 1083|       |
 1084|   294k|        leftSpectrum =
 1085|   294k|            SPEC(spectrumL, window, pAacDecoderChannelInfo[L]->granuleLength);
  ------------------
  |  |  115|   294k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
 1086|   294k|        rightSpectrum =
 1087|   294k|            SPEC(spectrumR, window, pAacDecoderChannelInfo[R]->granuleLength);
  ------------------
  |  |  115|   294k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
 1088|       |
 1089|   833k|        for (band = 0; band < max_sfb_ste_outside; band++) {
  ------------------
  |  Branch (1089:24): [True: 539k, False: 294k]
  ------------------
 1090|   539k|          if (pJointStereoData->MsUsed[band] & groupMask) {
  ------------------
  |  Branch (1090:15): [True: 127k, False: 411k]
  ------------------
 1091|   127k|            int lScale = leftScale[band];
 1092|   127k|            int rScale = rightScale[band];
 1093|   127k|            int commonScale = lScale > rScale ? lScale : rScale;
  ------------------
  |  Branch (1093:31): [True: 50.0k, False: 77.8k]
  ------------------
 1094|   127k|            unsigned int offsetCurrBand, offsetNextBand;
 1095|       |
 1096|       |            /* ISO/IEC 14496-3 Chapter 4.6.8.1.1 :
 1097|       |               M/S joint channel coding can only be used if common_window is 1.
 1098|       |             */
 1099|   127k|            FDK_ASSERT(GetWindowSequence(&pAacDecoderChannelInfo[L]->icsInfo) ==
  ------------------
  |  |  221|   127k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1099:13): [True: 127k, False: 0]
  ------------------
 1100|   127k|                       GetWindowSequence(&pAacDecoderChannelInfo[R]->icsInfo));
 1101|   127k|            FDK_ASSERT(GetWindowShape(&pAacDecoderChannelInfo[L]->icsInfo) ==
  ------------------
  |  |  221|   127k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1101:13): [True: 127k, False: 0]
  ------------------
 1102|   127k|                       GetWindowShape(&pAacDecoderChannelInfo[R]->icsInfo));
 1103|       |
 1104|   127k|            commonScale++;
 1105|   127k|            leftScale[band] = commonScale;
 1106|   127k|            rightScale[band] = commonScale;
 1107|       |
 1108|   127k|            lScale = fMin(DFRACT_BITS - 1, commonScale - lScale);
  ------------------
  |  |  113|   127k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1109|   127k|            rScale = fMin(DFRACT_BITS - 1, commonScale - rScale);
  ------------------
  |  |  113|   127k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1110|       |
 1111|   127k|            FDK_ASSERT(lScale >= 0 && rScale >= 0);
  ------------------
  |  |  221|   127k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1111:13): [True: 127k, False: 0]
  |  Branch (1111:13): [True: 127k, False: 0]
  |  Branch (1111:13): [True: 127k, False: 0]
  ------------------
 1112|       |
 1113|   127k|            offsetCurrBand = pScaleFactorBandOffsets[band];
 1114|   127k|            offsetNextBand = pScaleFactorBandOffsets[band + 1];
 1115|       |
 1116|   127k|            CJointStereo_GenerateMSOutput(&(leftSpectrum[offsetCurrBand]),
 1117|   127k|                                          &(rightSpectrum[offsetCurrBand]),
 1118|   127k|                                          lScale, rScale,
 1119|   127k|                                          offsetNextBand - offsetCurrBand);
 1120|   127k|          }
 1121|   539k|        }
 1122|   294k|        if (scaleFactorBandsTransmittedL > scaleFactorBandsTransmitted) {
  ------------------
  |  Branch (1122:13): [True: 535, False: 293k]
  ------------------
 1123|    535|          for (; band < scaleFactorBandsTransmittedL; band++) {
  ------------------
  |  Branch (1123:18): [True: 0, False: 535]
  ------------------
 1124|      0|            if (pJointStereoData->MsUsed[band] & groupMask) {
  ------------------
  |  Branch (1124:17): [True: 0, False: 0]
  ------------------
 1125|      0|              rightScale[band] = leftScale[band];
 1126|       |
 1127|      0|              for (int index = pScaleFactorBandOffsets[band];
 1128|      0|                   index < pScaleFactorBandOffsets[band + 1]; index++) {
  ------------------
  |  Branch (1128:20): [True: 0, False: 0]
  ------------------
 1129|      0|                FIXP_DBL leftCoefficient = leftSpectrum[index];
 1130|       |                /* FIXP_DBL rightCoefficient = (FIXP_DBL)0; */
 1131|      0|                rightSpectrum[index] = leftCoefficient;
 1132|      0|              }
 1133|      0|            }
 1134|      0|          }
 1135|   293k|        } else if (scaleFactorBandsTransmittedR > scaleFactorBandsTransmitted) {
  ------------------
  |  Branch (1135:20): [True: 2.96k, False: 290k]
  ------------------
 1136|  2.96k|          for (; band < scaleFactorBandsTransmittedR; band++) {
  ------------------
  |  Branch (1136:18): [True: 0, False: 2.96k]
  ------------------
 1137|      0|            if (pJointStereoData->MsUsed[band] & groupMask) {
  ------------------
  |  Branch (1137:17): [True: 0, False: 0]
  ------------------
 1138|      0|              leftScale[band] = rightScale[band];
 1139|       |
 1140|      0|              for (int index = pScaleFactorBandOffsets[band];
 1141|      0|                   index < pScaleFactorBandOffsets[band + 1]; index++) {
  ------------------
  |  Branch (1141:20): [True: 0, False: 0]
  ------------------
 1142|       |                /* FIXP_DBL leftCoefficient  = (FIXP_DBL)0; */
 1143|      0|                FIXP_DBL rightCoefficient = rightSpectrum[index];
 1144|       |
 1145|      0|                leftSpectrum[index] = rightCoefficient;
 1146|      0|                rightSpectrum[index] = -rightCoefficient;
 1147|      0|              }
 1148|      0|            }
 1149|      0|          }
 1150|  2.96k|        }
 1151|   294k|      }
 1152|   225k|    }
 1153|       |
 1154|       |    /* Reset MsUsed flags if no explicit signalling was transmitted. Necessary
 1155|       |       for intensity coding. PNS correlation signalling was mapped before
 1156|       |       calling CJointStereo_ApplyMS(). */
 1157|   107k|    if (pJointStereoData->MsMaskPresent == 2) {
  ------------------
  |  Branch (1157:9): [True: 24.2k, False: 83.4k]
  ------------------
 1158|  24.2k|      FDKmemclear(pJointStereoData->MsUsed,
 1159|  24.2k|                  JointStereoMaximumBands * sizeof(UCHAR));
 1160|  24.2k|    }
 1161|   107k|  }
 1162|   144k|}
_Z20CJointStereo_ApplyISPP22CAacDecoderChannelInfoPKsPKhii:
 1168|  99.4k|                          const int scaleFactorBandsTransmitted) {
 1169|  99.4k|  CJointStereoData *pJointStereoData =
 1170|  99.4k|      &pAacDecoderChannelInfo[L]->pComData->jointStereoData;
 1171|       |
 1172|   305k|  for (int window = 0, group = 0; group < windowGroups; group++) {
  ------------------
  |  Branch (1172:35): [True: 205k, False: 99.4k]
  ------------------
 1173|   205k|    UCHAR *CodeBook;
 1174|   205k|    SHORT *ScaleFactor;
 1175|   205k|    UCHAR groupMask = 1 << group;
 1176|       |
 1177|   205k|    CodeBook = &pAacDecoderChannelInfo[R]->pDynData->aCodeBook[group * 16];
 1178|   205k|    ScaleFactor =
 1179|   205k|        &pAacDecoderChannelInfo[R]->pDynData->aScaleFactor[group * 16];
 1180|       |
 1181|   477k|    for (int groupwin = 0; groupwin < pWindowGroupLength[group];
  ------------------
  |  Branch (1181:28): [True: 272k, False: 205k]
  ------------------
 1182|   272k|         groupwin++, window++) {
 1183|   272k|      FIXP_DBL *leftSpectrum, *rightSpectrum;
 1184|   272k|      SHORT *leftScale =
 1185|   272k|          &pAacDecoderChannelInfo[L]->pDynData->aSfbScale[window * 16];
 1186|   272k|      SHORT *rightScale =
 1187|   272k|          &pAacDecoderChannelInfo[R]->pDynData->aSfbScale[window * 16];
 1188|   272k|      int band;
 1189|       |
 1190|   272k|      leftSpectrum = SPEC(pAacDecoderChannelInfo[L]->pSpectralCoefficient,
  ------------------
  |  |  115|   272k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
 1191|   272k|                          window, pAacDecoderChannelInfo[L]->granuleLength);
 1192|   272k|      rightSpectrum = SPEC(pAacDecoderChannelInfo[R]->pSpectralCoefficient,
  ------------------
  |  |  115|   272k|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
 1193|   272k|                           window, pAacDecoderChannelInfo[R]->granuleLength);
 1194|       |
 1195|   766k|      for (band = 0; band < scaleFactorBandsTransmitted; band++) {
  ------------------
  |  Branch (1195:22): [True: 494k, False: 272k]
  ------------------
 1196|   494k|        if ((CodeBook[band] == INTENSITY_HCB) ||
  ------------------
  |  Branch (1196:13): [True: 33.9k, False: 460k]
  ------------------
 1197|   460k|            (CodeBook[band] == INTENSITY_HCB2)) {
  ------------------
  |  Branch (1197:13): [True: 35.1k, False: 425k]
  ------------------
 1198|  69.0k|          int bandScale = -(ScaleFactor[band] + 100);
 1199|       |
 1200|  69.0k|          int msb = bandScale >> 2;
 1201|  69.0k|          int lsb = bandScale & 0x03;
 1202|       |
 1203|       |          /* exponent of MantissaTable[lsb][0] is 1, thus msb+1 below. */
 1204|  69.0k|          FIXP_DBL scale = MantissaTable[lsb][0];
 1205|       |
 1206|       |          /* ISO/IEC 14496-3 Chapter 4.6.8.2.3 :
 1207|       |             The use of intensity stereo coding is signaled by the use of the
 1208|       |             pseudo codebooks INTENSITY_HCB and INTENSITY_HCB2 (15 and 14) only
 1209|       |             in the right channel of a channel_pair_element() having a common
 1210|       |             ics_info() (common_window == 1). */
 1211|  69.0k|          FDK_ASSERT(GetWindowSequence(&pAacDecoderChannelInfo[L]->icsInfo) ==
  ------------------
  |  |  221|  69.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1211:11): [True: 69.0k, False: 0]
  ------------------
 1212|  69.0k|                     GetWindowSequence(&pAacDecoderChannelInfo[R]->icsInfo));
 1213|  69.0k|          FDK_ASSERT(GetWindowShape(&pAacDecoderChannelInfo[L]->icsInfo) ==
  ------------------
  |  |  221|  69.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1213:11): [True: 69.0k, False: 0]
  ------------------
 1214|  69.0k|                     GetWindowShape(&pAacDecoderChannelInfo[R]->icsInfo));
 1215|       |
 1216|  69.0k|          rightScale[band] = leftScale[band] + msb + 1;
 1217|       |
 1218|  69.0k|          if (pJointStereoData->MsUsed[band] & groupMask) {
  ------------------
  |  Branch (1218:15): [True: 22.4k, False: 46.6k]
  ------------------
 1219|  22.4k|            if (CodeBook[band] == INTENSITY_HCB) /* _NOT_ in-phase */
  ------------------
  |  Branch (1219:17): [True: 6.73k, False: 15.7k]
  ------------------
 1220|  6.73k|            {
 1221|  6.73k|              scale = -scale;
 1222|  6.73k|            }
 1223|  46.6k|          } else {
 1224|  46.6k|            if (CodeBook[band] == INTENSITY_HCB2) /* out-of-phase */
  ------------------
  |  Branch (1224:17): [True: 19.3k, False: 27.2k]
  ------------------
 1225|  19.3k|            {
 1226|  19.3k|              scale = -scale;
 1227|  19.3k|            }
 1228|  46.6k|          }
 1229|       |
 1230|  69.0k|          for (int index = pScaleFactorBandOffsets[band];
 1231|   409k|               index < pScaleFactorBandOffsets[band + 1]; index++) {
  ------------------
  |  Branch (1231:16): [True: 340k, False: 69.0k]
  ------------------
 1232|   340k|            rightSpectrum[index] = fMult(leftSpectrum[index], scale);
 1233|   340k|          }
 1234|  69.0k|        }
 1235|   494k|      }
 1236|   272k|    }
 1237|   205k|  }
 1238|  99.4k|}
stereo.cpp:_ZL25CJointStereo_filterAndAddPiiiPKiS_h:
  359|   284k|) {
  360|   284k|  int i, j;
  361|       |
  362|   284k|  int indices_1[] = {2, 1, 0, 1, 2, 3};
  363|   284k|  int indices_2[] = {1, 0, 0, 2, 3, 4};
  364|   284k|  int indices_3[] = {0, 0, 1, 3, 4, 5};
  365|       |
  366|   284k|  int subtr_1[] = {6, 5, 4, 2, 1, 1};
  367|   284k|  int subtr_2[] = {5, 4, 3, 1, 1, 2};
  368|   284k|  int subtr_3[] = {4, 3, 2, 1, 2, 3};
  369|       |
  370|   284k|  if (isCurrent == 1) {
  ------------------
  |  Branch (370:7): [True: 157k, False: 126k]
  ------------------
  371|       |    /* exploit the symmetry of the table: coeff[6] = - coeff[0],
  372|       |                                          coeff[5] = - coeff[1],
  373|       |                                          coeff[4] = - coeff[2],
  374|       |                                          coeff[3] = 0
  375|       |    */
  376|       |
  377|   629k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (377:17): [True: 471k, False: 157k]
  ------------------
  378|   471k|      out[0] -= (FIXP_DBL)fMultDiv2(coeff[i], in[indices_1[i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  379|   471k|      out[0] +=
  380|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[indices_1[5 - i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  381|   471k|    }
  382|       |
  383|   629k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (383:17): [True: 471k, False: 157k]
  ------------------
  384|   471k|      out[1] -= (FIXP_DBL)fMultDiv2(coeff[i], in[indices_2[i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  385|   471k|      out[1] +=
  386|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[indices_2[5 - i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  387|   471k|    }
  388|       |
  389|   629k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (389:17): [True: 471k, False: 157k]
  ------------------
  390|   471k|      out[2] -= (FIXP_DBL)fMultDiv2(coeff[i], in[indices_3[i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  391|   471k|      out[2] +=
  392|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[indices_3[5 - i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  393|   471k|    }
  394|       |
  395|  1.13M|    for (j = 3; j < (len - 3); j++) {
  ------------------
  |  Branch (395:17): [True: 981k, False: 157k]
  ------------------
  396|  3.92M|      for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (396:19): [True: 2.94M, False: 981k]
  ------------------
  397|  2.94M|        out[j] -= (FIXP_DBL)fMultDiv2(coeff[i], in[j - 3 + i]) >> SR_FNA_OUT;
  ------------------
  |  |  113|  2.94M|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  398|  2.94M|        out[j] += (FIXP_DBL)fMultDiv2(coeff[i], in[j + 3 - i]) >> SR_FNA_OUT;
  ------------------
  |  |  113|  2.94M|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  399|  2.94M|      }
  400|   981k|    }
  401|       |
  402|   629k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (402:17): [True: 471k, False: 157k]
  ------------------
  403|   471k|      out[len - 3] -=
  404|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_1[i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  405|   471k|      out[len - 3] +=
  406|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_1[5 - i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  407|   471k|    }
  408|       |
  409|   629k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (409:17): [True: 471k, False: 157k]
  ------------------
  410|   471k|      out[len - 2] -=
  411|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_2[i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  412|   471k|      out[len - 2] +=
  413|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_2[5 - i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  414|   471k|    }
  415|       |
  416|   629k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (416:17): [True: 471k, False: 157k]
  ------------------
  417|   471k|      out[len - 1] -=
  418|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_3[i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  419|   471k|      out[len - 1] +=
  420|   471k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_3[5 - i]]) >> SR_FNA_OUT;
  ------------------
  |  |  113|   471k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  421|   471k|    }
  422|       |
  423|   157k|  } else {
  424|       |    /* exploit the symmetry of the table: coeff[6] = coeff[0],
  425|       |                                          coeff[5] = coeff[1],
  426|       |                                          coeff[4] = coeff[2]
  427|       |    */
  428|       |
  429|   507k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (429:17): [True: 380k, False: 126k]
  ------------------
  430|   380k|      out[0] -= (FIXP_DBL)fMultDiv2(coeff[i], in[indices_1[i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  431|   380k|      out[0] -=
  432|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[indices_1[5 - i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  433|   380k|    }
  434|   126k|    out[0] -= (FIXP_DBL)fMultDiv2(coeff[3], in[0] >> SR_FNA_OUT);
  ------------------
  |  |  113|   126k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  435|       |
  436|   507k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (436:17): [True: 380k, False: 126k]
  ------------------
  437|   380k|      out[1] += (FIXP_DBL)fMultDiv2(coeff[i], in[indices_2[i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  438|   380k|      out[1] +=
  439|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[indices_2[5 - i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  440|   380k|    }
  441|   126k|    out[1] += (FIXP_DBL)fMultDiv2(coeff[3], in[1] >> SR_FNA_OUT);
  ------------------
  |  |  113|   126k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  442|       |
  443|   507k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (443:17): [True: 380k, False: 126k]
  ------------------
  444|   380k|      out[2] -= (FIXP_DBL)fMultDiv2(coeff[i], in[indices_3[i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  445|   380k|      out[2] -=
  446|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[indices_3[5 - i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  447|   380k|    }
  448|   126k|    out[2] -= (FIXP_DBL)fMultDiv2(coeff[3], in[2] >> SR_FNA_OUT);
  ------------------
  |  |  113|   126k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  449|       |
  450|   271k|    for (j = 3; j < (len - 4); j++) {
  ------------------
  |  Branch (450:17): [True: 145k, False: 126k]
  ------------------
  451|   580k|      for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (451:19): [True: 435k, False: 145k]
  ------------------
  452|   435k|        out[j] += (FIXP_DBL)fMultDiv2(coeff[i], in[j - 3 + i] >> SR_FNA_OUT);
  ------------------
  |  |  113|   435k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  453|   435k|        out[j] += (FIXP_DBL)fMultDiv2(coeff[i], in[j + 3 - i] >> SR_FNA_OUT);
  ------------------
  |  |  113|   435k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  454|   435k|      }
  455|   145k|      out[j] += (FIXP_DBL)fMultDiv2(coeff[3], in[j] >> SR_FNA_OUT);
  ------------------
  |  |  113|   145k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  456|       |
  457|   145k|      j++;
  458|       |
  459|   580k|      for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (459:19): [True: 435k, False: 145k]
  ------------------
  460|   435k|        out[j] -= (FIXP_DBL)fMultDiv2(coeff[i], in[j - 3 + i] >> SR_FNA_OUT);
  ------------------
  |  |  113|   435k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  461|   435k|        out[j] -= (FIXP_DBL)fMultDiv2(coeff[i], in[j + 3 - i] >> SR_FNA_OUT);
  ------------------
  |  |  113|   435k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  462|   435k|      }
  463|   145k|      out[j] -= (FIXP_DBL)fMultDiv2(coeff[3], in[j] >> SR_FNA_OUT);
  ------------------
  |  |  113|   145k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  464|   145k|    }
  465|       |
  466|   507k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (466:17): [True: 380k, False: 126k]
  ------------------
  467|   380k|      out[len - 3] +=
  468|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_1[i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  469|   380k|      out[len - 3] +=
  470|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_1[5 - i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  471|   380k|    }
  472|   126k|    out[len - 3] += (FIXP_DBL)fMultDiv2(coeff[3], in[len - 3] >> SR_FNA_OUT);
  ------------------
  |  |  113|   126k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  473|       |
  474|   507k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (474:17): [True: 380k, False: 126k]
  ------------------
  475|   380k|      out[len - 2] -=
  476|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_2[i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  477|   380k|      out[len - 2] -=
  478|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_2[5 - i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  479|   380k|    }
  480|   126k|    out[len - 2] -= (FIXP_DBL)fMultDiv2(coeff[3], in[len - 2] >> SR_FNA_OUT);
  ------------------
  |  |  113|   126k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  481|       |
  482|   507k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (482:17): [True: 380k, False: 126k]
  ------------------
  483|   380k|      out[len - 1] +=
  484|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_3[i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  485|   380k|      out[len - 1] +=
  486|   380k|          (FIXP_DBL)fMultDiv2(coeff[i], in[len - subtr_3[5 - i]] >> SR_FNA_OUT);
  ------------------
  |  |  113|   380k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  487|   380k|    }
  488|   126k|    out[len - 1] += (FIXP_DBL)fMultDiv2(coeff[3], in[len - 1] >> SR_FNA_OUT);
  ------------------
  |  |  113|   126k|  0 /* Additional scaling of the CJointStereo_filterAndAdd()-output to avoid \
  ------------------
  489|   126k|  }
  490|   284k|}
stereo.cpp:_ZL29CJointStereo_GenerateMSOutputPiS_jjj:
  496|   127k|                                                 UINT nSfbBands) {
  497|   127k|  unsigned int i;
  498|       |
  499|   127k|  FIXP_DBL leftCoefficient0;
  500|   127k|  FIXP_DBL leftCoefficient1;
  501|   127k|  FIXP_DBL leftCoefficient2;
  502|   127k|  FIXP_DBL leftCoefficient3;
  503|       |
  504|   127k|  FIXP_DBL rightCoefficient0;
  505|   127k|  FIXP_DBL rightCoefficient1;
  506|   127k|  FIXP_DBL rightCoefficient2;
  507|   127k|  FIXP_DBL rightCoefficient3;
  508|       |
  509|   313k|  for (i = nSfbBands; i > 0; i -= 4) {
  ------------------
  |  Branch (509:23): [True: 185k, False: 127k]
  ------------------
  510|   185k|    leftCoefficient0 = pSpecLCurrBand[i - 4];
  511|   185k|    leftCoefficient1 = pSpecLCurrBand[i - 3];
  512|   185k|    leftCoefficient2 = pSpecLCurrBand[i - 2];
  513|   185k|    leftCoefficient3 = pSpecLCurrBand[i - 1];
  514|       |
  515|   185k|    rightCoefficient0 = pSpecRCurrBand[i - 4];
  516|   185k|    rightCoefficient1 = pSpecRCurrBand[i - 3];
  517|   185k|    rightCoefficient2 = pSpecRCurrBand[i - 2];
  518|   185k|    rightCoefficient3 = pSpecRCurrBand[i - 1];
  519|       |
  520|       |    /* MS output generation */
  521|   185k|    leftCoefficient0 >>= leftScale;
  522|   185k|    leftCoefficient1 >>= leftScale;
  523|   185k|    leftCoefficient2 >>= leftScale;
  524|   185k|    leftCoefficient3 >>= leftScale;
  525|       |
  526|   185k|    rightCoefficient0 >>= rightScale;
  527|   185k|    rightCoefficient1 >>= rightScale;
  528|   185k|    rightCoefficient2 >>= rightScale;
  529|   185k|    rightCoefficient3 >>= rightScale;
  530|       |
  531|   185k|    pSpecLCurrBand[i - 4] = leftCoefficient0 + rightCoefficient0;
  532|   185k|    pSpecLCurrBand[i - 3] = leftCoefficient1 + rightCoefficient1;
  533|   185k|    pSpecLCurrBand[i - 2] = leftCoefficient2 + rightCoefficient2;
  534|   185k|    pSpecLCurrBand[i - 1] = leftCoefficient3 + rightCoefficient3;
  535|       |
  536|   185k|    pSpecRCurrBand[i - 4] = leftCoefficient0 - rightCoefficient0;
  537|   185k|    pSpecRCurrBand[i - 3] = leftCoefficient1 - rightCoefficient1;
  538|   185k|    pSpecRCurrBand[i - 2] = leftCoefficient2 - rightCoefficient2;
  539|   185k|    pSpecRCurrBand[i - 1] = leftCoefficient3 - rightCoefficient3;
  540|   185k|  }
  541|   127k|}

_Z19D_ACELP_decode_4t64PsiS_:
  356|   336k|void D_ACELP_decode_4t64(SHORT index[], int nbits, FIXP_COD code[]) {
  357|   336k|  LONG L_index;
  ------------------
  |  |  181|   336k|#define LONG INT
  ------------------
  358|   336k|  SHORT k, pos[6];
  359|       |
  360|   336k|  FDKmemclear(code, L_SUBFR * sizeof(FIXP_COD));
  ------------------
  |  |  105|   336k|#define L_SUBFR 64 /* Subframe size              */
  ------------------
  361|       |
  362|       |  /* decode the positions and signs of pulses and build the codeword */
  363|   336k|  switch (nbits) {
  364|  32.9k|    case 12:
  ------------------
  |  Branch (364:5): [True: 32.9k, False: 303k]
  ------------------
  365|  98.8k|      for (k = 0; k < 4; k += 2) {
  ------------------
  |  Branch (365:19): [True: 65.9k, False: 32.9k]
  ------------------
  366|  65.9k|        L_index = index[2 * (k / 2) + 1];
  367|  65.9k|        D_ACELP_decode_1p_N1(L_index, 4, 0, pos);
  368|  65.9k|        D_ACELP_add_pulse(pos, 1, 2 * (index[2 * (k / 2)]) + k / 2, code);
  369|  65.9k|      }
  370|  32.9k|      break;
  371|  85.8k|    case 16: {
  ------------------
  |  Branch (371:5): [True: 85.8k, False: 250k]
  ------------------
  372|  85.8k|      int i = 0;
  373|  85.8k|      int offset = index[i++];
  374|  85.8k|      offset = (offset == 0) ? 1 : 3;
  ------------------
  |  Branch (374:16): [True: 53.3k, False: 32.4k]
  ------------------
  375|   429k|      for (k = 0; k < 4; k++) {
  ------------------
  |  Branch (375:19): [True: 343k, False: 85.8k]
  ------------------
  376|   343k|        if (k != offset) {
  ------------------
  |  Branch (376:13): [True: 257k, False: 85.8k]
  ------------------
  377|   257k|          L_index = index[i++];
  378|   257k|          D_ACELP_decode_1p_N1(L_index, 4, 0, pos);
  379|   257k|          D_ACELP_add_pulse(pos, 1, k, code);
  380|   257k|        }
  381|   343k|      }
  382|  85.8k|    } break;
  383|   140k|    case 20:
  ------------------
  |  Branch (383:5): [True: 140k, False: 196k]
  ------------------
  384|   702k|      for (k = 0; k < 4; k++) {
  ------------------
  |  Branch (384:19): [True: 562k, False: 140k]
  ------------------
  385|   562k|        L_index = (LONG)index[k];
  386|   562k|        D_ACELP_decode_1p_N1(L_index, 4, 0, pos);
  387|   562k|        D_ACELP_add_pulse(pos, 1, k, code);
  388|   562k|      }
  389|   140k|      break;
  390|  13.2k|    case 28:
  ------------------
  |  Branch (390:5): [True: 13.2k, False: 323k]
  ------------------
  391|  39.8k|      for (k = 0; k < 4 - 2; k++) {
  ------------------
  |  Branch (391:19): [True: 26.5k, False: 13.2k]
  ------------------
  392|  26.5k|        L_index = (LONG)index[k];
  393|  26.5k|        D_ACELP_decode_2p_2N1(L_index, 4, 0, pos);
  394|  26.5k|        D_ACELP_add_pulse(pos, 2, k, code);
  395|  26.5k|      }
  396|  39.8k|      for (k = 2; k < 4; k++) {
  ------------------
  |  Branch (396:19): [True: 26.5k, False: 13.2k]
  ------------------
  397|  26.5k|        L_index = (LONG)index[k];
  398|  26.5k|        D_ACELP_decode_1p_N1(L_index, 4, 0, pos);
  399|  26.5k|        D_ACELP_add_pulse(pos, 1, k, code);
  400|  26.5k|      }
  401|  13.2k|      break;
  402|  13.7k|    case 36:
  ------------------
  |  Branch (402:5): [True: 13.7k, False: 323k]
  ------------------
  403|  68.6k|      for (k = 0; k < 4; k++) {
  ------------------
  |  Branch (403:19): [True: 54.9k, False: 13.7k]
  ------------------
  404|  54.9k|        L_index = (LONG)index[k];
  405|  54.9k|        D_ACELP_decode_2p_2N1(L_index, 4, 0, pos);
  406|  54.9k|        D_ACELP_add_pulse(pos, 2, k, code);
  407|  54.9k|      }
  408|  13.7k|      break;
  409|  9.62k|    case 44:
  ------------------
  |  Branch (409:5): [True: 9.62k, False: 327k]
  ------------------
  410|  28.8k|      for (k = 0; k < 4 - 2; k++) {
  ------------------
  |  Branch (410:19): [True: 19.2k, False: 9.62k]
  ------------------
  411|  19.2k|        L_index = (LONG)index[k];
  412|  19.2k|        D_ACELP_decode_3p_3N1(L_index, 4, 0, pos);
  413|  19.2k|        D_ACELP_add_pulse(pos, 3, k, code);
  414|  19.2k|      }
  415|  28.8k|      for (k = 2; k < 4; k++) {
  ------------------
  |  Branch (415:19): [True: 19.2k, False: 9.62k]
  ------------------
  416|  19.2k|        L_index = (LONG)index[k];
  417|  19.2k|        D_ACELP_decode_2p_2N1(L_index, 4, 0, pos);
  418|  19.2k|        D_ACELP_add_pulse(pos, 2, k, code);
  419|  19.2k|      }
  420|  9.62k|      break;
  421|  5.30k|    case 52:
  ------------------
  |  Branch (421:5): [True: 5.30k, False: 331k]
  ------------------
  422|  26.5k|      for (k = 0; k < 4; k++) {
  ------------------
  |  Branch (422:19): [True: 21.2k, False: 5.30k]
  ------------------
  423|  21.2k|        L_index = (LONG)index[k];
  424|  21.2k|        D_ACELP_decode_3p_3N1(L_index, 4, 0, pos);
  425|  21.2k|        D_ACELP_add_pulse(pos, 3, k, code);
  426|  21.2k|      }
  427|  5.30k|      break;
  428|  35.4k|    case 64:
  ------------------
  |  Branch (428:5): [True: 35.4k, False: 301k]
  ------------------
  429|   177k|      for (k = 0; k < 4; k++) {
  ------------------
  |  Branch (429:19): [True: 141k, False: 35.4k]
  ------------------
  430|   141k|        L_index = (((LONG)index[k] << 14) + (LONG)index[k + 4]);
  431|   141k|        D_ACELP_decode_4p_4N(L_index, 4, 0, pos);
  432|   141k|        D_ACELP_add_pulse(pos, 4, k, code);
  433|   141k|      }
  434|  35.4k|      break;
  435|      0|    default:
  ------------------
  |  Branch (435:5): [True: 0, False: 336k]
  ------------------
  436|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (436:7): [Folded, False: 0]
  ------------------
  437|   336k|  }
  438|   336k|  return;
  439|   336k|}
usacdec_ace_d4t64.cpp:_ZL20D_ACELP_decode_1p_N1issPs:
  152|  1.04M|                                 SHORT pos[]) {
  153|  1.04M|  SHORT pos1;
  154|  1.04M|  LONG i, mask;
  ------------------
  |  |  181|  1.04M|#define LONG INT
  ------------------
  155|       |
  156|  1.04M|  mask = ((1 << N) - 1);
  157|       |  /*
  158|       |   * Decode 1 pulse with N+1 bits
  159|       |   */
  160|  1.04M|  pos1 = (SHORT)((index & mask) + offset);
  161|  1.04M|  i = ((index >> N) & 1);
  162|  1.04M|  if (i == 1) {
  ------------------
  |  Branch (162:7): [True: 360k, False: 688k]
  ------------------
  163|   360k|    pos1 += 16;
  164|   360k|  }
  165|  1.04M|  pos[0] = pos1;
  166|  1.04M|  return;
  167|  1.04M|}
usacdec_ace_d4t64.cpp:_ZL17D_ACELP_add_pulsePsssS_:
  123|  1.19M|                              FIXP_COD code[]) {
  124|  1.19M|  SHORT i, k;
  125|  2.99M|  for (k = 0; k < nb_pulse; k++) {
  ------------------
  |  Branch (125:15): [True: 1.80M, False: 1.19M]
  ------------------
  126|       |    /* i = ((pos[k] & (16-1))*NB_TRACK) + track; */
  127|  1.80M|    i = ((pos[k] & (16 - 1)) << 2) + track;
  128|  1.80M|    if ((pos[k] & 16) == 0) {
  ------------------
  |  Branch (128:9): [True: 1.15M, False: 651k]
  ------------------
  129|  1.15M|      code[i] = code[i] + (FIXP_COD)(512 << (COD_BITS - FRACT_BITS));
  ------------------
  |  |  113|  1.15M|#define COD_BITS FRACT_BITS
  |  |  ------------------
  |  |  |  |  112|  1.15M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
                    code[i] = code[i] + (FIXP_COD)(512 << (COD_BITS - FRACT_BITS));
  ------------------
  |  |  112|  1.15M|#define FRACT_BITS 16  /* single precision */
  ------------------
  130|  1.15M|    } else {
  131|   651k|      code[i] = code[i] - (FIXP_COD)(512 << (COD_BITS - FRACT_BITS));
  ------------------
  |  |  113|   651k|#define COD_BITS FRACT_BITS
  |  |  ------------------
  |  |  |  |  112|   651k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
                    code[i] = code[i] - (FIXP_COD)(512 << (COD_BITS - FRACT_BITS));
  ------------------
  |  |  112|   651k|#define FRACT_BITS 16  /* single precision */
  ------------------
  132|   651k|    }
  133|  1.80M|  }
  134|  1.19M|  return;
  135|  1.19M|}
usacdec_ace_d4t64.cpp:_ZL21D_ACELP_decode_2p_2N1issPs:
  184|   376k|                                  SHORT pos[]) {
  185|   376k|  SHORT pos1, pos2;
  186|   376k|  LONG mask, i;
  ------------------
  |  |  181|   376k|#define LONG INT
  ------------------
  187|   376k|  mask = ((1 << N) - 1);
  188|       |  /*
  189|       |   * Decode 2 pulses with 2*N+1 bits
  190|       |   */
  191|   376k|  pos1 = (SHORT)(((index >> N) & mask) + offset);
  192|   376k|  i = (index >> (2 * N)) & 1;
  193|   376k|  pos2 = (SHORT)((index & mask) + offset);
  194|   376k|  if ((pos2 - pos1) < 0) {
  ------------------
  |  Branch (194:7): [True: 119k, False: 257k]
  ------------------
  195|   119k|    if (i == 1) {
  ------------------
  |  Branch (195:9): [True: 54.2k, False: 65.0k]
  ------------------
  196|  54.2k|      pos1 += 16;
  197|  65.0k|    } else {
  198|  65.0k|      pos2 += 16;
  199|  65.0k|    }
  200|   257k|  } else {
  201|   257k|    if (i == 1) {
  ------------------
  |  Branch (201:9): [True: 85.9k, False: 171k]
  ------------------
  202|  85.9k|      pos1 += 16;
  203|  85.9k|      pos2 += 16;
  204|  85.9k|    }
  205|   257k|  }
  206|   376k|  pos[0] = pos1;
  207|   376k|  pos[1] = pos2;
  208|   376k|  return;
  209|   376k|}
usacdec_ace_d4t64.cpp:_ZL21D_ACELP_decode_3p_3N1issPs:
  226|  88.4k|                                  SHORT pos[]) {
  227|  88.4k|  SHORT j;
  228|  88.4k|  LONG mask, idx;
  ------------------
  |  |  181|  88.4k|#define LONG INT
  ------------------
  229|       |
  230|       |  /*
  231|       |   * Decode 3 pulses with 3*N+1 bits
  232|       |   */
  233|  88.4k|  mask = ((1 << ((2 * N) - 1)) - 1);
  234|  88.4k|  idx = index & mask;
  235|  88.4k|  j = offset;
  236|  88.4k|  if (((index >> ((2 * N) - 1)) & 1) == 1) {
  ------------------
  |  Branch (236:7): [True: 39.5k, False: 48.9k]
  ------------------
  237|  39.5k|    j += (1 << (N - 1));
  238|  39.5k|  }
  239|  88.4k|  D_ACELP_decode_2p_2N1(idx, N - 1, j, pos);
  240|  88.4k|  mask = ((1 << (N + 1)) - 1);
  241|  88.4k|  idx = (index >> (2 * N)) & mask;
  242|  88.4k|  D_ACELP_decode_1p_N1(idx, N, offset, pos + 2);
  243|  88.4k|  return;
  244|  88.4k|}
usacdec_ace_d4t64.cpp:_ZL20D_ACELP_decode_4p_4NissPs:
  295|   141k|                                 SHORT pos[]) {
  296|   141k|  SHORT j, n_1;
  297|       |  /*
  298|       |   * Decode 4 pulses with 4*N bits
  299|       |   */
  300|   141k|  n_1 = N - 1;
  301|   141k|  j = offset + (1 << n_1);
  302|   141k|  switch ((index >> ((4 * N) - 2)) & 3) {
  ------------------
  |  Branch (302:11): [True: 141k, False: 0]
  ------------------
  303|  68.7k|    case 0:
  ------------------
  |  Branch (303:5): [True: 68.7k, False: 73.1k]
  ------------------
  304|  68.7k|      if (((index >> ((4 * n_1) + 1)) & 1) == 0) {
  ------------------
  |  Branch (304:11): [True: 46.8k, False: 21.8k]
  ------------------
  305|  46.8k|        D_ACELP_decode_4p_4N1(index, n_1, offset, pos);
  306|  46.8k|      } else {
  307|  21.8k|        D_ACELP_decode_4p_4N1(index, n_1, j, pos);
  308|  21.8k|      }
  309|  68.7k|      break;
  310|  26.5k|    case 1:
  ------------------
  |  Branch (310:5): [True: 26.5k, False: 115k]
  ------------------
  311|  26.5k|      D_ACELP_decode_1p_N1((index >> ((3 * n_1) + 1)), n_1, offset, pos);
  312|  26.5k|      D_ACELP_decode_3p_3N1(index, n_1, j, pos + 1);
  313|  26.5k|      break;
  314|  25.1k|    case 2:
  ------------------
  |  Branch (314:5): [True: 25.1k, False: 116k]
  ------------------
  315|  25.1k|      D_ACELP_decode_2p_2N1((index >> ((2 * n_1) + 1)), n_1, offset, pos);
  316|  25.1k|      D_ACELP_decode_2p_2N1(index, n_1, j, pos + 2);
  317|  25.1k|      break;
  318|  21.4k|    case 3:
  ------------------
  |  Branch (318:5): [True: 21.4k, False: 120k]
  ------------------
  319|  21.4k|      D_ACELP_decode_3p_3N1((index >> (n_1 + 1)), n_1, offset, pos);
  320|  21.4k|      D_ACELP_decode_1p_N1(index, n_1, j, pos + 3);
  321|  21.4k|      break;
  322|   141k|  }
  323|   141k|  return;
  324|   141k|}
usacdec_ace_d4t64.cpp:_ZL21D_ACELP_decode_4p_4N1issPs:
  261|  68.7k|                                  SHORT pos[]) {
  262|  68.7k|  SHORT j;
  263|  68.7k|  LONG mask, idx;
  ------------------
  |  |  181|  68.7k|#define LONG INT
  ------------------
  264|       |  /*
  265|       |   * Decode 4 pulses with 4*N+1 bits
  266|       |   */
  267|  68.7k|  mask = ((1 << ((2 * N) - 1)) - 1);
  268|  68.7k|  idx = index & mask;
  269|  68.7k|  j = offset;
  270|  68.7k|  if (((index >> ((2 * N) - 1)) & 1) == 1) {
  ------------------
  |  Branch (270:7): [True: 23.7k, False: 44.9k]
  ------------------
  271|  23.7k|    j += (1 << (N - 1));
  272|  23.7k|  }
  273|  68.7k|  D_ACELP_decode_2p_2N1(idx, N - 1, j, pos);
  274|  68.7k|  mask = ((1 << ((2 * N) + 1)) - 1);
  275|  68.7k|  idx = (index >> (2 * N)) & mask;
  276|  68.7k|  D_ACELP_decode_2p_2N1(idx, N, offset, pos + 2);
  277|  68.7k|  return;
  278|  68.7k|}

_Z8Pred_lt4Piii:
  136|   343k|) {
  137|   343k|  int j;
  138|   343k|  FIXP_DBL *x;
  139|   343k|  const LONG *interpol;
  140|   343k|  FIXP_DBL L_sumb, L_sumt;
  141|       |
  142|   343k|  x = &exc[-T0 - L_INTERPOL2 + 1];
  ------------------
  |  |  109|   343k|#define L_INTERPOL2 16
  ------------------
  143|       |
  144|       |  /* remap frac and x:
  145|       |           0 -> 3   x (unchanged)
  146|       |           1 -> 0   x--
  147|       |           2 -> 1   x--
  148|       |           3 -> 2   x--
  149|       |  */
  150|       |
  151|   343k|  if (--frac < 0)
  ------------------
  |  Branch (151:7): [True: 189k, False: 154k]
  ------------------
  152|   189k|    frac += UP_SAMP;
  ------------------
  |  |  108|   189k|#define UP_SAMP 4
  ------------------
  153|   154k|  else
  154|   154k|    x--;
  155|       |
  156|   343k|  j = L_SUBFR + 1;
  ------------------
  |  |  110|   343k|#define L_SUBFR 64
  ------------------
  157|  22.3M|  do {
  158|  22.3M|    LONG filt;
  ------------------
  |  |  181|  22.3M|#define LONG INT
  ------------------
  159|  22.3M|    FIXP_DBL x0, x1;
  160|  22.3M|    FIXP_DBL *xi = x++;
  161|  22.3M|    interpol = Pred_lt4_inter4_2[frac];
  162|  22.3M|    int i = 3;
  163|       |
  164|  22.3M|    filt = *interpol++;
  165|  22.3M|    x0 = *xi++;
  166|  22.3M|    x1 = *xi++;
  167|  22.3M|    L_sumt = fMultDiv2(x0, (FIXP_SGL)((SHORT)(filt >> 16)));
  168|  22.3M|    L_sumb = fMultDiv2(x1, (FIXP_SGL)((SHORT)filt));
  169|  66.9M|    do {
  170|  66.9M|      filt = *interpol++;
  171|  66.9M|      x0 = *xi++;
  172|  66.9M|      x1 = *xi++;
  173|  66.9M|      L_sumt = fMultAddDiv2(L_sumt, x0, (FIXP_SGL)((SHORT)(filt >> 16)));
  174|  66.9M|      L_sumb = fMultAddDiv2(L_sumb, x1, (FIXP_SGL)((SHORT)filt));
  175|       |
  176|  66.9M|      filt = *interpol++;
  177|  66.9M|      x0 = *xi++;
  178|  66.9M|      x1 = *xi++;
  179|  66.9M|      L_sumt = fMultAddDiv2(L_sumt, x0, (FIXP_SGL)((SHORT)(filt >> 16)));
  180|  66.9M|      L_sumb = fMultAddDiv2(L_sumb, x1, (FIXP_SGL)((SHORT)filt));
  181|       |
  182|  66.9M|      filt = *interpol++;
  183|  66.9M|      x0 = *xi++;
  184|  66.9M|      x1 = *xi++;
  185|  66.9M|      L_sumt = fMultAddDiv2(L_sumt, x0, (FIXP_SGL)((SHORT)(filt >> 16)));
  186|  66.9M|      L_sumb = fMultAddDiv2(L_sumb, x1, (FIXP_SGL)((SHORT)filt));
  187|       |
  188|  66.9M|      filt = *interpol++;
  189|  66.9M|      x0 = *xi++;
  190|  66.9M|      x1 = *xi++;
  191|  66.9M|      L_sumt = fMultAddDiv2(L_sumt, x0, (FIXP_SGL)((SHORT)(filt >> 16)));
  192|  66.9M|      L_sumb = fMultAddDiv2(L_sumb, x1, (FIXP_SGL)((SHORT)filt));
  193|       |
  194|  66.9M|      filt = *interpol++;
  195|  66.9M|      x0 = *xi++;
  196|  66.9M|      x1 = *xi++;
  197|  66.9M|      L_sumt = fMultAddDiv2(L_sumt, x0, (FIXP_SGL)((SHORT)(filt >> 16)));
  198|  66.9M|      L_sumb = fMultAddDiv2(L_sumb, x1, (FIXP_SGL)((SHORT)filt));
  199|  66.9M|    } while (--i != 0);
  ------------------
  |  Branch (199:14): [True: 44.6M, False: 22.3M]
  ------------------
  200|       |
  201|  22.3M|    L_sumb <<= 1;
  202|  22.3M|    L_sumb = fAddSaturate(L_sumt << 1, L_sumb);
  203|  22.3M|    *exc++ = L_sumb;
  204|  22.3M|  } while (--j != 0);
  ------------------
  |  Branch (204:12): [True: 21.9M, False: 343k]
  ------------------
  205|   343k|  return;
  206|   343k|}
_Z19Pred_lt4_postfilterPi:
  209|   228k|) {
  210|       |  /*
  211|       |  exc[i]   = A*exc[i-1] + B*exc[i] + A*exc[i+1]
  212|       |  exc[i+1] =              A*exc[i] + B*exc[i+1] + A*exc[i+2] ; i = 0:2:62
  213|       |  */
  214|   228k|  int i;
  215|   228k|  FIXP_DBL sum0, sum1, a_exc0, a_exc1;
  216|   228k|  a_exc0 = fMultDiv2(A2, exc[-1]);
  ------------------
  |  |  112|   228k|#define A2 FL2FX_SGL(2 * 0.18f)
  |  |  ------------------
  |  |  |  |  207|   228k|  ((val) > 0.0f ? (SHORT)((val) * (float)(FRACT_FIX_SCALE) + 0.5f) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   228k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   228k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (207:4): [True: 228k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  208|   228k|                : (SHORT)((val) * (float)(FRACT_FIX_SCALE)-0.5f))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|   228k|  a_exc1 = fMultDiv2(A2, exc[0]);
  ------------------
  |  |  112|   228k|#define A2 FL2FX_SGL(2 * 0.18f)
  |  |  ------------------
  |  |  |  |  207|   228k|  ((val) > 0.0f ? (SHORT)((val) * (float)(FRACT_FIX_SCALE) + 0.5f) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   228k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   228k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (207:4): [True: 228k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  208|   228k|                : (SHORT)((val) * (float)(FRACT_FIX_SCALE)-0.5f))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|       |
  219|       |  /* ARM926: 22 cycles/iteration */
  220|  7.52M|  for (i = 0; i < L_SUBFR; i += 2) {
  ------------------
  |  |  110|  7.52M|#define L_SUBFR 64
  ------------------
  |  Branch (220:15): [True: 7.29M, False: 228k]
  ------------------
  221|  7.29M|    sum0 = a_exc0 + fMult(B, exc[i]);
  ------------------
  |  |  113|  7.29M|#define B FL2FX_SGL(0.64f)
  |  |  ------------------
  |  |  |  |  207|  7.29M|  ((val) > 0.0f ? (SHORT)((val) * (float)(FRACT_FIX_SCALE) + 0.5f) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  7.29M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.29M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (207:4): [True: 7.29M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  208|  7.29M|                : (SHORT)((val) * (float)(FRACT_FIX_SCALE)-0.5f))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|  7.29M|    sum1 = a_exc1 + fMult(B, exc[i + 1]);
  ------------------
  |  |  113|  7.29M|#define B FL2FX_SGL(0.64f)
  |  |  ------------------
  |  |  |  |  207|  7.29M|  ((val) > 0.0f ? (SHORT)((val) * (float)(FRACT_FIX_SCALE) + 0.5f) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  7.29M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.29M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (207:4): [True: 7.29M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  208|  7.29M|                : (SHORT)((val) * (float)(FRACT_FIX_SCALE)-0.5f))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|  7.29M|    a_exc0 = fMultDiv2(A2, exc[i + 1]);
  ------------------
  |  |  112|  7.29M|#define A2 FL2FX_SGL(2 * 0.18f)
  |  |  ------------------
  |  |  |  |  207|  7.29M|  ((val) > 0.0f ? (SHORT)((val) * (float)(FRACT_FIX_SCALE) + 0.5f) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  7.29M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.29M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (207:4): [True: 7.29M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  208|  7.29M|                : (SHORT)((val) * (float)(FRACT_FIX_SCALE)-0.5f))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|  7.29M|    a_exc1 = fMultDiv2(A2, exc[i + 2]);
  ------------------
  |  |  112|  7.29M|#define A2 FL2FX_SGL(2 * 0.18f)
  |  |  ------------------
  |  |  |  |  207|  7.29M|  ((val) > 0.0f ? (SHORT)((val) * (float)(FRACT_FIX_SCALE) + 0.5f) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  7.29M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.29M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (207:4): [True: 7.29M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  208|  7.29M|                : (SHORT)((val) * (float)(FRACT_FIX_SCALE)-0.5f))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|  7.29M|    exc[i] = sum0 + a_exc0;
  226|  7.29M|    exc[i + 1] = sum1 + a_exc1;
  227|  7.29M|  }
  228|   228k|  return;
  229|   228k|}

_Z14E_UTIL_preemphPKiPii:
  130|  51.5k|void E_UTIL_preemph(const FIXP_DBL *in, FIXP_DBL *out, INT L) {
  131|  51.5k|  int i;
  132|       |
  133|  20.9M|  for (i = 0; i < L; i++) {
  ------------------
  |  Branch (133:15): [True: 20.8M, False: 51.5k]
  ------------------
  134|  20.8M|    out[i] = fAddSaturate(in[i], -fMult(PREEMPH_FAC, in[i - 1]));
  ------------------
  |  |  118|  20.8M|  FL2FXCONST_SGL(0.68f) /* ACELP synth pre-emphasis factor            */
  |  |  ------------------
  |  |  |  |  180|  20.8M|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  20.8M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 20.8M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  20.8M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  20.8M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  20.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 20.8M]
  |  |  |  |  ------------------
  |  |  |  |  183|  20.8M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  20.8M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  20.8M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  20.8M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  20.8M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  20.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  20.8M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  135|  20.8M|  }
  136|       |
  137|  51.5k|  return;
  138|  51.5k|}
_Z23BuildAdaptiveExcitationPsPisiiiS0_:
  464|   343k|) {
  465|       |/* Note: code[L_SUBFR] and exc2[L_SUBFR] share the same memory!
  466|       |         If exc2[i] is written, code[i] will be destroyed!
  467|       |*/
  468|   343k|#define SF_HEADROOM (1)
  469|   343k|#define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  470|   343k|#define SF_GAIN_P2 (SF_GAIN_P - SF_HEADROOM)
  471|       |
  472|   343k|  int i;
  473|   343k|  FIXP_DBL tmp, cpe, code_smooth_prev, code_smooth;
  474|       |
  475|   343k|  FIXP_COD code_i;
  ------------------
  |  |  109|   343k|#define FIXP_COD FIXP_SGL
  ------------------
  476|   343k|  FIXP_DBL cpe_code_smooth, cpe_code_smooth_prev;
  477|       |
  478|       |  /* cpe = (1+r_v)/8 * 2 ; ( SF = -1) */
  479|   343k|  cpe = (period_fac >> (2 - SF_PFAC)) + FL2FXCONST_DBL(0.25f);
  ------------------
  |  |  111|   343k|#define SF_PFAC 0       /* exponent of period/voicing factor */
  ------------------
                cpe = (period_fac >> (2 - SF_PFAC)) + FL2FXCONST_DBL(0.25f);
  ------------------
  |  |  192|   343k|  (FIXP_DBL)(                                                                \
  |  |  193|   343k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 343k, Folded]
  |  |  ------------------
  |  |  194|   343k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   343k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 343k]
  |  |  ------------------
  |  |  195|   343k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   343k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   343k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   343k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   343k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   343k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  480|       |
  481|       |  /* u'(n) */
  482|   343k|  tmp = fMultDiv2(*exc, gain_pit) << (SF_GAIN_P2 + 1); /* v(0)*g_p */
  ------------------
  |  |  470|   343k|#define SF_GAIN_P2 (SF_GAIN_P - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  110|   343k|#define SF_GAIN_P 1     /* exponent of gain_pit */
  |  |  ------------------
  |  |               #define SF_GAIN_P2 (SF_GAIN_P - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|   343k|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
  483|   343k|  *exc++ = (tmp + (fMultDiv2(code[0], gain_code) << SF)) << SF_HEADROOM;
  ------------------
  |  |  469|   343k|#define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  107|   343k|#define SF_CODE 6       /* exponent of code[], fixed codebook vector */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|   343k|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  109|   343k|#define SF_EXC 16       /* exponent of exc[] and exc2[], excitation buffer */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|   343k|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
                *exc++ = (tmp + (fMultDiv2(code[0], gain_code) << SF)) << SF_HEADROOM;
  ------------------
  |  |  468|   343k|#define SF_HEADROOM (1)
  ------------------
  484|       |
  485|       |  /* u(n) */
  486|   343k|  code_smooth_prev = fMultDiv2(*code++, gain_code_smoothed)
  487|   343k|                     << SF; /* c(0) * g_sc */
  ------------------
  |  |  469|   343k|#define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  107|   343k|#define SF_CODE 6       /* exponent of code[], fixed codebook vector */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|   343k|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  109|   343k|#define SF_EXC 16       /* exponent of exc[] and exc2[], excitation buffer */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|   343k|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
  488|   343k|  code_i = *code++;
  489|   343k|  code_smooth = fMultDiv2(code_i, gain_code_smoothed) << SF; /* c(1) * g_sc */
  ------------------
  |  |  469|   343k|#define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  107|   343k|#define SF_CODE 6       /* exponent of code[], fixed codebook vector */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|   343k|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  109|   343k|#define SF_EXC 16       /* exponent of exc[] and exc2[], excitation buffer */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|   343k|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
  490|   343k|  tmp += code_smooth_prev; /* tmp = v(0)*g_p + c(0)*g_sc */
  491|   343k|  cpe_code_smooth = fMultDiv2(cpe, code_smooth);
  492|   343k|  *exc2++ = (tmp - cpe_code_smooth) << SF_HEADROOM;
  ------------------
  |  |  468|   343k|#define SF_HEADROOM (1)
  ------------------
  493|   343k|  cpe_code_smooth_prev = fMultDiv2(cpe, code_smooth_prev);
  494|       |
  495|   343k|  i = L_SUBFR - 2;
  ------------------
  |  |  146|   343k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  496|   343k|  do /* ARM926: 22 cycles per iteration */
  497|  21.2M|  {
  498|       |    /* u'(n) */
  499|  21.2M|    tmp = fMultDiv2(*exc, gain_pit) << (SF_GAIN_P2 + 1);
  ------------------
  |  |  470|  21.2M|#define SF_GAIN_P2 (SF_GAIN_P - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  110|  21.2M|#define SF_GAIN_P 1     /* exponent of gain_pit */
  |  |  ------------------
  |  |               #define SF_GAIN_P2 (SF_GAIN_P - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|  21.2M|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
  500|  21.2M|    *exc++ = (tmp + (fMultDiv2(code_i, gain_code) << SF)) << SF_HEADROOM;
  ------------------
  |  |  469|  21.2M|#define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  107|  21.2M|#define SF_CODE 6       /* exponent of code[], fixed codebook vector */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|  21.2M|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  109|  21.2M|#define SF_EXC 16       /* exponent of exc[] and exc2[], excitation buffer */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|  21.2M|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
                  *exc++ = (tmp + (fMultDiv2(code_i, gain_code) << SF)) << SF_HEADROOM;
  ------------------
  |  |  468|  21.2M|#define SF_HEADROOM (1)
  ------------------
  501|       |    /* u(n) */
  502|  21.2M|    tmp += code_smooth; /* += g_sc * c(i) */
  503|  21.2M|    tmp -= cpe_code_smooth_prev;
  504|  21.2M|    cpe_code_smooth_prev = cpe_code_smooth;
  505|  21.2M|    code_i = *code++;
  506|  21.2M|    code_smooth = fMultDiv2(code_i, gain_code_smoothed) << SF;
  ------------------
  |  |  469|  21.2M|#define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  107|  21.2M|#define SF_CODE 6       /* exponent of code[], fixed codebook vector */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|  21.2M|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  109|  21.2M|#define SF_EXC 16       /* exponent of exc[] and exc2[], excitation buffer */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|  21.2M|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
  507|  21.2M|    cpe_code_smooth = fMultDiv2(cpe, code_smooth);
  508|  21.2M|    *exc2++ = (tmp - cpe_code_smooth)
  509|  21.2M|              << SF_HEADROOM; /* tmp - c_pe * g_sc * c(i+1) */
  ------------------
  |  |  468|  21.2M|#define SF_HEADROOM (1)
  ------------------
  510|  21.2M|  } while (--i != 0);
  ------------------
  |  Branch (510:12): [True: 20.9M, False: 343k]
  ------------------
  511|       |
  512|       |  /* u'(n) */
  513|   343k|  tmp = fMultDiv2(*exc, gain_pit) << (SF_GAIN_P2 + 1);
  ------------------
  |  |  470|   343k|#define SF_GAIN_P2 (SF_GAIN_P - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  110|   343k|#define SF_GAIN_P 1     /* exponent of gain_pit */
  |  |  ------------------
  |  |               #define SF_GAIN_P2 (SF_GAIN_P - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|   343k|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
  514|   343k|  *exc = (tmp + (fMultDiv2(code_i, gain_code) << SF)) << SF_HEADROOM;
  ------------------
  |  |  469|   343k|#define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  107|   343k|#define SF_CODE 6       /* exponent of code[], fixed codebook vector */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|   343k|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  109|   343k|#define SF_EXC 16       /* exponent of exc[] and exc2[], excitation buffer */
  |  |  ------------------
  |  |               #define SF (SF_CODE + SF_GAIN_C + 1 - SF_EXC - SF_HEADROOM)
  |  |  ------------------
  |  |  |  |  468|   343k|#define SF_HEADROOM (1)
  |  |  ------------------
  ------------------
                *exc = (tmp + (fMultDiv2(code_i, gain_code) << SF)) << SF_HEADROOM;
  ------------------
  |  |  468|   343k|#define SF_HEADROOM (1)
  ------------------
  515|       |  /* u(n) */
  516|   343k|  tmp += code_smooth;
  517|   343k|  tmp -= cpe_code_smooth_prev;
  518|   343k|  *exc2++ = tmp << SF_HEADROOM;
  ------------------
  |  |  468|   343k|#define SF_HEADROOM (1)
  ------------------
  519|       |
  520|   343k|  return;
  521|   343k|}
_Z13int_lpc_acelpPKsS0_iiPsPi:
  542|   348k|    INT *A_exp) {
  543|   348k|  int i;
  544|   348k|  FIXP_LPC lsp_interpol[M_LP_FILTER_ORDER];
  545|   348k|  FIXP_SGL fac_old, fac_new;
  546|       |
  547|   348k|  FDK_ASSERT((nb_subfr == 3) || (nb_subfr == 4));
  ------------------
  |  |  221|   348k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (547:3): [True: 152k, False: 196k]
  |  Branch (547:3): [True: 196k, False: 0]
  |  Branch (547:3): [True: 348k, False: 0]
  ------------------
  548|       |
  549|   348k|  fac_old = lsp_interpol_factor[nb_subfr & 0x1][(nb_subfr - 1) - subfr_nr];
  550|   348k|  fac_new = lsp_interpol_factor[nb_subfr & 0x1][subfr_nr];
  551|  5.92M|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  5.92M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (551:15): [True: 5.57M, False: 348k]
  ------------------
  552|  5.57M|    lsp_interpol[i] = FX_DBL2FX_LPC(
  ------------------
  |  |  129|  5.57M|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  5.57M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.57M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.57M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  553|  5.57M|        (fMultDiv2(lsp_old[i], fac_old) + fMultDiv2(lsp_new[i], fac_new)) << 1);
  554|  5.57M|  }
  555|       |
  556|   348k|  E_LPC_f_lsp_a_conversion(lsp_interpol, A, A_exp);
  557|       |
  558|   348k|  return;
  559|   348k|}
_Z8Syn_filtPKsiiPiS1_:
  577|   393k|) {
  578|   393k|  int i, j;
  579|   393k|  FIXP_DBL L_tmp;
  580|       |
  581|  26.7M|  for (i = 0; i < length; i++) {
  ------------------
  |  Branch (581:15): [True: 26.3M, False: 393k]
  ------------------
  582|  26.3M|    L_tmp = (FIXP_DBL)0;
  583|       |
  584|   447M|    for (j = 0; j < M_LP_FILTER_ORDER; j++) {
  ------------------
  |  |  117|   447M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (584:17): [True: 421M, False: 26.3M]
  ------------------
  585|   421M|      L_tmp -= fMultDiv2(a[j], y[i - (j + 1)]) >> (LP_FILTER_SCALE - 1);
  ------------------
  |  |  118|   421M|#define LP_FILTER_SCALE 4    /* LP filter scale */
  ------------------
  586|   421M|    }
  587|       |
  588|  26.3M|    L_tmp = scaleValue(L_tmp, a_exp + LP_FILTER_SCALE);
  ------------------
  |  |  118|  26.3M|#define LP_FILTER_SCALE 4    /* LP filter scale */
  ------------------
  589|  26.3M|    y[i] = fAddSaturate(L_tmp, x[i]);
  590|  26.3M|  }
  591|       |
  592|   393k|  return;
  593|   393k|}
_Z6DeemphPiS_iS_:
  603|   143k|void Deemph(FIXP_DBL *x, FIXP_DBL *y, int L, FIXP_DBL *mem) {
  604|   143k|  int i;
  605|   143k|  FIXP_DBL yi = *mem;
  606|       |
  607|  26.1M|  for (i = 0; i < L; i++) {
  ------------------
  |  Branch (607:15): [True: 26.0M, False: 143k]
  ------------------
  608|  26.0M|    FIXP_DBL xi = x[i] >> 1;
  609|  26.0M|    xi = fMultAddDiv2(xi, PREEMPH_FAC, yi);
  ------------------
  |  |  118|  26.0M|  FL2FXCONST_SGL(0.68f) /* ACELP synth pre-emphasis factor            */
  |  |  ------------------
  |  |  |  |  180|  26.0M|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  26.0M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 26.0M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  26.0M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  26.0M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  26.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 26.0M]
  |  |  |  |  ------------------
  |  |  |  |  183|  26.0M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  26.0M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  26.0M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  26.0M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  26.0M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  26.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  26.0M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  610|  26.0M|    yi = SATURATE_LEFT_SHIFT(xi, 1, 32);
  ------------------
  |  |  251|  26.0M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 190k, False: 25.8M]
  |  |  ------------------
  |  |  252|  26.0M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  26.0M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 440k, False: 25.3M]
  |  |  ------------------
  |  |  254|  25.8M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  25.8M|             : ((LONG)(src) << (scale)))
  ------------------
  611|  26.0M|    y[i] = yi;
  612|  26.0M|  }
  613|   143k|  *mem = yi;
  614|   143k|  return;
  615|   143k|}
_Z13E_UTIL_residuPKsiPiS1_i:
  628|  87.2k|                   INT l) {
  629|  87.2k|  FIXP_DBL s;
  630|  87.2k|  INT i, j;
  631|       |
  632|       |  /* (note that values x[-m..-1] are needed) */
  633|  18.0M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (633:15): [True: 17.9M, False: 87.2k]
  ------------------
  634|  17.9M|    s = (FIXP_DBL)0;
  635|       |
  636|   305M|    for (j = 0; j < M_LP_FILTER_ORDER; j++) {
  ------------------
  |  |  117|   305M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (636:17): [True: 287M, False: 17.9M]
  ------------------
  637|   287M|      s += fMultDiv2(a[j], x[i - j - 1]) >> (LP_FILTER_SCALE - 1);
  ------------------
  |  |  118|   287M|#define LP_FILTER_SCALE 4    /* LP filter scale */
  ------------------
  638|   287M|    }
  639|       |
  640|  17.9M|    s = scaleValue(s, a_exp + LP_FILTER_SCALE);
  ------------------
  |  |  118|  17.9M|#define LP_FILTER_SCALE 4    /* LP filter scale */
  ------------------
  641|  17.9M|    y[i] = fAddSaturate(s, x[i]);
  642|  17.9M|  }
  643|       |
  644|  87.2k|  return;
  645|  87.2k|}
_Z16CLpd_AcelpDecodeP15CAcelpStaticMemiPKsS2_sP17CAcelpChannelDataiiiPiS5_S5_i:
  740|  98.3k|                      INT coreCoderFrameLength) {
  741|  98.3k|  int i_subfr, subfr_nr, l_div, T;
  742|  98.3k|  int T0 = -1, T0_frac = -1; /* mark invalid */
  743|       |
  744|  98.3k|  int pit_gain_index = 0;
  745|       |
  746|  98.3k|  const int PIT_MAX = PIT_MAX_12k8 + (6 * i_offset); /* maximum pitch lag */
  ------------------
  |  |  121|  98.3k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  ------------------
  747|       |
  748|  98.3k|  FIXP_COD *code;
  ------------------
  |  |  109|  98.3k|#define FIXP_COD FIXP_SGL
  ------------------
  749|  98.3k|  FIXP_DBL *exc2;
  750|  98.3k|  FIXP_DBL *syn;
  751|  98.3k|  FIXP_DBL *exc;
  752|  98.3k|  FIXP_LPC A[M_LP_FILTER_ORDER];
  753|  98.3k|  INT A_exp;
  754|       |
  755|  98.3k|  FIXP_DBL period_fac;
  756|  98.3k|  FIXP_SGL gain_pit;
  757|  98.3k|  FIXP_DBL gain_code, gain_code_smooth, Ener_code;
  758|  98.3k|  int Ener_code_e;
  759|  98.3k|  int n;
  760|  98.3k|  int bfi = (numLostSubframes > 0) ? 1 : 0;
  ------------------
  |  Branch (760:13): [True: 1.98k, False: 96.3k]
  ------------------
  761|       |
  762|  98.3k|  C_ALLOC_SCRATCH_START(
  ------------------
  |  |  324|  98.3k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  763|  98.3k|      exc_buf, FIXP_DBL,
  764|  98.3k|      PIT_MAX_MAX + L_INTERPOL + L_DIV + 1); /* 411 + 17 + 256 + 1 = 685 */
  765|  98.3k|  C_ALLOC_SCRATCH_START(syn_buf, FIXP_DBL,
  ------------------
  |  |  324|  98.3k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  766|  98.3k|                        M_LP_FILTER_ORDER + L_DIV); /* 16 + 256 = 272 */
  767|       |  /* use same memory for code[L_SUBFR] and exc2[L_SUBFR] */
  768|  98.3k|  C_ALLOC_SCRATCH_START(tmp_buf, FIXP_DBL, L_SUBFR); /* 64 */
  ------------------
  |  |  324|  98.3k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  769|       |  /* make sure they don't overlap if they are accessed alternatingly in
  770|       |   * BuildAdaptiveExcitation() */
  771|  98.3k|#if (COD_BITS == FRACT_BITS)
  772|  98.3k|  code = (FIXP_COD *)(tmp_buf + L_SUBFR / 2);
  ------------------
  |  |  146|  98.3k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  773|       |#elif (COD_BITS == DFRACT_BITS)
  774|       |  code = (FIXP_COD *)tmp_buf;
  775|       |#endif
  776|  98.3k|  exc2 = (FIXP_DBL *)tmp_buf;
  777|       |
  778|  98.3k|  syn = syn_buf + M_LP_FILTER_ORDER;
  ------------------
  |  |  117|  98.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  779|  98.3k|  exc = exc_buf + PIT_MAX_MAX + L_INTERPOL;
  ------------------
  |  |  142|  98.3k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  98.3k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  98.3k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  98.3k|   (6 *                                                                        \
  |  |  |  |  136|  98.3k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  98.3k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  98.3k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  98.3k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                exc = exc_buf + PIT_MAX_MAX + L_INTERPOL;
  ------------------
  |  |  153|  98.3k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  780|       |
  781|  98.3k|  FDKmemcpy(syn_buf, acelp_mem->old_syn_mem,
  782|  98.3k|            M_LP_FILTER_ORDER * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  98.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  783|  98.3k|  FDKmemcpy(exc_buf, acelp_mem->old_exc_mem,
  784|  98.3k|            (PIT_MAX_MAX + L_INTERPOL) * sizeof(FIXP_DBL));
  ------------------
  |  |  142|  98.3k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  98.3k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  98.3k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  98.3k|   (6 *                                                                        \
  |  |  |  |  136|  98.3k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  98.3k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  98.3k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  98.3k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          (PIT_MAX_MAX + L_INTERPOL) * sizeof(FIXP_DBL));
  ------------------
  |  |  153|  98.3k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  785|       |
  786|  98.3k|  FDKmemclear(exc_buf + (PIT_MAX_MAX + L_INTERPOL),
  ------------------
  |  |  142|  98.3k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  98.3k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  98.3k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  98.3k|   (6 *                                                                        \
  |  |  |  |  136|  98.3k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  98.3k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  98.3k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  98.3k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                FDKmemclear(exc_buf + (PIT_MAX_MAX + L_INTERPOL),
  ------------------
  |  |  153|  98.3k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  787|  98.3k|              (L_DIV + 1) * sizeof(FIXP_DBL));
  ------------------
  |  |  192|  98.3k|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|  98.3k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  98.3k|#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|  98.3k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  788|       |
  789|  98.3k|  l_div = coreCoderFrameLength / NB_DIV;
  ------------------
  |  |  145|  98.3k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
  790|       |
  791|   441k|  for (i_subfr = 0, subfr_nr = 0; i_subfr < l_div;
  ------------------
  |  Branch (791:35): [True: 343k, False: 98.3k]
  ------------------
  792|   343k|       i_subfr += L_SUBFR, subfr_nr++) {
  ------------------
  |  |  146|   343k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  793|       |    /*-------------------------------------------------*
  794|       |     * - Decode pitch lag (T0 and T0_frac)             *
  795|       |     *-------------------------------------------------*/
  796|   343k|    if (bfi) {
  ------------------
  |  Branch (796:9): [True: 6.44k, False: 336k]
  ------------------
  797|  6.44k|      ConcealPitchLag(acelp_mem, PIT_MAX, &T0, &T0_frac);
  798|   336k|    } else {
  799|   336k|      T0 = (int)pAcelpData->T0[subfr_nr];
  800|   336k|      T0_frac = (int)pAcelpData->T0_frac[subfr_nr];
  801|   336k|    }
  802|       |
  803|       |    /*-------------------------------------------------*
  804|       |     * - Find the pitch gain, the interpolation filter *
  805|       |     *   and the adaptive codebook vector.             *
  806|       |     *-------------------------------------------------*/
  807|   343k|    Pred_lt4(&exc[i_subfr], T0, T0_frac);
  808|       |
  809|   343k|    if ((!bfi && pAcelpData->ltp_filtering_flag[subfr_nr] == 0) ||
  ------------------
  |  Branch (809:10): [True: 336k, False: 6.44k]
  |  Branch (809:18): [True: 227k, False: 109k]
  ------------------
  810|   228k|        (bfi && numLostSubframes == 1 && stab_fac < FL2FXCONST_SGL(0.25f))) {
  ------------------
  |  |  180|  1.10k|  (FIXP_SGL)(                                                                \
  |  |  181|  1.10k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.10k, Folded]
  |  |  ------------------
  |  |  182|  1.10k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.10k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.10k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.10k]
  |  |  ------------------
  |  |  183|  1.10k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.10k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.10k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.10k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.10k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.10k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.10k|          : ((((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 (810:10): [True: 6.44k, False: 109k]
  |  Branch (810:17): [True: 1.10k, False: 5.34k]
  |  Branch (810:42): [True: 394, False: 714]
  ------------------
  811|       |      /* find pitch excitation with lp filter: v'(n) => v(n) */
  812|   228k|      Pred_lt4_postfilter(&exc[i_subfr]);
  813|   228k|    }
  814|       |
  815|       |    /*-------------------------------------------------------*
  816|       |     * - Decode innovative codebook.                         *
  817|       |     * - Add the fixed-gain pitch contribution to code[].    *
  818|       |     *-------------------------------------------------------*/
  819|   343k|    if (bfi) {
  ------------------
  |  Branch (819:9): [True: 6.44k, False: 336k]
  ------------------
  820|   419k|      for (n = 0; n < L_SUBFR; n++) {
  ------------------
  |  |  146|   419k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (820:19): [True: 412k, False: 6.44k]
  ------------------
  821|   412k|        code[n] =
  822|   412k|            FX_SGL2FX_COD((FIXP_SGL)E_UTIL_random(&acelp_mem->seed_ace)) >> 4;
  ------------------
  |  |  112|   412k|#define FX_SGL2FX_COD(x) (x)
  ------------------
  823|   412k|      }
  824|   336k|    } else {
  825|   336k|      int nbits = MapCoreMode2NBits((int)pAcelpData->acelp_core_mode);
  826|   336k|      D_ACELP_decode_4t64(pAcelpData->icb_index[subfr_nr], nbits, &code[0]);
  827|   336k|    }
  828|       |
  829|   343k|    T = T0;
  830|   343k|    if (T0_frac > 2) {
  ------------------
  |  Branch (830:9): [True: 47.7k, False: 295k]
  ------------------
  831|  47.7k|      T += 1;
  832|  47.7k|    }
  833|       |
  834|   343k|    Preemph_code(code);
  835|   343k|    Pit_shrp(code, T);
  836|       |
  837|       |    /* Output pitch lag for bass post-filter */
  838|   343k|    if (T > PIT_MAX) {
  ------------------
  |  Branch (838:9): [True: 1.80k, False: 341k]
  ------------------
  839|  1.80k|      pT[subfr_nr] = PIT_MAX;
  840|   341k|    } else {
  841|   341k|      pT[subfr_nr] = T;
  842|   341k|    }
  843|   343k|    D_gain2_plus(
  844|   343k|        pAcelpData->gains[subfr_nr],
  845|   343k|        code,       /* (i)  : Innovative code vector, exponent = SF_CODE */
  846|   343k|        &gain_pit,  /* (o)  : Quantized pitch gain, exponent = SF_GAIN_P */
  847|   343k|        &gain_code, /* (o)  : Quantized codebook gain                    */
  848|   343k|        pAcelpData
  849|   343k|            ->mean_energy, /* (i)  : mean_ener defined in open-loop (2 bits) */
  850|   343k|        bfi, &acelp_mem->past_gpit, &acelp_mem->past_gcode,
  851|   343k|        &Ener_code,    /* (o)  : Innovative code vector energy              */
  852|   343k|        &Ener_code_e); /* (o)  : Innovative code vector energy exponent     */
  853|       |
  854|   343k|    pit_gain[pit_gain_index++] = FX_SGL2FX_DBL(gain_pit);
  ------------------
  |  |  219|   343k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   343k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  855|       |
  856|       |    /* calc periodicity factor r_v */
  857|   343k|    period_fac =
  858|   343k|        calc_period_factor(/* (o) : factor (-1=unvoiced to 1=voiced)    */
  859|   343k|                           &exc[i_subfr], /* (i) : pitch excitation, exponent =
  860|       |                                             SF_EXC */
  861|   343k|                           gain_pit,      /* (i) : gain of pitch, exponent =
  862|       |                                             SF_GAIN_P */
  863|   343k|                           gain_code,     /* (i) : gain of code     */
  864|   343k|                           Ener_code,     /* (i) : Energy of code[]     */
  865|   343k|                           Ener_code_e);  /* (i) : Exponent of energy of code[]
  866|       |                                           */
  867|       |
  868|   343k|    if (lastLpcLost && frameCnt == 0) {
  ------------------
  |  Branch (868:9): [True: 5.36k, False: 337k]
  |  Branch (868:24): [True: 532, False: 4.83k]
  ------------------
  869|    532|      if (gain_pit > FL2FXCONST_SGL(1.0f / (1 << SF_GAIN_P))) {
  ------------------
  |  |  180|    532|  (FIXP_SGL)(                                                                \
  |  |  181|    532|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 532, Folded]
  |  |  ------------------
  |  |  182|    532|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|    532|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    532|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 532]
  |  |  ------------------
  |  |  183|    532|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|    532|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|    532|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|    532|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|    532|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    532|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|    532|          : ((((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 (869:11): [True: 15, False: 517]
  ------------------
  870|     15|        gain_pit = FL2FXCONST_SGL(1.0f / (1 << SF_GAIN_P));
  ------------------
  |  |  180|     15|  (FIXP_SGL)(                                                                \
  |  |  181|     15|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 15, Folded]
  |  |  ------------------
  |  |  182|     15|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|     15|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     15|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 15]
  |  |  ------------------
  |  |  183|     15|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|     15|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|     15|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|     15|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|     15|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     15|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|     15|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  871|     15|      }
  872|    532|    }
  873|       |
  874|   343k|    gain_code_smooth =
  875|   343k|        noise_enhancer(/* (o) : smoothed gain g_sc exponent = SF_GAIN_C */
  876|   343k|                       gain_code,  /* (i) : Quantized codebook gain  */
  877|   343k|                       period_fac, /* (i) : periodicity factor (-1=unvoiced to
  878|       |                                      1=voiced)  */
  879|   343k|                       stab_fac,   /* (i) : stability factor (0 <= ... < 1),
  880|       |                                      exponent = 1 */
  881|   343k|                       &acelp_mem->gc_threshold);
  882|       |
  883|       |    /* Compute adaptive codebook update u'(n), pitch enhancement c'(n) and
  884|       |     * post-processed excitation u(n). */
  885|   343k|    BuildAdaptiveExcitation(code, exc + i_subfr, gain_pit, gain_code,
  886|   343k|                            gain_code_smooth, period_fac, exc2);
  887|       |
  888|       |    /* Interpolate filter coeffs for current subframe in lsp domain and convert
  889|       |     * to LP domain */
  890|   343k|    int_lpc_acelp(lsp_old,  /* input : LSPs from past frame              */
  891|   343k|                  lsp_new,  /* input : LSPs from present frame           */
  892|   343k|                  subfr_nr, /* input : ACELP subframe index              */
  893|   343k|                  coreCoderFrameLength / L_DIV,
  ------------------
  |  |  192|   343k|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|   343k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   343k|#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|   343k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|   343k|                  A, /* output: LP coefficients of this subframe  */
  895|   343k|                  &A_exp);
  896|       |
  897|   343k|    Syn_filt(A, /* (i) : a[m] prediction coefficients               */
  898|   343k|             A_exp, L_SUBFR, /* (i) : length */
  ------------------
  |  |  146|   343k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  899|   343k|             exc2, /* (i) : input signal                               */
  900|   343k|             &syn[i_subfr] /* (i/o) : filter states / output signal */
  901|   343k|    );
  902|       |
  903|   343k|  } /* end of subframe loop */
  904|       |
  905|       |  /* update pitch value for bfi procedure */
  906|  98.3k|  acelp_mem->old_T0_frac = T0_frac;
  907|  98.3k|  acelp_mem->old_T0 = T0;
  908|       |
  909|       |  /* save old excitation and old synthesis memory for next ACELP frame */
  910|  98.3k|  FDKmemcpy(acelp_mem->old_exc_mem, exc + l_div - (PIT_MAX_MAX + L_INTERPOL),
  ------------------
  |  |  142|  98.3k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  98.3k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  98.3k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  98.3k|   (6 *                                                                        \
  |  |  |  |  136|  98.3k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  98.3k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  98.3k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  98.3k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                FDKmemcpy(acelp_mem->old_exc_mem, exc + l_div - (PIT_MAX_MAX + L_INTERPOL),
  ------------------
  |  |  153|  98.3k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  911|  98.3k|            sizeof(FIXP_DBL) * (PIT_MAX_MAX + L_INTERPOL));
  ------------------
  |  |  142|  98.3k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  98.3k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  98.3k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  98.3k|   (6 *                                                                        \
  |  |  |  |  136|  98.3k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  98.3k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  98.3k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.3k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  98.3k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.3k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          sizeof(FIXP_DBL) * (PIT_MAX_MAX + L_INTERPOL));
  ------------------
  |  |  153|  98.3k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  912|  98.3k|  FDKmemcpy(acelp_mem->old_syn_mem, syn_buf + l_div,
  913|  98.3k|            sizeof(FIXP_DBL) * M_LP_FILTER_ORDER);
  ------------------
  |  |  117|  98.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  914|       |
  915|  98.3k|  Deemph(syn, synth, l_div,
  916|  98.3k|         &acelp_mem->de_emph_mem); /* ref soft: mem = synth[-1] */
  917|       |
  918|  98.3k|  scaleValues(synth, l_div, -ACELP_OUTSCALE);
  ------------------
  |  |  121|  98.3k|#define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|  98.3k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  |  |  ------------------
  |  |               #define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  120|  98.3k|#define ACELP_HEADROOM 1
  |  |  ------------------
  ------------------
  919|  98.3k|  acelp_mem->deemph_mem_wsyn = acelp_mem->de_emph_mem;
  920|       |
  921|  98.3k|  C_ALLOC_SCRATCH_END(tmp_buf, FIXP_DBL, L_SUBFR);
  922|  98.3k|  C_ALLOC_SCRATCH_END(syn_buf, FIXP_DBL, M_LP_FILTER_ORDER + L_DIV);
  923|  98.3k|  C_ALLOC_SCRATCH_END(exc_buf, FIXP_DBL, PIT_MAX_MAX + L_INTERPOL + L_DIV + 1);
  924|  98.3k|  return;
  925|  98.3k|}
_Z15CLpd_AcelpResetP15CAcelpStaticMem:
  927|  29.4k|void CLpd_AcelpReset(CAcelpStaticMem *acelp) {
  928|  29.4k|  acelp->gc_threshold = (FIXP_DBL)0;
  929|       |
  930|  29.4k|  acelp->past_gpit = (FIXP_SGL)0;
  931|  29.4k|  acelp->past_gcode = (FIXP_DBL)0;
  932|  29.4k|  acelp->old_T0 = 64;
  933|  29.4k|  acelp->old_T0_frac = 0;
  934|  29.4k|  acelp->deemph_mem_wsyn = (FIXP_DBL)0;
  935|  29.4k|  acelp->wsyn_rms = (FIXP_DBL)0;
  936|  29.4k|  acelp->seed_ace = 0;
  937|  29.4k|}
_Z17CLpd_TcxTDConcealP15CAcelpStaticMemPsPKsS3_siPiih:
  945|  1.48k|                       INT coreCoderFrameLength, UCHAR last_tcx_noise_factor) {
  946|       |  /* repeat past excitation with pitch from previous decoded TCX frame */
  947|  1.48k|  C_ALLOC_SCRATCH_START(
  ------------------
  |  |  324|  1.48k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  948|  1.48k|      exc_buf, FIXP_DBL,
  949|  1.48k|      PIT_MAX_MAX + L_INTERPOL + L_DIV); /* 411 +  17 + 256 + 1 =  */
  950|  1.48k|  C_ALLOC_SCRATCH_START(syn_buf, FIXP_DBL,
  ------------------
  |  |  324|  1.48k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  951|  1.48k|                        M_LP_FILTER_ORDER + L_DIV); /* 256 +  16           =  */
  952|       |                                                    /*                    +=  */
  953|  1.48k|  FIXP_DBL ns_buf[L_DIV + 1];
  954|  1.48k|  FIXP_DBL *syn = syn_buf + M_LP_FILTER_ORDER;
  ------------------
  |  |  117|  1.48k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  955|  1.48k|  FIXP_DBL *exc = exc_buf + PIT_MAX_MAX + L_INTERPOL;
  ------------------
  |  |  142|  1.48k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  1.48k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  1.48k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  1.48k|   (6 *                                                                        \
  |  |  |  |  136|  1.48k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  1.48k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  1.48k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  1.48k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                FIXP_DBL *exc = exc_buf + PIT_MAX_MAX + L_INTERPOL;
  ------------------
  |  |  153|  1.48k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  956|  1.48k|  FIXP_DBL *ns = ns_buf + 1;
  957|  1.48k|  FIXP_DBL tmp, fact_exc;
  958|  1.48k|  INT T = fMin(*pitch, (SHORT)PIT_MAX_MAX);
  ------------------
  |  |  142|  1.48k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  1.48k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  1.48k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  1.48k|   (6 *                                                                        \
  |  |  |  |  136|  1.48k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  1.48k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  1.48k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  1.48k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  959|  1.48k|  int i, i_subfr, subfr_nr;
  960|  1.48k|  int lDiv = coreCoderFrameLength / NB_DIV;
  ------------------
  |  |  145|  1.48k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
  961|       |
  962|  1.48k|  FDKmemcpy(syn_buf, acelp_mem->old_syn_mem,
  963|  1.48k|            M_LP_FILTER_ORDER * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  1.48k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  964|  1.48k|  FDKmemcpy(exc_buf, acelp_mem->old_exc_mem,
  965|  1.48k|            (PIT_MAX_MAX + L_INTERPOL) * sizeof(FIXP_DBL));
  ------------------
  |  |  142|  1.48k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  1.48k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  1.48k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  1.48k|   (6 *                                                                        \
  |  |  |  |  136|  1.48k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  1.48k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  1.48k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  1.48k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          (PIT_MAX_MAX + L_INTERPOL) * sizeof(FIXP_DBL));
  ------------------
  |  |  153|  1.48k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  966|       |
  967|       |  /* if we lost all packets (i.e. 1 packet of TCX-20 ms, 2 packets of
  968|       |     the TCX-40 ms or 4 packets of the TCX-80ms), we lost the whole
  969|       |     coded frame extrapolation strategy: repeat lost excitation and
  970|       |     use extrapolated LSFs */
  971|       |
  972|       |  /* AMR-WB+ like TCX TD concealment */
  973|       |
  974|       |  /* number of lost frame cmpt */
  975|  1.48k|  if (nLostSf < 2) {
  ------------------
  |  Branch (975:7): [True: 284, False: 1.20k]
  ------------------
  976|    284|    fact_exc = FL2FXCONST_DBL(0.8f);
  ------------------
  |  |  192|    284|  (FIXP_DBL)(                                                                \
  |  |  193|    284|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 284, Folded]
  |  |  ------------------
  |  |  194|    284|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    284|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    284|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 284]
  |  |  ------------------
  |  |  195|    284|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    284|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    284|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    284|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    284|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    284|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    284|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  977|  1.20k|  } else {
  978|  1.20k|    fact_exc = FL2FXCONST_DBL(0.4f);
  ------------------
  |  |  192|  1.20k|  (FIXP_DBL)(                                                                \
  |  |  193|  1.20k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.20k, Folded]
  |  |  ------------------
  |  |  194|  1.20k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.20k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.20k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.20k]
  |  |  ------------------
  |  |  195|  1.20k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.20k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.20k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.20k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.20k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.20k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.20k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  979|  1.20k|  }
  980|       |
  981|       |  /* repeat past excitation */
  982|   338k|  for (i = 0; i < lDiv; i++) {
  ------------------
  |  Branch (982:15): [True: 336k, False: 1.48k]
  ------------------
  983|   336k|    exc[i] = fMult(fact_exc, exc[i - T]);
  984|   336k|  }
  985|       |
  986|  1.48k|  tmp = fMult(fact_exc, acelp_mem->wsyn_rms);
  987|  1.48k|  acelp_mem->wsyn_rms = tmp;
  988|       |
  989|       |  /* init deemph_mem_wsyn */
  990|  1.48k|  acelp_mem->deemph_mem_wsyn = exc[-1];
  991|       |
  992|  1.48k|  ns[-1] = acelp_mem->deemph_mem_wsyn;
  993|       |
  994|  6.74k|  for (i_subfr = 0, subfr_nr = 0; i_subfr < lDiv;
  ------------------
  |  Branch (994:35): [True: 5.26k, False: 1.48k]
  ------------------
  995|  5.26k|       i_subfr += L_SUBFR, subfr_nr++) {
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  996|  5.26k|    FIXP_DBL tRes[L_SUBFR];
  997|  5.26k|    FIXP_LPC A[M_LP_FILTER_ORDER];
  998|  5.26k|    INT A_exp;
  999|       |
 1000|       |    /* interpolate LPC coefficients */
 1001|  5.26k|    int_lpc_acelp(lsp_old, lsp_new, subfr_nr, lDiv / L_SUBFR, A, &A_exp);
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1002|       |
 1003|  5.26k|    Syn_filt(A,              /* (i) : a[m] prediction coefficients         */
 1004|  5.26k|             A_exp, L_SUBFR, /* (i) : length                               */
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1005|  5.26k|             &exc[i_subfr],  /* (i) : input signal                         */
 1006|  5.26k|             &syn[i_subfr]   /* (i/o) : filter states / output signal      */
 1007|  5.26k|    );
 1008|       |
 1009|  5.26k|    E_LPC_a_weight(
 1010|  5.26k|        A, A,
 1011|  5.26k|        M_LP_FILTER_ORDER); /* overwrite A as it is not needed any longer */
  ------------------
  |  |  117|  5.26k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1012|       |
 1013|  5.26k|    E_UTIL_residu(A, A_exp, &syn[i_subfr], tRes, L_SUBFR);
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1014|       |
 1015|  5.26k|    Deemph(tRes, &ns[i_subfr], L_SUBFR, &acelp_mem->deemph_mem_wsyn);
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1016|       |
 1017|       |    /* Amplitude limiter (saturate at wsyn_rms) */
 1018|   341k|    for (i = i_subfr; i < i_subfr + L_SUBFR; i++) {
  ------------------
  |  |  146|   341k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (1018:23): [True: 336k, False: 5.26k]
  ------------------
 1019|   336k|      if (ns[i] > tmp) {
  ------------------
  |  Branch (1019:11): [True: 96.5k, False: 240k]
  ------------------
 1020|  96.5k|        ns[i] = tmp;
 1021|   240k|      } else {
 1022|   240k|        if (ns[i] < -tmp) {
  ------------------
  |  Branch (1022:13): [True: 92.1k, False: 147k]
  ------------------
 1023|  92.1k|          ns[i] = -tmp;
 1024|  92.1k|        }
 1025|   240k|      }
 1026|   336k|    }
 1027|       |
 1028|  5.26k|    E_UTIL_preemph(&ns[i_subfr], tRes, L_SUBFR);
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1029|       |
 1030|  5.26k|    Syn_filt(A,              /* (i) : a[m] prediction coefficients         */
 1031|  5.26k|             A_exp, L_SUBFR, /* (i) : length                               */
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1032|  5.26k|             tRes,           /* (i) : input signal                         */
 1033|  5.26k|             &syn[i_subfr]   /* (i/o) : filter states / output signal      */
 1034|  5.26k|    );
 1035|       |
 1036|  5.26k|    FDKmemmove(&synth[i_subfr], &syn[i_subfr], L_SUBFR * sizeof(FIXP_DBL));
  ------------------
  |  |  146|  5.26k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1037|  5.26k|  }
 1038|       |
 1039|       |  /* save old excitation and old synthesis memory for next ACELP frame */
 1040|  1.48k|  FDKmemcpy(acelp_mem->old_exc_mem, exc + lDiv - (PIT_MAX_MAX + L_INTERPOL),
  ------------------
  |  |  142|  1.48k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  1.48k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  1.48k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  1.48k|   (6 *                                                                        \
  |  |  |  |  136|  1.48k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  1.48k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  1.48k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  1.48k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                FDKmemcpy(acelp_mem->old_exc_mem, exc + lDiv - (PIT_MAX_MAX + L_INTERPOL),
  ------------------
  |  |  153|  1.48k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
 1041|  1.48k|            sizeof(FIXP_DBL) * (PIT_MAX_MAX + L_INTERPOL));
  ------------------
  |  |  142|  1.48k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  1.48k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  1.48k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  1.48k|   (6 *                                                                        \
  |  |  |  |  136|  1.48k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  1.48k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  1.48k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  1.48k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  1.48k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.48k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          sizeof(FIXP_DBL) * (PIT_MAX_MAX + L_INTERPOL));
  ------------------
  |  |  153|  1.48k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
 1042|  1.48k|  FDKmemcpy(acelp_mem->old_syn_mem, syn_buf + lDiv,
 1043|  1.48k|            sizeof(FIXP_DBL) * M_LP_FILTER_ORDER);
  ------------------
  |  |  117|  1.48k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1044|  1.48k|  acelp_mem->de_emph_mem = acelp_mem->deemph_mem_wsyn;
 1045|       |
 1046|  1.48k|  C_ALLOC_SCRATCH_END(syn_buf, FIXP_DBL, M_LP_FILTER_ORDER + L_DIV);
 1047|  1.48k|  C_ALLOC_SCRATCH_END(exc_buf, FIXP_DBL, PIT_MAX_MAX + L_INTERPOL + L_DIV);
 1048|  1.48k|}
_Z19Acelp_PreProcessingPiS_S_S_S_S_iS_iii:
 1054|  42.4k|                         INT nbSubfrSuperfr) {
 1055|  42.4k|  int n;
 1056|       |
 1057|       |  /* init beginning of synth_buf with old synthesis from previous frame */
 1058|  42.4k|  FDKmemcpy(synth_buf, old_synth, sizeof(FIXP_DBL) * (PIT_MAX_MAX - BPF_DELAY));
  ------------------
  |  |  142|  42.4k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  42.4k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  42.4k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  42.4k|   (6 *                                                                        \
  |  |  |  |  136|  42.4k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  42.4k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  42.4k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  42.4k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                FDKmemcpy(synth_buf, old_synth, sizeof(FIXP_DBL) * (PIT_MAX_MAX - BPF_DELAY));
  ------------------
  |  |  148|  42.4k|#define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  147|  42.4k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  |  |  ------------------
  |  |               #define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  ------------------
  ------------------
 1059|       |
 1060|       |  /* calculate pitch lag offset for ACELP decoder */
 1061|  42.4k|  *i_offset =
 1062|  42.4k|      (samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
  ------------------
  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  ------------------
                    (samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
  ------------------
  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  ------------------
                    (samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
  ------------------
  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  ------------------
 1063|  42.4k|      PIT_MIN_12k8;
  ------------------
  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  ------------------
 1064|       |
 1065|       |  /* for bass postfilter */
 1066|   296k|  for (n = 0; n < synSfd; n++) {
  ------------------
  |  Branch (1066:15): [True: 253k, False: 42.4k]
  ------------------
 1067|   253k|    pitch[n] = old_T_pf[n];
 1068|   253k|    pit_gain[n] = old_gain_pf[n];
 1069|   253k|  }
 1070|   634k|  for (n = 0; n < nbSubfrSuperfr; n++) {
  ------------------
  |  Branch (1070:15): [True: 592k, False: 42.4k]
  ------------------
 1071|   592k|    pitch[n + synSfd] = L_SUBFR;
  ------------------
  |  |  146|   592k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1072|   592k|    pit_gain[n + synSfd] = (FIXP_DBL)0;
 1073|   592k|  }
 1074|  42.4k|}
_Z20Acelp_PostProcessingPiS_S_S_iii:
 1078|  42.4k|                          INT nbSubfrSuperfr) {
 1079|  42.4k|  int n;
 1080|       |
 1081|       |  /* store last part of synth_buf (which is not handled by the IMDCT overlap)
 1082|       |   * for next frame */
 1083|  42.4k|  FDKmemcpy(old_synth, synth_buf + coreCoderFrameLength,
 1084|  42.4k|            sizeof(FIXP_DBL) * (PIT_MAX_MAX - BPF_DELAY));
  ------------------
  |  |  142|  42.4k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  42.4k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  42.4k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  42.4k|   (6 *                                                                        \
  |  |  |  |  136|  42.4k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  42.4k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  42.4k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  42.4k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          sizeof(FIXP_DBL) * (PIT_MAX_MAX - BPF_DELAY));
  ------------------
  |  |  148|  42.4k|#define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  147|  42.4k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  |  |  ------------------
  |  |               #define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  ------------------
  ------------------
 1085|       |
 1086|       |  /* for bass postfilter */
 1087|   296k|  for (n = 0; n < synSfd; n++) {
  ------------------
  |  Branch (1087:15): [True: 253k, False: 42.4k]
  ------------------
 1088|   253k|    old_T_pf[n] = pitch[nbSubfrSuperfr + n];
 1089|   253k|  }
 1090|  42.4k|}
_Z14CLpd_Acelp_ZirPKsiP15CAcelpStaticMemiPii:
 1096|  40.0k|                    FIXP_DBL zir[], int doDeemph) {
 1097|  40.0k|  C_ALLOC_SCRATCH_START(tmp_buf, FIXP_DBL, L_FAC_ZIR + M_LP_FILTER_ORDER);
  ------------------
  |  |  324|  40.0k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1098|  40.0k|  FDK_ASSERT(length <= L_FAC_ZIR);
  ------------------
  |  |  221|  40.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1098:3): [True: 40.0k, False: 0]
  ------------------
 1099|       |
 1100|  40.0k|  FDKmemcpy(tmp_buf, acelp_mem->old_syn_mem,
 1101|  40.0k|            M_LP_FILTER_ORDER * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  40.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1102|  40.0k|  FDKmemset(tmp_buf + M_LP_FILTER_ORDER, 0, L_FAC_ZIR * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  40.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
                FDKmemset(tmp_buf + M_LP_FILTER_ORDER, 0, L_FAC_ZIR * sizeof(FIXP_DBL));
  ------------------
  |  | 1092|  40.0k|#define L_FAC_ZIR (LFAC)
  |  |  ------------------
  |  |  |  |  199|  40.0k|#define LFAC LFAC_1024
  |  |  |  |  ------------------
  |  |  |  |  |  |  169|  40.0k|#define LFAC_1024 (L_DIV_1024 / 2) /* FAC frame length */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|  40.0k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  156|  40.0k|#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|  40.0k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1103|       |
 1104|  40.0k|  Syn_filt(A, A_exp, length, &tmp_buf[M_LP_FILTER_ORDER],
  ------------------
  |  |  117|  40.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1105|  40.0k|           &tmp_buf[M_LP_FILTER_ORDER]);
  ------------------
  |  |  117|  40.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1106|  40.0k|  if (!doDeemph) {
  ------------------
  |  Branch (1106:7): [True: 6, False: 40.0k]
  ------------------
 1107|       |    /* if last lpd mode was TD concealment, then bypass deemph */
 1108|      6|    FDKmemcpy(zir, tmp_buf, length * sizeof(*zir));
 1109|  40.0k|  } else {
 1110|  40.0k|    Deemph(&tmp_buf[M_LP_FILTER_ORDER], &zir[0], length,
  ------------------
  |  |  117|  40.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1111|  40.0k|           &acelp_mem->de_emph_mem);
 1112|  40.0k|    scaleValues(zir, length, -ACELP_OUTSCALE);
  ------------------
  |  |  121|  40.0k|#define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|  40.0k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  |  |  ------------------
  |  |               #define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  120|  40.0k|#define ACELP_HEADROOM 1
  |  |  ------------------
  ------------------
 1113|  40.0k|  }
 1114|  40.0k|  C_ALLOC_SCRATCH_END(tmp_buf, FIXP_DBL, L_FAC_ZIR + M_LP_FILTER_ORDER);
 1115|  40.0k|}
_Z28CLpd_AcelpPrepareInternalMemPKihhPKsiS2_iP15CAcelpStaticMemiih:
 1123|  46.5k|                                  UCHAR lpd_mode) {
 1124|  46.5k|  int l_div =
 1125|  46.5k|      coreCoderFrameLength / NB_DIV; /* length of one ACELP/TCX20 frame */
  ------------------
  |  |  145|  46.5k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
 1126|  46.5k|  int l_div_partial;
 1127|  46.5k|  FIXP_DBL *syn, *old_exc_mem;
 1128|       |
 1129|  46.5k|  C_ALLOC_SCRATCH_START(synth_buf, FIXP_DBL,
  ------------------
  |  |  324|  46.5k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1130|  46.5k|                        PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER);
 1131|  46.5k|  syn = &synth_buf[M_LP_FILTER_ORDER];
  ------------------
  |  |  117|  46.5k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1132|       |
 1133|  46.5k|  l_div_partial = PIT_MAX_MAX + L_INTERPOL - l_div;
  ------------------
  |  |  142|  46.5k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  46.5k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  46.5k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  46.5k|   (6 *                                                                        \
  |  |  |  |  136|  46.5k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  46.5k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  46.5k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  46.5k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                l_div_partial = PIT_MAX_MAX + L_INTERPOL - l_div;
  ------------------
  |  |  153|  46.5k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
 1134|  46.5k|  old_exc_mem = acelp_mem->old_exc_mem;
 1135|       |
 1136|  46.5k|  if (lpd_mode == 4) {
  ------------------
  |  Branch (1136:7): [True: 284, False: 46.2k]
  ------------------
 1137|       |    /* Bypass Domain conversion. TCXTD Concealment does no deemphasis in the
 1138|       |     * end. */
 1139|    284|    FDKmemcpy(
 1140|    284|        synth_buf, &synth[-(PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER)],
  ------------------
  |  |  142|    284|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|    284|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|    284|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|    284|   (6 *                                                                        \
  |  |  |  |  136|    284|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|    284|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|    284|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    284|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    284|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    284|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|    284|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    284|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      synth_buf, &synth[-(PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER)],
  ------------------
  |  |  153|    284|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
                      synth_buf, &synth[-(PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER)],
  ------------------
  |  |  117|    284|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1141|    284|        (PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER) * sizeof(FIXP_DBL));
  ------------------
  |  |  142|    284|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|    284|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|    284|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|    284|   (6 *                                                                        \
  |  |  |  |  136|    284|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|    284|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|    284|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    284|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    284|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|    284|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|    284|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    284|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      (PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER) * sizeof(FIXP_DBL));
  ------------------
  |  |  153|    284|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
                      (PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER) * sizeof(FIXP_DBL));
  ------------------
  |  |  117|    284|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1142|       |    /* Set deemphasis memory state for TD concealment */
 1143|    284|    acelp_mem->deemph_mem_wsyn = scaleValueSaturate(synth[-1], ACELP_OUTSCALE);
  ------------------
  |  |  121|    284|#define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|    284|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  |  |  ------------------
  |  |               #define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  120|    284|#define ACELP_HEADROOM 1
  |  |  ------------------
  ------------------
 1144|  46.2k|  } else {
 1145|       |    /* convert past [PIT_MAX_MAX+L_INTERPOL+M_LP_FILTER_ORDER] synthesis to
 1146|       |     * preemph domain */
 1147|  46.2k|    E_UTIL_preemph(&synth[-(PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER)],
  ------------------
  |  |  142|  46.2k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  46.2k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  46.2k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  46.2k|   (6 *                                                                        \
  |  |  |  |  136|  46.2k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  46.2k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  46.2k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  46.2k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  E_UTIL_preemph(&synth[-(PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER)],
  ------------------
  |  |  153|  46.2k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
                  E_UTIL_preemph(&synth[-(PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER)],
  ------------------
  |  |  117|  46.2k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1148|  46.2k|                   synth_buf, PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER);
  ------------------
  |  |  142|  46.2k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  46.2k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  46.2k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  46.2k|   (6 *                                                                        \
  |  |  |  |  136|  46.2k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  46.2k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  46.2k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  46.2k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 synth_buf, PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER);
  ------------------
  |  |  153|  46.2k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
                                 synth_buf, PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER);
  ------------------
  |  |  117|  46.2k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1149|  46.2k|    scaleValuesSaturate(synth_buf, PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER,
  ------------------
  |  |  142|  46.2k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  46.2k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  46.2k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  46.2k|   (6 *                                                                        \
  |  |  |  |  136|  46.2k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  46.2k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  46.2k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  46.2k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  scaleValuesSaturate(synth_buf, PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER,
  ------------------
  |  |  153|  46.2k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
                  scaleValuesSaturate(synth_buf, PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER,
  ------------------
  |  |  117|  46.2k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1150|  46.2k|                        ACELP_OUTSCALE);
  ------------------
  |  |  121|  46.2k|#define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|  46.2k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  |  |  ------------------
  |  |               #define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  120|  46.2k|#define ACELP_HEADROOM 1
  |  |  ------------------
  ------------------
 1151|  46.2k|  }
 1152|       |
 1153|       |  /* Set deemphasis memory state */
 1154|  46.5k|  acelp_mem->de_emph_mem = scaleValueSaturate(synth[-1], ACELP_OUTSCALE);
  ------------------
  |  |  121|  46.5k|#define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  108|  46.5k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  |  |  ------------------
  |  |               #define ACELP_OUTSCALE (MDCT_OUT_HEADROOM - ACELP_HEADROOM)
  |  |  ------------------
  |  |  |  |  120|  46.5k|#define ACELP_HEADROOM 1
  |  |  ------------------
  ------------------
 1155|       |
 1156|       |  /* update acelp synth filter memory */
 1157|  46.5k|  FDKmemcpy(acelp_mem->old_syn_mem,
 1158|  46.5k|            &syn[PIT_MAX_MAX + L_INTERPOL - M_LP_FILTER_ORDER],
  ------------------
  |  |  142|  46.5k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  46.5k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  46.5k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  46.5k|   (6 *                                                                        \
  |  |  |  |  136|  46.5k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  46.5k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  46.5k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  46.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  46.5k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  46.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          &syn[PIT_MAX_MAX + L_INTERPOL - M_LP_FILTER_ORDER],
  ------------------
  |  |  153|  46.5k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
                          &syn[PIT_MAX_MAX + L_INTERPOL - M_LP_FILTER_ORDER],
  ------------------
  |  |  117|  46.5k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1159|  46.5k|            M_LP_FILTER_ORDER * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  46.5k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1160|       |
 1161|  46.5k|  if (clearOldExc) {
  ------------------
  |  Branch (1161:7): [True: 1, False: 46.5k]
  ------------------
 1162|      1|    FDKmemclear(old_exc_mem, (PIT_MAX_MAX + L_INTERPOL) * sizeof(FIXP_DBL));
  ------------------
  |  |  142|      1|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|      1|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      1|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|      1|   (6 *                                                                        \
  |  |  |  |  136|      1|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|      1|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|      1|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|      1|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      1|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|      1|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  FDKmemclear(old_exc_mem, (PIT_MAX_MAX + L_INTERPOL) * sizeof(FIXP_DBL));
  ------------------
  |  |  153|      1|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
 1163|      1|    C_ALLOC_SCRATCH_END(synth_buf, FIXP_DBL,
 1164|      1|                        PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER);
 1165|      1|    return;
 1166|      1|  }
 1167|       |
 1168|       |  /* update past [PIT_MAX_MAX+L_INTERPOL] samples of exc memory */
 1169|  46.5k|  if (last_lpd_mode == 1) {        /* last frame was TCX20 */
  ------------------
  |  Branch (1169:7): [True: 22.3k, False: 24.2k]
  ------------------
 1170|  22.3k|    if (last_last_lpd_mode == 0) { /* ACELP -> TCX20 -> ACELP transition */
  ------------------
  |  Branch (1170:9): [True: 11.1k, False: 11.1k]
  ------------------
 1171|       |      /* Delay valid part of excitation buffer (from previous ACELP frame) by
 1172|       |       * l_div samples */
 1173|  11.1k|      FDKmemmove(old_exc_mem, old_exc_mem + l_div,
 1174|  11.1k|                 sizeof(FIXP_DBL) * l_div_partial);
 1175|  11.1k|    } else if (last_last_lpd_mode > 0) { /* TCX -> TCX20 -> ACELP transition */
  ------------------
  |  Branch (1175:16): [True: 11.1k, False: 0]
  ------------------
 1176|  11.1k|      E_UTIL_residu(A_old, A_old_exp, syn, old_exc_mem, l_div_partial);
 1177|  11.1k|    }
 1178|  22.3k|    E_UTIL_residu(A_new, A_new_exp, syn + l_div_partial,
 1179|  22.3k|                  old_exc_mem + l_div_partial, l_div);
 1180|  24.2k|  } else { /* prev frame was FD, TCX40 or TCX80 */
 1181|  24.2k|    int exc_A_new_length = (coreCoderFrameLength / 2 > PIT_MAX_MAX + L_INTERPOL)
  ------------------
  |  |  142|  24.2k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  24.2k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  24.2k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  24.2k|   (6 *                                                                        \
  |  |  |  |  136|  24.2k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  24.2k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  24.2k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  24.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  24.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  24.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  24.2k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  24.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  int exc_A_new_length = (coreCoderFrameLength / 2 > PIT_MAX_MAX + L_INTERPOL)
  ------------------
  |  |  153|  24.2k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
  |  Branch (1181:28): [True: 13.4k, False: 10.8k]
  ------------------
 1182|  24.2k|                               ? PIT_MAX_MAX + L_INTERPOL
  ------------------
  |  |  142|  13.4k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  13.4k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  13.4k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  13.4k|   (6 *                                                                        \
  |  |  |  |  136|  13.4k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  13.4k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  13.4k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  13.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  13.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  13.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  13.4k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  13.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                             ? PIT_MAX_MAX + L_INTERPOL
  ------------------
  |  |  153|  13.4k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
 1183|  24.2k|                               : coreCoderFrameLength / 2;
 1184|  24.2k|    int exc_A_old_length = PIT_MAX_MAX + L_INTERPOL - exc_A_new_length;
  ------------------
  |  |  142|  24.2k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  24.2k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  24.2k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  24.2k|   (6 *                                                                        \
  |  |  |  |  136|  24.2k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  24.2k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  24.2k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  24.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  24.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  24.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  24.2k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  24.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  int exc_A_old_length = PIT_MAX_MAX + L_INTERPOL - exc_A_new_length;
  ------------------
  |  |  153|  24.2k|  (16 + 1) /* Length of filter for interpolation (acelp decoder) */
  ------------------
 1185|  24.2k|    E_UTIL_residu(A_old, A_old_exp, syn, old_exc_mem, exc_A_old_length);
 1186|  24.2k|    E_UTIL_residu(A_new, A_new_exp, &syn[exc_A_old_length],
 1187|  24.2k|                  &old_exc_mem[exc_A_old_length], exc_A_new_length);
 1188|  24.2k|  }
 1189|  46.5k|  C_ALLOC_SCRATCH_END(synth_buf, FIXP_DBL,
 1190|  46.5k|                      PIT_MAX_MAX + L_INTERPOL + M_LP_FILTER_ORDER);
 1191|       |
 1192|  46.5k|  return;
 1193|  46.5k|}
_Z24CLpd_ACELP_GetFreeExcMemP15CAcelpStaticMemi:
 1195|  40.0k|FIXP_DBL *CLpd_ACELP_GetFreeExcMem(CAcelpStaticMem *acelp_mem, INT length) {
 1196|  40.0k|  FDK_ASSERT(length <= PIT_MAX_MAX + L_INTERPOL);
  ------------------
  |  |  221|  40.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1196:3): [True: 40.0k, False: 0]
  ------------------
 1197|  40.0k|  return acelp_mem->old_exc_mem;
 1198|  40.0k|}
_Z14CLpd_AcelpReadP13FDK_BITSTREAMP17CAcelpChannelDataiii:
 1202|  98.2k|                   INT i_offset) {
 1203|  98.2k|  int nb_subfr = coreCoderFrameLength / L_DIV;
  ------------------
  |  |  192|  98.2k|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|  98.2k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  98.2k|#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|  98.2k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1204|  98.2k|  const UCHAR *num_acb_index_bits =
 1205|  98.2k|      (nb_subfr == 4) ? num_acb_idx_bits_table[0] : num_acb_idx_bits_table[1];
  ------------------
  |  Branch (1205:7): [True: 48.9k, False: 49.3k]
  ------------------
 1206|  98.2k|  int nbits;
 1207|  98.2k|  int error = 0;
 1208|       |
 1209|  98.2k|  const int PIT_MIN = PIT_MIN_12k8 + i_offset;
  ------------------
  |  |  120|  98.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  ------------------
 1210|  98.2k|  const int PIT_FR2 = PIT_FR2_12k8 - i_offset;
  ------------------
  |  |  111|  98.2k|#define PIT_FR2_12k8 128 /* Minimum pitch lag with resolution 1/2      */
  ------------------
 1211|  98.2k|  const int PIT_FR1 = PIT_FR1_12k8;
  ------------------
  |  |  112|  98.2k|#define PIT_FR1_12k8 160 /* Minimum pitch lag with resolution 1        */
  ------------------
 1212|  98.2k|  const int PIT_MAX = PIT_MAX_12k8 + (6 * i_offset);
  ------------------
  |  |  121|  98.2k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  ------------------
 1213|  98.2k|  int T0, T0_frac, T0_min = 0, T0_max;
 1214|       |
 1215|  98.2k|  if (PIT_MAX > PIT_MAX_MAX) {
  ------------------
  |  |  142|  98.2k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  98.2k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  98.2k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  98.2k|   (6 *                                                                        \
  |  |  |  |  136|  98.2k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  98.2k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  98.2k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  98.2k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  98.2k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  98.2k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1215:7): [True: 0, False: 98.2k]
  ------------------
 1216|      0|    error = AAC_DEC_DECODE_FRAME_ERROR;
 1217|      0|    goto bail;
 1218|      0|  }
 1219|       |
 1220|  98.2k|  acelp->acelp_core_mode = acelp_core_mode;
 1221|       |
 1222|  98.2k|  nbits = MapCoreMode2NBits(acelp_core_mode);
 1223|       |
 1224|       |  /* decode mean energy with 2 bits : 18, 30, 42 or 54 dB */
 1225|  98.2k|  acelp->mean_energy = FDKreadBits(hBs, 2);
 1226|       |
 1227|   441k|  for (int sfr = 0; sfr < nb_subfr; sfr++) {
  ------------------
  |  Branch (1227:21): [True: 343k, False: 98.2k]
  ------------------
 1228|       |    /* read ACB index and store T0 and T0_frac for each ACELP subframe. */
 1229|   343k|    error = DecodePitchLag(hBs, num_acb_index_bits[sfr], PIT_MIN, PIT_FR2,
 1230|   343k|                           PIT_FR1, PIT_MAX, &T0, &T0_frac, &T0_min, &T0_max);
 1231|   343k|    if (error) {
  ------------------
  |  Branch (1231:9): [True: 0, False: 343k]
  ------------------
 1232|      0|      goto bail;
 1233|      0|    }
 1234|   343k|    acelp->T0[sfr] = (USHORT)T0;
 1235|   343k|    acelp->T0_frac[sfr] = (UCHAR)T0_frac;
 1236|   343k|    acelp->ltp_filtering_flag[sfr] = FDKreadBits(hBs, 1);
 1237|   343k|    switch (nbits) {
 1238|  33.3k|      case 12: /* 12 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1238:7): [True: 33.3k, False: 310k]
  ------------------
 1239|  33.3k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 1);
 1240|  33.3k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 5);
 1241|  33.3k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 1);
 1242|  33.3k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 5);
 1243|  33.3k|        break;
 1244|  86.6k|      case 16: /* 16 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1244:7): [True: 86.6k, False: 256k]
  ------------------
 1245|  86.6k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 1);
 1246|  86.6k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 5);
 1247|  86.6k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 5);
 1248|  86.6k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 5);
 1249|  86.6k|        break;
 1250|   143k|      case 20: /* 20 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1250:7): [True: 143k, False: 200k]
  ------------------
 1251|   143k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 5);
 1252|   143k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 5);
 1253|   143k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 5);
 1254|   143k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 5);
 1255|   143k|        break;
 1256|  13.7k|      case 28: /* 28 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1256:7): [True: 13.7k, False: 329k]
  ------------------
 1257|  13.7k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 9);
 1258|  13.7k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 9);
 1259|  13.7k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 5);
 1260|  13.7k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 5);
 1261|  13.7k|        break;
 1262|  14.1k|      case 36: /* 36 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1262:7): [True: 14.1k, False: 329k]
  ------------------
 1263|  14.1k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 9);
 1264|  14.1k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 9);
 1265|  14.1k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 9);
 1266|  14.1k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 9);
 1267|  14.1k|        break;
 1268|  9.90k|      case 44: /* 44 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1268:7): [True: 9.90k, False: 333k]
  ------------------
 1269|  9.90k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 13);
 1270|  9.90k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 13);
 1271|  9.90k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 9);
 1272|  9.90k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 9);
 1273|  9.90k|        break;
 1274|  5.99k|      case 52: /* 52 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1274:7): [True: 5.99k, False: 337k]
  ------------------
 1275|  5.99k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 13);
 1276|  5.99k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 13);
 1277|  5.99k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 13);
 1278|  5.99k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 13);
 1279|  5.99k|        break;
 1280|  36.2k|      case 64: /* 64 bits AMR-WB codebook is used */
  ------------------
  |  Branch (1280:7): [True: 36.2k, False: 307k]
  ------------------
 1281|  36.2k|        acelp->icb_index[sfr][0] = FDKreadBits(hBs, 2);
 1282|  36.2k|        acelp->icb_index[sfr][1] = FDKreadBits(hBs, 2);
 1283|  36.2k|        acelp->icb_index[sfr][2] = FDKreadBits(hBs, 2);
 1284|  36.2k|        acelp->icb_index[sfr][3] = FDKreadBits(hBs, 2);
 1285|  36.2k|        acelp->icb_index[sfr][4] = FDKreadBits(hBs, 14);
 1286|  36.2k|        acelp->icb_index[sfr][5] = FDKreadBits(hBs, 14);
 1287|  36.2k|        acelp->icb_index[sfr][6] = FDKreadBits(hBs, 14);
 1288|  36.2k|        acelp->icb_index[sfr][7] = FDKreadBits(hBs, 14);
 1289|  36.2k|        break;
 1290|      0|      default:
  ------------------
  |  Branch (1290:7): [True: 0, False: 343k]
  ------------------
 1291|      0|        FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1291:9): [Folded, False: 0]
  ------------------
 1292|      0|        break;
 1293|   343k|    }
 1294|   343k|    acelp->gains[sfr] = FDKreadBits(hBs, 7);
 1295|   343k|  }
 1296|       |
 1297|  98.2k|bail:
 1298|  98.2k|  return error;
 1299|  98.2k|}
usacdec_acelp.cpp:_ZL15ConcealPitchLagP15CAcelpStaticMemiPiS1_:
  717|  6.44k|                            int *pT0, int *pT0_frac) {
  718|  6.44k|  USHORT *pold_T0 = &acelp_mem->old_T0;
  719|  6.44k|  UCHAR *pold_T0_frac = &acelp_mem->old_T0_frac;
  720|       |
  721|  6.44k|  if ((int)*pold_T0 >= PIT_MAX) {
  ------------------
  |  Branch (721:7): [True: 10, False: 6.43k]
  ------------------
  722|     10|    *pold_T0 = (USHORT)(PIT_MAX - 5);
  723|     10|  }
  724|  6.44k|  *pT0 = (int)*pold_T0;
  725|  6.44k|  *pT0_frac = (int)*pold_T0_frac;
  726|  6.44k|}
usacdec_acelp.cpp:_ZL17MapCoreMode2NBitsi:
  730|   435k|static int MapCoreMode2NBits(int core_mode) {
  731|   435k|  return (int)tab_coremode2nbits[core_mode];
  732|   435k|}
usacdec_acelp.cpp:_ZL12Preemph_codePs:
  147|   343k|) {
  148|   343k|  int i;
  149|   343k|  FIXP_DBL L_tmp;
  150|       |
  151|       |  /* ARM926: 12 cycles per sample */
  152|  21.9M|  for (i = L_SUBFR - 1; i > 0; i--) {
  ------------------
  |  |  146|   343k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (152:25): [True: 21.6M, False: 343k]
  ------------------
  153|  21.6M|    L_tmp = FX_COD2FX_DBL(x[i]);
  ------------------
  |  |  110|  21.6M|#define FX_COD2FX_DBL(x) (FX_SGL2FX_DBL(x))
  |  |  ------------------
  |  |  |  |  219|  21.6M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  154|  21.6M|    L_tmp -= fMultDiv2(x[i - 1], TILT_CODE2);
  ------------------
  |  |  114|  21.6M|  FL2FXCONST_SGL(0.3f * 2.0f) /* ACELP code pre-emphasis factor ( *2 )      */
  |  |  ------------------
  |  |  |  |  180|  21.6M|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  21.6M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 21.6M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  21.6M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  21.6M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  21.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 21.6M]
  |  |  |  |  ------------------
  |  |  |  |  183|  21.6M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  21.6M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  21.6M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  21.6M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  21.6M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  21.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  21.6M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  21.6M|    x[i] = FX_DBL2FX_COD(L_tmp);
  ------------------
  |  |  111|  21.6M|#define FX_DBL2FX_COD(x) FX_DBL2FX_SGL((x) + (FIXP_DBL)0x8000)
  |  |  ------------------
  |  |  |  |  220|  21.6M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  21.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|  21.6M|  }
  157|   343k|}
usacdec_acelp.cpp:_ZL8Pit_shrpPsi:
  167|   343k|) {
  168|   343k|  int i;
  169|   343k|  FIXP_DBL L_tmp;
  170|       |
  171|  2.47M|  for (i = pit_lag; i < L_SUBFR; i++) {
  ------------------
  |  |  146|  2.47M|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (171:21): [True: 2.13M, False: 343k]
  ------------------
  172|  2.13M|    L_tmp = FX_COD2FX_DBL(x[i]);
  ------------------
  |  |  110|  2.13M|#define FX_COD2FX_DBL(x) (FX_SGL2FX_DBL(x))
  |  |  ------------------
  |  |  |  |  219|  2.13M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.13M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.13M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  173|  2.13M|    L_tmp += fMult(x[i - pit_lag], PIT_SHARP);
  ------------------
  |  |  116|  2.13M|  FL2FXCONST_SGL(0.85f) /* pitch sharpening factor                    */
  |  |  ------------------
  |  |  |  |  180|  2.13M|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  2.13M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 2.13M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  2.13M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.13M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  2.13M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 2.13M]
  |  |  |  |  ------------------
  |  |  |  |  183|  2.13M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  2.13M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  2.13M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  2.13M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.13M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  2.13M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  2.13M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|  2.13M|    x[i] = FX_DBL2FX_COD(L_tmp);
  ------------------
  |  |  111|  2.13M|#define FX_DBL2FX_COD(x) FX_DBL2FX_SGL((x) + (FIXP_DBL)0x8000)
  |  |  ------------------
  |  |  |  |  220|  2.13M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.13M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.13M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  175|  2.13M|  }
  176|       |
  177|   343k|  return;
  178|   343k|}
usacdec_acelp.cpp:_ZL12D_gain2_plusiPsS_PiiiS_S0_S0_S0_:
  201|   343k|                         FIXP_DBL *pEner_code, int *pEner_code_e) {
  202|   343k|  FIXP_DBL Ltmp;
  203|   343k|  FIXP_DBL gcode0, gcode_inov;
  204|   343k|  INT gcode0_e, gcode_inov_e;
  205|   343k|  int i;
  206|       |
  207|   343k|  FIXP_DBL ener_code;
  208|   343k|  INT ener_code_e;
  209|       |
  210|       |  /* ener_code = sum(code[]^2) */
  211|   343k|  ener_code = FIXP_DBL(0);
  212|  22.3M|  for (i = 0; i < L_SUBFR; i++) {
  ------------------
  |  |  146|  22.3M|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (212:15): [True: 21.9M, False: 343k]
  ------------------
  213|  21.9M|    ener_code += fPow2Div2(code[i]);
  214|  21.9M|  }
  215|       |
  216|   343k|  ener_code_e = fMax(fNorm(ener_code) - 1, 0);
  217|   343k|  ener_code <<= ener_code_e;
  218|   343k|  ener_code_e = 2 * SF_CODE + 1 - ener_code_e;
  ------------------
  |  |  107|   343k|#define SF_CODE 6       /* exponent of code[], fixed codebook vector */
  ------------------
  219|       |
  220|       |  /* export energy of code for calc_period_factor() */
  221|   343k|  *pEner_code = ener_code;
  222|   343k|  *pEner_code_e = ener_code_e;
  223|       |
  224|   343k|  ener_code += scaleValue(FL2FXCONST_DBL(0.01f), -ener_code_e);
  ------------------
  |  |  192|   343k|  (FIXP_DBL)(                                                                \
  |  |  193|   343k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 343k, Folded]
  |  |  ------------------
  |  |  194|   343k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   343k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 343k]
  |  |  ------------------
  |  |  195|   343k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   343k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   343k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   343k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   343k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   343k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|       |
  226|       |  /* ener_code *= 1/L_SUBFR, and make exponent even (because of square root
  227|       |   * below). */
  228|   343k|  if (ener_code_e & 1) {
  ------------------
  |  Branch (228:7): [True: 152k, False: 190k]
  ------------------
  229|   152k|    ener_code_e -= 5;
  230|   152k|    ener_code >>= 1;
  231|   190k|  } else {
  232|   190k|    ener_code_e -= 6;
  233|   190k|  }
  234|   343k|  gcode_inov = invSqrtNorm2(ener_code, &gcode0_e);
  235|   343k|  gcode_inov_e = gcode0_e - (ener_code_e >> 1);
  236|       |
  237|   343k|  if (bfi) {
  ------------------
  |  Branch (237:7): [True: 6.44k, False: 336k]
  ------------------
  238|  6.44k|    FIXP_DBL tgcode;
  239|  6.44k|    FIXP_SGL tgpit;
  240|       |
  241|  6.44k|    tgpit = *past_gpit;
  242|       |
  243|  6.44k|    if (tgpit > FL2FXCONST_SGL(0.95f / (1 << SF_GAIN_P))) {
  ------------------
  |  |  180|  6.44k|  (FIXP_SGL)(                                                                \
  |  |  181|  6.44k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 6.44k, Folded]
  |  |  ------------------
  |  |  182|  6.44k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  6.44k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.44k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 6.44k]
  |  |  ------------------
  |  |  183|  6.44k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  6.44k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  6.44k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  6.44k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  6.44k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.44k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  6.44k|          : ((((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 (243:9): [True: 91, False: 6.35k]
  ------------------
  244|     91|      tgpit = FL2FXCONST_SGL(0.95f / (1 << SF_GAIN_P));
  ------------------
  |  |  180|     91|  (FIXP_SGL)(                                                                \
  |  |  181|     91|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 91, Folded]
  |  |  ------------------
  |  |  182|     91|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|     91|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     91|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 91]
  |  |  ------------------
  |  |  183|     91|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|     91|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|     91|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|     91|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|     91|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     91|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|     91|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  245|  6.35k|    } else if (tgpit < FL2FXCONST_SGL(0.5f / (1 << SF_GAIN_P))) {
  ------------------
  |  |  180|  6.35k|  (FIXP_SGL)(                                                                \
  |  |  181|  6.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 6.35k, Folded]
  |  |  ------------------
  |  |  182|  6.35k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  6.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 6.35k]
  |  |  ------------------
  |  |  183|  6.35k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  6.35k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  6.35k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  6.35k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  6.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  6.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 (245:16): [True: 4.70k, False: 1.65k]
  ------------------
  246|  4.70k|      tgpit = FL2FXCONST_SGL(0.5f / (1 << SF_GAIN_P));
  ------------------
  |  |  180|  4.70k|  (FIXP_SGL)(                                                                \
  |  |  181|  4.70k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 4.70k, Folded]
  |  |  ------------------
  |  |  182|  4.70k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  4.70k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  4.70k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 4.70k]
  |  |  ------------------
  |  |  183|  4.70k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  4.70k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  4.70k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  4.70k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  4.70k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  4.70k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  4.70k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|  4.70k|    }
  248|  6.44k|    *gain_pit = tgpit;
  249|  6.44k|    tgpit = FX_DBL2FX_SGL(fMult(tgpit, FL2FXCONST_DBL(0.95f)));
  ------------------
  |  |  220|  25.7k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  6.44k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  6.44k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 6.44k]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 6.44k, Folded]
  |  |  ------------------
  ------------------
  250|  6.44k|    *past_gpit = tgpit;
  251|       |
  252|  6.44k|    tgpit = FL2FXCONST_SGL(1.4f / (1 << SF_GAIN_P)) - tgpit;
  ------------------
  |  |  180|  6.44k|  (FIXP_SGL)(                                                                \
  |  |  181|  6.44k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 6.44k, Folded]
  |  |  ------------------
  |  |  182|  6.44k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  6.44k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.44k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 6.44k]
  |  |  ------------------
  |  |  183|  6.44k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  6.44k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  6.44k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  6.44k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  6.44k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.44k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  6.44k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  253|  6.44k|    tgcode = fMult(*past_gcode, tgpit) << SF_GAIN_P;
  ------------------
  |  |  110|  6.44k|#define SF_GAIN_P 1     /* exponent of gain_pit */
  ------------------
  254|  6.44k|    *gain_code = scaleValue(fMult(tgcode, gcode_inov), gcode_inov_e);
  255|  6.44k|    *past_gcode = tgcode;
  256|       |
  257|  6.44k|    return;
  258|  6.44k|  }
  259|       |
  260|       |  /*-------------- Decode gains ---------------*/
  261|       |  /*
  262|       |   gcode0 = pow(10.0, (float)mean_ener/20.0);
  263|       |   gcode0 = gcode0 / sqrt(ener_code/L_SUBFR);
  264|       |   */
  265|   336k|  gcode0 = pow_10_mean_energy[mean_ener_bits];
  266|   336k|  gcode0 = fMultDiv2(gcode0, gcode_inov);
  267|   336k|  gcode0_e = gcode0_e + SF_MEAN_ENER_LG10 - (ener_code_e >> 1) + 1;
  ------------------
  |  |  192|   336k|#define SF_MEAN_ENER_LG10 9
  ------------------
  268|       |
  269|   336k|  i = index << 1;
  270|   336k|  *gain_pit = t_qua_gain7b[i]; /* adaptive codebook gain */
  271|       |  /* t_qua_gain[ind2p1] : fixed codebook gain correction factor */
  272|   336k|  Ltmp = fMult(t_qua_gain7b[i + 1], gcode0);
  273|   336k|  *gain_code = scaleValue(Ltmp, gcode0_e - SF_GAIN_C + SF_QUA_GAIN7B);
  ------------------
  |  |  108|   336k|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  ------------------
                *gain_code = scaleValue(Ltmp, gcode0_e - SF_GAIN_C + SF_QUA_GAIN7B);
  ------------------
  |  |  134|   336k|#define SF_QUA_GAIN7B 4
  ------------------
  274|       |
  275|       |  /* update bad frame handler */
  276|   336k|  *past_gpit = *gain_pit;
  277|       |
  278|       |  /*--------------------------------------------------------
  279|       |    past_gcode  = gain_code/gcode_inov
  280|       |   --------------------------------------------------------*/
  281|   336k|  {
  282|   336k|    FIXP_DBL gcode_m;
  283|   336k|    INT gcode_e;
  284|       |
  285|   336k|    gcode_m = fDivNormHighPrec(Ltmp, gcode_inov, &gcode_e);
  286|   336k|    gcode_e += (gcode0_e - SF_GAIN_C + SF_QUA_GAIN7B) - (gcode_inov_e);
  ------------------
  |  |  108|   336k|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  ------------------
                  gcode_e += (gcode0_e - SF_GAIN_C + SF_QUA_GAIN7B) - (gcode_inov_e);
  ------------------
  |  |  134|   336k|#define SF_QUA_GAIN7B 4
  ------------------
  287|   336k|    *past_gcode = scaleValue(gcode_m, gcode_e);
  288|   336k|  }
  289|   336k|}
usacdec_acelp.cpp:_ZL18calc_period_factorPisiii:
  303|   343k|                                   int ener_code_e) {
  304|   343k|  int ener_exc_e, L_tmp_e, s = 0;
  305|   343k|  FIXP_DBL ener_exc, L_tmp;
  306|   343k|  FIXP_DBL period_fac;
  307|       |
  308|       |  /* energy of pitch excitation */
  309|   343k|  ener_exc = (FIXP_DBL)0;
  310|  22.3M|  for (int i = 0; i < L_SUBFR; i++) {
  ------------------
  |  |  146|  22.3M|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (310:19): [True: 21.9M, False: 343k]
  ------------------
  311|  21.9M|    ener_exc += fPow2Div2(exc[i]) >> s;
  312|  21.9M|    if (ener_exc >= FL2FXCONST_DBL(0.5f)) {
  ------------------
  |  |  192|  21.9M|  (FIXP_DBL)(                                                                \
  |  |  193|  21.9M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.9M, Folded]
  |  |  ------------------
  |  |  194|  21.9M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.9M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.9M]
  |  |  ------------------
  |  |  195|  21.9M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.9M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.9M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.9M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.9M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.9M|          : ((((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 (312:9): [True: 88.6k, False: 21.8M]
  ------------------
  313|  88.6k|      ener_exc >>= 1;
  314|  88.6k|      s++;
  315|  88.6k|    }
  316|  21.9M|  }
  317|       |
  318|   343k|  ener_exc_e = fNorm(ener_exc);
  319|   343k|  ener_exc = fMult(ener_exc << ener_exc_e, fPow2(gain_pit));
  320|   343k|  if (ener_exc != (FIXP_DBL)0) {
  ------------------
  |  Branch (320:7): [True: 303k, False: 39.3k]
  ------------------
  321|   303k|    ener_exc_e = 2 * SF_EXC + 1 + 2 * SF_GAIN_P - ener_exc_e + s;
  ------------------
  |  |  109|   303k|#define SF_EXC 16       /* exponent of exc[] and exc2[], excitation buffer */
  ------------------
                  ener_exc_e = 2 * SF_EXC + 1 + 2 * SF_GAIN_P - ener_exc_e + s;
  ------------------
  |  |  110|   303k|#define SF_GAIN_P 1     /* exponent of gain_pit */
  ------------------
  322|   303k|  } else {
  323|  39.3k|    ener_exc_e = 0;
  324|  39.3k|  }
  325|       |
  326|       |  /* energy of innovative code excitation */
  327|       |  /* L_tmp = ener_code * gain_code*gain_code; */
  328|   343k|  L_tmp_e = fNorm(gain_code);
  329|   343k|  L_tmp = fPow2(gain_code << L_tmp_e);
  330|   343k|  L_tmp = fMult(ener_code, L_tmp);
  331|   343k|  L_tmp_e = 2 * SF_GAIN_C + ener_code_e - 2 * L_tmp_e;
  ------------------
  |  |  108|   343k|#define SF_GAIN_C 16    /* exponent of gain code and smoothed gain code */
  ------------------
  332|       |
  333|       |  /* Find common exponent */
  334|   343k|  {
  335|   343k|    FIXP_DBL num, den;
  336|   343k|    int exp_diff;
  337|       |
  338|   343k|    exp_diff = ener_exc_e - L_tmp_e;
  339|   343k|    if (exp_diff >= 0) {
  ------------------
  |  Branch (339:9): [True: 201k, False: 141k]
  ------------------
  340|   201k|      ener_exc >>= 1;
  341|   201k|      if (exp_diff <= DFRACT_BITS - 2) {
  ------------------
  |  |  113|   201k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (341:11): [True: 201k, False: 261]
  ------------------
  342|   201k|        L_tmp >>= exp_diff + 1;
  343|   201k|      } else {
  344|    261|        L_tmp = (FIXP_DBL)0;
  345|    261|      }
  346|   201k|      den = ener_exc + L_tmp;
  347|   201k|      if (ener_exc_e < DFRACT_BITS - 1) {
  ------------------
  |  |  113|   201k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (347:11): [True: 137k, False: 63.7k]
  ------------------
  348|   137k|        den += scaleValue(FL2FXCONST_DBL(0.01f), -ener_exc_e - 1);
  ------------------
  |  |  192|   137k|  (FIXP_DBL)(                                                                \
  |  |  193|   137k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 137k, Folded]
  |  |  ------------------
  |  |  194|   137k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   137k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   137k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 137k]
  |  |  ------------------
  |  |  195|   137k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   137k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   137k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   137k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   137k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   137k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   137k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  349|   137k|      }
  350|   201k|    } else {
  351|   141k|      if (exp_diff >= -(DFRACT_BITS - 2)) {
  ------------------
  |  |  113|   141k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (351:11): [True: 141k, False: 516]
  ------------------
  352|   141k|        ener_exc >>= 1 - exp_diff;
  353|   141k|      } else {
  354|    516|        ener_exc = (FIXP_DBL)0;
  355|    516|      }
  356|   141k|      L_tmp >>= 1;
  357|   141k|      den = ener_exc + L_tmp;
  358|   141k|      if (L_tmp_e < DFRACT_BITS - 1) {
  ------------------
  |  |  113|   141k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (358:11): [True: 137k, False: 4.87k]
  ------------------
  359|   137k|        den += scaleValue(FL2FXCONST_DBL(0.01f), -L_tmp_e - 1);
  ------------------
  |  |  192|   137k|  (FIXP_DBL)(                                                                \
  |  |  193|   137k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 137k, Folded]
  |  |  ------------------
  |  |  194|   137k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   137k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   137k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 137k]
  |  |  ------------------
  |  |  195|   137k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   137k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   137k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   137k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   137k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   137k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   137k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  360|   137k|      }
  361|   141k|    }
  362|   343k|    num = (ener_exc - L_tmp);
  363|   343k|    num >>= SF_PFAC;
  ------------------
  |  |  111|   343k|#define SF_PFAC 0       /* exponent of period/voicing factor */
  ------------------
  364|       |
  365|   343k|    if (den > (FIXP_DBL)0) {
  ------------------
  |  Branch (365:9): [True: 343k, False: 103]
  ------------------
  366|   343k|      if (ener_exc > L_tmp) {
  ------------------
  |  Branch (366:11): [True: 125k, False: 217k]
  ------------------
  367|   125k|        period_fac = schur_div(num, den, 16);
  368|   217k|      } else {
  369|   217k|        period_fac = -schur_div(-num, den, 16);
  370|   217k|      }
  371|   343k|    } else {
  372|    103|      period_fac = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|    103|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  373|    103|    }
  374|   343k|  }
  375|       |
  376|       |  /* exponent = SF_PFAC */
  377|   343k|  return period_fac;
  378|   343k|}
usacdec_acelp.cpp:_ZL14noise_enhanceriisPi:
  405|   343k|{
  406|   343k|  FIXP_DBL fac, L_tmp, gc_thres;
  407|       |
  408|   343k|  gc_thres = *p_gc_threshold;
  409|       |
  410|   343k|  L_tmp = gain_code;
  411|   343k|  if (L_tmp < gc_thres) {
  ------------------
  |  Branch (411:7): [True: 155k, False: 187k]
  ------------------
  412|   155k|    L_tmp += fMultDiv2(gain_code,
  413|   155k|                       FL2FXCONST_SGL(2.0 * 0.19f)); /* +1.5dB => *(1.0+0.19) */
  ------------------
  |  |  180|   155k|  (FIXP_SGL)(                                                                \
  |  |  181|   155k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 155k, Folded]
  |  |  ------------------
  |  |  182|   155k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   155k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   155k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 155k]
  |  |  ------------------
  |  |  183|   155k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   155k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   155k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   155k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   155k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   155k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   155k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  414|   155k|    if (L_tmp > gc_thres) {
  ------------------
  |  Branch (414:9): [True: 13.3k, False: 141k]
  ------------------
  415|  13.3k|      L_tmp = gc_thres;
  416|  13.3k|    }
  417|   187k|  } else {
  418|   187k|    L_tmp = fMult(gain_code,
  419|   187k|                  FL2FXCONST_SGL(1.0f / 1.19f)); /* -1.5dB => *10^(-1.5/20) */
  ------------------
  |  |  180|   187k|  (FIXP_SGL)(                                                                \
  |  |  181|   187k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 187k, Folded]
  |  |  ------------------
  |  |  182|   187k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   187k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   187k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 187k]
  |  |  ------------------
  |  |  183|   187k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   187k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   187k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   187k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   187k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   187k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   187k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  420|   187k|    if (L_tmp < gc_thres) {
  ------------------
  |  Branch (420:9): [True: 13.6k, False: 174k]
  ------------------
  421|  13.6k|      L_tmp = gc_thres;
  422|  13.6k|    }
  423|   187k|  }
  424|   343k|  *p_gc_threshold = L_tmp;
  425|       |
  426|       |  /* voicing factor     lambda = 0.5*(1-period_fac) */
  427|       |  /* gain smoothing factor S_m = lambda*stab_fac  (=fac)
  428|       |                               = 0.5(stab_fac - stab_fac * period_fac) */
  429|   343k|  fac = (FX_SGL2FX_DBL(stab_fac) >> (SF_PFAC + 1)) -
  ------------------
  |  |  219|   343k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   343k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
                fac = (FX_SGL2FX_DBL(stab_fac) >> (SF_PFAC + 1)) -
  ------------------
  |  |  111|   343k|#define SF_PFAC 0       /* exponent of period/voicing factor */
  ------------------
  430|   343k|        fMultDiv2(stab_fac, period_fac);
  431|       |  /* fac_e = SF_PFAC + SF_STAB */
  432|   343k|  FDK_ASSERT(fac >= (FIXP_DBL)0);
  ------------------
  |  |  221|   343k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (432:3): [True: 343k, False: 0]
  ------------------
  433|       |
  434|       |  /* gain_code = (float)((fac*tmp) + ((1.0-fac)*gain_code)); */
  435|   343k|  gain_code = fMult(fac, L_tmp) -
  436|   343k|              fMult(FL2FXCONST_DBL(-1.0f / (1 << (SF_PFAC + SF_STAB))) + fac,
  ------------------
  |  |  192|   343k|  (FIXP_DBL)(                                                                \
  |  |  193|   343k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 343k]
  |  |  ------------------
  |  |  194|   343k|          ? ((((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|   343k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   343k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 343k]
  |  |  ------------------
  |  |  199|   343k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   343k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   343k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   343k|                 ? (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|   343k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   343k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   343k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  437|   343k|                    gain_code);
  438|   343k|  gain_code <<= (SF_PFAC + SF_STAB);
  ------------------
  |  |  111|   343k|#define SF_PFAC 0       /* exponent of period/voicing factor */
  ------------------
                gain_code <<= (SF_PFAC + SF_STAB);
  ------------------
  |  |  114|   343k|#define SF_STAB 1       /* exponent of stability factor */
  ------------------
  439|       |
  440|   343k|  return gain_code;
  441|   343k|}
usacdec_acelp.cpp:_ZL14DecodePitchLagP13FDK_BITSTREAMhiiiiPiS1_S1_S1_:
  659|   343k|                          int *pT0, int *pT0_frac, int *pT0_min, int *pT0_max) {
  660|   343k|  int acb_idx;
  661|   343k|  int error = 0;
  662|   343k|  int T0, T0_frac;
  663|       |
  664|   343k|  FDK_ASSERT((num_acb_idx_bits == 9) || (num_acb_idx_bits == 6));
  ------------------
  |  |  221|   343k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (664:3): [True: 147k, False: 196k]
  |  Branch (664:3): [True: 196k, False: 0]
  |  Branch (664:3): [True: 343k, False: 0]
  ------------------
  665|       |
  666|   343k|  acb_idx = FDKreadBits(hBs, num_acb_idx_bits);
  667|       |
  668|   343k|  if (num_acb_idx_bits == 6) {
  ------------------
  |  Branch (668:7): [True: 196k, False: 147k]
  ------------------
  669|       |    /* When the pitch value is encoded on 6 bits, a pitch resolution of 1/4 is
  670|       |       always used in the range [T1-8, T1+7.75], where T1 is nearest integer to
  671|       |       the fractional pitch lag of the previous subframe.
  672|       |    */
  673|   196k|    T0 = *pT0_min + acb_idx / 4;
  674|   196k|    T0_frac = acb_idx & 0x3;
  675|   196k|  } else { /* num_acb_idx_bits == 9 */
  676|       |    /* When the pitch value is encoded on 9 bits, a fractional pitch delay is
  677|       |       used with resolutions 0.25 in the range [TMIN, TFR2-0.25], resolutions
  678|       |       0.5 in the range [TFR2, TFR1-0.5], and integers only in the range [TFR1,
  679|       |       TMAX]. NOTE: for small sampling rates TMAX can get smaller than TFR1.
  680|       |    */
  681|   147k|    int T0_min, T0_max;
  682|       |
  683|   147k|    if (acb_idx < (PIT_FR2 - PIT_MIN) * 4) {
  ------------------
  |  Branch (683:9): [True: 88.6k, False: 58.4k]
  ------------------
  684|       |      /* first interval with 0.25 pitch resolution */
  685|  88.6k|      T0 = PIT_MIN + (acb_idx / 4);
  686|  88.6k|      T0_frac = acb_idx & 0x3;
  687|  88.6k|    } else if (acb_idx < ((PIT_FR2 - PIT_MIN) * 4 + (PIT_FR1 - PIT_FR2) * 2)) {
  ------------------
  |  Branch (687:16): [True: 20.1k, False: 38.3k]
  ------------------
  688|       |      /* second interval with 0.5 pitch resolution */
  689|  20.1k|      acb_idx -= (PIT_FR2 - PIT_MIN) * 4;
  690|  20.1k|      T0 = PIT_FR2 + (acb_idx / 2);
  691|  20.1k|      T0_frac = (acb_idx & 0x1) * 2;
  692|  38.3k|    } else {
  693|       |      /* third interval with 1.0 pitch resolution */
  694|  38.3k|      T0 = acb_idx + PIT_FR1 - ((PIT_FR2 - PIT_MIN) * 4) -
  695|  38.3k|           ((PIT_FR1 - PIT_FR2) * 2);
  696|  38.3k|      T0_frac = 0;
  697|  38.3k|    }
  698|       |    /* find T0_min and T0_max for subframe 1 or 3 */
  699|   147k|    T0_min = T0 - 8;
  700|   147k|    if (T0_min < PIT_MIN) {
  ------------------
  |  Branch (700:9): [True: 49.1k, False: 97.9k]
  ------------------
  701|  49.1k|      T0_min = PIT_MIN;
  702|  49.1k|    }
  703|   147k|    T0_max = T0_min + 15;
  704|   147k|    if (T0_max > PIT_MAX) {
  ------------------
  |  Branch (704:9): [True: 3.56k, False: 143k]
  ------------------
  705|  3.56k|      T0_max = PIT_MAX;
  706|  3.56k|      T0_min = T0_max - 15;
  707|  3.56k|    }
  708|   147k|    *pT0_min = T0_min;
  709|   147k|    *pT0_max = T0_max;
  710|   147k|  }
  711|   343k|  *pT0 = T0;
  712|   343k|  *pT0_frac = T0_frac;
  713|       |
  714|   343k|  return error;
  715|   343k|}

_Z13E_UTIL_randomPs:
  276|   412k|inline SHORT E_UTIL_random(SHORT *seed) {
  277|   412k|  *seed = (SHORT)((((LONG)*seed * (LONG)31821) >> 1) + (LONG)13849);
  278|   412k|  return (*seed);
  279|   412k|}

_Z18CLpd_FAC_GetMemoryP22CAacDecoderChannelInfoPhPi:
  116|  53.1k|                             UCHAR mod[NB_DIV], int *pState) {
  117|  53.1k|  FIXP_DBL *ptr;
  118|  53.1k|  int i;
  119|  53.1k|  int k = 0;
  120|  53.1k|  int max_windows = 8;
  121|       |
  122|  53.1k|  FDK_ASSERT(*pState >= 0 && *pState < max_windows);
  ------------------
  |  |  221|  53.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 53.1k, False: 0]
  |  Branch (122:3): [True: 53.1k, False: 0]
  |  Branch (122:3): [True: 53.1k, False: 0]
  ------------------
  123|       |
  124|       |  /* Look for free space to store FAC data. 2 FAC data blocks fit into each TCX
  125|       |   * spectral data block. */
  126|   142k|  for (i = *pState; i < max_windows; i++) {
  ------------------
  |  Branch (126:21): [True: 141k, False: 1.34k]
  ------------------
  127|   141k|    if (mod[i >> 1] == 0) {
  ------------------
  |  Branch (127:9): [True: 51.8k, False: 89.4k]
  ------------------
  128|  51.8k|      break;
  129|  51.8k|    }
  130|   141k|  }
  131|       |
  132|  53.1k|  *pState = i + 1;
  133|       |
  134|  53.1k|  if (i == max_windows) {
  ------------------
  |  Branch (134:7): [True: 1.34k, False: 51.8k]
  ------------------
  135|  1.34k|    ptr = pAacDecoderChannelInfo->data.usac.fac_data0;
  136|  51.8k|  } else {
  137|  51.8k|    FDK_ASSERT(mod[(i >> 1)] == 0);
  ------------------
  |  |  221|  51.8k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (137:5): [True: 51.8k, False: 0]
  ------------------
  138|  51.8k|    ptr = SPEC_FAC(pAacDecoderChannelInfo->pSpectralCoefficient, i,
  ------------------
  |  |  113|  51.8k|#define SPEC_FAC(ptr, i, gl) ((ptr) + ((i) * (gl)))
  ------------------
  139|  51.8k|                   pAacDecoderChannelInfo->granuleLength << k);
  140|  51.8k|  }
  141|       |
  142|  53.1k|  return ptr;
  143|  53.1k|}
_Z13CLpd_FAC_ReadP13FDK_BITSTREAMPiPaiii:
  146|  86.9k|                  int length, int use_gain, int frame) {
  147|  86.9k|  FIXP_DBL fac_gain;
  148|  86.9k|  int fac_gain_e = 0;
  149|       |
  150|  86.9k|  if (use_gain) {
  ------------------
  |  Branch (150:7): [True: 37.1k, False: 49.8k]
  ------------------
  151|  37.1k|    CLpd_DecodeGain(&fac_gain, &fac_gain_e, FDKreadBits(hBs, 7));
  152|  37.1k|  }
  153|       |
  154|  86.9k|  if (CLpc_DecodeAVQ(hBs, pFac, 1, 1, length) != 0) {
  ------------------
  |  Branch (154:7): [True: 218, False: 86.7k]
  ------------------
  155|    218|    return -1;
  156|    218|  }
  157|       |
  158|  86.7k|  {
  159|  86.7k|    int scale;
  160|       |
  161|  86.7k|    scale = getScalefactor(pFac, length);
  162|  86.7k|    scaleValues(pFac, length, scale);
  163|  86.7k|    pFacScale[frame] = DFRACT_BITS - 1 - scale;
  ------------------
  |  |  113|  86.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  164|  86.7k|  }
  165|       |
  166|  86.7k|  if (use_gain) {
  ------------------
  |  Branch (166:7): [True: 36.9k, False: 49.8k]
  ------------------
  167|  36.9k|    int i;
  168|       |
  169|  36.9k|    pFacScale[frame] += fac_gain_e;
  170|       |
  171|  2.75M|    for (i = 0; i < length; i++) {
  ------------------
  |  Branch (171:17): [True: 2.72M, False: 36.9k]
  ------------------
  172|  2.72M|      pFac[i] = fMult(pFac[i], fac_gain);
  173|  2.72M|    }
  174|  36.9k|  }
  175|  86.7k|  return 0;
  176|  86.9k|}
_Z15CFac_ApplyGainsPiiiPKii:
  210|  45.1k|                     const INT mod) {
  211|  45.1k|  FIXP_DBL facFactor;
  212|  45.1k|  int i;
  213|       |
  214|  45.1k|  FDK_ASSERT((fac_length == 128) || (fac_length == 96));
  ------------------
  |  |  221|  45.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (214:3): [True: 22.6k, False: 22.5k]
  |  Branch (214:3): [True: 22.5k, False: 0]
  |  Branch (214:3): [True: 45.1k, False: 0]
  ------------------
  215|       |
  216|       |  /* 2) Apply gain factor to FAC data */
  217|  45.1k|  facFactor = fMult(gainFac[mod], tcx_gain);
  218|  5.10M|  for (i = 0; i < fac_length; i++) {
  ------------------
  |  Branch (218:15): [True: 5.06M, False: 45.1k]
  ------------------
  219|  5.06M|    fac_data[i] = fMult(fac_data[i], facFactor);
  220|  5.06M|  }
  221|       |
  222|       |  /* 3) Apply spectrum deshaping using alfd_gains */
  223|  1.31M|  for (i = 0; i < fac_length / 4; i++) {
  ------------------
  |  Branch (223:15): [True: 1.26M, False: 45.1k]
  ------------------
  224|  1.26M|    int k;
  225|       |
  226|  1.26M|    k = i >> (3 - mod);
  227|  1.26M|    fac_data[i] = fMult(fac_data[i], alfd_gains[k])
  228|  1.26M|                  << 1; /* alfd_gains is scaled by one bit. */
  229|  1.26M|  }
  230|  45.1k|}
_Z19CLpd_FAC_Mdct2AcelpP6mdct_tPiS1_iPsiiiih:
  275|  46.5k|                        const INT isFdFac, UCHAR prevWindowShape) {
  276|  46.5k|  FIXP_DBL *pOvl;
  277|  46.5k|  FIXP_DBL *pOut0;
  278|  46.5k|  const FIXP_WTP *pWindow;
  279|  46.5k|  int i, fl, nrSamples = 0;
  280|       |
  281|  46.5k|  FDK_ASSERT(fac_length <= 1024 / (4 * 2));
  ------------------
  |  |  221|  46.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (281:3): [True: 46.5k, False: 0]
  ------------------
  282|       |
  283|  46.5k|  fl = fac_length * 2;
  284|       |
  285|  46.5k|  pWindow = FDKgetWindowSlope(fl, prevWindowShape);
  286|       |
  287|       |  /* Adapt window slope length in case of frame loss. */
  288|  46.5k|  if (hMdct->prev_fr != fl) {
  ------------------
  |  Branch (288:7): [True: 11.1k, False: 35.4k]
  ------------------
  289|  11.1k|    int nl = 0;
  290|  11.1k|    imdct_adapt_parameters(hMdct, &fl, &nl, fac_length, pWindow, nrOutSamples);
  291|  11.1k|    FDK_ASSERT(nl == 0);
  ------------------
  |  |  221|  11.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (291:5): [True: 11.1k, False: 0]
  ------------------
  292|  11.1k|  }
  293|       |
  294|  46.5k|  if (nrSamples < nrOutSamples) {
  ------------------
  |  Branch (294:7): [True: 31.9k, False: 14.6k]
  ------------------
  295|  31.9k|    pOut0 = output;
  296|  31.9k|    nrSamples += hMdct->ov_offset;
  297|       |    /* Purge buffered output. */
  298|  31.9k|    FDKmemcpy(pOut0, hMdct->overlap.time, hMdct->ov_offset * sizeof(pOut0[0]));
  299|  31.9k|    hMdct->ov_offset = 0;
  300|  31.9k|  }
  301|       |
  302|  46.5k|  pOvl = hMdct->overlap.freq + hMdct->ov_size - 1;
  303|       |
  304|  46.5k|  if (nrSamples >= nrOutSamples) {
  ------------------
  |  Branch (304:7): [True: 14.6k, False: 31.9k]
  ------------------
  305|  14.6k|    pOut0 = hMdct->overlap.time + hMdct->ov_offset;
  306|  14.6k|    hMdct->ov_offset += hMdct->prev_nr + fl / 2;
  307|  31.9k|  } else {
  308|  31.9k|    pOut0 = output + nrSamples;
  309|  31.9k|    nrSamples += hMdct->prev_nr + fl / 2;
  310|  31.9k|  }
  311|  46.5k|  if (hMdct->prevPrevAliasSymmetry == 0) {
  ------------------
  |  Branch (311:7): [True: 46.5k, False: 0]
  ------------------
  312|  4.52M|    for (i = 0; i < hMdct->prev_nr; i++) {
  ------------------
  |  Branch (312:17): [True: 4.47M, False: 46.5k]
  ------------------
  313|  4.47M|      FIXP_DBL x = -(*pOvl--);
  314|  4.47M|      *pOut0 = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|  4.47M|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  315|  4.47M|      pOut0++;
  316|  4.47M|    }
  317|  46.5k|  } else {
  318|      0|    for (i = 0; i < hMdct->prev_nr; i++) {
  ------------------
  |  Branch (318:17): [True: 0, False: 0]
  ------------------
  319|      0|      FIXP_DBL x = (*pOvl--);
  320|      0|      *pOut0 = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|      0|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  321|      0|      pOut0++;
  322|      0|    }
  323|      0|  }
  324|  46.5k|  hMdct->prev_nr = 0;
  325|       |
  326|  46.5k|  {
  327|  46.5k|    if (pFac != NULL) {
  ------------------
  |  Branch (327:9): [True: 32.1k, False: 14.4k]
  ------------------
  328|       |      /* Note: The FAC gain might have been applied directly after bit stream
  329|       |       * parse in this case. */
  330|  32.1k|      CFac_CalcFacSignal(pOut0, pFac, fac_scale, fac_length, A, A_exp, 0,
  331|  32.1k|                         isFdFac);
  332|  32.1k|    } else {
  333|       |      /* Clear buffer because of the overlap and ADD! */
  334|  14.4k|      FDKmemclear(pOut0, fac_length * sizeof(FIXP_DBL));
  335|  14.4k|    }
  336|  46.5k|  }
  337|       |
  338|  46.5k|  i = 0;
  339|       |
  340|  46.5k|  if (hMdct->prevPrevAliasSymmetry == 0) {
  ------------------
  |  Branch (340:7): [True: 46.5k, False: 0]
  ------------------
  341|  4.79M|    for (; i < fl / 2; i++) {
  ------------------
  |  Branch (341:12): [True: 4.75M, False: 46.5k]
  ------------------
  342|  4.75M|      FIXP_DBL x0;
  343|       |
  344|       |      /* Overlap Add */
  345|  4.75M|      x0 = -fMult(*pOvl--, pWindow[i].v.re);
  346|       |
  347|  4.75M|      *pOut0 = fAddSaturate(*pOut0, IMDCT_SCALE_DBL(x0));
  ------------------
  |  |  119|  4.75M|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  348|  4.75M|      pOut0++;
  349|  4.75M|    }
  350|  46.5k|  } else {
  351|      0|    for (; i < fl / 2; i++) {
  ------------------
  |  Branch (351:12): [True: 0, False: 0]
  ------------------
  352|      0|      FIXP_DBL x0;
  353|       |
  354|       |      /* Overlap Add */
  355|      0|      x0 = fMult(*pOvl--, pWindow[i].v.re);
  356|       |
  357|      0|      *pOut0 = fAddSaturate(*pOut0, IMDCT_SCALE_DBL(x0));
  ------------------
  |  |  119|      0|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  358|      0|      pOut0++;
  359|      0|    }
  360|      0|  }
  361|  46.5k|  if (hMdct->pFacZir !=
  ------------------
  |  Branch (361:7): [True: 11.1k, False: 35.4k]
  ------------------
  362|  46.5k|      0) { /* this should only happen for ACELP -> TCX20 -> ACELP transition */
  363|  11.1k|    FIXP_DBL *pOut = pOut0 - fl / 2; /* fl/2 == fac_length */
  364|  1.23M|    for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (364:17): [True: 1.22M, False: 11.1k]
  ------------------
  365|  1.22M|      pOut[i] = fAddSaturate(pOut[i], IMDCT_SCALE_DBL(hMdct->pFacZir[i]));
  ------------------
  |  |  119|  1.22M|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  366|  1.22M|    }
  367|  11.1k|    hMdct->pFacZir = NULL;
  368|  11.1k|  }
  369|       |
  370|  46.5k|  hMdct->prev_fr = 0;
  371|  46.5k|  hMdct->prev_nr = 0;
  372|  46.5k|  hMdct->prev_tl = 0;
  373|  46.5k|  hMdct->prevPrevAliasSymmetry = hMdct->prevAliasSymmetry;
  374|       |
  375|  46.5k|  return nrSamples;
  376|  46.5k|}
_Z19CLpd_FAC_Acelp2MdctP6mdct_tPiS1_PKsiS1_iiiiPK8FIXP_SPKiPsiP15CAcelpStaticMemiiihii:
  386|  40.0k|                        const int k, int currAliasingSymmetry) {
  387|  40.0k|  FIXP_DBL *pCurr, *pOvl, *pSpec;
  388|  40.0k|  const FIXP_WTP *pWindow;
  389|  40.0k|  const FIXP_WTB *FacWindowZir_conceal;
  390|  40.0k|  UCHAR doFacZirConceal = 0;
  391|  40.0k|  int doDeemph = 1;
  392|  40.0k|  const FIXP_WTB *FacWindowZir, *FacWindowSynth;
  393|  40.0k|  FIXP_DBL *pOut0 = output, *pOut1;
  394|  40.0k|  int w, i, fl, nl, nr, f_len, nrSamples = 0, s = 0, scale, total_gain_e;
  395|  40.0k|  FIXP_DBL *pF, *pFAC_and_FAC_ZIR = NULL;
  396|  40.0k|  FIXP_DBL total_gain = gain;
  397|       |
  398|  40.0k|  FDK_ASSERT(fac_length <= 1024 / (4 * 2));
  ------------------
  |  |  221|  40.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (398:3): [True: 40.0k, False: 0]
  ------------------
  399|  40.0k|  switch (fac_length) {
  400|       |    /* coreCoderFrameLength = 1024 */
  401|  12.7k|    case 128:
  ------------------
  |  Branch (401:5): [True: 12.7k, False: 27.2k]
  ------------------
  402|  12.7k|      pWindow = SineWindow256;
  403|  12.7k|      FacWindowZir = FacWindowZir128;
  404|  12.7k|      FacWindowSynth = FacWindowSynth128;
  405|  12.7k|      break;
  406|  5.38k|    case 64:
  ------------------
  |  Branch (406:5): [True: 5.38k, False: 34.6k]
  ------------------
  407|  5.38k|      pWindow = SineWindow128;
  408|  5.38k|      FacWindowZir = FacWindowZir64;
  409|  5.38k|      FacWindowSynth = FacWindowSynth64;
  410|  5.38k|      break;
  411|      0|    case 32:
  ------------------
  |  Branch (411:5): [True: 0, False: 40.0k]
  ------------------
  412|      0|      pWindow = SineWindow64;
  413|      0|      FacWindowZir = FacWindowZir32;
  414|      0|      FacWindowSynth = FacWindowSynth32;
  415|      0|      break;
  416|       |    /* coreCoderFrameLength = 768 */
  417|  14.3k|    case 96:
  ------------------
  |  Branch (417:5): [True: 14.3k, False: 25.7k]
  ------------------
  418|  14.3k|      pWindow = SineWindow192;
  419|  14.3k|      FacWindowZir = FacWindowZir96;
  420|  14.3k|      FacWindowSynth = FacWindowSynth96;
  421|  14.3k|      break;
  422|  7.59k|    case 48:
  ------------------
  |  Branch (422:5): [True: 7.59k, False: 32.4k]
  ------------------
  423|  7.59k|      pWindow = SineWindow96;
  424|  7.59k|      FacWindowZir = FacWindowZir48;
  425|  7.59k|      FacWindowSynth = FacWindowSynth48;
  426|  7.59k|      break;
  427|      0|    default:
  ------------------
  |  Branch (427:5): [True: 0, False: 40.0k]
  ------------------
  428|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (428:7): [Folded, False: 0]
  ------------------
  429|      0|      return 0;
  430|  40.0k|  }
  431|       |
  432|  40.0k|  FacWindowZir_conceal = FacWindowSynth;
  433|       |  /* Derive NR and NL */
  434|  40.0k|  fl = fac_length * 2;
  435|  40.0k|  nl = (tl - fl) >> 1;
  436|  40.0k|  nr = (tl - fr) >> 1;
  437|       |
  438|  40.0k|  if (noOutSamples > nrSamples) {
  ------------------
  |  Branch (438:7): [True: 27.0k, False: 12.9k]
  ------------------
  439|       |    /* Purge buffered output. */
  440|  27.0k|    FDKmemcpy(pOut0, hMdct->overlap.time, hMdct->ov_offset * sizeof(pOut0[0]));
  441|  27.0k|    nrSamples = hMdct->ov_offset;
  442|  27.0k|    hMdct->ov_offset = 0;
  443|  27.0k|  }
  444|       |
  445|  40.0k|  if (nrSamples >= noOutSamples) {
  ------------------
  |  Branch (445:7): [True: 12.9k, False: 27.0k]
  ------------------
  446|  12.9k|    pOut1 = hMdct->overlap.time + hMdct->ov_offset;
  447|  12.9k|    if (hMdct->ov_offset < fac_length) {
  ------------------
  |  Branch (447:9): [True: 8.08k, False: 4.91k]
  ------------------
  448|  8.08k|      pOut0 = output + nrSamples;
  449|  8.08k|    } else {
  450|  4.91k|      pOut0 = pOut1;
  451|  4.91k|    }
  452|  12.9k|    hMdct->ov_offset += fac_length + nl;
  453|  27.0k|  } else {
  454|  27.0k|    pOut1 = output + nrSamples;
  455|  27.0k|    pOut0 = output + nrSamples;
  456|  27.0k|  }
  457|       |
  458|  40.0k|  {
  459|  40.0k|    pFAC_and_FAC_ZIR = CLpd_ACELP_GetFreeExcMem(acelp_mem, 2 * fac_length);
  460|  40.0k|    {
  461|  40.0k|      const FIXP_DBL *pTmp1, *pTmp2;
  462|       |
  463|  40.0k|      doFacZirConceal |= ((last_frame_lost != 0) && (k == 0));
  ------------------
  |  Branch (463:27): [True: 16, False: 40.0k]
  |  Branch (463:53): [True: 8, False: 8]
  ------------------
  464|  40.0k|      doDeemph &= (last_lpd_mode != 4);
  465|  40.0k|      if (doFacZirConceal) {
  ------------------
  |  Branch (465:11): [True: 8, False: 40.0k]
  ------------------
  466|       |        /* ACELP contribution in concealment case:
  467|       |           Use ZIR with a modified ZIR window to preserve some more energy.
  468|       |           Dont use FAC, which contains wrong information for concealed frame
  469|       |           Dont use last ACELP samples, but double ZIR, instead (afterwards) */
  470|      8|        FDKmemclear(pFAC_and_FAC_ZIR, 2 * fac_length * sizeof(FIXP_DBL));
  471|      8|        FacWindowSynth = (FIXP_WTB *)pFAC_and_FAC_ZIR;
  472|      8|        FacWindowZir = FacWindowZir_conceal;
  473|  40.0k|      } else {
  474|  40.0k|        CFac_CalcFacSignal(pFAC_and_FAC_ZIR, pFac, fac_scale + s, fac_length, A,
  475|  40.0k|                           A_exp, 1, isFdFac);
  476|  40.0k|      }
  477|       |      /* 6) Get windowed past ACELP samples and ACELP ZIR signal */
  478|       |
  479|       |      /*
  480|       |       * Get ACELP ZIR (pFac[]) and ACELP past samples (pOut0[]) and add them
  481|       |       * to the FAC synth signal contribution on pOut1[].
  482|       |       */
  483|  40.0k|      {
  484|  40.0k|        {
  485|  40.0k|          CLpd_Acelp_Zir(A, A_exp, acelp_mem, fac_length, pFac, doDeemph);
  486|       |
  487|  40.0k|          pTmp1 = pOut0;
  488|  40.0k|          pTmp2 = pFac;
  489|  40.0k|        }
  490|       |
  491|  3.75M|        for (i = 0, w = 0; i < fac_length; i++) {
  ------------------
  |  Branch (491:28): [True: 3.71M, False: 40.0k]
  ------------------
  492|  3.71M|          FIXP_DBL x;
  493|       |          /* Div2 is compensated by table scaling */
  494|  3.71M|          x = fMultDiv2(pTmp2[i], FacWindowZir[w]);
  495|  3.71M|          x += fMultDiv2(pTmp1[-i - 1], FacWindowSynth[w]);
  496|  3.71M|          pOut1[i] = fAddSaturate(x, pFAC_and_FAC_ZIR[i]);
  497|  3.71M|          w++;
  498|  3.71M|        }
  499|  40.0k|      }
  500|       |
  501|  40.0k|      if (doFacZirConceal) {
  ------------------
  |  Branch (501:11): [True: 8, False: 40.0k]
  ------------------
  502|       |        /* ZIR is the only ACELP contribution, so double it */
  503|      8|        scaleValues(pOut1, fac_length, 1);
  504|      8|      }
  505|  40.0k|    }
  506|  40.0k|  }
  507|       |
  508|  40.0k|  if (nrSamples < noOutSamples) {
  ------------------
  |  Branch (508:7): [True: 27.0k, False: 12.9k]
  ------------------
  509|  27.0k|    nrSamples += fac_length + nl;
  510|  27.0k|  }
  511|       |
  512|       |  /* Obtain transform gain */
  513|  40.0k|  total_gain = gain;
  514|  40.0k|  total_gain_e = 0;
  515|  40.0k|  imdct_gain(&total_gain, &total_gain_e, tl);
  516|       |
  517|       |  /* IMDCT overlap add */
  518|  40.0k|  scale = total_gain_e;
  519|  40.0k|  pSpec = _pSpec;
  520|       |
  521|       |  /* Note:when comming from an LPD frame (TCX/ACELP) the previous alisaing
  522|       |   * symmetry must always be 0 */
  523|  40.0k|  if (currAliasingSymmetry == 0) {
  ------------------
  |  Branch (523:7): [True: 40.0k, False: 0]
  ------------------
  524|  40.0k|    dct_IV(pSpec, tl, &scale);
  525|  40.0k|  } else {
  526|      0|    FIXP_DBL _tmp[1024 + ALIGNMENT_DEFAULT / sizeof(FIXP_DBL)];
  527|      0|    FIXP_DBL *tmp = (FIXP_DBL *)ALIGN_PTR(_tmp);
  ------------------
  |  |  312|      0|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|      0|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|      0|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|      0|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  528|      0|    C_ALLOC_ALIGNED_REGISTER(tmp, sizeof(_tmp));
  529|      0|    dst_III(pSpec, tmp, tl, &scale);
  530|      0|    C_ALLOC_ALIGNED_UNREGISTER(tmp);
  531|      0|  }
  532|       |
  533|       |  /* Optional scaling of time domain - no yet windowed - of current spectrum */
  534|  40.0k|  if (total_gain != (FIXP_DBL)0) {
  ------------------
  |  Branch (534:7): [True: 31.9k, False: 8.12k]
  ------------------
  535|  8.03M|    for (i = 0; i < tl; i++) {
  ------------------
  |  Branch (535:17): [True: 8.00M, False: 31.9k]
  ------------------
  536|  8.00M|      pSpec[i] = fMult(pSpec[i], total_gain);
  537|  8.00M|    }
  538|  31.9k|  }
  539|  40.0k|  int loc_scale = fixmin_I(spec_scale[0] + scale, (INT)DFRACT_BITS - 1);
  ------------------
  |  |  127|  40.0k|#define fixmin_I(a, b) fixmin(a, b)
  ------------------
  540|  40.0k|  scaleValuesSaturate(pSpec, tl, loc_scale);
  541|       |
  542|  40.0k|  pOut1 += fl / 2 - 1;
  543|  40.0k|  pCurr = pSpec + tl - fl / 2;
  544|       |
  545|  3.75M|  for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (545:15): [True: 3.71M, False: 40.0k]
  ------------------
  546|  3.71M|    FIXP_DBL x1;
  547|       |
  548|       |    /* FAC signal is already on pOut1, because of that the += operator. */
  549|  3.71M|    x1 = fMult(*pCurr++, pWindow[i].v.re);
  550|  3.71M|    FDK_ASSERT((pOut1 >= hMdct->overlap.time &&
  ------------------
  |  |  221|  3.71M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (550:5): [True: 2.85M, False: 857k]
  |  Branch (550:5): [True: 1.52M, False: 1.33M]
  |  Branch (550:5): [True: 2.18M, False: 0]
  |  Branch (550:5): [True: 2.18M, False: 0]
  |  Branch (550:5): [True: 3.71M, False: 0]
  ------------------
  551|  3.71M|                pOut1 < hMdct->overlap.time + hMdct->ov_size) ||
  552|  3.71M|               (pOut1 >= output && pOut1 < output + 1024));
  553|  3.71M|    *pOut1 = fAddSaturate(*pOut1, IMDCT_SCALE_DBL(-x1));
  ------------------
  |  |  119|  3.71M|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  554|  3.71M|    pOut1--;
  555|  3.71M|  }
  556|       |
  557|       |  /* NL output samples TL/2+FL/2..TL. - current[FL/2..0] */
  558|  40.0k|  pOut1 += (fl / 2) + 1;
  559|       |
  560|  40.0k|  pFAC_and_FAC_ZIR += fac_length; /* set pointer to beginning of FAC ZIR */
  561|       |
  562|  40.0k|  if (nl == 0) {
  ------------------
  |  Branch (562:7): [True: 29.0k, False: 11.0k]
  ------------------
  563|       |    /* save pointer to write FAC ZIR data later */
  564|  29.0k|    hMdct->pFacZir = pFAC_and_FAC_ZIR;
  565|  29.0k|  } else {
  566|  11.0k|    FDK_ASSERT(nl >= fac_length);
  ------------------
  |  |  221|  11.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (566:5): [True: 11.0k, False: 0]
  ------------------
  567|       |    /* FAC ZIR will be added now ... */
  568|  11.0k|    hMdct->pFacZir = NULL;
  569|  11.0k|  }
  570|       |
  571|  40.0k|  pF = pFAC_and_FAC_ZIR;
  572|  40.0k|  f_len = fac_length;
  573|       |
  574|  40.0k|  pCurr = pSpec + tl - fl / 2 - 1;
  575|  2.07M|  for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (575:15): [True: 2.03M, False: 40.0k]
  ------------------
  576|  2.03M|    FIXP_DBL x = -(*pCurr--);
  577|       |    /* 5) (item 4) Synthesis filter Zir component, FAC ZIR (another one). */
  578|  2.03M|    if (i < f_len) {
  ------------------
  |  Branch (578:9): [True: 1.18M, False: 851k]
  ------------------
  579|  1.18M|      x = fAddSaturate(x, *pF++);
  580|  1.18M|    }
  581|       |
  582|  2.03M|    FDK_ASSERT((pOut1 >= hMdct->overlap.time &&
  ------------------
  |  |  221|  2.03M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (582:5): [True: 785k, False: 1.24M]
  |  Branch (582:5): [True: 151k, False: 634k]
  |  Branch (582:5): [True: 1.88M, False: 0]
  |  Branch (582:5): [True: 1.88M, False: 0]
  |  Branch (582:5): [True: 2.03M, False: 0]
  ------------------
  583|  2.03M|                pOut1 < hMdct->overlap.time + hMdct->ov_size) ||
  584|  2.03M|               (pOut1 >= output && pOut1 < output + 1024));
  585|  2.03M|    *pOut1 = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|  2.03M|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  586|  2.03M|    pOut1++;
  587|  2.03M|  }
  588|       |
  589|  40.0k|  hMdct->prev_nr = nr;
  590|  40.0k|  hMdct->prev_fr = fr;
  591|  40.0k|  hMdct->prev_wrs = wrs;
  592|  40.0k|  hMdct->prev_tl = tl;
  593|  40.0k|  hMdct->prevPrevAliasSymmetry = hMdct->prevAliasSymmetry;
  594|  40.0k|  hMdct->prevAliasSymmetry = currAliasingSymmetry;
  595|  40.0k|  fl = fr;
  596|  40.0k|  nl = nr;
  597|       |
  598|  40.0k|  pOvl = pSpec + tl / 2 - 1;
  599|  40.0k|  pOut0 = pOut1;
  600|       |
  601|   130k|  for (w = 1; w < nSpec; w++) /* for ACELP -> FD short */
  ------------------
  |  Branch (601:15): [True: 90.8k, False: 40.0k]
  ------------------
  602|  90.8k|  {
  603|  90.8k|    const FIXP_WTP *pWindow_prev;
  604|       |
  605|       |    /* Setup window pointers */
  606|  90.8k|    pWindow_prev = hMdct->prev_wrs;
  607|       |
  608|       |    /* Current spectrum */
  609|  90.8k|    pSpec = _pSpec + w * tl;
  610|       |
  611|  90.8k|    scale = total_gain_e;
  612|       |
  613|       |    /* For the second, third, etc. short frames the alisaing symmetry is equal,
  614|       |     * either (0,0) or (1,1) */
  615|  90.8k|    if (currAliasingSymmetry == 0) {
  ------------------
  |  Branch (615:9): [True: 90.8k, False: 0]
  ------------------
  616|       |      /* DCT IV of current spectrum */
  617|  90.8k|      dct_IV(pSpec, tl, &scale);
  618|  90.8k|    } else {
  619|      0|      dst_IV(pSpec, tl, &scale);
  620|      0|    }
  621|       |
  622|       |    /* Optional scaling of time domain - no yet windowed - of current spectrum
  623|       |     */
  624|       |    /* and de-scale current spectrum signal (time domain, no yet windowed) */
  625|  90.8k|    if (total_gain != (FIXP_DBL)0) {
  ------------------
  |  Branch (625:9): [True: 53.1k, False: 37.6k]
  ------------------
  626|  5.15M|      for (i = 0; i < tl; i++) {
  ------------------
  |  Branch (626:19): [True: 5.10M, False: 53.1k]
  ------------------
  627|  5.10M|        pSpec[i] = fMult(pSpec[i], total_gain);
  628|  5.10M|      }
  629|  53.1k|    }
  630|  90.8k|    loc_scale = fixmin_I(spec_scale[w] + scale, (INT)DFRACT_BITS - 1);
  ------------------
  |  |  127|  90.8k|#define fixmin_I(a, b) fixmin(a, b)
  ------------------
  631|  90.8k|    scaleValuesSaturate(pSpec, tl, loc_scale);
  632|       |
  633|  90.8k|    if (noOutSamples <= nrSamples) {
  ------------------
  |  Branch (633:9): [True: 38.9k, False: 51.8k]
  ------------------
  634|       |      /* Divert output first half to overlap buffer if we already got enough
  635|       |       * output samples. */
  636|  38.9k|      pOut0 = hMdct->overlap.time + hMdct->ov_offset;
  637|  38.9k|      hMdct->ov_offset += hMdct->prev_nr + fl / 2;
  638|  51.8k|    } else {
  639|       |      /* Account output samples */
  640|  51.8k|      nrSamples += hMdct->prev_nr + fl / 2;
  641|  51.8k|    }
  642|       |
  643|       |    /* NR output samples 0 .. NR. -overlap[TL/2..TL/2-NR] */
  644|  90.8k|    for (i = 0; i < hMdct->prev_nr; i++) {
  ------------------
  |  Branch (644:17): [True: 0, False: 90.8k]
  ------------------
  645|      0|      FIXP_DBL x = -(*pOvl--);
  646|      0|      *pOut0 = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|      0|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  647|      0|      pOut0++;
  648|      0|    }
  649|       |
  650|  90.8k|    if (noOutSamples <= nrSamples) {
  ------------------
  |  Branch (650:9): [True: 51.8k, False: 38.9k]
  ------------------
  651|       |      /* Divert output second half to overlap buffer if we already got enough
  652|       |       * output samples. */
  653|  51.8k|      pOut1 = hMdct->overlap.time + hMdct->ov_offset + fl / 2 - 1;
  654|  51.8k|      hMdct->ov_offset += fl / 2 + nl;
  655|  51.8k|    } else {
  656|  38.9k|      pOut1 = pOut0 + (fl - 1);
  657|  38.9k|      nrSamples += fl / 2 + nl;
  658|  38.9k|    }
  659|       |
  660|       |    /* output samples before window crossing point NR .. TL/2.
  661|       |     * -overlap[TL/2-NR..TL/2-NR-FL/2] + current[NR..TL/2] */
  662|       |    /* output samples after window crossing point TL/2 .. TL/2+FL/2.
  663|       |     * -overlap[0..FL/2] - current[TL/2..FL/2] */
  664|  90.8k|    pCurr = pSpec + tl - fl / 2;
  665|  90.8k|    if (currAliasingSymmetry == 0) {
  ------------------
  |  Branch (665:9): [True: 90.8k, False: 0]
  ------------------
  666|  5.05M|      for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (666:19): [True: 4.96M, False: 90.8k]
  ------------------
  667|  4.96M|        FIXP_DBL x0, x1;
  668|       |
  669|  4.96M|        cplxMultDiv2(&x1, &x0, *pCurr++, -*pOvl--, pWindow_prev[i]);
  670|  4.96M|        *pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|  4.96M|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|  4.96M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 204k, False: 4.75M]
  |  |  |  |  ------------------
  |  |  |  |  271|  4.96M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|  4.96M|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 214k, False: 4.54M]
  |  |  |  |  ------------------
  |  |  |  |  273|  4.75M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|  4.75M|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  671|  4.96M|        *pOut1 = IMDCT_SCALE_DBL_LSH1(-x1);
  ------------------
  |  |  120|  4.96M|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|  4.96M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 200k, False: 4.76M]
  |  |  |  |  ------------------
  |  |  |  |  271|  4.96M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|  4.96M|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 156k, False: 4.60M]
  |  |  |  |  ------------------
  |  |  |  |  273|  4.76M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|  4.76M|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  672|  4.96M|        pOut0++;
  673|  4.96M|        pOut1--;
  674|  4.96M|      }
  675|  90.8k|    } else {
  676|      0|      if (hMdct->prevPrevAliasSymmetry == 0) {
  ------------------
  |  Branch (676:11): [True: 0, False: 0]
  ------------------
  677|       |        /* Jump DST II -> DST IV for the second window */
  678|      0|        for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (678:21): [True: 0, False: 0]
  ------------------
  679|      0|          FIXP_DBL x0, x1;
  680|       |
  681|      0|          cplxMultDiv2(&x1, &x0, *pCurr++, -*pOvl--, pWindow_prev[i]);
  682|      0|          *pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  683|      0|          *pOut1 = IMDCT_SCALE_DBL_LSH1(x1);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  684|      0|          pOut0++;
  685|      0|          pOut1--;
  686|      0|        }
  687|      0|      } else {
  688|       |        /* Jump DST IV -> DST IV from the second window on */
  689|      0|        for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (689:21): [True: 0, False: 0]
  ------------------
  690|      0|          FIXP_DBL x0, x1;
  691|       |
  692|      0|          cplxMultDiv2(&x1, &x0, *pCurr++, *pOvl--, pWindow_prev[i]);
  693|      0|          *pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  694|      0|          *pOut1 = IMDCT_SCALE_DBL_LSH1(x1);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  695|      0|          pOut0++;
  696|      0|          pOut1--;
  697|      0|        }
  698|      0|      }
  699|      0|    }
  700|       |
  701|  90.8k|    if (hMdct->pFacZir != 0) {
  ------------------
  |  Branch (701:9): [True: 12.9k, False: 77.8k]
  ------------------
  702|       |      /* add FAC ZIR of previous ACELP -> mdct transition */
  703|  12.9k|      FIXP_DBL *pOut = pOut0 - fl / 2;
  704|  12.9k|      FDK_ASSERT(fl / 2 <= 128);
  ------------------
  |  |  221|  12.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (704:7): [True: 12.9k, False: 0]
  ------------------
  705|   721k|      for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (705:19): [True: 708k, False: 12.9k]
  ------------------
  706|   708k|        pOut[i] = fAddSaturate(pOut[i], IMDCT_SCALE_DBL(hMdct->pFacZir[i]));
  ------------------
  |  |  119|   708k|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  707|   708k|      }
  708|  12.9k|      hMdct->pFacZir = NULL;
  709|  12.9k|    }
  710|  90.8k|    pOut0 += (fl / 2);
  711|       |
  712|       |    /* NL output samples TL/2+FL/2..TL. - current[FL/2..0] */
  713|  90.8k|    pOut1 += (fl / 2) + 1;
  714|  90.8k|    pCurr = pSpec + tl - fl / 2 - 1;
  715|  90.8k|    for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (715:17): [True: 0, False: 90.8k]
  ------------------
  716|      0|      FIXP_DBL x = -(*pCurr--);
  717|      0|      *pOut1 = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|      0|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  718|      0|      pOut1++;
  719|      0|    }
  720|       |
  721|       |    /* Set overlap source pointer for next window pOvl = pSpec + tl/2 - 1; */
  722|  90.8k|    pOvl = pSpec + tl / 2 - 1;
  723|       |
  724|       |    /* Previous window values. */
  725|  90.8k|    hMdct->prev_nr = nr;
  726|  90.8k|    hMdct->prev_fr = fr;
  727|  90.8k|    hMdct->prev_tl = tl;
  728|  90.8k|    hMdct->prev_wrs = pWindow_prev;
  729|  90.8k|    hMdct->prevPrevAliasSymmetry = hMdct->prevAliasSymmetry;
  730|  90.8k|    hMdct->prevAliasSymmetry = currAliasingSymmetry;
  731|  90.8k|  }
  732|       |
  733|       |  /* Save overlap */
  734|       |
  735|  40.0k|  pOvl = hMdct->overlap.freq + hMdct->ov_size - tl / 2;
  736|  40.0k|  FDK_ASSERT(pOvl >= hMdct->overlap.time + hMdct->ov_offset);
  ------------------
  |  |  221|  40.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (736:3): [True: 40.0k, False: 0]
  ------------------
  737|  40.0k|  FDK_ASSERT(tl / 2 <= hMdct->ov_size);
  ------------------
  |  |  221|  40.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (737:3): [True: 40.0k, False: 0]
  ------------------
  738|  5.78M|  for (i = 0; i < tl / 2; i++) {
  ------------------
  |  Branch (738:15): [True: 5.74M, False: 40.0k]
  ------------------
  739|  5.74M|    pOvl[i] = _pSpec[i + (w - 1) * tl];
  740|  5.74M|  }
  741|       |
  742|  40.0k|  return nrSamples;
  743|  40.0k|}
usacdec_fac.cpp:_ZL18CFac_CalcFacSignalPiS_iiPKsiii:
  236|  72.1k|                               const int isFdFac) {
  237|  72.1k|  FIXP_LPC wA[M_LP_FILTER_ORDER];
  238|  72.1k|  FIXP_DBL tf_gain = (FIXP_DBL)0;
  239|  72.1k|  int wlength;
  240|  72.1k|  int scale = fac_scale;
  241|       |
  242|       |  /* obtain tranform gain. */
  243|  72.1k|  imdct_gain(&tf_gain, &scale, isFdFac ? 0 : fac_length);
  ------------------
  |  Branch (243:32): [True: 21.7k, False: 50.3k]
  ------------------
  244|       |
  245|       |  /* 4) Compute inverse DCT-IV of FAC data. Output scale of DCT IV is 16 bits.
  246|       |   */
  247|  72.1k|  dct_IV(pFac, fac_length, &scale);
  248|       |  /* dct_IV scale = log2(fac_length). "- 7" is a factor of 2/128 */
  249|  72.1k|  if (tf_gain != (FIXP_DBL)0) { /* non-radix 2 transform gain */
  ------------------
  |  Branch (249:7): [True: 28.4k, False: 43.7k]
  ------------------
  250|  28.4k|    int i;
  251|       |
  252|  2.75M|    for (i = 0; i < fac_length; i++) {
  ------------------
  |  Branch (252:17): [True: 2.72M, False: 28.4k]
  ------------------
  253|  2.72M|      pFac[i] = fMult(tf_gain, pFac[i]);
  254|  2.72M|    }
  255|  28.4k|  }
  256|  72.1k|  scaleValuesSaturate(pOut, pFac, fac_length,
  257|  72.1k|                      scale); /* Avoid overflow issues and saturate. */
  258|       |
  259|  72.1k|  E_LPC_a_weight(wA, A, M_LP_FILTER_ORDER);
  ------------------
  |  |  117|  72.1k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  260|       |
  261|       |  /* We need the output of the IIR filter to be longer than "fac_length".
  262|       |  For this reason we run it with zero input appended to the end of the input
  263|       |  sequence, i.e. we generate its ZIR and extend the output signal.*/
  264|  72.1k|  FDKmemclear(pOut + fac_length, fac_length * sizeof(FIXP_DBL));
  265|  72.1k|  wlength = 2 * fac_length;
  266|       |
  267|       |  /* 5) Apply weighted synthesis filter to FAC data, including optional Zir (5.
  268|       |   * item 4). */
  269|  72.1k|  Syn_filt_zero(wA, A_exp, wlength, pOut);
  270|  72.1k|}
usacdec_fac.cpp:_ZL13Syn_filt_zeroPKsiiPi:
  186|  72.1k|                          FIXP_DBL x[]) {
  187|  72.1k|  int i, j;
  188|  72.1k|  FIXP_DBL L_tmp;
  189|       |
  190|  14.3M|  for (i = 0; i < length; i++) {
  ------------------
  |  Branch (190:15): [True: 14.3M, False: 72.1k]
  ------------------
  191|  14.3M|    L_tmp = (FIXP_DBL)0;
  192|       |
  193|   233M|    for (j = 0; j < fMin(i, M_LP_FILTER_ORDER); j++) {
  ------------------
  |  |  117|   233M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (193:17): [True: 219M, False: 14.3M]
  ------------------
  194|   219M|      L_tmp -= fMultDiv2(a[j], x[i - (j + 1)]) >> (LP_FILTER_SCALE - 1);
  ------------------
  |  |  118|   219M|#define LP_FILTER_SCALE 4    /* LP filter scale */
  ------------------
  195|   219M|    }
  196|       |
  197|  14.3M|    L_tmp = scaleValue(L_tmp, a_exp + LP_FILTER_SCALE);
  ------------------
  |  |  118|  14.3M|#define LP_FILTER_SCALE 4    /* LP filter scale */
  ------------------
  198|  14.3M|    x[i] = fAddSaturate(x[i], L_tmp);
  199|  14.3M|  }
  200|  72.1k|}

_Z20nearest_neighbor_2D8PiS_:
  164|   183k|void nearest_neighbor_2D8(FIXP_ZF x[8], int y[8]) {
  165|   183k|  FIXP_ZF s, em, e[8];
  ------------------
  |  |  156|   183k|#define FIXP_ZF FIXP_DBL
  ------------------
  166|   183k|  int i, j, sum;
  167|       |
  168|       |  /* round x into 2Z^8 i.e. compute y=(y1,...,y8) such that yi = 2[xi/2]
  169|       |     where [.] is the nearest integer operator
  170|       |     in the mean time, compute sum = y1+...+y8
  171|       |  */
  172|   183k|  sum = 0;
  173|  1.65M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (173:15): [True: 1.47M, False: 183k]
  ------------------
  174|  1.47M|    FIXP_ZF tmp;
  ------------------
  |  |  156|  1.47M|#define FIXP_ZF FIXP_DBL
  ------------------
  175|       |    /* round to ..., -2, 0, 2, ... ([-1..1[ --> 0) */
  176|  1.47M|    if (x[i] < (FIXP_ZF)0) {
  ------------------
  |  Branch (176:9): [True: 474k, False: 996k]
  ------------------
  177|   474k|      tmp = ONEZF - x[i];
  ------------------
  |  |  161|   474k|#define ONEZF ((FIXP_ZF)INT2ZF(1, 0))
  |  |  ------------------
  |  |  |  |  157|   474k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  155|   474k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   474k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|   474k|      y[i] = -2 * ((ZF2INT(tmp)) >> 1);
  ------------------
  |  |  158|   474k|#define ZF2INT(x) (INT)((x) >> ZF_SCALE)
  |  |  ------------------
  |  |  |  |  155|   474k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   474k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  179|   996k|    } else {
  180|   996k|      tmp = ONEZF + x[i];
  ------------------
  |  |  161|   996k|#define ONEZF ((FIXP_ZF)INT2ZF(1, 0))
  |  |  ------------------
  |  |  |  |  157|   996k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  155|   996k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   996k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|   996k|      y[i] = 2 * ((ZF2INT(tmp)) >> 1);
  ------------------
  |  |  158|   996k|#define ZF2INT(x) (INT)((x) >> ZF_SCALE)
  |  |  ------------------
  |  |  |  |  155|   996k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   996k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|   996k|    }
  183|  1.47M|    sum += y[i];
  184|  1.47M|  }
  185|       |  /* check if y1+...+y8 is a multiple of 4
  186|       |     if not, y is not round xj in the wrong way where j is defined by
  187|       |        j = arg max_i | xi -yi|
  188|       |     (this is called the Wagner rule)
  189|       |  */
  190|   183k|  if (sum % 4) {
  ------------------
  |  Branch (190:7): [True: 105k, False: 78.0k]
  ------------------
  191|       |    /* find j = arg max_i | xi -yi| */
  192|   105k|    em = (FIXP_SGL)0;
  193|   105k|    j = 0;
  194|   952k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (194:17): [True: 846k, False: 105k]
  ------------------
  195|       |      /* compute ei = xi-yi */
  196|   846k|      e[i] = x[i] - INT2ZF(y[i], 0);
  ------------------
  |  |  157|   846k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  ------------------
  |  |  |  |  155|   846k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   846k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|   846k|    }
  198|   952k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (198:17): [True: 846k, False: 105k]
  ------------------
  199|       |      /* compute |ei| = | xi-yi | */
  200|   846k|      if (e[i] < (FIXP_ZF)0) {
  ------------------
  |  Branch (200:11): [True: 167k, False: 679k]
  ------------------
  201|   167k|        s = -e[i];
  202|   679k|      } else {
  203|   679k|        s = e[i];
  204|   679k|      }
  205|       |      /* check if |ei| is maximal, if so, set j=i */
  206|   846k|      if (em < s) {
  ------------------
  |  Branch (206:11): [True: 120k, False: 726k]
  ------------------
  207|   120k|        em = s;
  208|   120k|        j = i;
  209|   120k|      }
  210|   846k|    }
  211|       |    /* round xj in the "wrong way" */
  212|   105k|    if (e[j] < (FIXP_ZF)0) {
  ------------------
  |  Branch (212:9): [True: 54.0k, False: 51.7k]
  ------------------
  213|  54.0k|      y[j] -= 2;
  214|  54.0k|    } else {
  215|  51.7k|      y[j] += 2;
  216|  51.7k|    }
  217|   105k|  }
  218|   183k|}
_Z7RE8_PPVPiPsi:
  231|  91.9k|void RE8_PPV(FIXP_ZF x[], SHORT y[], int r) {
  232|  91.9k|  int i, y0[8], y1[8];
  233|  91.9k|  FIXP_ZF x1[8], tmp;
  ------------------
  |  |  156|  91.9k|#define FIXP_ZF FIXP_DBL
  ------------------
  234|  91.9k|  INT64 e;
  235|       |
  236|       |  /* find the nearest neighbor y0 of x in 2D8 */
  237|  91.9k|  nearest_neighbor_2D8(x, y0);
  238|       |  /* find the nearest neighbor y1 of x in 2D8+(1,...,1) (by coset decoding) */
  239|   827k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (239:15): [True: 735k, False: 91.9k]
  ------------------
  240|   735k|    x1[i] = x[i] - ONEZF;
  ------------------
  |  |  161|   735k|#define ONEZF ((FIXP_ZF)INT2ZF(1, 0))
  |  |  ------------------
  |  |  |  |  157|   735k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  155|   735k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   735k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  241|   735k|  }
  242|  91.9k|  nearest_neighbor_2D8(x1, y1);
  243|   827k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (243:15): [True: 735k, False: 91.9k]
  ------------------
  244|   735k|    y1[i] += 1;
  245|   735k|  }
  246|       |
  247|       |  /* compute e0=||x-y0||^2 and e1=||x-y1||^2 */
  248|  91.9k|  e = 0;
  249|   827k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (249:15): [True: 735k, False: 91.9k]
  ------------------
  250|   735k|    tmp = x[i] - INT2ZF(y0[i], 0);
  ------------------
  |  |  157|   735k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  ------------------
  |  |  |  |  155|   735k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   735k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  251|   735k|    e += (INT64)fPow2Div2(
  252|   735k|        tmp << r); /* shift left to ensure that no fract part bits get lost. */
  253|   735k|    tmp = x[i] - INT2ZF(y1[i], 0);
  ------------------
  |  |  157|   735k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  ------------------
  |  |  |  |  155|   735k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   735k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|   735k|    e -= (INT64)fPow2Div2(tmp << r);
  255|   735k|  }
  256|       |  /* select best candidate y0 or y1 to minimize distortion */
  257|  91.9k|  if (e < 0) {
  ------------------
  |  Branch (257:7): [True: 69.2k, False: 22.7k]
  ------------------
  258|   622k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (258:17): [True: 553k, False: 69.2k]
  ------------------
  259|   553k|      y[i] = y0[i];
  260|   553k|    }
  261|  69.2k|  } else {
  262|   204k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (262:17): [True: 181k, False: 22.7k]
  ------------------
  263|   181k|      y[i] = y1[i];
  264|   181k|    }
  265|  22.7k|  }
  266|  91.9k|}
_Z14CLpc_DecodeAVQP13FDK_BITSTREAMPiiii:
  723|   248k|                   int no_qn, int length) {
  724|   248k|  int i, l;
  725|       |
  726|  1.44M|  for (i = 0; i < length; i += 8 * no_qn) {
  ------------------
  |  Branch (726:15): [True: 1.19M, False: 248k]
  ------------------
  727|  1.19M|    int qn[2], nk, n, I;
  728|  1.19M|    int kv[8] = {0};
  729|       |
  730|  1.19M|    decode_qn(hBs, nk_mode, no_qn, qn);
  731|       |
  732|  2.54M|    for (l = 0; l < no_qn; l++) {
  ------------------
  |  Branch (732:17): [True: 1.35M, False: 1.19M]
  ------------------
  733|  1.35M|      if (qn[l] == 0) {
  ------------------
  |  Branch (733:11): [True: 845k, False: 509k]
  ------------------
  734|   845k|        FDKmemclear(&pOutput[i + l * 8], 8 * sizeof(FIXP_DBL));
  735|   845k|      }
  736|       |
  737|       |      /* Voronoi extension order ( nk ) */
  738|  1.35M|      nk = 0;
  739|  1.35M|      n = qn[l];
  740|  1.35M|      if (qn[l] > 4) {
  ------------------
  |  Branch (740:11): [True: 92.1k, False: 1.26M]
  ------------------
  741|  92.1k|        nk = (qn[l] - 3) >> 1;
  742|  92.1k|        n = qn[l] - nk * 2;
  743|  92.1k|      }
  744|       |
  745|       |      /* Base codebook index, in reverse bit group order (!) */
  746|  1.35M|      I = FDKreadBits(hBs, 4 * n);
  747|       |
  748|  1.35M|      if (nk > 0) {
  ------------------
  |  Branch (748:11): [True: 92.1k, False: 1.26M]
  ------------------
  749|  92.1k|        int j;
  750|       |
  751|   829k|        for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (751:21): [True: 737k, False: 92.1k]
  ------------------
  752|   737k|          kv[j] = FDKreadBits(hBs, nk);
  753|   737k|        }
  754|  92.1k|      }
  755|       |
  756|  1.35M|      if (RE8_dec(qn[l], I, kv, &pOutput[i + l * 8]) != 0) {
  ------------------
  |  Branch (756:11): [True: 228, False: 1.35M]
  ------------------
  757|    228|        return -1;
  758|    228|      }
  759|  1.35M|    }
  760|  1.19M|  }
  761|   248k|  return 0;
  762|   248k|}
_Z9CLpc_ReadP13FDK_BITSTREAMPA16_sPsS3_S3_Phiii:
  768|  42.0k|              int last_lpc_lost, int last_frame_ok) {
  769|  42.0k|  int i, k, err;
  770|  42.0k|  int mode_lpc_bin = 0; /* mode_lpc bitstream representation */
  771|  42.0k|  int lpc_present[5] = {0, 0, 0, 0, 0};
  772|  42.0k|  int lpc0_available = 1;
  773|  42.0k|  int s = 0;
  774|  42.0k|  int l = 3;
  775|  42.0k|  const int nbDiv = NB_DIV;
  ------------------
  |  |  145|  42.0k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
  776|       |
  777|  42.0k|  lpc_present[4 >> s] = 1; /* LPC4 */
  778|       |
  779|       |  /* Decode LPC filters in the following order: LPC 4,0,2,1,3 */
  780|       |
  781|       |  /*** Decode LPC4 ***/
  782|  42.0k|  vlpc_1st_dec(hBs, lsp[4 >> s]);
  783|  42.0k|  err = vlpc_2st_dec(hBs, lsp[4 >> s], 0); /* nk_mode = 0 */
  784|  42.0k|  if (err != 0) {
  ------------------
  |  Branch (784:7): [True: 3, False: 42.0k]
  ------------------
  785|      3|    return err;
  786|      3|  }
  787|       |
  788|       |  /*** Decode LPC0 and LPC2 ***/
  789|  42.0k|  k = 0;
  790|  42.0k|  if (!first_lpd_flag) {
  ------------------
  |  Branch (790:7): [True: 24.6k, False: 17.4k]
  ------------------
  791|  24.6k|    lpc_present[0] = 1;
  792|  24.6k|    lpc0_available = !last_lpc_lost;
  793|       |    /* old LPC4 is new LPC0 */
  794|   419k|    for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   419k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (794:17): [True: 394k, False: 24.6k]
  ------------------
  795|   394k|      lsp[0][i] = lpc4_lsf[i];
  796|   394k|    }
  797|       |    /* skip LPC0 and continue with LPC2 */
  798|  24.6k|    k = 2;
  799|  24.6k|  }
  800|       |
  801|   101k|  for (; k < l; k += 2) {
  ------------------
  |  Branch (801:10): [True: 59.4k, False: 41.5k]
  ------------------
  802|  59.4k|    int nk_mode = 0;
  803|       |
  804|  59.4k|    if ((k == 2) && (mod[0] == 3)) {
  ------------------
  |  Branch (804:9): [True: 42.0k, False: 17.4k]
  |  Branch (804:21): [True: 498, False: 41.5k]
  ------------------
  805|    498|      break; /* skip LPC2 */
  806|    498|    }
  807|       |
  808|  58.9k|    lpc_present[k >> s] = 1;
  809|       |
  810|  58.9k|    mode_lpc_bin = FDKreadBit(hBs);
  811|       |
  812|  58.9k|    if (mode_lpc_bin == 0) {
  ------------------
  |  Branch (812:9): [True: 31.4k, False: 27.5k]
  ------------------
  813|       |      /* LPC0/LPC2: Abs */
  814|  31.4k|      vlpc_1st_dec(hBs, lsp[k >> s]);
  815|  31.4k|    } else {
  816|       |      /* LPC0/LPC2: RelR */
  817|   467k|      for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   467k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (817:19): [True: 440k, False: 27.5k]
  ------------------
  818|   440k|        lsp[k >> s][i] = lsp[4 >> s][i];
  819|   440k|      }
  820|  27.5k|      nk_mode = 3;
  821|  27.5k|    }
  822|       |
  823|  58.9k|    err = vlpc_2st_dec(hBs, lsp[k >> s], nk_mode);
  824|  58.9k|    if (err != 0) {
  ------------------
  |  Branch (824:9): [True: 2, False: 58.9k]
  ------------------
  825|      2|      return err;
  826|      2|    }
  827|  58.9k|  }
  828|       |
  829|       |  /*** Decode LPC1 ***/
  830|  42.0k|  if (mod[0] < 2) { /* else: skip LPC1 */
  ------------------
  |  Branch (830:7): [True: 26.2k, False: 15.8k]
  ------------------
  831|  26.2k|    lpc_present[1] = 1;
  832|  26.2k|    mode_lpc_bin = get_vlclbf_n(hBs, 2);
  833|       |
  834|  26.2k|    switch (mode_lpc_bin) {
  ------------------
  |  Branch (834:13): [True: 26.2k, False: 0]
  ------------------
  835|  4.60k|      case 1:
  ------------------
  |  Branch (835:7): [True: 4.60k, False: 21.6k]
  ------------------
  836|       |        /* LPC1: abs */
  837|  4.60k|        vlpc_1st_dec(hBs, lsp[1]);
  838|  4.60k|        err = vlpc_2st_dec(hBs, lsp[1], 0);
  839|  4.60k|        if (err != 0) {
  ------------------
  |  Branch (839:13): [True: 1, False: 4.60k]
  ------------------
  840|      1|          return err;
  841|      1|        }
  842|  4.60k|        break;
  843|  5.41k|      case 2:
  ------------------
  |  Branch (843:7): [True: 5.41k, False: 20.8k]
  ------------------
  844|       |        /* LPC1: mid0 (no second stage AVQ quantizer in this case) */
  845|  5.41k|        if (lpc0_available) { /* LPC0/lsf[0] might be zero some times */
  ------------------
  |  Branch (845:13): [True: 5.41k, False: 1]
  ------------------
  846|  92.0k|          for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  92.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (846:23): [True: 86.6k, False: 5.41k]
  ------------------
  847|  86.6k|            lsp[1][i] = (lsp[0][i] >> 1) + (lsp[2][i] >> 1);
  848|  86.6k|          }
  849|  5.41k|        } else {
  850|     17|          for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|     17|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (850:23): [True: 16, False: 1]
  ------------------
  851|     16|            lsp[1][i] = lsp[2][i];
  852|     16|          }
  853|      1|        }
  854|  5.41k|        break;
  855|  16.2k|      case 0:
  ------------------
  |  Branch (855:7): [True: 16.2k, False: 10.0k]
  ------------------
  856|       |        /* LPC1: RelR */
  857|   276k|        for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   276k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (857:21): [True: 259k, False: 16.2k]
  ------------------
  858|   259k|          lsp[1][i] = lsp[2][i];
  859|   259k|        }
  860|  16.2k|        err = vlpc_2st_dec(hBs, lsp[1], 2 << s);
  861|  16.2k|        if (err != 0) {
  ------------------
  |  Branch (861:13): [True: 1, False: 16.2k]
  ------------------
  862|      1|          return err;
  863|      1|        }
  864|  16.2k|        break;
  865|  26.2k|    }
  866|  26.2k|  }
  867|       |
  868|       |  /*** Decode LPC3 ***/
  869|  42.0k|  if ((mod[2] < 2)) { /* else: skip LPC3 */
  ------------------
  |  Branch (869:7): [True: 39.7k, False: 2.33k]
  ------------------
  870|  39.7k|    int nk_mode = 0;
  871|  39.7k|    lpc_present[3] = 1;
  872|       |
  873|  39.7k|    mode_lpc_bin = get_vlclbf_n(hBs, 3);
  874|       |
  875|  39.7k|    switch (mode_lpc_bin) {
  ------------------
  |  Branch (875:13): [True: 39.7k, False: 0]
  ------------------
  876|  4.61k|      case 1:
  ------------------
  |  Branch (876:7): [True: 4.61k, False: 35.1k]
  ------------------
  877|       |        /* LPC3: abs */
  878|  4.61k|        vlpc_1st_dec(hBs, lsp[3]);
  879|  4.61k|        break;
  880|  26.5k|      case 0:
  ------------------
  |  Branch (880:7): [True: 26.5k, False: 13.2k]
  ------------------
  881|       |        /* LPC3: mid */
  882|   450k|        for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   450k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (882:21): [True: 424k, False: 26.5k]
  ------------------
  883|   424k|          lsp[3][i] = (lsp[2][i] >> 1) + (lsp[4][i] >> 1);
  884|   424k|        }
  885|  26.5k|        nk_mode = 1;
  886|  26.5k|        break;
  887|  5.31k|      case 2:
  ------------------
  |  Branch (887:7): [True: 5.31k, False: 34.4k]
  ------------------
  888|       |        /* LPC3: relL */
  889|  90.3k|        for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  90.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (889:21): [True: 85.0k, False: 5.31k]
  ------------------
  890|  85.0k|          lsp[3][i] = lsp[2][i];
  891|  85.0k|        }
  892|  5.31k|        nk_mode = 2;
  893|  5.31k|        break;
  894|  3.28k|      case 3:
  ------------------
  |  Branch (894:7): [True: 3.28k, False: 36.4k]
  ------------------
  895|       |        /* LPC3: relR */
  896|  55.9k|        for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  55.9k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (896:21): [True: 52.6k, False: 3.28k]
  ------------------
  897|  52.6k|          lsp[3][i] = lsp[4][i];
  898|  52.6k|        }
  899|  3.28k|        nk_mode = 2;
  900|  3.28k|        break;
  901|  39.7k|    }
  902|  39.7k|    err = vlpc_2st_dec(hBs, lsp[3], nk_mode);
  903|  39.7k|    if (err != 0) {
  ------------------
  |  Branch (903:9): [True: 3, False: 39.7k]
  ------------------
  904|      3|      return err;
  905|      3|    }
  906|  39.7k|  }
  907|       |
  908|  42.0k|  if (!lpc0_available && !last_frame_ok) {
  ------------------
  |  Branch (908:7): [True: 3, False: 42.0k]
  |  Branch (908:26): [True: 0, False: 3]
  ------------------
  909|       |    /* LPC(0) was lost. Use next available LPC(k) instead */
  910|      0|    for (k = 1; k < (nbDiv + 1); k++) {
  ------------------
  |  Branch (910:17): [True: 0, False: 0]
  ------------------
  911|      0|      if (lpc_present[k]) {
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|        for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|      0|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (912:21): [True: 0, False: 0]
  ------------------
  913|      0|#define LSF_INIT_TILT (0.25f)
  914|      0|          if (mod[0] > 0) {
  ------------------
  |  Branch (914:15): [True: 0, False: 0]
  ------------------
  915|      0|            lsp[0][i] = FX_DBL2FX_LPC(
  ------------------
  |  |  129|      0|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 0, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  916|      0|                fMult(lsp[k][i], FL2FXCONST_SGL(1.0f - LSF_INIT_TILT)) +
  917|      0|                fMult(fdk_dec_lsf_init[i], FL2FXCONST_SGL(LSF_INIT_TILT)));
  918|      0|          } else {
  919|      0|            lsp[0][i] = lsp[k][i];
  920|      0|          }
  921|      0|        }
  922|      0|        break;
  923|      0|      }
  924|      0|    }
  925|      0|  }
  926|       |
  927|   715k|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   715k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (927:15): [True: 672k, False: 42.0k]
  ------------------
  928|   672k|    lpc4_lsf[i] = lsp[4 >> s][i];
  929|   672k|  }
  930|       |
  931|  42.0k|  {
  932|  42.0k|    FIXP_DBL divFac;
  933|  42.0k|    int last, numLpc = 0;
  934|       |
  935|  42.0k|    i = nbDiv;
  936|   129k|    do {
  937|   129k|      numLpc += lpc_present[i--];
  938|   129k|    } while (i >= 0 && numLpc < 3);
  ------------------
  |  Branch (938:14): [True: 128k, False: 823]
  |  Branch (938:24): [True: 87.2k, False: 41.2k]
  ------------------
  939|       |
  940|  42.0k|    last = i;
  941|       |
  942|  42.0k|    switch (numLpc) {
  943|  41.5k|      case 3:
  ------------------
  |  Branch (943:7): [True: 41.5k, False: 498]
  ------------------
  944|  41.5k|        divFac = FL2FXCONST_DBL(1.0f / 3.0f);
  ------------------
  |  |  192|  41.5k|  (FIXP_DBL)(                                                                \
  |  |  193|  41.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 41.5k, Folded]
  |  |  ------------------
  |  |  194|  41.5k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  41.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  41.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 41.5k]
  |  |  ------------------
  |  |  195|  41.5k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  41.5k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  41.5k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  41.5k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  41.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  41.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  41.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  945|  41.5k|        break;
  946|    498|      case 2:
  ------------------
  |  Branch (946:7): [True: 498, False: 41.5k]
  ------------------
  947|    498|        divFac = FL2FXCONST_DBL(1.0f / 2.0f);
  ------------------
  |  |  192|    498|  (FIXP_DBL)(                                                                \
  |  |  193|    498|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 498, Folded]
  |  |  ------------------
  |  |  194|    498|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    498|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    498|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 498]
  |  |  ------------------
  |  |  195|    498|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    498|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    498|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    498|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    498|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    498|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    498|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  948|    498|        break;
  949|      0|      default:
  ------------------
  |  Branch (949:7): [True: 0, False: 42.0k]
  ------------------
  950|      0|        divFac = FL2FXCONST_DBL(1.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): [True: 0, Folded]
  |  |  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  951|      0|        break;
  952|  42.0k|    }
  953|       |
  954|       |    /* get the adaptive mean for the next (bad) frame */
  955|   715k|    for (k = 0; k < M_LP_FILTER_ORDER; k++) {
  ------------------
  |  |  117|   715k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (955:17): [True: 672k, False: 42.0k]
  ------------------
  956|   672k|      FIXP_DBL tmp = (FIXP_DBL)0;
  957|  2.74M|      for (i = nbDiv; i > last; i--) {
  ------------------
  |  Branch (957:23): [True: 2.06M, False: 672k]
  ------------------
  958|  2.06M|        if (lpc_present[i]) {
  ------------------
  |  Branch (958:13): [True: 2.01M, False: 58.5k]
  ------------------
  959|  2.01M|          tmp = fMultAdd(tmp >> 1, lsp[i][k], divFac);
  960|  2.01M|        }
  961|  2.06M|      }
  962|   672k|      lsf_adaptive_mean_cand[k] = FX_DBL2FX_LPC(tmp);
  ------------------
  |  |  129|   672k|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|   672k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   672k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   672k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  963|   672k|    }
  964|  42.0k|  }
  965|       |
  966|       |  /* calculate stability factor Theta. Needed for ACELP decoder and concealment
  967|       |   */
  968|      0|  {
  969|  42.0k|    FIXP_LPC *lsf_prev, *lsf_curr;
  970|  42.0k|    k = 0;
  971|       |
  972|  42.0k|    FDK_ASSERT(lpc_present[0] == 1 && lpc_present[4 >> s] == 1);
  ------------------
  |  |  221|  42.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (972:5): [True: 42.0k, False: 0]
  |  Branch (972:5): [True: 42.0k, False: 0]
  |  Branch (972:5): [True: 42.0k, False: 0]
  ------------------
  973|  42.0k|    lsf_prev = lsp[0];
  974|   210k|    for (i = 1; i < (nbDiv + 1); i++) {
  ------------------
  |  Branch (974:17): [True: 168k, False: 42.0k]
  ------------------
  975|   168k|      if (lpc_present[i]) {
  ------------------
  |  Branch (975:11): [True: 149k, False: 18.6k]
  ------------------
  976|   149k|        FIXP_DBL tmp = (FIXP_DBL)0;
  977|   149k|        int j;
  978|   149k|        lsf_curr = lsp[i];
  979|       |
  980|       |        /* sum = tmp * 2^(LSF_SCALE*2 + 4) */
  981|  2.54M|        for (j = 0; j < M_LP_FILTER_ORDER; j++) {
  ------------------
  |  |  117|  2.54M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (981:21): [True: 2.39M, False: 149k]
  ------------------
  982|  2.39M|          tmp += fPow2Div2((FIXP_SGL)(lsf_curr[j] - lsf_prev[j])) >> 3;
  983|  2.39M|        }
  984|       |
  985|       |        /* tmp = (float)(FL2FXCONST_DBL(1.25f) - fMult(tmp,
  986|       |         * FL2FXCONST_DBL(1/400000.0f))); */
  987|   149k|        tmp = FL2FXCONST_DBL(1.25f / (1 << LSF_SCALE)) -
  ------------------
  |  |  192|   149k|  (FIXP_DBL)(                                                                \
  |  |  193|   149k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 149k, Folded]
  |  |  ------------------
  |  |  194|   149k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   149k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   149k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 149k]
  |  |  ------------------
  |  |  195|   149k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   149k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   149k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   149k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   149k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   149k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   149k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  988|   149k|              fMult(tmp, FL2FXCONST_DBL((1 << (LSF_SCALE + 4)) / 400000.0f));
  ------------------
  |  |  192|   149k|  (FIXP_DBL)(                                                                \
  |  |  193|   149k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 149k, Folded]
  |  |  ------------------
  |  |  194|   149k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   149k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   149k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 149k]
  |  |  ------------------
  |  |  195|   149k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   149k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   149k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   149k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   149k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   149k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   149k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  989|   149k|        if (tmp >= FL2FXCONST_DBL(1.0f / (1 << LSF_SCALE))) {
  ------------------
  |  |  192|   149k|  (FIXP_DBL)(                                                                \
  |  |  193|   149k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 149k, Folded]
  |  |  ------------------
  |  |  194|   149k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   149k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   149k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 149k]
  |  |  ------------------
  |  |  195|   149k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   149k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   149k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   149k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   149k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   149k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   149k|          : ((((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 (989:13): [True: 39.3k, False: 110k]
  ------------------
  990|  39.3k|          pStability[k] = FL2FXCONST_SGL(1.0f / 2.0f);
  ------------------
  |  |  180|  39.3k|  (FIXP_SGL)(                                                                \
  |  |  181|  39.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 39.3k, Folded]
  |  |  ------------------
  |  |  182|  39.3k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  39.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  39.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 39.3k]
  |  |  ------------------
  |  |  183|  39.3k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  39.3k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  39.3k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  39.3k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  39.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  39.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  39.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  991|   110k|        } else if (tmp < FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   110k|  (FIXP_DBL)(                                                                \
  |  |  193|   110k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 110k, Folded]
  |  |  ------------------
  |  |  194|   110k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   110k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   110k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 110k]
  |  |  ------------------
  |  |  195|   110k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   110k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   110k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   110k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   110k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   110k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   110k|          : ((((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 (991:20): [True: 66.1k, False: 44.1k]
  ------------------
  992|  66.1k|          pStability[k] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  66.1k|  (FIXP_SGL)(                                                                \
  |  |  181|  66.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 66.1k, Folded]
  |  |  ------------------
  |  |  182|  66.1k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  66.1k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  66.1k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 66.1k]
  |  |  ------------------
  |  |  183|  66.1k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  66.1k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  66.1k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  66.1k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  66.1k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  66.1k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  66.1k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  993|  66.1k|        } else {
  994|  44.1k|          pStability[k] = FX_DBL2FX_SGL(tmp << (LSF_SCALE - 1));
  ------------------
  |  |  220|  44.1k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  44.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  44.1k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  995|  44.1k|        }
  996|       |
  997|   149k|        lsf_prev = lsf_curr;
  998|   149k|        k = i;
  999|   149k|      } else {
 1000|       |        /* Mark stability value as undefined. */
 1001|  18.6k|        pStability[i] = (FIXP_SGL)-1;
 1002|  18.6k|      }
 1003|   168k|    }
 1004|  42.0k|  }
 1005|       |
 1006|       |  /* convert into LSP domain */
 1007|   252k|  for (i = 0; i < (nbDiv + 1); i++) {
  ------------------
  |  Branch (1007:15): [True: 210k, False: 42.0k]
  ------------------
 1008|   210k|    if (lpc_present[i]) {
  ------------------
  |  Branch (1008:9): [True: 191k, False: 18.6k]
  ------------------
 1009|  3.25M|      for (k = 0; k < M_LP_FILTER_ORDER; k++) {
  ------------------
  |  |  117|  3.25M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1009:19): [True: 3.06M, False: 191k]
  ------------------
 1010|  3.06M|        lsp[i][k] = FX_DBL2FX_LPC(
  ------------------
  |  |  129|  3.06M|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  12.2M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.06M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.06M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 3.06M]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 3.06M, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1011|  3.06M|            fixp_cos(fMult(lsp[i][k],
 1012|  3.06M|                           FL2FXCONST_SGL((1 << LSPARG_SCALE) * M_PI / 6400.0)),
 1013|  3.06M|                     LSF_SCALE - LSPARG_SCALE));
 1014|  3.06M|      }
 1015|   191k|    }
 1016|   210k|  }
 1017|       |
 1018|  42.0k|  return 0;
 1019|  42.0k|}
_Z12CLpc_ConcealPA16_sPsS1_i:
 1024|  6.93k|                  const int first_lpd_flag) {
 1025|  6.93k|  int i, j;
 1026|       |
 1027|  6.93k|#define BETA (FL2FXCONST_SGL(0.25f))
 1028|  6.93k|#define ONE_BETA (FL2FXCONST_SGL(0.75f))
 1029|  6.93k|#define BFI_FAC (FL2FXCONST_SGL(0.90f))
 1030|  6.93k|#define ONE_BFI_FAC (FL2FXCONST_SGL(0.10f))
 1031|       |
 1032|       |  /* Frame loss concealment (could be improved) */
 1033|       |
 1034|  6.93k|  if (first_lpd_flag) {
  ------------------
  |  Branch (1034:7): [True: 5.98k, False: 953]
  ------------------
 1035|       |    /* Reset past LSF values */
 1036|   101k|    for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   101k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1036:17): [True: 95.7k, False: 5.98k]
  ------------------
 1037|  95.7k|      lsp[0][i] = lpc4_lsf[i] = fdk_dec_lsf_init[i];
 1038|  95.7k|    }
 1039|  5.98k|  } else {
 1040|       |    /* old LPC4 is new LPC0 */
 1041|  16.2k|    for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  16.2k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1041:17): [True: 15.2k, False: 953]
  ------------------
 1042|  15.2k|      lsp[0][i] = lpc4_lsf[i];
 1043|  15.2k|    }
 1044|    953|  }
 1045|       |
 1046|       |  /* LPC1 */
 1047|   117k|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   117k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1047:15): [True: 111k, False: 6.93k]
  ------------------
 1048|   111k|    FIXP_LPC lsf_mean = FX_DBL2FX_LPC(fMult(BETA, fdk_dec_lsf_init[i]) +
  ------------------
  |  |  129|   111k|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|   888k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   111k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   111k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 111k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 111k, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 111k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 111k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1049|   111k|                                      fMult(ONE_BETA, lsf_adaptive_mean[i]));
 1050|       |
 1051|   111k|    lsp[1][i] = FX_DBL2FX_LPC(fMult(BFI_FAC, lpc4_lsf[i]) +
  ------------------
  |  |  129|   111k|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|   888k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   111k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   111k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 111k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 111k, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 111k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 111k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1052|   111k|                              fMult(ONE_BFI_FAC, lsf_mean));
 1053|   111k|  }
 1054|       |
 1055|       |  /* LPC2 - LPC4 */
 1056|  27.7k|  for (j = 2; j <= 4; j++) {
  ------------------
  |  Branch (1056:15): [True: 20.8k, False: 6.93k]
  ------------------
 1057|   353k|    for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   353k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1057:17): [True: 333k, False: 20.8k]
  ------------------
 1058|       |      /* lsf_mean[i] =  FX_DBL2FX_LPC(fMult((FIXP_LPC)(BETA + j *
 1059|       |         FL2FXCONST_LPC(0.1f)), fdk_dec_lsf_init[i])
 1060|       |                                    + fMult((FIXP_LPC)(ONE_BETA - j *
 1061|       |         FL2FXCONST_LPC(0.1f)), lsf_adaptive_mean[i])); */
 1062|       |
 1063|   333k|      FIXP_LPC lsf_mean = FX_DBL2FX_LPC(
  ------------------
  |  |  129|   333k|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  5.32M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   333k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   333k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 333k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 333k, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 333k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 333k, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 333k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 333k, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 333k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 333k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1064|   333k|          fMult((FIXP_SGL)(BETA + (FIXP_SGL)(j * (INT)FL2FXCONST_SGL(0.1f))),
 1065|   333k|                (FIXP_SGL)fdk_dec_lsf_init[i]) +
 1066|   333k|          fMult(
 1067|   333k|              (FIXP_SGL)(ONE_BETA - (FIXP_SGL)(j * (INT)FL2FXCONST_SGL(0.1f))),
 1068|   333k|              lsf_adaptive_mean[i]));
 1069|       |
 1070|   333k|      lsp[j][i] = FX_DBL2FX_LPC(fMult(BFI_FAC, lsp[j - 1][i]) +
  ------------------
  |  |  129|   333k|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  2.66M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   333k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   333k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 333k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 333k, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 333k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 333k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1071|   333k|                                fMult(ONE_BFI_FAC, lsf_mean));
 1072|   333k|    }
 1073|  20.8k|  }
 1074|       |
 1075|       |  /* Update past values for the future */
 1076|   117k|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   117k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1076:15): [True: 111k, False: 6.93k]
  ------------------
 1077|   111k|    lpc4_lsf[i] = lsp[4][i];
 1078|   111k|  }
 1079|       |
 1080|       |  /* convert into LSP domain */
 1081|  41.6k|  for (j = 0; j < 5; j++) {
  ------------------
  |  Branch (1081:15): [True: 34.6k, False: 6.93k]
  ------------------
 1082|   589k|    for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   589k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1082:17): [True: 555k, False: 34.6k]
  ------------------
 1083|   555k|      lsp[j][i] = FX_DBL2FX_LPC(fixp_cos(
  ------------------
  |  |  129|   555k|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  2.22M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   555k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   555k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 555k]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 555k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1084|   555k|          fMult(lsp[j][i], FL2FXCONST_SGL((1 << LSPARG_SCALE) * M_PI / 6400.0)),
 1085|   555k|          LSF_SCALE - LSPARG_SCALE));
 1086|   555k|    }
 1087|  34.6k|  }
 1088|  6.93k|}
_Z14E_LPC_a_weightPsPKsi:
 1090|  77.3k|void E_LPC_a_weight(FIXP_LPC *wA, const FIXP_LPC *A, int m) {
 1091|  77.3k|  FIXP_DBL f;
 1092|  77.3k|  int i;
 1093|       |
 1094|  77.3k|  f = FL2FXCONST_DBL(0.92f);
  ------------------
  |  |  192|  77.3k|  (FIXP_DBL)(                                                                \
  |  |  193|  77.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 77.3k, Folded]
  |  |  ------------------
  |  |  194|  77.3k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  77.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  77.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 77.3k]
  |  |  ------------------
  |  |  195|  77.3k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  77.3k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  77.3k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  77.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  77.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  77.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  77.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1095|  1.31M|  for (i = 0; i < m; i++) {
  ------------------
  |  Branch (1095:15): [True: 1.23M, False: 77.3k]
  ------------------
 1096|  1.23M|    wA[i] = FX_DBL2FX_LPC(fMult(A[i], f));
  ------------------
  |  |  129|  1.23M|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  1.23M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.23M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.23M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1097|  1.23M|    f = fMult(f, FL2FXCONST_DBL(0.92f));
  ------------------
  |  |  192|  1.23M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.23M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.23M, Folded]
  |  |  ------------------
  |  |  194|  1.23M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.23M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.23M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.23M]
  |  |  ------------------
  |  |  195|  1.23M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.23M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.23M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.23M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.23M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.23M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.23M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|  1.23M|  }
 1099|  77.3k|}
_Z15CLpd_DecodeGainPiS_i:
 1101|  88.4k|void CLpd_DecodeGain(FIXP_DBL *gain, INT *gain_e, int gain_code) {
 1102|       |  /* gain * 2^(gain_e) = 10^(gain_code/28) */
 1103|  88.4k|  *gain = fLdPow(
 1104|  88.4k|      FL2FXCONST_DBL(3.3219280948873623478703194294894 / 4.0), /* log2(10)*/
  ------------------
  |  |  192|  88.4k|  (FIXP_DBL)(                                                                \
  |  |  193|  88.4k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 88.4k, Folded]
  |  |  ------------------
  |  |  194|  88.4k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  88.4k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  88.4k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 88.4k]
  |  |  ------------------
  |  |  195|  88.4k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  88.4k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  88.4k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  88.4k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  88.4k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  88.4k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  88.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1105|  88.4k|      2,
 1106|  88.4k|      fMultDiv2((FIXP_DBL)gain_code << (DFRACT_BITS - 1 - 7),
  ------------------
  |  |  113|  88.4k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1107|  88.4k|                FL2FXCONST_DBL(2.0f / 28.0f)),
  ------------------
  |  |  192|  88.4k|  (FIXP_DBL)(                                                                \
  |  |  193|  88.4k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 88.4k, Folded]
  |  |  ------------------
  |  |  194|  88.4k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  88.4k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  88.4k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 88.4k]
  |  |  ------------------
  |  |  195|  88.4k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  88.4k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  88.4k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  88.4k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  88.4k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  88.4k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  88.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1108|  88.4k|      7, gain_e);
 1109|  88.4k|}
_Z24E_LPC_f_lsp_a_conversionPsS_Pi:
 1160|   463k|void E_LPC_f_lsp_a_conversion(FIXP_LPC *lsp, FIXP_LPC *a, INT *a_exp) {
 1161|   463k|  FIXP_DBL f1[NC + 1], f2[NC + 1];
 1162|   463k|  int i, k;
 1163|       |
 1164|       |  /*-----------------------------------------------------*
 1165|       |   *  Find the polynomials F1(z) and F2(z)               *
 1166|       |   *-----------------------------------------------------*/
 1167|       |
 1168|   463k|  get_lsppol(lsp, f1, NC, 1);
  ------------------
  |  | 1154|   463k|#define NC M_LP_FILTER_ORDER / 2
  |  |  ------------------
  |  |  |  |  117|   463k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  |  |  ------------------
  ------------------
 1169|   463k|  get_lsppol(lsp, f2, NC, 2);
  ------------------
  |  | 1154|   463k|#define NC M_LP_FILTER_ORDER / 2
  |  |  ------------------
  |  |  |  |  117|   463k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  |  |  ------------------
  ------------------
 1170|       |
 1171|       |  /*-----------------------------------------------------*
 1172|       |   *  Multiply F1(z) by (1+z^-1) and F2(z) by (1-z^-1)   *
 1173|       |   *-----------------------------------------------------*/
 1174|   463k|  scaleValues(f1, NC + 1, -2);
  ------------------
  |  | 1154|   463k|#define NC M_LP_FILTER_ORDER / 2
  |  |  ------------------
  |  |  |  |  117|   463k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  |  |  ------------------
  ------------------
 1175|   463k|  scaleValues(f2, NC + 1, -2);
  ------------------
  |  | 1154|   463k|#define NC M_LP_FILTER_ORDER / 2
  |  |  ------------------
  |  |  |  |  117|   463k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  |  |  ------------------
  ------------------
 1176|       |
 1177|  4.17M|  for (i = NC; i > 0; i--) {
  ------------------
  |  | 1154|   463k|#define NC M_LP_FILTER_ORDER / 2
  |  |  ------------------
  |  |  |  |  117|   463k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  |  |  ------------------
  ------------------
  |  Branch (1177:16): [True: 3.70M, False: 463k]
  ------------------
 1178|  3.70M|    f1[i] += f1[i - 1];
 1179|  3.70M|    f2[i] -= f2[i - 1];
 1180|  3.70M|  }
 1181|       |
 1182|   463k|  FIXP_DBL aDBL[M_LP_FILTER_ORDER];
 1183|       |
 1184|  4.17M|  for (i = 1, k = M_LP_FILTER_ORDER - 1; i <= NC; i++, k--) {
  ------------------
  |  |  117|   463k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
                for (i = 1, k = M_LP_FILTER_ORDER - 1; i <= NC; i++, k--) {
  ------------------
  |  | 1154|  4.17M|#define NC M_LP_FILTER_ORDER / 2
  |  |  ------------------
  |  |  |  |  117|  4.17M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  |  |  ------------------
  ------------------
  |  Branch (1184:42): [True: 3.70M, False: 463k]
  ------------------
 1185|  3.70M|    aDBL[i - 1] = f1[i] + f2[i];
 1186|  3.70M|    aDBL[k] = f1[i] - f2[i];
 1187|  3.70M|  }
 1188|       |
 1189|   463k|  int headroom_a = getScalefactor(aDBL, M_LP_FILTER_ORDER);
  ------------------
  |  |  117|   463k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1190|       |
 1191|  7.88M|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  7.88M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1191:15): [True: 7.41M, False: 463k]
  ------------------
 1192|  7.41M|    a[i] = FX_DBL2FX_LPC(aDBL[i] << headroom_a);
  ------------------
  |  |  129|  7.41M|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  7.41M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.41M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.41M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|  7.41M|  }
 1194|       |
 1195|   463k|  *a_exp = SF_F + (2 - 1) - headroom_a;
  ------------------
  |  | 1128|   463k|#define SF_F 8
  ------------------
 1196|   463k|}
usacdec_lpc.cpp:_ZL9decode_qnP13FDK_BITSTREAMiiPi:
  583|  1.19M|                      int qn[]) {
  584|  1.19M|  int n;
  585|       |
  586|  1.19M|  if (nk_mode == 1) { /* nk mode 1 */
  ------------------
  |  Branch (586:7): [True: 1.05M, False: 135k]
  ------------------
  587|       |    /* Unary code for mid LPC1/LPC3 */
  588|       |    /* Q0=0, Q2=10, Q3=110, ... */
  589|  2.14M|    for (n = 0; n < nqn; n++) {
  ------------------
  |  Branch (589:17): [True: 1.08M, False: 1.05M]
  ------------------
  590|  1.08M|      qn[n] = get_vlclbf(hBs);
  591|  1.08M|      if (qn[n] > 0) {
  ------------------
  |  Branch (591:11): [True: 243k, False: 840k]
  ------------------
  592|   243k|        qn[n]++;
  593|   243k|      }
  594|  1.08M|    }
  595|  1.05M|  } else { /* nk_mode 0, 3 and 2 */
  596|       |    /* 2 bits to specify Q2,Q3,Q4,ext */
  597|   405k|    for (n = 0; n < nqn; n++) {
  ------------------
  |  Branch (597:17): [True: 270k, False: 135k]
  ------------------
  598|   270k|      qn[n] = 2 + FDKreadBits(hBs, 2);
  599|   270k|    }
  600|   135k|    if (nk_mode == 2) {
  ------------------
  |  Branch (600:9): [True: 24.8k, False: 110k]
  ------------------
  601|       |      /* Unary code for rel LPC1/LPC3 */
  602|       |      /* Q0 = 0, Q5=10, Q6=110, ... */
  603|  74.5k|      for (n = 0; n < nqn; n++) {
  ------------------
  |  Branch (603:19): [True: 49.6k, False: 24.8k]
  ------------------
  604|  49.6k|        if (qn[n] > 4) {
  ------------------
  |  Branch (604:13): [True: 6.34k, False: 43.3k]
  ------------------
  605|  6.34k|          qn[n] = get_vlclbf(hBs);
  606|  6.34k|          if (qn[n] > 0) qn[n] += 4;
  ------------------
  |  Branch (606:15): [True: 4.25k, False: 2.08k]
  ------------------
  607|  6.34k|        }
  608|  49.6k|      }
  609|   110k|    } else { /* nk_mode == (0 and 3) */
  610|       |      /* Unary code for abs and rel LPC0/LPC2 */
  611|       |      /* Q5 = 0, Q6=10, Q0=110, Q7=1110, ... */
  612|   330k|      for (n = 0; n < nqn; n++) {
  ------------------
  |  Branch (612:19): [True: 220k, False: 110k]
  ------------------
  613|   220k|        if (qn[n] > 4) {
  ------------------
  |  Branch (613:13): [True: 44.7k, False: 175k]
  ------------------
  614|  44.7k|          qn[n] = get_vlclbf(hBs);
  615|  44.7k|          switch (qn[n]) {
  616|  24.9k|            case 0:
  ------------------
  |  Branch (616:13): [True: 24.9k, False: 19.8k]
  ------------------
  617|  24.9k|              qn[n] = 5;
  618|  24.9k|              break;
  619|  7.63k|            case 1:
  ------------------
  |  Branch (619:13): [True: 7.63k, False: 37.1k]
  ------------------
  620|  7.63k|              qn[n] = 6;
  621|  7.63k|              break;
  622|  2.81k|            case 2:
  ------------------
  |  Branch (622:13): [True: 2.81k, False: 41.9k]
  ------------------
  623|  2.81k|              qn[n] = 0;
  624|  2.81k|              break;
  625|  9.36k|            default:
  ------------------
  |  Branch (625:13): [True: 9.36k, False: 35.4k]
  ------------------
  626|  9.36k|              qn[n] += 4;
  627|  9.36k|              break;
  628|  44.7k|          }
  629|  44.7k|        }
  630|   220k|      }
  631|   110k|    }
  632|   135k|  }
  633|  1.19M|}
usacdec_lpc.cpp:_ZL10get_vlclbfP13FDK_BITSTREAM:
  119|  1.13M|static int get_vlclbf(HANDLE_FDK_BITSTREAM hBs) {
  120|  1.13M|  int result = 0;
  121|       |
  122|  1.78M|  while (FDKreadBits(hBs, 1) && result <= NQ_MAX) {
  ------------------
  |  |  108|   644k|#define NQ_MAX 36
  ------------------
  |  Branch (122:10): [True: 644k, False: 1.13M]
  |  Branch (122:33): [True: 644k, False: 219]
  ------------------
  123|   644k|    result++;
  124|   644k|  }
  125|  1.13M|  return result;
  126|  1.13M|}
usacdec_lpc.cpp:_ZL7RE8_deciiPiS_:
  483|  1.35M|static int RE8_dec(int n, int I, int *k, FIXP_DBL *y) {
  484|  1.35M|  SHORT v[8];
  485|  1.35M|  SHORT _y[8];
  486|  1.35M|  UINT r;
  487|  1.35M|  int i;
  488|       |
  489|       |  /* Check bound of codebook qn */
  490|  1.35M|  if (n > NQ_MAX) {
  ------------------
  |  |  108|  1.35M|#define NQ_MAX 36
  ------------------
  |  Branch (490:7): [True: 228, False: 1.35M]
  ------------------
  491|    228|    return -1;
  492|    228|  }
  493|       |
  494|       |  /* decode the sub-indices I and kv[] according to the codebook number n:
  495|       |     if n=0,2,3,4, decode I (no Voronoi extension)
  496|       |     if n>4, Voronoi extension is used, decode I and kv[] */
  497|  1.35M|  if (n <= 4) {
  ------------------
  |  Branch (497:7): [True: 1.26M, False: 91.9k]
  ------------------
  498|  1.26M|    re8_decode_base_index(&n, I, _y);
  499|  11.3M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (499:17): [True: 10.1M, False: 1.26M]
  ------------------
  500|  10.1M|      y[i] = (LONG)_y[i];
  501|  10.1M|    }
  502|  1.26M|  } else {
  503|       |    /* compute the Voronoi modulo m = 2^r where r is extension order */
  504|  91.9k|    r = ((n - 3) >> 1);
  505|       |
  506|   236k|    while (n > 4) {
  ------------------
  |  Branch (506:12): [True: 144k, False: 91.9k]
  ------------------
  507|   144k|      n -= 2;
  508|   144k|    }
  509|       |    /* decode base codebook index I into c (c is an element of Q3 or Q4)
  510|       |       [here c is stored in y to save memory] */
  511|  91.9k|    re8_decode_base_index(&n, I, _y);
  512|       |    /* decode Voronoi index k[] into v */
  513|  91.9k|    re8_k2y(k, r, v);
  514|       |    /* reconstruct y as y = m c + v (with m=2^r, r integer >=1) */
  515|   827k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (515:17): [True: 735k, False: 91.9k]
  ------------------
  516|   735k|      y[i] = (LONG)((_y[i] << r) + v[i]);
  517|   735k|    }
  518|  91.9k|  }
  519|  1.35M|  return 0;
  520|  1.35M|}
usacdec_lpc.cpp:_ZL21re8_decode_base_indexPijPs:
  375|  1.35M|static void re8_decode_base_index(int *n, UINT index, SHORT y[8]) {
  376|  1.35M|  int i, im, t, sign_code, ka, ks, rank, leader[8];
  377|       |
  378|  1.35M|  if (*n < 2) {
  ------------------
  |  Branch (378:7): [True: 845k, False: 508k]
  ------------------
  379|  7.61M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (379:17): [True: 6.76M, False: 845k]
  ------------------
  380|  6.76M|      y[i] = 0;
  381|  6.76M|    }
  382|   845k|  } else {
  383|       |    // index = (unsigned int)*I;
  384|       |    /* search for the identifier ka of the absolute leader (table-lookup)
  385|       |       Q2 is a subset of Q3 - the two cases are considered in the same branch
  386|       |     */
  387|   508k|    switch (*n) {
  388|   247k|      case 2:
  ------------------
  |  Branch (388:7): [True: 247k, False: 261k]
  ------------------
  389|   391k|      case 3:
  ------------------
  |  Branch (389:7): [True: 144k, False: 364k]
  ------------------
  390|   391k|        i = table_lookup(fdk_dec_I3, index, NB_LDQ3);
  ------------------
  |  |  115|   391k|#define NB_LDQ3 9
  ------------------
  391|   391k|        ka = fdk_dec_A3[i];
  392|   391k|        break;
  393|   117k|      case 4:
  ------------------
  |  Branch (393:7): [True: 117k, False: 391k]
  ------------------
  394|   117k|        i = table_lookup(fdk_dec_I4, index, NB_LDQ4);
  ------------------
  |  |  116|   117k|#define NB_LDQ4 28
  ------------------
  395|   117k|        ka = fdk_dec_A4[i];
  396|   117k|        break;
  397|      0|      default:
  ------------------
  |  Branch (397:7): [True: 0, False: 508k]
  ------------------
  398|      0|        FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (398:9): [Folded, False: 0]
  ------------------
  399|      0|        return;
  400|   508k|    }
  401|       |    /* reconstruct the absolute leader */
  402|  4.58M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (402:17): [True: 4.07M, False: 508k]
  ------------------
  403|  4.07M|      leader[i] = fdk_dec_Da[ka][i];
  404|  4.07M|    }
  405|       |    /* search for the identifier ks of the signed leader (table look-up)
  406|       |       (this search is focused based on the identifier ka of the absolute
  407|       |        leader)*/
  408|   508k|    t = fdk_dec_Ia[ka];
  409|   508k|    im = fdk_dec_Ns[ka];
  410|   508k|    ks = table_lookup(fdk_dec_Is + t, index, im);
  411|       |
  412|       |    /* reconstruct the signed leader from its sign code */
  413|   508k|    sign_code = 2 * fdk_dec_Ds[t + ks];
  414|  4.58M|    for (i = 7; i >= 0; i--) {
  ------------------
  |  Branch (414:17): [True: 4.07M, False: 508k]
  ------------------
  415|  4.07M|      leader[i] *= (1 - (sign_code & 2));
  416|  4.07M|      sign_code >>= 1;
  417|  4.07M|    }
  418|       |
  419|       |    /* compute and decode the rank of the permutation */
  420|   508k|    rank = index - fdk_dec_Is[t + ks]; /* rank = index - cardinality offset */
  421|       |
  422|   508k|    re8_decode_rank_of_permutation(rank, leader, y);
  423|   508k|  }
  424|  1.35M|  return;
  425|  1.35M|}
usacdec_lpc.cpp:_ZL12table_lookupPKtji:
  270|  1.01M|static int table_lookup(const USHORT *table, unsigned int index, int range) {
  271|  1.01M|  int i;
  272|       |
  273|  1.30M|  for (i = 4; i < range; i += 4) {
  ------------------
  |  Branch (273:15): [True: 1.15M, False: 151k]
  ------------------
  274|  1.15M|    if (index < table[i]) {
  ------------------
  |  Branch (274:9): [True: 866k, False: 285k]
  ------------------
  275|   866k|      break;
  276|   866k|    }
  277|  1.15M|  }
  278|  1.01M|  if (i > range) {
  ------------------
  |  Branch (278:7): [True: 108k, False: 909k]
  ------------------
  279|   108k|    i = range;
  280|   108k|  }
  281|       |
  282|  1.01M|  if (index < table[i - 2]) {
  ------------------
  |  Branch (282:7): [True: 637k, False: 380k]
  ------------------
  283|   637k|    i -= 2;
  284|   637k|  }
  285|  1.01M|  if (index < table[i - 1]) {
  ------------------
  |  Branch (285:7): [True: 557k, False: 460k]
  ------------------
  286|   557k|    i--;
  287|   557k|  }
  288|  1.01M|  i--;
  289|       |
  290|  1.01M|  return (i); /* index >= table[i] */
  291|  1.01M|}
usacdec_lpc.cpp:_ZL30re8_decode_rank_of_permutationiPiPs:
  301|   508k|static void re8_decode_rank_of_permutation(int rank, int *xs, SHORT x[8]) {
  302|   508k|  INT a[8], w[8], B, fac, fac_B, target;
  303|   508k|  int i, j;
  304|       |
  305|       |  /* --- pre-processing based on the signed leader xs ---
  306|       |     - compute the alphabet a=[a[0] ... a[q-1]] of x (q elements)
  307|       |       such that a[0]!=...!=a[q-1]
  308|       |       it is assumed that xs is sorted in the form of a signed leader
  309|       |       which can be summarized in 2 requirements:
  310|       |          a) |xs[0]| >= |xs[1]| >= |xs[2]| >= ... >= |xs[7]|
  311|       |          b) if |xs[i]|=|xs[i-1]|, xs[i]>=xs[i+1]
  312|       |       where |.| indicates the absolute value operator
  313|       |     - compute q (the number of symbols in the alphabet)
  314|       |     - compute w[0..q-1] where w[j] counts the number of occurences of
  315|       |       the symbol a[j] in xs
  316|       |     - compute B = prod_j=0..q-1 (w[j]!) where .! is the factorial */
  317|       |  /* xs[i], xs[i-1] and ptr_w/a*/
  318|   508k|  j = 0;
  319|   508k|  w[j] = 1;
  320|   508k|  a[j] = xs[0];
  321|   508k|  B = 1;
  322|  4.07M|  for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (322:15): [True: 3.56M, False: 508k]
  ------------------
  323|  3.56M|    if (xs[i] != xs[i - 1]) {
  ------------------
  |  Branch (323:9): [True: 763k, False: 2.79M]
  ------------------
  324|   763k|      j++;
  325|   763k|      w[j] = 1;
  326|   763k|      a[j] = xs[i];
  327|  2.79M|    } else {
  328|  2.79M|      w[j]++;
  329|  2.79M|      B *= w[j];
  330|  2.79M|    }
  331|  3.56M|  }
  332|       |
  333|       |  /* --- actual rank decoding ---
  334|       |     the rank of x (where x is a permutation of xs) is based on
  335|       |     Schalkwijk's formula
  336|       |     it is given by rank=sum_{k=0..7} (A_k * fac_k/B_k)
  337|       |     the decoding of this rank is sequential and reconstructs x[0..7]
  338|       |     element by element from x[0] to x[7]
  339|       |     [the tricky part is the inference of A_k for each k...]
  340|       |   */
  341|       |
  342|   508k|  if (w[0] == 8) {
  ------------------
  |  Branch (342:7): [True: 52.9k, False: 455k]
  ------------------
  343|   476k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (343:17): [True: 423k, False: 52.9k]
  ------------------
  344|   423k|      x[i] = a[0]; /* avoid fac of 40320 */
  345|   423k|    }
  346|   455k|  } else {
  347|   455k|    target = rank * B;
  348|   455k|    fac_B = 1;
  349|       |    /* decode x element by element */
  350|  4.10M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (350:17): [True: 3.64M, False: 455k]
  ------------------
  351|  3.64M|      fac = fac_B * fdk_dec_tab_factorial[i]; /* fac = 1..5040 */
  352|  3.64M|      j = -1;
  353|  7.36M|      do {
  354|  7.36M|        target -= w[++j] * fac;
  355|  7.36M|      } while (target >= 0); /* max of 30 tests / SV */
  ------------------
  |  Branch (355:16): [True: 3.71M, False: 3.64M]
  ------------------
  356|  3.64M|      x[i] = a[j];
  357|       |      /* update rank, denominator B (B_k) and counter w[j] */
  358|  3.64M|      target += w[j] * fac; /* target = fac_B*B*rank */
  359|  3.64M|      fac_B *= w[j];
  360|  3.64M|      w[j]--;
  361|  3.64M|    }
  362|   455k|  }
  363|   508k|}
usacdec_lpc.cpp:_ZL7re8_k2yPiiPs:
  434|  91.9k|static void re8_k2y(int *k, int r, SHORT *y) {
  435|  91.9k|  int i, tmp, sum;
  436|  91.9k|  SHORT v[8];
  437|  91.9k|  FIXP_ZF zf[8];
  ------------------
  |  |  156|  91.9k|#define FIXP_ZF FIXP_DBL
  ------------------
  438|       |
  439|  91.9k|  FDK_ASSERT(r <= ZF_SCALE);
  ------------------
  |  |  221|  91.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (439:3): [True: 91.9k, False: 0]
  ------------------
  440|       |
  441|       |  /* compute y = k M and z=(y-a)/m, where
  442|       |     M = [4        ]
  443|       |         [2 2      ]
  444|       |         [|   \    ]
  445|       |         [2     2  ]
  446|       |         [1 1 _ 1 1]
  447|       |     a=(2,0,...,0)
  448|       |     m = 1<<r
  449|       |  */
  450|   827k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (450:15): [True: 735k, False: 91.9k]
  ------------------
  451|   735k|    y[i] = k[7];
  452|   735k|  }
  453|  91.9k|  zf[7] = INT2ZF(y[7], r);
  ------------------
  |  |  157|  91.9k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  ------------------
  |  |  |  |  155|  91.9k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  91.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  454|  91.9k|  sum = 0;
  455|   643k|  for (i = 6; i >= 1; i--) {
  ------------------
  |  Branch (455:15): [True: 551k, False: 91.9k]
  ------------------
  456|   551k|    tmp = 2 * k[i];
  457|   551k|    sum += tmp;
  458|   551k|    y[i] += tmp;
  459|   551k|    zf[i] = INT2ZF(y[i], r);
  ------------------
  |  |  157|   551k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  ------------------
  |  |  |  |  155|   551k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   551k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  460|   551k|  }
  461|  91.9k|  y[0] += (4 * k[0] + sum);
  462|  91.9k|  zf[0] = INT2ZF(y[0] - 2, r);
  ------------------
  |  |  157|  91.9k|#define INT2ZF(x, s) (FIXP_ZF)((x) << (ZF_SCALE - (s)))
  |  |  ------------------
  |  |  |  |  155|  91.9k|#define ZF_SCALE ((DFRACT_BITS / 2))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  91.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  463|       |  /* find nearest neighbor v of z in infinite RE8 */
  464|  91.9k|  RE8_PPV(zf, v, r);
  465|       |  /* compute y -= m v */
  466|   827k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (466:15): [True: 735k, False: 91.9k]
  ------------------
  467|   735k|    y[i] -= (SHORT)(v[i] << r);
  468|   735k|  }
  469|  91.9k|}
usacdec_lpc.cpp:_ZL12vlpc_1st_decP13FDK_BITSTREAMPs:
  674|  82.7k|) {
  675|  82.7k|  const FIXP_LPC *p_dico;
  676|  82.7k|  int i, index;
  677|       |
  678|  82.7k|  index = FDKreadBits(hBs, 8);
  679|  82.7k|  p_dico = &fdk_dec_dico_lsf_abs_8b[index * M_LP_FILTER_ORDER];
  ------------------
  |  |  117|  82.7k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  680|  1.40M|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  1.40M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (680:15): [True: 1.32M, False: 82.7k]
  ------------------
  681|  1.32M|    lsfq[i] = p_dico[i];
  682|  1.32M|  }
  683|  82.7k|}
usacdec_lpc.cpp:_ZL12vlpc_2st_decP13FDK_BITSTREAMPsi:
  698|   161k|) {
  699|   161k|  int err;
  700|   161k|  FIXP_DBL xq[M_LP_FILTER_ORDER]; /* weighted residual LSF vector */
  701|       |
  702|       |  /* Decode AVQ refinement */
  703|   161k|  { err = CLpc_DecodeAVQ(hBs, xq, nk_mode, 2, 8); }
  704|   161k|  if (err != 0) {
  ------------------
  |  Branch (704:7): [True: 10, False: 161k]
  ------------------
  705|     10|    return -1;
  706|     10|  }
  707|       |
  708|       |  /* add non-weighted residual LSF vector to LSF1st */
  709|   161k|  lsf_weight_2st(lsfq, xq, nk_mode);
  710|       |
  711|       |  /* reorder */
  712|   161k|  reorder_lsf(lsfq, FL2FXCONST_LPC(LSF_GAP / (1 << LSF_SCALE)),
  ------------------
  |  |  132|   161k|#define FL2FXCONST_LPC(val) FL2FXCONST_SGL(val)
  |  |  ------------------
  |  |  |  |  180|   161k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   161k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 161k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   161k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   161k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   161k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 161k]
  |  |  |  |  ------------------
  |  |  |  |  183|   161k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   161k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   161k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   161k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   161k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   161k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   161k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  713|   161k|              M_LP_FILTER_ORDER);
  ------------------
  |  |  117|   161k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  714|       |
  715|   161k|  return 0;
  716|   161k|}
usacdec_lpc.cpp:_ZL14lsf_weight_2stPsPii:
  537|   161k|static void lsf_weight_2st(FIXP_LPC *lsfq, FIXP_DBL *xq, int nk_mode) {
  538|   161k|  FIXP_LPC d[M_LP_FILTER_ORDER + 1];
  539|   161k|  FIXP_SGL factor;
  540|   161k|  LONG w; /* inverse weight factor */
  ------------------
  |  |  181|   161k|#define LONG INT
  ------------------
  541|   161k|  int i;
  542|       |
  543|       |  /* compute lsf distance */
  544|   161k|  d[0] = lsfq[0];
  545|   161k|  d[M_LP_FILTER_ORDER] =
  ------------------
  |  |  117|   161k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  546|   161k|      FL2FXCONST_LPC(FREQ_MAX / (1 << LSF_SCALE)) - lsfq[M_LP_FILTER_ORDER - 1];
  ------------------
  |  |  132|   161k|#define FL2FXCONST_LPC(val) FL2FXCONST_SGL(val)
  |  |  ------------------
  |  |  |  |  180|   161k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   161k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 161k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   161k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   161k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   161k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 161k]
  |  |  |  |  ------------------
  |  |  |  |  183|   161k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   161k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   161k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   161k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   161k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   161k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   161k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    FL2FXCONST_LPC(FREQ_MAX / (1 << LSF_SCALE)) - lsfq[M_LP_FILTER_ORDER - 1];
  ------------------
  |  |  117|   161k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  547|  2.58M|  for (i = 1; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  2.58M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (547:15): [True: 2.42M, False: 161k]
  ------------------
  548|  2.42M|    d[i] = lsfq[i] - lsfq[i - 1];
  549|  2.42M|  }
  550|       |
  551|   161k|  switch (nk_mode) {
  552|  82.7k|    case 0:
  ------------------
  |  Branch (552:5): [True: 82.7k, False: 78.8k]
  ------------------
  553|  82.7k|      factor = FL2FXCONST_SGL(2.0f * 60.0f / FREQ_DIV);
  ------------------
  |  |  180|  82.7k|  (FIXP_SGL)(                                                                \
  |  |  181|  82.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 82.7k, Folded]
  |  |  ------------------
  |  |  182|  82.7k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  82.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  82.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 82.7k]
  |  |  ------------------
  |  |  183|  82.7k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  82.7k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  82.7k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  82.7k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  82.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  82.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  82.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  554|  82.7k|      break; /* abs */
  555|  26.5k|    case 1:
  ------------------
  |  Branch (555:5): [True: 26.5k, False: 135k]
  ------------------
  556|  26.5k|      factor = FL2FXCONST_SGL(2.0f * 65.0f / FREQ_DIV);
  ------------------
  |  |  180|  26.5k|  (FIXP_SGL)(                                                                \
  |  |  181|  26.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 26.5k, Folded]
  |  |  ------------------
  |  |  182|  26.5k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  26.5k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.5k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 26.5k]
  |  |  ------------------
  |  |  183|  26.5k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  26.5k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  26.5k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  26.5k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  26.5k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.5k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  26.5k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  26.5k|      break; /* mid */
  558|  24.8k|    case 2:
  ------------------
  |  Branch (558:5): [True: 24.8k, False: 136k]
  ------------------
  559|  24.8k|      factor = FL2FXCONST_SGL(2.0f * 64.0f / FREQ_DIV);
  ------------------
  |  |  180|  24.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  24.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 24.8k, Folded]
  |  |  ------------------
  |  |  182|  24.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  24.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  24.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 24.8k]
  |  |  ------------------
  |  |  183|  24.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  24.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  24.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  24.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  24.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  24.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  24.8k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  560|  24.8k|      break; /* rel1 */
  561|  27.5k|    default:
  ------------------
  |  Branch (561:5): [True: 27.5k, False: 134k]
  ------------------
  562|  27.5k|      factor = FL2FXCONST_SGL(2.0f * 63.0f / FREQ_DIV);
  ------------------
  |  |  180|  27.5k|  (FIXP_SGL)(                                                                \
  |  |  181|  27.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 27.5k, Folded]
  |  |  ------------------
  |  |  182|  27.5k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  27.5k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  27.5k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 27.5k]
  |  |  ------------------
  |  |  183|  27.5k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  27.5k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  27.5k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  27.5k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  27.5k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  27.5k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  27.5k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  563|  27.5k|      break; /* rel2 */
  564|   161k|  }
  565|       |  /* add non-weighted residual LSF vector to LSF1st */
  566|  2.74M|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|  2.74M|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (566:15): [True: 2.58M, False: 161k]
  ------------------
  567|  2.58M|    w = (LONG)fMultDiv2(factor, sqrtFixp(fMult(d[i], d[i + 1])));
  568|  2.58M|    lsfq[i] = fAddSaturate(lsfq[i],
  569|  2.58M|                           FX_DBL2FX_LPC((FIXP_DBL)((INT64)w * (LONG)xq[i])));
  ------------------
  |  |  129|  2.58M|#define FX_DBL2FX_LPC(x) FX_DBL2FX_SGL((FIXP_DBL)(x))
  |  |  ------------------
  |  |  |  |  220|  2.58M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.58M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.58M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  570|  2.58M|  }
  571|       |
  572|   161k|  return;
  573|   161k|}
usacdec_lpc.cpp:_ZL11reorder_lsfPssi:
  642|   161k|static void reorder_lsf(FIXP_LPC *lsf, FIXP_LPC min_dist, int n) {
  643|   161k|  FIXP_LPC lsf_min;
  644|   161k|  int i;
  645|       |
  646|   161k|  lsf_min = min_dist;
  647|  2.74M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (647:15): [True: 2.58M, False: 161k]
  ------------------
  648|  2.58M|    if (lsf[i] < lsf_min) {
  ------------------
  |  Branch (648:9): [True: 121k, False: 2.46M]
  ------------------
  649|   121k|      lsf[i] = lsf_min;
  650|   121k|    }
  651|  2.58M|    lsf_min = fAddSaturate(lsf[i], min_dist);
  652|  2.58M|  }
  653|       |
  654|       |  /* reverse */
  655|   161k|  lsf_min = FL2FXCONST_LPC(FREQ_MAX / (1 << LSF_SCALE)) - min_dist;
  ------------------
  |  |  132|   161k|#define FL2FXCONST_LPC(val) FL2FXCONST_SGL(val)
  |  |  ------------------
  |  |  |  |  180|   161k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   161k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 161k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   161k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   161k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   161k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 161k]
  |  |  |  |  ------------------
  |  |  |  |  183|   161k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   161k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   161k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   161k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   161k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   161k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   161k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  656|  2.74M|  for (i = n - 1; i >= 0; i--) {
  ------------------
  |  Branch (656:19): [True: 2.58M, False: 161k]
  ------------------
  657|  2.58M|    if (lsf[i] > lsf_min) {
  ------------------
  |  Branch (657:9): [True: 20.2k, False: 2.56M]
  ------------------
  658|  20.2k|      lsf[i] = lsf_min;
  659|  20.2k|    }
  660|       |
  661|  2.58M|    lsf_min = lsf[i] - min_dist;
  662|  2.58M|  }
  663|   161k|}
usacdec_lpc.cpp:_ZL12get_vlclbf_nP13FDK_BITSTREAMi:
  134|  65.9k|static int get_vlclbf_n(HANDLE_FDK_BITSTREAM hBs, int n) {
  135|  65.9k|  int result = 0;
  136|       |
  137|  97.8k|  while (FDKreadBits(hBs, 1)) {
  ------------------
  |  Branch (137:10): [True: 40.5k, False: 57.2k]
  ------------------
  138|  40.5k|    result++;
  139|  40.5k|    n--;
  140|  40.5k|    if (n <= 0) {
  ------------------
  |  Branch (140:9): [True: 8.70k, False: 31.8k]
  ------------------
  141|  8.70k|      break;
  142|  8.70k|    }
  143|  40.5k|  }
  144|       |
  145|  65.9k|  return result;
  146|  65.9k|}
usacdec_lpc.cpp:_ZL10get_lsppolPsPiii:
 1130|   927k|static void get_lsppol(FIXP_LPC lsp[], FIXP_DBL f[], int n, int flag) {
 1131|   927k|  FIXP_DBL b;
 1132|   927k|  FIXP_LPC *plsp;
 1133|   927k|  int i, j;
 1134|       |
 1135|   927k|  plsp = lsp + flag - 1;
 1136|   927k|  f[0] = FL2FXCONST_DBL(1.0f / (1 << SF_F));
  ------------------
  |  |  192|   927k|  (FIXP_DBL)(                                                                \
  |  |  193|   927k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 927k, Folded]
  |  |  ------------------
  |  |  194|   927k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   927k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   927k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 927k]
  |  |  ------------------
  |  |  195|   927k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   927k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   927k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   927k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   927k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   927k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   927k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1137|   927k|  b = -FX_LPC2FX_DBL(*plsp);
  ------------------
  |  |  131|   927k|#define FX_LPC2FX_DBL(x) FX_SGL2FX_DBL(x)
  |  |  ------------------
  |  |  |  |  219|   927k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   927k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   927k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1138|   927k|  f[1] = b >> (SF_F - 1);
  ------------------
  |  | 1128|   927k|#define SF_F 8
  ------------------
 1139|  7.41M|  for (i = 2; i <= n; i++) {
  ------------------
  |  Branch (1139:15): [True: 6.49M, False: 927k]
  ------------------
 1140|  6.49M|    plsp += 2;
 1141|  6.49M|    b = -FX_LPC2FX_DBL(*plsp);
  ------------------
  |  |  131|  6.49M|#define FX_LPC2FX_DBL(x) FX_SGL2FX_DBL(x)
  |  |  ------------------
  |  |  |  |  219|  6.49M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.49M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.49M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1142|  6.49M|    f[i] = SATURATE_LEFT_SHIFT((fMultDiv2(b, f[i - 1]) + (f[i - 2] >> 1)), 2,
  ------------------
  |  |  251|  6.49M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 8.88k, False: 6.48M]
  |  |  ------------------
  |  |  252|  6.49M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  6.49M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 1.88k, False: 6.48M]
  |  |  ------------------
  |  |  254|  6.48M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  6.48M|             : ((LONG)(src) << (scale)))
  ------------------
 1143|  6.49M|                               DFRACT_BITS);
 1144|  25.9M|    for (j = i - 1; j > 1; j--) {
  ------------------
  |  Branch (1144:21): [True: 19.4M, False: 6.49M]
  ------------------
 1145|  19.4M|      f[j] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  19.4M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 32.0k, False: 19.4M]
  |  |  ------------------
  |  |  252|  19.4M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  19.4M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 1.49k, False: 19.4M]
  |  |  ------------------
  |  |  254|  19.4M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  19.4M|             : ((LONG)(src) << (scale)))
  ------------------
 1146|  19.4M|          ((f[j] >> 2) + fMultDiv2(b, f[j - 1]) + (f[j - 2] >> 2)), 2,
 1147|  19.4M|          DFRACT_BITS);
 1148|  19.4M|    }
 1149|  6.49M|    f[1] = f[1] + (b >> (SF_F - 1));
  ------------------
  |  | 1128|  6.49M|#define SF_F 8
  ------------------
 1150|  6.49M|  }
 1151|   927k|  return;
 1152|   927k|}

_Z6filtLPPKiPiS1_PKsiii:
  127|   811k|            int len) {
  128|   811k|  INT i, j;
  129|   811k|  FIXP_DBL tmp;
  130|       |
  131|   811k|  FDK_ASSERT((aacOutDataHeadroom - 1) >= -(MDCT_OUTPUT_SCALE));
  ------------------
  |  |  221|   811k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (131:3): [True: 811k, False: 0]
  ------------------
  132|       |
  133|  52.7M|  for (i = 0; i < stop; i++) {
  ------------------
  |  Branch (133:15): [True: 51.9M, False: 811k]
  ------------------
  134|  51.9M|    tmp = fMultDiv2(noise[i], filt[0]);  // Filt in Q-1.16
  135|   674M|    for (j = 1; j <= len; j++) {
  ------------------
  |  Branch (135:17): [True: 623M, False: 51.9M]
  ------------------
  136|   623M|      tmp += fMult((noise[i - j] >> 1) + (noise[i + j] >> 1), filt[j]);
  137|   623M|    }
  138|  51.9M|    syn_out[i] = (PCM_DEC)(
  139|  51.9M|        IMDCT_SCALE((syn[i] >> 1) - (tmp >> 1), aacOutDataHeadroom - 1));
  ------------------
  |  |  118|  51.9M|  SATURATE_RIGHT_SHIFT((x), ((s) + MDCT_OUTPUT_SCALE), PCM_OUT_BITS)
  |  |  ------------------
  |  |  |  |  242|  51.9M|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (242:4): [True: 0, False: 51.9M]
  |  |  |  |  ------------------
  |  |  |  |  243|  51.9M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  |  |  244|  51.9M|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:10): [True: 0, False: 51.9M]
  |  |  |  |  ------------------
  |  |  |  |  245|  51.9M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  |  |  246|  51.9M|             : ((LONG)(src) >> (scale)))
  |  |  ------------------
  ------------------
  140|  51.9M|  }
  141|   811k|}
_Z17bass_pf_1sf_delayPiPKiS_iiiS_iS_:
  154|  64.0k|{
  155|  64.0k|  INT i, sf, i_subfr, T, T2, lg;
  156|       |
  157|  64.0k|  FIXP_DBL tmp, ener, corr, gain;
  158|  64.0k|  FIXP_DBL *noise, *noise_in;
  159|  64.0k|  FIXP_DBL
  160|  64.0k|  noise_buf[L_FILT + (2 * L_SUBFR)];  // L_FILT = 12, L_SUBFR = 64 => 140
  161|  64.0k|  const FIXP_DBL *x, *y;
  162|       |
  163|  64.0k|  {
  164|  64.0k|    noise = noise_buf + L_FILT;  // L_FILT = 12 delay of upsampling filter
  ------------------
  |  |  139|  64.0k|#define L_FILT 12 /* Delay of up-sampling filter                */
  ------------------
  165|  64.0k|    noise_in = noise_buf + L_FILT + L_SUBFR;
  ------------------
  |  |  139|  64.0k|#define L_FILT 12 /* Delay of up-sampling filter                */
  ------------------
                  noise_in = noise_buf + L_FILT + L_SUBFR;
  ------------------
  |  |  146|  64.0k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  166|       |    /* Input scaling of the BPF memory */
  167|  64.0k|    scaleValues(mem_bpf, (L_FILT + L_SUBFR), 1);
  ------------------
  |  |  139|  64.0k|#define L_FILT 12 /* Delay of up-sampling filter                */
  ------------------
                  scaleValues(mem_bpf, (L_FILT + L_SUBFR), 1);
  ------------------
  |  |  146|  64.0k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  168|  64.0k|  }
  169|       |
  170|  64.0k|  int gain_exp = 17;
  171|       |
  172|  64.0k|  sf = 0;
  173|   875k|  for (i_subfr = 0; i_subfr < l_frame; i_subfr += L_SUBFR, sf++) {
  ------------------
  |  |  146|   811k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (173:21): [True: 811k, False: 64.0k]
  ------------------
  174|   811k|    T = T_sf[sf];
  175|   811k|    gain = pit_gain[sf];
  176|       |
  177|       |    /* Gain is in Q17.14 */
  178|       |    /* If gain > 1 set to 1 */
  179|   811k|    if (gain > (FIXP_DBL)(1 << 14)) gain = (FIXP_DBL)(1 << 14);
  ------------------
  |  Branch (179:9): [True: 23.1k, False: 788k]
  ------------------
  180|       |
  181|       |    /* If gain < 0 set to 0 */
  182|   811k|    if (gain < (FIXP_DBL)0) gain = (FIXP_DBL)0;
  ------------------
  |  Branch (182:9): [True: 59.2k, False: 751k]
  ------------------
  183|       |
  184|   811k|    if (gain > (FIXP_DBL)0) {
  ------------------
  |  Branch (184:9): [True: 163k, False: 647k]
  ------------------
  185|       |      /* pitch tracker: test pitch/2 to avoid continuous pitch doubling */
  186|       |      /* Note: pitch is limited to PIT_MIN (34 = 376Hz) at the encoder  */
  187|   163k|      T2 = T >> 1;
  188|   163k|      x = &syn[i_subfr - L_EXTRA];
  ------------------
  |  |  151|   163k|#define L_EXTRA 96 /* for bass post-filter */
  ------------------
  189|   163k|      y = &syn[i_subfr - T2 - L_EXTRA];
  ------------------
  |  |  151|   163k|#define L_EXTRA 96 /* for bass post-filter */
  ------------------
  190|       |
  191|   163k|      ener = (FIXP_DBL)0;
  192|   163k|      corr = (FIXP_DBL)0;
  193|   163k|      tmp = (FIXP_DBL)0;
  194|       |
  195|   163k|      int headroom_x = getScalefactor(x, L_SUBFR + L_EXTRA);
  ------------------
  |  |  146|   163k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
                    int headroom_x = getScalefactor(x, L_SUBFR + L_EXTRA);
  ------------------
  |  |  151|   163k|#define L_EXTRA 96 /* for bass post-filter */
  ------------------
  196|   163k|      int headroom_y = getScalefactor(y, L_SUBFR + L_EXTRA);
  ------------------
  |  |  146|   163k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
                    int headroom_y = getScalefactor(y, L_SUBFR + L_EXTRA);
  ------------------
  |  |  151|   163k|#define L_EXTRA 96 /* for bass post-filter */
  ------------------
  197|       |
  198|   163k|      int width_shift = 7;
  199|       |
  200|  26.2M|      for (i = 0; i < (L_SUBFR + L_EXTRA); i++) {
  ------------------
  |  |  146|  26.2M|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
                    for (i = 0; i < (L_SUBFR + L_EXTRA); i++) {
  ------------------
  |  |  151|  26.2M|#define L_EXTRA 96 /* for bass post-filter */
  ------------------
  |  Branch (200:19): [True: 26.1M, False: 163k]
  ------------------
  201|  26.1M|        ener += fPow2Div2((x[i] << headroom_x)) >> width_shift;
  202|  26.1M|        corr += fMultDiv2((x[i] << headroom_x), (y[i] << headroom_y)) >>
  203|  26.1M|                width_shift;
  204|  26.1M|        tmp += fPow2Div2((y[i] << headroom_y)) >> width_shift;
  205|  26.1M|      }
  206|       |
  207|   163k|      int exp_ener = ((17 - headroom_x) << 1) + width_shift + 1;
  208|   163k|      int exp_corr = (17 - headroom_x) + (17 - headroom_y) + width_shift + 1;
  209|   163k|      int exp_tmp = ((17 - headroom_y) << 1) + width_shift + 1;
  210|       |
  211|       |      /* Add 0.01 to "ener". Adjust exponents */
  212|   163k|      FIXP_DBL point_zero_one = (FIXP_DBL)0x51eb851f; /* In Q-6.37 */
  213|   163k|      int diff;
  214|   163k|      ener = fAddNorm(ener, exp_ener, point_zero_one, -6, &exp_ener);
  215|   163k|      corr = fAddNorm(corr, exp_corr, point_zero_one, -6, &exp_corr);
  216|   163k|      tmp = fAddNorm(tmp, exp_tmp, point_zero_one, -6, &exp_tmp);
  217|       |
  218|       |      /* use T2 if normalized correlation > 0.95 */
  219|   163k|      INT s1, s2;
  220|   163k|      s1 = CntLeadingZeros(ener) - 1;
  ------------------
  |  |  308|   163k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  221|   163k|      s2 = CntLeadingZeros(tmp) - 1;
  ------------------
  |  |  308|   163k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  222|       |
  223|   163k|      FIXP_DBL ener_by_tmp = fMultDiv2(ener << s1, tmp << s2);
  224|   163k|      int ener_by_tmp_exp = (exp_ener - s1) + (exp_tmp - s2) + 1;
  225|       |
  226|   163k|      if (ener_by_tmp_exp & 1) {
  ------------------
  |  Branch (226:11): [True: 87.7k, False: 75.6k]
  ------------------
  227|  87.7k|        ener_by_tmp <<= 1;
  228|  87.7k|        ener_by_tmp_exp -= 1;
  229|  87.7k|      }
  230|       |
  231|   163k|      int temp_exp = 0;
  232|       |
  233|   163k|      FIXP_DBL temp1 = invSqrtNorm2(ener_by_tmp, &temp_exp);
  234|       |
  235|   163k|      int temp1_exp = temp_exp - (ener_by_tmp_exp >> 1);
  236|       |
  237|   163k|      FIXP_DBL tmp_result = fMult(corr, temp1);
  238|       |
  239|   163k|      int tmp_result_exp = exp_corr + temp1_exp;
  240|       |
  241|   163k|      diff = tmp_result_exp - 0;
  242|   163k|      FIXP_DBL point95 = FL2FXCONST_DBL(0.95f);
  ------------------
  |  |  192|   163k|  (FIXP_DBL)(                                                                \
  |  |  193|   163k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 163k, Folded]
  |  |  ------------------
  |  |  194|   163k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   163k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   163k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 163k]
  |  |  ------------------
  |  |  195|   163k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   163k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   163k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   163k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   163k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   163k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   163k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  243|   163k|      if (diff >= 0) {
  ------------------
  |  Branch (243:11): [True: 87.2k, False: 76.1k]
  ------------------
  244|  87.2k|        diff = fMin(diff, 31);
  245|  87.2k|        point95 = FL2FXCONST_DBL(0.95f) >> diff;
  ------------------
  |  |  192|  87.2k|  (FIXP_DBL)(                                                                \
  |  |  193|  87.2k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 87.2k, Folded]
  |  |  ------------------
  |  |  194|  87.2k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  87.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  87.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 87.2k]
  |  |  ------------------
  |  |  195|  87.2k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  87.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  87.2k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  87.2k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  87.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  87.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  87.2k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  246|  87.2k|      } else {
  247|  76.1k|        diff = fMax(diff, -31);
  248|  76.1k|        tmp_result >>= (-diff);
  249|  76.1k|      }
  250|       |
  251|   163k|      if (tmp_result > point95) T = T2;
  ------------------
  |  Branch (251:11): [True: 6.43k, False: 156k]
  ------------------
  252|       |
  253|       |      /* prevent that noise calculation below reaches into not defined signal
  254|       |         parts at the end of the synth_buf or in other words restrict the below
  255|       |         used index (i+i_subfr+T) < l_frame + l_next
  256|       |      */
  257|   163k|      lg = l_frame + l_next - T - i_subfr;
  258|       |
  259|   163k|      if (lg > L_SUBFR)
  ------------------
  |  |  146|   163k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (259:11): [True: 162k, False: 695]
  ------------------
  260|   162k|        lg = L_SUBFR;
  ------------------
  |  |  146|   162k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  261|    695|      else if (lg < 0)
  ------------------
  |  Branch (261:16): [True: 380, False: 315]
  ------------------
  262|    380|        lg = 0;
  263|       |
  264|       |      /* limit gain to avoid problem on burst */
  265|   163k|      if (lg > 0) {
  ------------------
  |  Branch (265:11): [True: 162k, False: 390]
  ------------------
  266|   162k|        FIXP_DBL tmp1;
  267|       |
  268|       |        /* max(lg) = 64 => scale with 6 bits minus 1 (fPow2Div2) */
  269|       |
  270|   162k|        s1 = getScalefactor(&syn[i_subfr], lg);
  271|   162k|        s2 = getScalefactor(&syn[i_subfr + T], lg);
  272|   162k|        INT s = fixMin(s1, s2);
  ------------------
  |  |  306|   162k|#define fixMin(a, b) fMin(a, b)
  ------------------
  273|       |
  274|   162k|        tmp = (FIXP_DBL)0;
  275|   162k|        ener = (FIXP_DBL)0;
  276|  10.5M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (276:21): [True: 10.4M, False: 162k]
  ------------------
  277|  10.4M|          tmp += fPow2Div2(syn[i + i_subfr] << s1) >> (SF_PITCH_TRACK);
  ------------------
  |  |  118|  10.4M|#define SF_PITCH_TRACK 6
  ------------------
  278|  10.4M|          ener += fPow2Div2(syn[i + i_subfr + T] << s2) >> (SF_PITCH_TRACK);
  ------------------
  |  |  118|  10.4M|#define SF_PITCH_TRACK 6
  ------------------
  279|  10.4M|        }
  280|   162k|        tmp = tmp >> fMin(DFRACT_BITS - 1, (2 * (s1 - s)));
  ------------------
  |  |  113|   162k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  281|   162k|        ener = ener >> fMin(DFRACT_BITS - 1, (2 * (s2 - s)));
  ------------------
  |  |  113|   162k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  282|       |
  283|       |        /* error robustness: for the specific case syn[...] == -1.0f for all 64
  284|       |           samples ener or tmp might overflow and become negative. For all sane
  285|       |           cases we have enough headroom.
  286|       |        */
  287|   162k|        if (ener <= (FIXP_DBL)0) {
  ------------------
  |  Branch (287:13): [True: 9.89k, False: 153k]
  ------------------
  288|  9.89k|          ener = (FIXP_DBL)1;
  289|  9.89k|        }
  290|   162k|        if (tmp <= (FIXP_DBL)0) {
  ------------------
  |  Branch (290:13): [True: 543, False: 162k]
  ------------------
  291|    543|          tmp = (FIXP_DBL)1;
  292|    543|        }
  293|   162k|        FDK_ASSERT(ener > (FIXP_DBL)0);
  ------------------
  |  |  221|   162k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (293:9): [True: 162k, False: 0]
  ------------------
  294|       |
  295|       |        /* tmp = sqrt(tmp/ener) */
  296|   162k|        int result_e = 0;
  297|   162k|        tmp1 = fDivNorm(tmp, ener, &result_e);
  298|   162k|        if (result_e & 1) {
  ------------------
  |  Branch (298:13): [True: 90.1k, False: 72.8k]
  ------------------
  299|  90.1k|          tmp1 >>= 1;
  300|  90.1k|          result_e += 1;
  301|  90.1k|        }
  302|   162k|        tmp = sqrtFixp(tmp1);
  303|   162k|        result_e >>= 1;
  304|       |
  305|   162k|        gain_exp = 17;
  306|       |
  307|   162k|        diff = result_e - gain_exp;
  308|       |
  309|   162k|        FIXP_DBL gain1 = gain;
  310|       |
  311|   162k|        if (diff >= 0) {
  ------------------
  |  Branch (311:13): [True: 0, False: 162k]
  ------------------
  312|      0|          diff = fMin(diff, 31);
  313|      0|          gain1 >>= diff;
  314|   162k|        } else {
  315|   162k|          result_e += (-diff);
  316|   162k|          diff = fMax(diff, -31);
  317|   162k|          tmp >>= (-diff);
  318|   162k|        }
  319|       |
  320|   162k|        if (tmp < gain1) {
  ------------------
  |  Branch (320:13): [True: 25.6k, False: 137k]
  ------------------
  321|  25.6k|          gain = tmp;
  322|  25.6k|          gain_exp = result_e;
  323|  25.6k|        }
  324|   162k|      }
  325|       |
  326|       |      /* calculate noise based on voiced pitch */
  327|       |      /* fMultDiv2() replaces weighting of gain with 0.5 */
  328|   163k|      diff = gain_exp - 17;
  329|   163k|      if (diff >= 0) {
  ------------------
  |  Branch (329:11): [True: 163k, False: 0]
  ------------------
  330|   163k|        gain <<= diff;
  331|   163k|      } else {
  332|      0|        gain >>= (-diff);
  333|      0|      }
  334|       |
  335|   163k|      s1 = CntLeadingZeros(gain) - 1;
  ------------------
  |  |  308|   163k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  336|   163k|      s1 -= 16; /* Leading bits for SGL */
  337|       |
  338|   163k|      FIXP_SGL gainSGL = FX_DBL2FX_SGL(gain << 16);
  ------------------
  |  |  220|   163k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   163k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   163k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  339|       |
  340|   163k|      gainSGL = gainSGL << s1;
  341|       |
  342|   163k|      {
  343|  10.5M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (343:21): [True: 10.4M, False: 163k]
  ------------------
  344|       |          /* scaled with SF_SYNTH + gain_sf + 1; composition of scalefactor 2:
  345|       |           * one additional shift of syn values + fMult => fMultDiv2 */
  346|  10.4M|          noise_in[i] =
  347|  10.4M|              scaleValue(fMultDiv2(gainSGL, (syn[i + i_subfr] >> 1) -
  348|  10.4M|                                                (syn[i + i_subfr - T] >> 2) -
  349|  10.4M|                                                (syn[i + i_subfr + T] >> 2)),
  350|  10.4M|                         2 - s1);
  351|  10.4M|        }
  352|       |
  353|   196k|        for (i = lg; i < L_SUBFR; i++) {
  ------------------
  |  |  146|   196k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  |  Branch (353:22): [True: 32.8k, False: 163k]
  ------------------
  354|       |          /* scaled with SF_SYNTH + gain_sf + 1; composition of scalefactor 2:
  355|       |           * one additional shift of syn values + fMult => fMultDiv2 */
  356|  32.8k|          noise_in[i] =
  357|  32.8k|              scaleValue(fMultDiv2(gainSGL, (syn[i + i_subfr] >> 1) -
  358|  32.8k|                                                (syn[i + i_subfr - T] >> 1)),
  359|  32.8k|                         2 - s1);
  360|  32.8k|        }
  361|   163k|      }
  362|   647k|    } else {
  363|   647k|      FDKmemset(noise_in, (FIXP_DBL)0, L_SUBFR * sizeof(FIXP_DBL));
  ------------------
  |  |  146|   647k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  364|   647k|    }
  365|       |
  366|   811k|    {
  367|   811k|      FDKmemcpy(noise_buf, mem_bpf, (L_FILT + L_SUBFR) * sizeof(FIXP_DBL));
  ------------------
  |  |  139|   811k|#define L_FILT 12 /* Delay of up-sampling filter                */
  ------------------
                    FDKmemcpy(noise_buf, mem_bpf, (L_FILT + L_SUBFR) * sizeof(FIXP_DBL));
  ------------------
  |  |  146|   811k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  368|       |
  369|   811k|      FDKmemcpy(mem_bpf, noise_buf + L_SUBFR,
  ------------------
  |  |  146|   811k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  370|   811k|                (L_FILT + L_SUBFR) * sizeof(FIXP_DBL));
  ------------------
  |  |  139|   811k|#define L_FILT 12 /* Delay of up-sampling filter                */
  ------------------
                              (L_FILT + L_SUBFR) * sizeof(FIXP_DBL));
  ------------------
  |  |  146|   811k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  371|   811k|    }
  372|       |
  373|       |    /* substract from voiced speech low-pass filtered noise */
  374|       |    /* filter coefficients are scaled with factor SF_FILT_LP (1) */
  375|       |
  376|   811k|    {
  377|   811k|      filtLP(&syn[i_subfr - L_SUBFR], &synth_out[i_subfr], noise,
  ------------------
  |  |  146|   811k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  378|   811k|             fdk_dec_filt_lp, aacOutDataHeadroom, L_SUBFR, L_FILT);
  ------------------
  |  |  146|   811k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
                           fdk_dec_filt_lp, aacOutDataHeadroom, L_SUBFR, L_FILT);
  ------------------
  |  |  139|   811k|#define L_FILT 12 /* Delay of up-sampling filter                */
  ------------------
  379|   811k|    }
  380|   811k|  }
  381|       |
  382|  64.0k|  {
  383|       |
  384|  64.0k|  }
  385|       |
  386|       |  // To be determined (info from Ben)
  387|  64.0k|  {
  388|       |    /* Output scaling of the BPF memory */
  389|  64.0k|    scaleValues(mem_bpf, (L_FILT + L_SUBFR), -1);
  ------------------
  |  |  139|  64.0k|#define L_FILT 12 /* Delay of up-sampling filter                */
  ------------------
                  scaleValues(mem_bpf, (L_FILT + L_SUBFR), -1);
  ------------------
  |  |  146|  64.0k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  390|       |    /* Copy the rest of the signal (after the fac) */
  391|  64.0k|    scaleValuesSaturate(
  392|  64.0k|        (PCM_DEC *)&synth_out[l_frame], (FIXP_DBL *)&syn[l_frame - L_SUBFR],
  ------------------
  |  |  146|  64.0k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
  393|  64.0k|        (frame_length - l_frame), MDCT_OUT_HEADROOM - aacOutDataHeadroom);
  ------------------
  |  |  108|  64.0k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  ------------------
  394|  64.0k|  }
  395|       |
  396|  64.0k|  return;
  397|  64.0k|}
_Z23CLpd_AdaptLowFreqDeemphPiiS_i:
  422|  51.3k|                             INT s) {
  423|  51.3k|  {
  424|  51.3k|    int i, j, k, i_max;
  425|  51.3k|    FIXP_DBL max, fac;
  426|       |    /* Note: This stack array saves temporary accumulation results to be used in
  427|       |     * a second run */
  428|       |    /*       The size should be limited to (1024/4)/8=32 */
  429|  51.3k|    FIXP_DBL tmp_pow2[32];
  430|       |
  431|  51.3k|    s = s * 2 + ALFDPOW2_SCALE;
  ------------------
  |  |  419|  51.3k|#define ALFDPOW2_SCALE 3
  ------------------
  432|  51.3k|    s = fMin(31, s);
  433|       |
  434|  51.3k|    k = 8;
  435|  51.3k|    i_max = lg / 4; /* ALFD range = 1600Hz (lg = 6400Hz) */
  436|       |
  437|       |    /* find spectral peak */
  438|  51.3k|    max = FL2FX_DBL(0.01f) >> s;
  ------------------
  |  |  210|  51.3k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|  51.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  51.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [True: 51.3k, Folded]
  |  |  ------------------
  |  |  211|  51.3k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  439|   536k|    for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (439:17): [True: 485k, False: 51.3k]
  ------------------
  440|   485k|      FIXP_DBL tmp;
  441|       |
  442|   485k|      tmp = FIXP_DBL(0);
  443|   485k|      FIXP_DBL *pX = &x[i];
  444|       |
  445|   485k|      j = 8;
  446|  1.94M|      do {
  447|  1.94M|        FIXP_DBL x0 = *pX++;
  448|  1.94M|        FIXP_DBL x1 = *pX++;
  449|  1.94M|        x0 = fPow2Div2(x0);
  450|  1.94M|        x1 = fPow2Div2(x1);
  451|  1.94M|        tmp = tmp + (x0 >> (ALFDPOW2_SCALE - 1));
  ------------------
  |  |  419|  1.94M|#define ALFDPOW2_SCALE 3
  ------------------
  452|  1.94M|        tmp = tmp + (x1 >> (ALFDPOW2_SCALE - 1));
  ------------------
  |  |  419|  1.94M|#define ALFDPOW2_SCALE 3
  ------------------
  453|  1.94M|      } while ((j = j - 2) != 0);
  ------------------
  |  Branch (453:16): [True: 1.45M, False: 485k]
  ------------------
  454|   485k|      tmp = fMax(tmp, (FL2FX_DBL(0.01f) >> s));
  ------------------
  |  |  210|   485k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|   485k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   485k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [True: 485k, Folded]
  |  |  ------------------
  |  |  211|   485k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  455|   485k|      tmp_pow2[i >> 3] = tmp;
  456|   485k|      if (tmp > max) {
  ------------------
  |  Branch (456:11): [True: 81.3k, False: 403k]
  ------------------
  457|  81.3k|        max = tmp;
  458|  81.3k|      }
  459|   485k|    }
  460|       |
  461|       |    /* deemphasis of all blocks below the peak */
  462|  51.3k|    fac = FL2FX_DBL(0.1f) >> 1;
  ------------------
  |  |  210|  51.3k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|  51.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  51.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [True: 51.3k, Folded]
  |  |  ------------------
  |  |  211|  51.3k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  463|   536k|    for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (463:17): [True: 485k, False: 51.3k]
  ------------------
  464|   485k|      FIXP_DBL tmp;
  465|   485k|      INT shifti;
  466|       |
  467|   485k|      tmp = tmp_pow2[i >> 3];
  468|       |
  469|       |      /* tmp = (float)sqrt(tmp/max); */
  470|       |
  471|       |      /* value of tmp is between 8/2*max^2 and max^2 / 2. */
  472|       |      /* required shift factor of division can grow up to 27
  473|       |         (grows exponentially for values toward zero)
  474|       |         thus using normalized division to assure valid result. */
  475|   485k|      {
  476|   485k|        INT sd;
  477|       |
  478|   485k|        if (tmp != (FIXP_DBL)0) {
  ------------------
  |  Branch (478:13): [True: 479k, False: 5.86k]
  ------------------
  479|   479k|          tmp = fDivNorm(max, tmp, &sd);
  480|   479k|          if (sd & 1) {
  ------------------
  |  Branch (480:15): [True: 333k, False: 145k]
  ------------------
  481|   333k|            sd++;
  482|   333k|            tmp >>= 1;
  483|   333k|          }
  484|   479k|        } else {
  485|  5.86k|          tmp = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  5.86k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  486|  5.86k|          sd = 0;
  487|  5.86k|        }
  488|   485k|        tmp = invSqrtNorm2(tmp, &shifti);
  489|   485k|        tmp = scaleValue(tmp, shifti - 1 - (sd / 2));
  490|   485k|      }
  491|   485k|      if (tmp > fac) {
  ------------------
  |  Branch (491:11): [True: 95.8k, False: 389k]
  ------------------
  492|  95.8k|        fac = tmp;
  493|  95.8k|      }
  494|   485k|      FIXP_DBL *pX = &x[i];
  495|       |
  496|   485k|      j = 8;
  497|  1.94M|      do {
  498|  1.94M|        FIXP_DBL x0 = pX[0];
  499|  1.94M|        FIXP_DBL x1 = pX[1];
  500|  1.94M|        x0 = fMultDiv2(x0, fac);
  501|  1.94M|        x1 = fMultDiv2(x1, fac);
  502|  1.94M|        x0 = x0 << 2;
  503|  1.94M|        x1 = x1 << 2;
  504|  1.94M|        *pX++ = x0;
  505|  1.94M|        *pX++ = x1;
  506|       |
  507|  1.94M|      } while ((j = j - 2) != 0);
  ------------------
  |  Branch (507:16): [True: 1.45M, False: 485k]
  ------------------
  508|       |      /* Store gains for FAC */
  509|   485k|      *alfd_gains++ = fac;
  510|   485k|    }
  511|  51.3k|  }
  512|  51.3k|}
_Z23lpc2mdctAndNoiseShapingPiPsiiPKsiS2_i:
  545|  51.3k|                             const INT A2_exp) {
  546|  51.3k|  FIXP_DBL *tmp2 = NULL;
  547|  51.3k|  FIXP_DBL rr_minus_one;
  548|  51.3k|  int i, k, s, step;
  549|       |
  550|  51.3k|  C_AALLOC_SCRATCH_START(tmp1, FIXP_DBL, FDNS_NPTS * 8)
  ------------------
  |  |  319|  51.3k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  51.3k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  51.3k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  51.3k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  51.3k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  51.3k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  51.3k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  51.3k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  51.3k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  51.3k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  551|       |
  552|  51.3k|  {
  553|  51.3k|    tmp2 = tmp1 + fdns_npts * 4;
  554|       |
  555|       |    /* lpc2mdct() */
  556|       |
  557|       |    /* ODFT. E_LPC_a_weight() for A1 and A2 vectors is included into the loop
  558|       |     * below. */
  559|  51.3k|    FIXP_DBL f = FL2FXCONST_DBL(0.92f);
  ------------------
  |  |  192|  51.3k|  (FIXP_DBL)(                                                                \
  |  |  193|  51.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 51.3k, Folded]
  |  |  ------------------
  |  |  194|  51.3k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  51.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  51.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 51.3k]
  |  |  ------------------
  |  |  195|  51.3k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  51.3k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  51.3k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  51.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  51.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  51.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  51.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  560|       |
  561|  51.3k|    const FIXP_STP *SinTab;
  562|  51.3k|    int k_step;
  563|       |    /* needed values: sin(phi), cos(phi); phi = i*PI/(2*fdns_npts), i = 0 ...
  564|       |     * M_LP_FILTER_ORDER */
  565|  51.3k|    switch (fdns_npts) {
  566|  24.8k|      case 64:
  ------------------
  |  Branch (566:7): [True: 24.8k, False: 26.4k]
  ------------------
  567|  24.8k|        SinTab = SineTable512;
  568|  24.8k|        k_step = (512 / 64);
  569|  24.8k|        FDK_ASSERT(512 >= 64);
  ------------------
  |  |  221|  24.8k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (569:9): [True: 24.8k, Folded]
  ------------------
  570|  24.8k|        break;
  571|  26.4k|      case 48:
  ------------------
  |  Branch (571:7): [True: 26.4k, False: 24.8k]
  ------------------
  572|  26.4k|        SinTab = SineTable384;
  573|  26.4k|        k_step = 384 / 48;
  574|  26.4k|        FDK_ASSERT(384 >= 48);
  ------------------
  |  |  221|  26.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (574:9): [True: 26.4k, Folded]
  ------------------
  575|  26.4k|        break;
  576|  26.4k|      default:
  ------------------
  |  Branch (576:7): [True: 0, False: 51.3k]
  ------------------
  577|      0|        FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (577:9): [Folded, False: 0]
  ------------------
  578|      0|        return;
  579|  51.3k|    }
  580|       |
  581|   872k|    for (i = 0, k = k_step; i < M_LP_FILTER_ORDER; i++, k += k_step) {
  ------------------
  |  |  117|   872k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (581:29): [True: 821k, False: 51.3k]
  ------------------
  582|   821k|      FIXP_STP cs = SinTab[k];
  ------------------
  |  |  236|   821k|#define FIXP_STP FIXP_SPK
  ------------------
  583|   821k|      FIXP_DBL wA1, wA2;
  584|       |
  585|   821k|      wA1 = fMult(A1[i], f);
  586|   821k|      wA2 = fMult(A2[i], f);
  587|       |
  588|       |      /* r[i] = A[i]*cos() */
  589|   821k|      tmp1[2 + i * 2] = fMult(wA1, cs.v.re);
  590|   821k|      tmp2[2 + i * 2] = fMult(wA2, cs.v.re);
  591|       |      /* i[i] = A[i]*sin() */
  592|   821k|      tmp1[3 + i * 2] = -fMult(wA1, cs.v.im);
  593|   821k|      tmp2[3 + i * 2] = -fMult(wA2, cs.v.im);
  594|       |
  595|   821k|      f = fMult(f, FL2FXCONST_DBL(0.92f));
  ------------------
  |  |  192|   821k|  (FIXP_DBL)(                                                                \
  |  |  193|   821k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 821k, Folded]
  |  |  ------------------
  |  |  194|   821k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   821k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   821k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 821k]
  |  |  ------------------
  |  |  195|   821k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   821k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   821k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   821k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   821k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   821k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   821k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  596|   821k|    }
  597|       |
  598|       |    /* Guarantee at least 2 bits of headroom for the FFT */
  599|       |    /* "3" stands for 1.0 with 2 bits of headroom; (A1_exp + 2) guarantess 2
  600|       |     * bits of headroom if A1_exp > 1 */
  601|  51.3k|    int A1_exp_fix = fMax(3, A1_exp + 2);
  602|  51.3k|    int A2_exp_fix = fMax(3, A2_exp + 2);
  603|       |
  604|       |    /* Set 1.0 in the proper format */
  605|  51.3k|    tmp1[0] = (FIXP_DBL)(INT)((ULONG)0x80000000 >> A1_exp_fix);
  606|  51.3k|    tmp2[0] = (FIXP_DBL)(INT)((ULONG)0x80000000 >> A2_exp_fix);
  607|       |
  608|  51.3k|    tmp1[1] = tmp2[1] = (FIXP_DBL)0;
  609|       |
  610|       |    /* Clear the resto of the array */
  611|  51.3k|    FDKmemclear(
  612|  51.3k|        tmp1 + 2 * (M_LP_FILTER_ORDER + 1),
  ------------------
  |  |  117|  51.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  613|  51.3k|        2 * (fdns_npts * 2 - (M_LP_FILTER_ORDER + 1)) * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  51.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  614|  51.3k|    FDKmemclear(
  615|  51.3k|        tmp2 + 2 * (M_LP_FILTER_ORDER + 1),
  ------------------
  |  |  117|  51.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  616|  51.3k|        2 * (fdns_npts * 2 - (M_LP_FILTER_ORDER + 1)) * sizeof(FIXP_DBL));
  ------------------
  |  |  117|  51.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  617|       |
  618|       |    /* Guarantee 2 bits of headroom for FFT */
  619|  51.3k|    scaleValues(&tmp1[2], (2 * M_LP_FILTER_ORDER), (A1_exp - A1_exp_fix));
  ------------------
  |  |  117|  51.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  620|  51.3k|    scaleValues(&tmp2[2], (2 * M_LP_FILTER_ORDER), (A2_exp - A2_exp_fix));
  ------------------
  |  |  117|  51.3k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  621|       |
  622|  51.3k|    INT s2;
  623|  51.3k|    s = A1_exp_fix;
  624|  51.3k|    s2 = A2_exp_fix;
  625|       |
  626|  51.3k|    fft(2 * fdns_npts, tmp1, &s);
  627|  51.3k|    fft(2 * fdns_npts, tmp2, &s2);
  628|       |
  629|       |    /* Adjust the exponents of both fft outputs if necessary*/
  630|  51.3k|    if (s > s2) {
  ------------------
  |  Branch (630:9): [True: 3.13k, False: 48.2k]
  ------------------
  631|  3.13k|      scaleValues(tmp2, 2 * fdns_npts, s2 - s);
  632|  3.13k|      s2 = s;
  633|  48.2k|    } else if (s < s2) {
  ------------------
  |  Branch (633:16): [True: 6.98k, False: 41.2k]
  ------------------
  634|  6.98k|      scaleValues(tmp1, 2 * fdns_npts, s - s2);
  635|  6.98k|      s = s2;
  636|  6.98k|    }
  637|       |
  638|  51.3k|    FDK_ASSERT(s == s2);
  ------------------
  |  |  221|  51.3k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (638:5): [True: 51.3k, False: 0]
  ------------------
  639|  51.3k|  }
  640|       |
  641|       |  /* Get amplitude and apply gains */
  642|  51.3k|  step = lg / fdns_npts;
  643|  51.3k|  rr_minus_one = (FIXP_DBL)0;
  644|       |
  645|  2.91M|  for (k = 0; k < fdns_npts; k++) {
  ------------------
  |  Branch (645:15): [True: 2.86M, False: 51.3k]
  ------------------
  646|  2.86M|    FIXP_DBL g1, g2, inv_g1_g2, a, b;
  647|  2.86M|    INT inv_g1_g2_e;
  648|  2.86M|    int g_e, shift;
  649|       |
  650|  2.86M|    {
  651|  2.86M|      FIXP_DBL real, imag;
  652|  2.86M|      int si1, si2, sInput;
  653|       |
  654|  2.86M|      real = tmp1[k * 2];
  655|  2.86M|      imag = tmp1[k * 2 + 1];
  656|  2.86M|      sInput = fMax(fMin(fNorm(real), fNorm(imag)) - 1, 0);
  657|  2.86M|      real <<= sInput;
  658|  2.86M|      imag <<= sInput;
  659|       |      /* g1_e = si1 - 2*s/2 */
  660|  2.86M|      g1 = invSqrtNorm2(fPow2(real) + fPow2(imag), &si1);
  661|  2.86M|      si1 += sInput;
  662|       |
  663|  2.86M|      real = tmp2[k * 2];
  664|  2.86M|      imag = tmp2[k * 2 + 1];
  665|  2.86M|      sInput = fMax(fMin(fNorm(real), fNorm(imag)) - 1, 0);
  666|  2.86M|      real <<= sInput;
  667|  2.86M|      imag <<= sInput;
  668|       |      /* g2_e = si2 - 2*s/2 */
  669|  2.86M|      g2 = invSqrtNorm2(fPow2(real) + fPow2(imag), &si2);
  670|  2.86M|      si2 += sInput;
  671|       |
  672|       |      /* Pick a common scale factor for g1 and g2 */
  673|  2.86M|      if (si1 > si2) {
  ------------------
  |  Branch (673:11): [True: 642k, False: 2.21M]
  ------------------
  674|   642k|        g2 >>= si1 - si2;
  675|   642k|        g_e = si1 - s;
  676|  2.21M|      } else {
  677|  2.21M|        g1 >>= si2 - si1;
  678|  2.21M|        g_e = si2 - s;
  679|  2.21M|      }
  680|  2.86M|    }
  681|       |
  682|       |    /* end of lpc2mdct() */
  683|       |
  684|  2.86M|    FDK_ASSERT(g1 >= (FIXP_DBL)0);
  ------------------
  |  |  221|  2.86M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (684:5): [True: 2.86M, False: 0]
  ------------------
  685|  2.86M|    FDK_ASSERT(g2 >= (FIXP_DBL)0);
  ------------------
  |  |  221|  2.86M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (685:5): [True: 2.86M, False: 0]
  ------------------
  686|       |
  687|       |    /* mdct_IntNoiseShaping() */
  688|  2.86M|    {
  689|       |      /* inv_g1_g2 * 2^inv_g1_g2_e = 1/(g1+g2) */
  690|  2.86M|      inv_g1_g2 = (g1 >> 1) + (g2 >> 1);
  691|  2.86M|      if (inv_g1_g2 != (FIXP_DBL)0) {
  ------------------
  |  Branch (691:11): [True: 2.86M, False: 0]
  ------------------
  692|  2.86M|        inv_g1_g2 = fDivNorm(FL2FXCONST_DBL(0.5f), inv_g1_g2, &inv_g1_g2_e);
  ------------------
  |  |  192|  2.86M|  (FIXP_DBL)(                                                                \
  |  |  193|  2.86M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.86M, Folded]
  |  |  ------------------
  |  |  194|  2.86M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.86M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.86M]
  |  |  ------------------
  |  |  195|  2.86M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.86M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.86M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.86M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.86M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.86M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  693|  2.86M|        inv_g1_g2_e = inv_g1_g2_e - g_e;
  694|  2.86M|      } else {
  695|      0|        inv_g1_g2 = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  696|      0|        inv_g1_g2_e = 0;
  697|      0|      }
  698|       |
  699|  2.86M|      if (g_e < 0) {
  ------------------
  |  Branch (699:11): [True: 378k, False: 2.48M]
  ------------------
  700|       |        /* a_e = g_e + inv_g1_g2_e + 1 */
  701|   378k|        a = scaleValue(fMult(fMult(g1, g2), inv_g1_g2), g_e);
  702|       |        /* b_e = g_e + inv_g1_g2_e */
  703|   378k|        b = fMult(g2 - g1, inv_g1_g2);
  704|   378k|        shift = g_e + inv_g1_g2_e + 1 - NSHAPE_SCALE;
  ------------------
  |  |  535|   378k|#define NSHAPE_SCALE (4)
  ------------------
  705|  2.48M|      } else {
  706|       |        /* a_e = (g_e+g_e) + inv_g1_g2_e + 1 */
  707|  2.48M|        a = fMult(fMult(g1, g2), inv_g1_g2);
  708|       |        /* b_e = (g_e+g_e) + inv_g1_g2_e */
  709|  2.48M|        b = scaleValue(fMult(g2 - g1, inv_g1_g2), -g_e);
  710|  2.48M|        shift = (g_e + g_e) + inv_g1_g2_e + 1 - NSHAPE_SCALE;
  ------------------
  |  |  535|  2.48M|#define NSHAPE_SCALE (4)
  ------------------
  711|  2.48M|      }
  712|       |
  713|  18.3M|      for (i = k * step; i < (k + 1) * step; i++) {
  ------------------
  |  Branch (713:26): [True: 15.5M, False: 2.86M]
  ------------------
  714|  15.5M|        FIXP_DBL tmp;
  715|       |
  716|       |        /* rr[i] = 2*a*r[i] + b*rr[i-1] */
  717|  15.5M|        tmp = fMult(a, r[i]);
  718|  15.5M|        tmp += scaleValue(fMultDiv2(b, rr_minus_one), NSHAPE_SCALE);
  ------------------
  |  |  535|  15.5M|#define NSHAPE_SCALE (4)
  ------------------
  719|  15.5M|        tmp = scaleValueSaturate(tmp, shift);
  720|  15.5M|        rr_minus_one = tmp;
  721|  15.5M|        r[i] = tmp;
  722|  15.5M|      }
  723|  2.86M|    }
  724|  2.86M|  }
  725|       |
  726|       |  /* end of mdct_IntNoiseShaping() */
  727|  51.3k|  { *pScale += NSHAPE_SCALE; }
  ------------------
  |  |  535|  51.3k|#define NSHAPE_SCALE (4)
  ------------------
  728|       |
  729|  51.3k|  C_AALLOC_SCRATCH_END(tmp1, FIXP_DBL, FDNS_NPTS * 8)
  ------------------
  |  |  327|  51.3k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
  730|  51.3k|}
_Z15CLpd_FdnsDecodeP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoPiiiPsPKsiS6_iS3_i:
  873|  51.3k|                     FIXP_DBL pAlfdGains[LFAC / 4], const INT fdns_npts) {
  874|       |  /* Weight LPC coefficients using Rm values */
  875|  51.3k|  CLpd_AdaptLowFreqDeemph(r, lg, pAlfdGains, *pScale);
  876|       |
  877|  51.3k|  FIXP_DBL rms_m = (FIXP_DBL)0;
  878|  51.3k|  INT rms_e = 0;
  879|  51.3k|  {
  880|       |    /* Calculate Energy */
  881|  51.3k|    rms_m = calcEnergy(r, *pScale, lg, &rms_e);
  882|  51.3k|  }
  883|       |
  884|  51.3k|  calcTCXGain(pAacDecoderChannelInfo, r, rms_m, rms_e, frame, lg);
  885|       |
  886|       |  /* Apply ODFT and Noise Shaping. LP coefficient (A1, A2) weighting is done
  887|       |   * inside on the fly. */
  888|       |
  889|  51.3k|  lpc2mdctAndNoiseShaping(r, pScale, lg, fdns_npts, A1, A1_exp, A2, A2_exp);
  890|  51.3k|}
_Z22CLpdChannelStream_ReadP13FDK_BITSTREAMP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoPK16SamplingRateInfoj:
 1210|  42.5k|    const SamplingRateInfo *pSamplingRateInfo, UINT flags) {
 1211|  42.5k|  AAC_DECODER_ERROR error = AAC_DEC_OK;
 1212|  42.5k|  int first_tcx_flag;
 1213|  42.5k|  int k, nbDiv, fFacDataPresent, first_lpd_flag, acelp_core_mode,
 1214|  42.5k|      facGetMemState = 0;
 1215|  42.5k|  UCHAR *mod = pAacDecoderChannelInfo->data.usac.mod;
 1216|  42.5k|  int lpd_mode_last, prev_frame_was_lpd;
 1217|  42.5k|  USAC_COREMODE core_mode_last;
 1218|  42.5k|  const int lg_table_offset = 0;
 1219|  42.5k|  const int *lg_table = (pAacDecoderChannelInfo->granuleLength == 128)
  ------------------
  |  Branch (1219:25): [True: 20.8k, False: 21.7k]
  ------------------
 1220|  42.5k|                            ? &lg_table_ccfl[0][lg_table_offset]
 1221|  42.5k|                            : &lg_table_ccfl[1][lg_table_offset];
 1222|  42.5k|  int last_lpc_lost = pAacDecoderStaticChannelInfo->last_lpc_lost;
 1223|       |
 1224|  42.5k|  int last_frame_ok = CConcealment_GetLastFrameOk(
 1225|  42.5k|      &pAacDecoderStaticChannelInfo->concealmentInfo, 1);
 1226|       |
 1227|  42.5k|  INT i_offset;
 1228|  42.5k|  UINT samplingRate;
 1229|       |
 1230|  42.5k|  samplingRate = pSamplingRateInfo->samplingRate;
 1231|       |
 1232|  42.5k|  i_offset =
 1233|  42.5k|      (INT)(samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
  ------------------
  |  |  120|  42.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  ------------------
                    (INT)(samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
  ------------------
  |  |  122|  42.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  ------------------
                    (INT)(samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
  ------------------
  |  |  122|  42.5k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  ------------------
 1234|  42.5k|      (INT)PIT_MIN_12k8;
  ------------------
  |  |  120|  42.5k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  ------------------
 1235|       |
 1236|  42.5k|  if ((samplingRate < FAC_FSCALE_MIN) || (samplingRate > FAC_FSCALE_MAX)) {
  ------------------
  |  |  124|  42.5k|  6000 /* Minimum allowed frequency scale for acelp decoder */
  ------------------
                if ((samplingRate < FAC_FSCALE_MIN) || (samplingRate > FAC_FSCALE_MAX)) {
  ------------------
  |  |  130|  42.5k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  ------------------
  |  |  |  |  127|  42.5k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  ------------------
  ------------------
  |  Branch (1236:7): [True: 60, False: 42.5k]
  |  Branch (1236:42): [True: 28, False: 42.5k]
  ------------------
 1237|     88|    error = AAC_DEC_PARSE_ERROR;
 1238|     88|    goto bail;
 1239|     88|  }
 1240|       |
 1241|  42.5k|  acelp_core_mode = FDKreadBits(hBs, 3);
 1242|       |
 1243|       |  /* lpd_mode */
 1244|  42.5k|  error = CLpd_ReadAndMapLpdModeToModArray(mod, hBs, 0);
 1245|  42.5k|  if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (1245:7): [True: 64, False: 42.4k]
  ------------------
 1246|     64|    goto bail;
 1247|     64|  }
 1248|       |
 1249|       |  /* bpf_control_info */
 1250|  42.4k|  pAacDecoderChannelInfo->data.usac.bpf_control_info = FDKreadBit(hBs);
 1251|       |
 1252|       |  /* last_core_mode */
 1253|  42.4k|  prev_frame_was_lpd = FDKreadBit(hBs);
 1254|       |  /* fac_data_present */
 1255|  42.4k|  fFacDataPresent = FDKreadBit(hBs);
 1256|       |
 1257|       |  /* Set valid values from
 1258|       |   * pAacDecoderStaticChannelInfo->{last_core_mode,last_lpd_mode} */
 1259|  42.4k|  pAacDecoderChannelInfo->data.usac.core_mode_last =
 1260|  42.4k|      pAacDecoderStaticChannelInfo->last_core_mode;
 1261|  42.4k|  lpd_mode_last = pAacDecoderChannelInfo->data.usac.lpd_mode_last =
 1262|  42.4k|      pAacDecoderStaticChannelInfo->last_lpd_mode;
 1263|       |
 1264|  42.4k|  if (prev_frame_was_lpd == 0) {
  ------------------
  |  Branch (1264:7): [True: 17.5k, False: 24.9k]
  ------------------
 1265|       |    /* Last frame was FD */
 1266|  17.5k|    pAacDecoderChannelInfo->data.usac.core_mode_last = FD_LONG;
 1267|  17.5k|    pAacDecoderChannelInfo->data.usac.lpd_mode_last = 255;
 1268|  24.9k|  } else {
 1269|       |    /* Last frame was LPD */
 1270|  24.9k|    pAacDecoderChannelInfo->data.usac.core_mode_last = LPD;
 1271|  24.9k|    if (((mod[0] == 0) && fFacDataPresent) ||
  ------------------
  |  Branch (1271:10): [True: 11.3k, False: 13.5k]
  |  Branch (1271:27): [True: 4.36k, False: 7.01k]
  ------------------
 1272|  20.5k|        ((mod[0] != 0) && !fFacDataPresent)) {
  ------------------
  |  Branch (1272:10): [True: 13.5k, False: 7.01k]
  |  Branch (1272:27): [True: 12.1k, False: 1.34k]
  ------------------
 1273|       |      /* Currend mod is ACELP, fac data present -> TCX, current mod TCX, no fac
 1274|       |       * data -> TCX */
 1275|  16.5k|      if (lpd_mode_last == 0) {
  ------------------
  |  Branch (1275:11): [True: 6.36k, False: 10.1k]
  ------------------
 1276|       |        /* Bit stream interruption detected. Assume last TCX mode as TCX20. */
 1277|  6.36k|        pAacDecoderChannelInfo->data.usac.lpd_mode_last = 1;
 1278|  6.36k|      }
 1279|       |      /* Else assume that remembered TCX mode is correct. */
 1280|  16.5k|    } else {
 1281|  8.35k|      pAacDecoderChannelInfo->data.usac.lpd_mode_last = 0;
 1282|  8.35k|    }
 1283|  24.9k|  }
 1284|       |
 1285|  42.4k|  first_lpd_flag = (pAacDecoderChannelInfo->data.usac.core_mode_last !=
 1286|  42.4k|                    LPD); /* Depends on bitstream configuration */
 1287|  42.4k|  first_tcx_flag = 1;
 1288|       |
 1289|  42.4k|  if (pAacDecoderStaticChannelInfo->last_core_mode !=
  ------------------
  |  Branch (1289:7): [True: 29.4k, False: 12.9k]
  ------------------
 1290|  42.4k|      LPD) { /* ATTENTION: Reset depends on what we rendered before! */
 1291|  29.4k|    CLpd_Reset(pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo, 0);
 1292|       |
 1293|  29.4k|    if (!last_frame_ok) {
  ------------------
  |  Branch (1293:9): [True: 0, False: 29.4k]
  ------------------
 1294|       |      /* If last rendered frame was not LPD and first lpd flag is not set, this
 1295|       |       * must be an error - set last_lpc_lost flag */
 1296|      0|      last_lpc_lost |= (first_lpd_flag) ? 0 : 1;
  ------------------
  |  Branch (1296:24): [True: 0, False: 0]
  ------------------
 1297|      0|    }
 1298|  29.4k|  }
 1299|       |
 1300|  42.4k|  core_mode_last = pAacDecoderChannelInfo->data.usac.core_mode_last;
 1301|  42.4k|  lpd_mode_last = pAacDecoderChannelInfo->data.usac.lpd_mode_last;
 1302|       |
 1303|  42.4k|  nbDiv = NB_DIV;
  ------------------
  |  |  145|  42.4k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
 1304|       |
 1305|       |  /* k is the frame index. If a frame is of size 40MS or 80MS,
 1306|       |     this frame index is incremented 2 or 4 instead of 1 respectively. */
 1307|       |
 1308|  42.4k|  k = 0;
 1309|   192k|  while (k < nbDiv) {
  ------------------
  |  Branch (1309:10): [True: 150k, False: 42.0k]
  ------------------
 1310|       |    /* Reset FAC data pointers in order to avoid applying old random FAC data.
 1311|       |     */
 1312|   150k|    pAacDecoderChannelInfo->data.usac.fac_data[k] = NULL;
 1313|       |
 1314|   150k|    if ((k == 0 && core_mode_last == LPD && fFacDataPresent) ||
  ------------------
  |  Branch (1314:10): [True: 42.4k, False: 107k]
  |  Branch (1314:20): [True: 24.9k, False: 17.5k]
  |  Branch (1314:45): [True: 5.70k, False: 19.1k]
  ------------------
 1315|   144k|        (lpd_mode_last == 0 && mod[k] > 0) ||
  ------------------
  |  Branch (1315:10): [True: 72.8k, False: 71.7k]
  |  Branch (1315:32): [True: 17.1k, False: 55.7k]
  ------------------
 1316|   127k|        ((lpd_mode_last != 255) && lpd_mode_last > 0 && mod[k] == 0)) {
  ------------------
  |  Branch (1316:10): [True: 104k, False: 22.9k]
  |  Branch (1316:36): [True: 48.8k, False: 55.7k]
  |  Branch (1316:57): [True: 26.9k, False: 21.8k]
  ------------------
 1317|  49.8k|      int err;
 1318|       |
 1319|       |      /* Assign FAC memory */
 1320|  49.8k|      pAacDecoderChannelInfo->data.usac.fac_data[k] =
 1321|  49.8k|          CLpd_FAC_GetMemory(pAacDecoderChannelInfo, mod, &facGetMemState);
 1322|       |
 1323|       |      /* FAC for (ACELP -> TCX) or (TCX -> ACELP) */
 1324|  49.8k|      err = CLpd_FAC_Read(
 1325|  49.8k|          hBs, pAacDecoderChannelInfo->data.usac.fac_data[k],
 1326|  49.8k|          pAacDecoderChannelInfo->data.usac.fac_data_e,
 1327|  49.8k|          pAacDecoderChannelInfo->granuleLength, /* == fac_length */
 1328|  49.8k|          0, k);
 1329|  49.8k|      if (err != 0) {
  ------------------
  |  Branch (1329:11): [True: 4, False: 49.8k]
  ------------------
 1330|      4|        error = AAC_DEC_PARSE_ERROR;
 1331|      4|        goto bail;
 1332|      4|      }
 1333|  49.8k|    }
 1334|       |
 1335|   150k|    if (mod[k] == 0) /* acelp-mode */
  ------------------
  |  Branch (1335:9): [True: 98.2k, False: 52.1k]
  ------------------
 1336|  98.2k|    {
 1337|  98.2k|      int err;
 1338|  98.2k|      err = CLpd_AcelpRead(
 1339|  98.2k|          hBs, &pAacDecoderChannelInfo->data.usac.acelp[k], acelp_core_mode,
 1340|  98.2k|          pAacDecoderChannelInfo->granuleLength * 8 /* coreCoderFrameLength */,
 1341|  98.2k|          i_offset);
 1342|  98.2k|      if (err != 0) {
  ------------------
  |  Branch (1342:11): [True: 0, False: 98.2k]
  ------------------
 1343|      0|        error = AAC_DEC_PARSE_ERROR;
 1344|      0|        goto bail;
 1345|      0|      }
 1346|       |
 1347|  98.2k|      lpd_mode_last = 0;
 1348|  98.2k|      k++;
 1349|  98.2k|    } else /* mode != 0  =>  TCX */
 1350|  52.1k|    {
 1351|  52.1k|      error = CLpd_TCX_Read(hBs, pAacDecoderChannelInfo,
 1352|  52.1k|                            pAacDecoderStaticChannelInfo, lg_table[mod[k]],
 1353|  52.1k|                            first_tcx_flag, k, flags);
 1354|       |
 1355|  52.1k|      lpd_mode_last = mod[k];
 1356|  52.1k|      first_tcx_flag = 0;
 1357|  52.1k|      k += 1 << (mod[k] - 1);
 1358|  52.1k|    }
 1359|   150k|    if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (1359:9): [True: 370, False: 149k]
  ------------------
 1360|    370|      error = AAC_DEC_PARSE_ERROR;
 1361|    370|      goto bail;
 1362|    370|    }
 1363|   150k|  }
 1364|       |
 1365|  42.0k|  {
 1366|  42.0k|    int err;
 1367|       |
 1368|       |    /* Read LPC coefficients */
 1369|  42.0k|    err = CLpc_Read(
 1370|  42.0k|        hBs, pAacDecoderChannelInfo->data.usac.lsp_coeff,
 1371|  42.0k|        pAacDecoderStaticChannelInfo->lpc4_lsf,
 1372|  42.0k|        pAacDecoderChannelInfo->data.usac.lsf_adaptive_mean_cand,
 1373|  42.0k|        pAacDecoderChannelInfo->data.usac.aStability, mod, first_lpd_flag,
 1374|       |        /* if last lpc4 is available from concealment do not extrapolate lpc0
 1375|       |           from lpc2 */
 1376|  42.0k|        (mod[0] & 0x3) ? 0
  ------------------
  |  Branch (1376:9): [True: 19.6k, False: 22.3k]
  ------------------
 1377|  42.0k|                       : (last_lpc_lost &&
  ------------------
  |  Branch (1377:27): [True: 10, False: 22.3k]
  ------------------
 1378|     10|                          pAacDecoderStaticChannelInfo->last_core_mode != LPD),
  ------------------
  |  Branch (1378:27): [True: 3, False: 7]
  ------------------
 1379|  42.0k|        last_frame_ok);
 1380|  42.0k|    if (err != 0) {
  ------------------
  |  Branch (1380:9): [True: 10, False: 42.0k]
  ------------------
 1381|     10|      error = AAC_DEC_PARSE_ERROR;
 1382|     10|      goto bail;
 1383|     10|    }
 1384|  42.0k|  }
 1385|       |
 1386|       |  /* adjust old lsp[] following to a bad frame (to avoid overshoot) (ref:
 1387|       |   * dec_LPD.c) */
 1388|  42.0k|  if (last_lpc_lost && !last_frame_ok) {
  ------------------
  |  Branch (1388:7): [True: 12, False: 42.0k]
  |  Branch (1388:24): [True: 0, False: 12]
  ------------------
 1389|      0|    int k_next;
 1390|      0|    k = 0;
 1391|      0|    while (k < nbDiv) {
  ------------------
  |  Branch (1391:12): [True: 0, False: 0]
  ------------------
 1392|      0|      int i;
 1393|      0|      k_next = k + (((mod[k] & 0x3) == 0) ? 1 : (1 << (mod[k] - 1)));
  ------------------
  |  Branch (1393:21): [True: 0, False: 0]
  ------------------
 1394|      0|      FIXP_LPC *lsp_old = pAacDecoderChannelInfo->data.usac.lsp_coeff[k];
 1395|      0|      FIXP_LPC *lsp_new = pAacDecoderChannelInfo->data.usac.lsp_coeff[k_next];
 1396|       |
 1397|      0|      for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|      0|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1397:19): [True: 0, False: 0]
  ------------------
 1398|      0|        if (lsp_new[i] < lsp_old[i]) {
  ------------------
  |  Branch (1398:13): [True: 0, False: 0]
  ------------------
 1399|      0|          lsp_old[i] = lsp_new[i];
 1400|      0|        }
 1401|      0|      }
 1402|      0|      k = k_next;
 1403|      0|    }
 1404|      0|  }
 1405|       |
 1406|  42.0k|  if (!CConcealment_GetLastFrameOk(
  ------------------
  |  Branch (1406:7): [True: 0, False: 42.0k]
  ------------------
 1407|  42.0k|          &pAacDecoderStaticChannelInfo->concealmentInfo, 1)) {
 1408|      0|    E_LPC_f_lsp_a_conversion(
 1409|      0|        pAacDecoderChannelInfo->data.usac.lsp_coeff[0],
 1410|      0|        pAacDecoderChannelInfo->data.usac.lp_coeff[0],
 1411|      0|        &pAacDecoderChannelInfo->data.usac.lp_coeff_exp[0]);
 1412|  42.0k|  } else if (pAacDecoderStaticChannelInfo->last_lpd_mode != 0) {
  ------------------
  |  Branch (1412:14): [True: 32.8k, False: 9.22k]
  ------------------
 1413|  32.8k|    if (pAacDecoderStaticChannelInfo->last_lpd_mode == 255) {
  ------------------
  |  Branch (1413:9): [True: 29.1k, False: 3.67k]
  ------------------
 1414|       |      /* We need it for TCX decoding or ACELP excitation update */
 1415|  29.1k|      E_LPC_f_lsp_a_conversion(
 1416|  29.1k|          pAacDecoderChannelInfo->data.usac.lsp_coeff[0],
 1417|  29.1k|          pAacDecoderChannelInfo->data.usac.lp_coeff[0],
 1418|  29.1k|          &pAacDecoderChannelInfo->data.usac.lp_coeff_exp[0]);
 1419|  29.1k|    } else { /* last_lpd_mode was TCX */
 1420|       |      /* Copy old LPC4 LP domain coefficients to LPC0 LP domain buffer (to avoid
 1421|       |       * converting LSP coefficients again). */
 1422|  3.67k|      FDKmemcpy(pAacDecoderChannelInfo->data.usac.lp_coeff[0],
 1423|  3.67k|                pAacDecoderStaticChannelInfo->lp_coeff_old[0],
 1424|  3.67k|                M_LP_FILTER_ORDER * sizeof(FIXP_LPC));
  ------------------
  |  |  117|  3.67k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1425|  3.67k|      pAacDecoderChannelInfo->data.usac.lp_coeff_exp[0] =
 1426|  3.67k|          pAacDecoderStaticChannelInfo->lp_coeff_old_exp[0];
 1427|  3.67k|    }
 1428|  32.8k|  } /* case last_lpd_mode was ACELP is handled by CLpd_TcxDecode() */
 1429|       |
 1430|  42.0k|  if (fFacDataPresent && (core_mode_last != LPD)) {
  ------------------
  |  Branch (1430:7): [True: 8.93k, False: 33.1k]
  |  Branch (1430:26): [True: 3.37k, False: 5.56k]
  ------------------
 1431|  3.37k|    int prev_frame_was_short;
 1432|       |
 1433|  3.37k|    prev_frame_was_short = FDKreadBit(hBs);
 1434|       |
 1435|  3.37k|    if (prev_frame_was_short) {
  ------------------
  |  Branch (1435:9): [True: 240, False: 3.13k]
  ------------------
 1436|    240|      core_mode_last = pAacDecoderChannelInfo->data.usac.core_mode_last =
 1437|    240|          FD_SHORT;
 1438|    240|      pAacDecoderChannelInfo->data.usac.lpd_mode_last = 255;
 1439|       |
 1440|    240|      if ((pAacDecoderStaticChannelInfo->last_core_mode != FD_SHORT) &&
  ------------------
  |  Branch (1440:11): [True: 15, False: 225]
  ------------------
 1441|     15|          CConcealment_GetLastFrameOk(
  ------------------
  |  Branch (1441:11): [True: 15, False: 0]
  ------------------
 1442|     15|              &pAacDecoderStaticChannelInfo->concealmentInfo, 1)) {
 1443|       |        /* USAC Conformance document:
 1444|       |           short_fac_flag   shall be encoded with a value of 1 if the
 1445|       |           window_sequence of the previous frame was 2 (EIGHT_SHORT_SEQUENCE).
 1446|       |                            Otherwise short_fac_flag shall be encoded with a
 1447|       |           value of 0. */
 1448|     15|        error = AAC_DEC_PARSE_ERROR;
 1449|     15|        goto bail;
 1450|     15|      }
 1451|    240|    }
 1452|       |
 1453|       |    /* Assign memory */
 1454|  3.35k|    pAacDecoderChannelInfo->data.usac.fac_data[0] =
 1455|  3.35k|        CLpd_FAC_GetMemory(pAacDecoderChannelInfo, mod, &facGetMemState);
 1456|       |
 1457|  3.35k|    {
 1458|  3.35k|      int err;
 1459|       |
 1460|       |      /* FAC for FD -> ACELP */
 1461|  3.35k|      err = CLpd_FAC_Read(
 1462|  3.35k|          hBs, pAacDecoderChannelInfo->data.usac.fac_data[0],
 1463|  3.35k|          pAacDecoderChannelInfo->data.usac.fac_data_e,
 1464|  3.35k|          CLpd_FAC_getLength(core_mode_last != FD_SHORT,
 1465|  3.35k|                             pAacDecoderChannelInfo->granuleLength),
 1466|  3.35k|          1, 0);
 1467|  3.35k|      if (err != 0) {
  ------------------
  |  Branch (1467:11): [True: 1, False: 3.35k]
  ------------------
 1468|      1|        error = AAC_DEC_PARSE_ERROR;
 1469|      1|        goto bail;
 1470|      1|      }
 1471|  3.35k|    }
 1472|  3.35k|  }
 1473|       |
 1474|  42.5k|bail:
 1475|  42.5k|  if (error == AAC_DEC_OK) {
  ------------------
  |  Branch (1475:7): [True: 42.0k, False: 552]
  ------------------
 1476|       |    /* check consitency of last core/lpd mode values */
 1477|  42.0k|    if ((pAacDecoderChannelInfo->data.usac.core_mode_last !=
  ------------------
  |  Branch (1477:9): [True: 26.7k, False: 15.2k]
  ------------------
 1478|  42.0k|         pAacDecoderStaticChannelInfo->last_core_mode) &&
 1479|  26.7k|        (pAacDecoderStaticChannelInfo->last_lpc_lost == 0)) {
  ------------------
  |  Branch (1479:9): [True: 26.7k, False: 2]
  ------------------
 1480|       |      /* Something got wrong! */
 1481|       |      /* error = AAC_DEC_PARSE_ERROR; */ /* Throwing errors does not help */
 1482|  26.7k|    } else if ((pAacDecoderChannelInfo->data.usac.core_mode_last == LPD) &&
  ------------------
  |  Branch (1482:16): [True: 8.76k, False: 6.52k]
  ------------------
 1483|  8.76k|               (pAacDecoderChannelInfo->data.usac.lpd_mode_last !=
  ------------------
  |  Branch (1483:16): [True: 6.77k, False: 1.99k]
  ------------------
 1484|  8.76k|                pAacDecoderStaticChannelInfo->last_lpd_mode) &&
 1485|  6.77k|               (pAacDecoderStaticChannelInfo->last_lpc_lost == 0)) {
  ------------------
  |  Branch (1485:16): [True: 6.77k, False: 0]
  ------------------
 1486|       |      /* Something got wrong! */
 1487|       |      /* error = AAC_DEC_PARSE_ERROR; */ /* Throwing errors does not help */
 1488|  6.77k|    }
 1489|  42.0k|  }
 1490|       |
 1491|  42.5k|  return error;
 1492|  42.0k|}
_Z24CLpdChannelStream_DecodeP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoj:
 1496|  41.5k|    CAacDecoderStaticChannelInfo *pAacDecoderStaticChannelInfo, UINT flags) {
 1497|  41.5k|  UCHAR *mod = pAacDecoderChannelInfo->data.usac.mod;
 1498|  41.5k|  int k;
 1499|  41.5k|  UCHAR last_lpd_mode;
 1500|  41.5k|  int nbDiv = NB_DIV;
  ------------------
  |  |  145|  41.5k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
 1501|       |
 1502|       |  /* k is the frame index. If a frame is of size 40MS or 80MS,
 1503|       |     this frame index is incremented 2 or 4 instead of 1 respectively. */
 1504|  41.5k|  k = 0;
 1505|  41.5k|  last_lpd_mode =
 1506|  41.5k|      pAacDecoderChannelInfo->data.usac
 1507|  41.5k|          .lpd_mode_last; /* could be different to what has been rendered */
 1508|   189k|  while (k < nbDiv) {
  ------------------
  |  Branch (1508:10): [True: 147k, False: 41.5k]
  ------------------
 1509|   147k|    if (mod[k] == 0) {
  ------------------
  |  Branch (1509:9): [True: 96.3k, False: 51.3k]
  ------------------
 1510|       |      /* ACELP */
 1511|       |
 1512|       |      /* If FAC (fac_data[k] != NULL), and previous frame was TCX, apply (TCX)
 1513|       |       * gains to FAC data */
 1514|  96.3k|      if (last_lpd_mode > 0 && last_lpd_mode != 255 &&
  ------------------
  |  Branch (1514:11): [True: 41.9k, False: 54.4k]
  |  Branch (1514:32): [True: 27.0k, False: 14.8k]
  ------------------
 1515|  27.0k|          pAacDecoderChannelInfo->data.usac.fac_data[k]) {
  ------------------
  |  Branch (1515:11): [True: 27.0k, False: 0]
  ------------------
 1516|  27.0k|        CFac_ApplyGains(pAacDecoderChannelInfo->data.usac.fac_data[k],
 1517|  27.0k|                        pAacDecoderChannelInfo->granuleLength,
 1518|  27.0k|                        pAacDecoderStaticChannelInfo->last_tcx_gain,
 1519|  27.0k|                        pAacDecoderStaticChannelInfo->last_alfd_gains,
 1520|  27.0k|                        (last_lpd_mode < 4) ? last_lpd_mode : 3);
  ------------------
  |  Branch (1520:25): [True: 27.0k, False: 7]
  ------------------
 1521|       |
 1522|  27.0k|        pAacDecoderChannelInfo->data.usac.fac_data_e[k] +=
 1523|  27.0k|            pAacDecoderStaticChannelInfo->last_tcx_gain_e;
 1524|  27.0k|      }
 1525|  96.3k|    } else {
 1526|       |      /* TCX */
 1527|  51.3k|      CLpd_TcxDecode(pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo,
 1528|  51.3k|                     flags, mod[k], last_lpd_mode, k, 1 /* frameOk == 1 */
 1529|  51.3k|      );
 1530|       |
 1531|       |      /* Store TCX gain scale for next possible FAC transition. */
 1532|  51.3k|      pAacDecoderStaticChannelInfo->last_tcx_gain =
 1533|  51.3k|          pAacDecoderChannelInfo->data.usac.tcx_gain[k];
 1534|  51.3k|      pAacDecoderStaticChannelInfo->last_tcx_gain_e =
 1535|  51.3k|          pAacDecoderChannelInfo->data.usac.tcx_gain_e[k];
 1536|       |
 1537|       |      /* If FAC (fac_data[k] != NULL), apply gains */
 1538|  51.3k|      if (last_lpd_mode == 0 && pAacDecoderChannelInfo->data.usac.fac_data[k]) {
  ------------------
  |  Branch (1538:11): [True: 18.1k, False: 33.1k]
  |  Branch (1538:33): [True: 18.1k, False: 0]
  ------------------
 1539|  18.1k|        CFac_ApplyGains(
 1540|  18.1k|            pAacDecoderChannelInfo->data.usac.fac_data[k],
 1541|  18.1k|            pAacDecoderChannelInfo->granuleLength /* == fac_length */,
 1542|  18.1k|            pAacDecoderChannelInfo->data.usac.tcx_gain[k],
 1543|  18.1k|            pAacDecoderStaticChannelInfo->last_alfd_gains, mod[k]);
 1544|       |
 1545|  18.1k|        pAacDecoderChannelInfo->data.usac.fac_data_e[k] +=
 1546|  18.1k|            pAacDecoderChannelInfo->data.usac.tcx_gain_e[k];
 1547|  18.1k|      }
 1548|  51.3k|    }
 1549|       |
 1550|       |    /* remember previous mode */
 1551|   147k|    last_lpd_mode = mod[k];
 1552|       |
 1553|       |    /* Increase k to next frame */
 1554|   147k|    k += (mod[k] == 0) ? 1 : (1 << (mod[k] - 1));
  ------------------
  |  Branch (1554:10): [True: 96.3k, False: 51.3k]
  ------------------
 1555|   147k|  }
 1556|  41.5k|}
_Z21CLpd_RenderTimeSignalP28CAacDecoderStaticChannelInfoP22CAacDecoderChannelInfoPiiP16SamplingRateInfojijj:
 1562|  42.4k|    const INT aacOutDataHeadroom, UINT flags, UINT strmFlags) {
 1563|  42.4k|  UCHAR *mod = pAacDecoderChannelInfo->data.usac.mod;
 1564|  42.4k|  AAC_DECODER_ERROR error = AAC_DEC_OK;
 1565|  42.4k|  int k, i_offset;
 1566|  42.4k|  int last_k;
 1567|  42.4k|  int nrSamples = 0;
 1568|  42.4k|  int facFB = 1;
 1569|  42.4k|  int nbDiv = NB_DIV;
  ------------------
  |  |  145|  42.4k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  ------------------
 1570|  42.4k|  int lDiv = lFrame / nbDiv; /* length of division (acelp or tcx20 frame)*/
 1571|  42.4k|  int lFac = lDiv / 2;
 1572|  42.4k|  int nbSubfr =
 1573|  42.4k|      lFrame / (nbDiv * L_SUBFR); /* number of subframes per division */
  ------------------
  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1574|  42.4k|  int nbSubfrSuperfr = nbDiv * nbSubfr;
 1575|  42.4k|  int synSfd = (nbSubfrSuperfr / 2) - BPF_SFD;
  ------------------
  |  |  147|  42.4k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  ------------------
 1576|  42.4k|  int SynDelay = synSfd * L_SUBFR;
  ------------------
  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 1577|  42.4k|  int aacDelay = lFrame / 2;
 1578|       |
 1579|       |  /*
 1580|       |   In respect to the reference software, the synth pointer here is lagging by
 1581|       |   aacDelay ( == SYN_DELAY + BPF_DELAY ) samples. The corresponding old
 1582|       |   synthesis samples are handled by the IMDCT overlap.
 1583|       |   */
 1584|       |
 1585|  42.4k|  FIXP_DBL *synth_buf =
 1586|  42.4k|      pAacDecoderChannelInfo->pComStaticData->pWorkBufferCore1->synth_buf;
 1587|  42.4k|  FIXP_DBL *synth = synth_buf + PIT_MAX_MAX - BPF_DELAY;
  ------------------
  |  |  142|  42.4k|#define PIT_MAX_MAX PIT_MAX_TMP
  |  |  ------------------
  |  |  |  |  134|  42.4k|  (PIT_MAX_12k8 +                                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|  42.4k|#define PIT_MAX_12k8 231   /* Maximum pitch lag for fs=12.8kHz */
  |  |  |  |  ------------------
  |  |  |  |  135|  42.4k|   (6 *                                                                        \
  |  |  |  |  136|  42.4k|    ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  130|  42.4k|  LPD_MAX_CORE_SR /* Maximum allowed frequency scale for acelp decoder */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  127|  42.4k|#define LPD_MAX_CORE_SR 24000 /* Default value from ref soft */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |                   ((((FAC_FSCALE_MAX * PIT_MIN_12k8) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - \
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|  42.4k|#define FSCALE_DENOM 12800 /* Frequency scale denominator */
  |  |  |  |  ------------------
  |  |  |  |  137|  42.4k|     PIT_MIN_12k8)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  42.4k|#define PIT_MIN_12k8 34    /* Minimum pitch lag with resolution 1/4 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                FIXP_DBL *synth = synth_buf + PIT_MAX_MAX - BPF_DELAY;
  ------------------
  |  |  148|  42.4k|#define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  147|  42.4k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  |  |  ------------------
  |  |               #define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  ------------------
  ------------------
 1588|  42.4k|  UCHAR last_lpd_mode, last_last_lpd_mode, last_lpc_lost, last_frame_lost;
 1589|       |
 1590|  42.4k|  INT pitch[NB_SUBFR_SUPERFR + SYN_SFD];
 1591|  42.4k|  FIXP_DBL pit_gain[NB_SUBFR_SUPERFR + SYN_SFD];
 1592|       |
 1593|  42.4k|  const int *lg_table;
 1594|  42.4k|  int lg_table_offset = 0;
 1595|       |
 1596|  42.4k|  UINT samplingRate = pSamplingRateInfo->samplingRate;
 1597|       |
 1598|  42.4k|  FDKmemclear(pitch, (NB_SUBFR_SUPERFR + SYN_SFD) * sizeof(INT));
  ------------------
  |  |  194|  42.4k|#define NB_SUBFR_SUPERFR NB_SUBFR_SUPERFR_1024
  |  |  ------------------
  |  |  |  |  162|  42.4k|  (L_FRAME_PLUS_1024 / L_SUBFR) /* number of 5ms subframe per 80ms frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  42.4k|#define L_FRAME_PLUS_1024 1024 /* length of one 80ms superframe */
  |  |  |  |  ------------------
  |  |  |  |                 (L_FRAME_PLUS_1024 / L_SUBFR) /* number of 5ms subframe per 80ms frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                FDKmemclear(pitch, (NB_SUBFR_SUPERFR + SYN_SFD) * sizeof(INT));
  ------------------
  |  |  197|  42.4k|#define SYN_SFD SYN_SFD_1024
  |  |  ------------------
  |  |  |  |  165|  42.4k|#define SYN_SFD_1024 (AAC_SFD_1024 - BPF_SFD) /* synthesis delay (subframe) */
  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  42.4k|#define AAC_SFD_1024 (NB_SUBFR_SUPERFR_1024 / 2) /* AAC delay (subframe) */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  42.4k|  (L_FRAME_PLUS_1024 / L_SUBFR) /* number of 5ms subframe per 80ms frame */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  156|  42.4k|#define L_FRAME_PLUS_1024 1024 /* length of one 80ms superframe */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 (L_FRAME_PLUS_1024 / L_SUBFR) /* number of 5ms subframe per 80ms frame */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define SYN_SFD_1024 (AAC_SFD_1024 - BPF_SFD) /* synthesis delay (subframe) */
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  42.4k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1599|       |
 1600|  42.4k|  if (flags & AACDEC_FLUSH) {
  ------------------
  |  | 1023|  42.4k|#define AACDEC_FLUSH 2
  ------------------
  |  Branch (1600:7): [True: 24, False: 42.4k]
  ------------------
 1601|     24|    CLpd_Reset(pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo,
 1602|     24|               flags & AACDEC_FLUSH);
  ------------------
  |  | 1023|     24|#define AACDEC_FLUSH 2
  ------------------
 1603|     24|    frameOk = 0;
 1604|     24|  }
 1605|       |
 1606|  42.4k|  switch (lFrame) {
 1607|  20.6k|    case 1024:
  ------------------
  |  Branch (1607:5): [True: 20.6k, False: 21.8k]
  ------------------
 1608|  20.6k|      lg_table = &lg_table_ccfl[0][lg_table_offset];
 1609|  20.6k|      break;
 1610|  21.8k|    case 768:
  ------------------
  |  Branch (1610:5): [True: 21.8k, False: 20.6k]
  ------------------
 1611|  21.8k|      lg_table = &lg_table_ccfl[1][lg_table_offset];
 1612|  21.8k|      break;
 1613|      0|    default:
  ------------------
  |  Branch (1613:5): [True: 0, False: 42.4k]
  ------------------
 1614|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1614:7): [Folded, False: 0]
  ------------------
 1615|      0|      return AAC_DEC_UNKNOWN;
 1616|  42.4k|  }
 1617|       |
 1618|  42.4k|  last_frame_lost = !CConcealment_GetLastFrameOk(
 1619|  42.4k|      &pAacDecoderStaticChannelInfo->concealmentInfo, 0);
 1620|       |
 1621|       |  /* Maintain LPD mode from previous frame */
 1622|  42.4k|  if ((pAacDecoderStaticChannelInfo->last_core_mode == FD_LONG) ||
  ------------------
  |  Branch (1622:7): [True: 17.5k, False: 24.9k]
  ------------------
 1623|  28.7k|      (pAacDecoderStaticChannelInfo->last_core_mode == FD_SHORT)) {
  ------------------
  |  Branch (1623:7): [True: 11.2k, False: 13.7k]
  ------------------
 1624|  28.7k|    pAacDecoderStaticChannelInfo->last_lpd_mode = 255;
 1625|  28.7k|  }
 1626|       |
 1627|  42.4k|  if (!frameOk) {
  ------------------
  |  Branch (1627:7): [True: 953, False: 41.5k]
  ------------------
 1628|    953|    FIXP_DBL old_tcx_gain;
 1629|    953|    FIXP_SGL old_stab;
 1630|    953|    SCHAR old_tcx_gain_e;
 1631|    953|    int nLostSf;
 1632|       |
 1633|    953|    last_lpd_mode = pAacDecoderStaticChannelInfo->last_lpd_mode;
 1634|    953|    old_tcx_gain = pAacDecoderStaticChannelInfo->last_tcx_gain;
 1635|    953|    old_tcx_gain_e = pAacDecoderStaticChannelInfo->last_tcx_gain_e;
 1636|    953|    old_stab = pAacDecoderStaticChannelInfo->oldStability;
 1637|    953|    nLostSf = pAacDecoderStaticChannelInfo->numLostLpdFrames;
 1638|       |
 1639|       |    /* patch the last LPD mode */
 1640|    953|    pAacDecoderChannelInfo->data.usac.lpd_mode_last = last_lpd_mode;
 1641|       |
 1642|       |    /* Do mode extrapolation and repeat the previous mode:
 1643|       |       if previous mode = ACELP        -> ACELP
 1644|       |       if previous mode = TCX-20/40    -> TCX-20
 1645|       |       if previous mode = TCX-80       -> TCX-80
 1646|       |       notes:
 1647|       |       - ACELP is not allowed after TCX (no pitch information to reuse)
 1648|       |       - TCX-40 is not allowed in the mode repetition to keep the logic simple
 1649|       |     */
 1650|    953|    switch (last_lpd_mode) {
 1651|    497|      case 0:
  ------------------
  |  Branch (1651:7): [True: 497, False: 456]
  ------------------
 1652|    497|        mod[0] = mod[1] = mod[2] = mod[3] = 0; /* -> ACELP concealment */
 1653|    497|        break;
 1654|     44|      case 3:
  ------------------
  |  Branch (1654:7): [True: 44, False: 909]
  ------------------
 1655|     44|        mod[0] = mod[1] = mod[2] = mod[3] = 3; /* -> TCX FD concealment */
 1656|     44|        break;
 1657|     41|      case 2:
  ------------------
  |  Branch (1657:7): [True: 41, False: 912]
  ------------------
 1658|     41|        mod[0] = mod[1] = mod[2] = mod[3] = 2; /* -> TCX FD concealment */
 1659|     41|        break;
 1660|    284|      case 1:
  ------------------
  |  Branch (1660:7): [True: 284, False: 669]
  ------------------
 1661|    371|      default:
  ------------------
  |  Branch (1661:7): [True: 87, False: 866]
  ------------------
 1662|    371|        mod[0] = mod[1] = mod[2] = mod[3] = 4; /* -> TCX TD concealment */
 1663|    371|        break;
 1664|    953|    }
 1665|       |
 1666|       |    /* LPC extrapolation */
 1667|    953|    CLpc_Conceal(pAacDecoderChannelInfo->data.usac.lsp_coeff,
 1668|    953|                 pAacDecoderStaticChannelInfo->lpc4_lsf,
 1669|    953|                 pAacDecoderStaticChannelInfo->lsf_adaptive_mean,
 1670|       |                 /*(pAacDecoderStaticChannelInfo->numLostLpdFrames == 0) ||*/
 1671|    953|                 (last_lpd_mode == 255));
 1672|       |
 1673|    953|    if ((last_lpd_mode > 0) && (last_lpd_mode < 255)) {
  ------------------
  |  Branch (1673:9): [True: 456, False: 497]
  |  Branch (1673:32): [True: 456, False: 0]
  ------------------
 1674|       |      /* Copy old LPC4 LP domain coefficients to LPC0 LP domain buffer (to avoid
 1675|       |       * converting LSP coefficients again). */
 1676|    456|      FDKmemcpy(pAacDecoderChannelInfo->data.usac.lp_coeff[0],
 1677|    456|                pAacDecoderStaticChannelInfo->lp_coeff_old[0],
 1678|    456|                M_LP_FILTER_ORDER * sizeof(FIXP_LPC));
  ------------------
  |  |  117|    456|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1679|    456|      pAacDecoderChannelInfo->data.usac.lp_coeff_exp[0] =
 1680|    456|          pAacDecoderStaticChannelInfo->lp_coeff_old_exp[0];
 1681|    456|    } /* case last_lpd_mode was ACELP is handled by CLpd_TcxDecode() */
 1682|       |    /* case last_lpd_mode was Time domain TCX concealment is handled after this
 1683|       |     * "if (!frameOk)"-block */
 1684|       |
 1685|       |    /* k is the frame index. If a frame is of size 40MS or 80MS,
 1686|       |       this frame index is incremented 2 or 4 instead of 1 respectively. */
 1687|    953|    k = 0;
 1688|  4.55k|    while (k < nbDiv) {
  ------------------
  |  Branch (1688:12): [True: 3.59k, False: 953]
  ------------------
 1689|  3.59k|      pAacDecoderChannelInfo->data.usac.tcx_gain[k] = old_tcx_gain;
 1690|  3.59k|      pAacDecoderChannelInfo->data.usac.tcx_gain_e[k] = old_tcx_gain_e;
 1691|       |
 1692|       |      /* restore stability value from last frame */
 1693|  3.59k|      pAacDecoderChannelInfo->data.usac.aStability[k] = old_stab;
 1694|       |
 1695|       |      /* Increase k to next frame */
 1696|  3.59k|      k += ((mod[k] & 0x3) == 0) ? 1 : (1 << ((mod[k] & 0x3) - 1));
  ------------------
  |  Branch (1696:12): [True: 3.47k, False: 126]
  ------------------
 1697|       |
 1698|  3.59k|      nLostSf++;
 1699|  3.59k|    }
 1700|  41.5k|  } else {
 1701|  41.5k|    if ((pAacDecoderStaticChannelInfo->last_lpd_mode == 4) && (mod[0] > 0)) {
  ------------------
  |  Branch (1701:9): [True: 9, False: 41.5k]
  |  Branch (1701:63): [True: 2, False: 7]
  ------------------
 1702|       |      /* Copy old LPC4 LP domain coefficients to LPC0 LP domain buffer (to avoid
 1703|       |       * converting LSP coefficients again). */
 1704|      2|      FDKmemcpy(pAacDecoderChannelInfo->data.usac.lp_coeff[0],
 1705|      2|                pAacDecoderStaticChannelInfo->lp_coeff_old[0],
 1706|      2|                M_LP_FILTER_ORDER * sizeof(FIXP_LPC));
  ------------------
  |  |  117|      2|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1707|      2|      pAacDecoderChannelInfo->data.usac.lp_coeff_exp[0] =
 1708|      2|          pAacDecoderStaticChannelInfo->lp_coeff_old_exp[0];
 1709|      2|    }
 1710|  41.5k|  }
 1711|       |
 1712|  42.4k|  Acelp_PreProcessing(synth_buf, pAacDecoderStaticChannelInfo->old_synth, pitch,
 1713|  42.4k|                      pAacDecoderStaticChannelInfo->old_T_pf, pit_gain,
 1714|  42.4k|                      pAacDecoderStaticChannelInfo->old_gain_pf, samplingRate,
 1715|  42.4k|                      &i_offset, lFrame, synSfd, nbSubfrSuperfr);
 1716|       |
 1717|       |  /* k is the frame index. If a frame is of size 40MS or 80MS,
 1718|       |     this frame index is incremented 2 or 4 instead of 1 respectively. */
 1719|  42.4k|  k = 0;
 1720|  42.4k|  last_k = -1; /* mark invalid */
 1721|  42.4k|  last_lpd_mode = pAacDecoderStaticChannelInfo->last_lpd_mode;
 1722|  42.4k|  last_last_lpd_mode = pAacDecoderStaticChannelInfo->last_last_lpd_mode;
 1723|  42.4k|  last_lpc_lost = pAacDecoderStaticChannelInfo->last_lpc_lost | last_frame_lost;
 1724|       |
 1725|       |  /* This buffer must be avalable for the case of FD->ACELP transition. The
 1726|       |  beginning of the buffer is used after the BPF to overwrite the output signal.
 1727|       |  Only the FAC area must be affected by the BPF */
 1728|       |
 1729|   193k|  while (k < nbDiv) {
  ------------------
  |  Branch (1729:10): [True: 151k, False: 42.4k]
  ------------------
 1730|   151k|    if (frameOk == 0) {
  ------------------
  |  Branch (1730:9): [True: 3.59k, False: 147k]
  ------------------
 1731|  3.59k|      pAacDecoderStaticChannelInfo->numLostLpdFrames++;
 1732|   147k|    } else {
 1733|   147k|      last_frame_lost |=
 1734|   147k|          (pAacDecoderStaticChannelInfo->numLostLpdFrames > 0) ? 1 : 0;
  ------------------
  |  Branch (1734:11): [True: 9, False: 147k]
  ------------------
 1735|   147k|      pAacDecoderStaticChannelInfo->numLostLpdFrames = 0;
 1736|   147k|    }
 1737|   151k|    if (mod[k] == 0 || mod[k] == 4) {
  ------------------
  |  Branch (1737:9): [True: 98.3k, False: 52.9k]
  |  Branch (1737:24): [True: 1.48k, False: 51.4k]
  ------------------
 1738|       |      /* ACELP or TCX time domain concealment */
 1739|  99.8k|      FIXP_DBL *acelp_out;
 1740|       |
 1741|       |      /* FAC management */
 1742|  99.8k|      if ((last_lpd_mode != 0) && (last_lpd_mode != 4)) /* TCX TD concealment */
  ------------------
  |  Branch (1742:11): [True: 47.7k, False: 52.0k]
  |  Branch (1742:35): [True: 46.5k, False: 1.20k]
  ------------------
 1743|  46.5k|      {
 1744|  46.5k|        FIXP_DBL *pFacData = NULL;
 1745|       |
 1746|  46.5k|        if (frameOk && !last_frame_lost) {
  ------------------
  |  Branch (1746:13): [True: 46.2k, False: 284]
  |  Branch (1746:24): [True: 46.2k, False: 2]
  ------------------
 1747|  46.2k|          pFacData = pAacDecoderChannelInfo->data.usac.fac_data[k];
 1748|  46.2k|        }
 1749|       |
 1750|  46.5k|        nrSamples += CLpd_FAC_Mdct2Acelp(
 1751|  46.5k|            &pAacDecoderStaticChannelInfo->IMdct, synth + nrSamples, pFacData,
 1752|  46.5k|            pAacDecoderChannelInfo->data.usac.fac_data_e[k],
 1753|  46.5k|            pAacDecoderChannelInfo->data.usac.lp_coeff[k],
 1754|  46.5k|            pAacDecoderChannelInfo->data.usac.lp_coeff_exp[k],
 1755|  46.5k|            lFrame - nrSamples,
 1756|  46.5k|            CLpd_FAC_getLength(
 1757|  46.5k|                (pAacDecoderStaticChannelInfo->last_core_mode != FD_SHORT) ||
  ------------------
  |  Branch (1757:17): [True: 35.4k, False: 11.1k]
  ------------------
 1758|  11.1k|                    (k > 0),
  ------------------
  |  Branch (1758:21): [True: 3.71k, False: 7.42k]
  ------------------
 1759|  46.5k|                lFac),
 1760|  46.5k|            (pAacDecoderStaticChannelInfo->last_core_mode != LPD) && (k == 0),
  ------------------
  |  Branch (1760:13): [True: 36.6k, False: 9.95k]
  |  Branch (1760:70): [True: 18.6k, False: 18.0k]
  ------------------
 1761|  46.5k|            0);
 1762|       |
 1763|  46.5k|        FDKmemcpy(
 1764|  46.5k|            synth + nrSamples, pAacDecoderStaticChannelInfo->IMdct.overlap.time,
 1765|  46.5k|            pAacDecoderStaticChannelInfo->IMdct.ov_offset * sizeof(FIXP_DBL));
 1766|  46.5k|        {
 1767|  46.5k|          FIXP_LPC *lp_prev =
 1768|  46.5k|              pAacDecoderChannelInfo->data.usac
 1769|  46.5k|                  .lp_coeff[0]; /* init value does not real matter */
 1770|  46.5k|          INT lp_prev_exp = pAacDecoderChannelInfo->data.usac.lp_coeff_exp[0];
 1771|       |
 1772|  46.5k|          if (last_lpd_mode != 255) { /* last mode was tcx */
  ------------------
  |  Branch (1772:15): [True: 27.9k, False: 18.6k]
  ------------------
 1773|  27.9k|            last_k = k - (1 << (last_lpd_mode - 1));
 1774|  27.9k|            if (last_k < 0) {
  ------------------
  |  Branch (1774:17): [True: 1.13k, False: 26.8k]
  ------------------
 1775|  1.13k|              lp_prev = pAacDecoderStaticChannelInfo->lp_coeff_old[1];
 1776|  1.13k|              lp_prev_exp = pAacDecoderStaticChannelInfo->lp_coeff_old_exp[1];
 1777|  26.8k|            } else {
 1778|  26.8k|              lp_prev = pAacDecoderChannelInfo->data.usac.lp_coeff[last_k];
 1779|  26.8k|              lp_prev_exp =
 1780|  26.8k|                  pAacDecoderChannelInfo->data.usac.lp_coeff_exp[last_k];
 1781|  26.8k|            }
 1782|  27.9k|          }
 1783|       |
 1784|  46.5k|          CLpd_AcelpPrepareInternalMem(
 1785|  46.5k|              synth + aacDelay + k * lDiv, last_lpd_mode,
 1786|  46.5k|              (last_last_lpd_mode == 4) ? 0 : last_last_lpd_mode,
  ------------------
  |  Branch (1786:15): [True: 2, False: 46.5k]
  ------------------
 1787|  46.5k|              pAacDecoderChannelInfo->data.usac.lp_coeff[k],
 1788|  46.5k|              pAacDecoderChannelInfo->data.usac.lp_coeff_exp[k], lp_prev,
 1789|  46.5k|              lp_prev_exp, &pAacDecoderStaticChannelInfo->acelp, lFrame,
 1790|  46.5k|              (last_frame_lost && k < 2), mod[k]);
  ------------------
  |  Branch (1790:16): [True: 2, False: 46.5k]
  |  Branch (1790:35): [True: 1, False: 1]
  ------------------
 1791|  46.5k|        }
 1792|  53.2k|      } else {
 1793|  53.2k|        if (k == 0 && pAacDecoderStaticChannelInfo->IMdct.ov_offset !=
  ------------------
  |  Branch (1793:13): [True: 3.13k, False: 50.1k]
  |  Branch (1793:23): [True: 0, False: 3.13k]
  ------------------
 1794|  3.13k|                          lFrame / facFB / 2) {
 1795|      0|          pAacDecoderStaticChannelInfo->IMdct.ov_offset = lFrame / facFB / 2;
 1796|      0|        }
 1797|  53.2k|        nrSamples += imdct_drain(&pAacDecoderStaticChannelInfo->IMdct,
 1798|  53.2k|                                 synth + nrSamples, lFrame / facFB - nrSamples);
 1799|  53.2k|      }
 1800|       |
 1801|  99.8k|      if (nrSamples >= lFrame / facFB) {
  ------------------
  |  Branch (1801:11): [True: 55.8k, False: 43.9k]
  ------------------
 1802|       |        /* Write ACELP time domain samples into IMDCT overlap buffer at
 1803|       |         * pAacDecoderStaticChannelInfo->IMdct.overlap.time +
 1804|       |         * pAacDecoderStaticChannelInfo->IMdct.ov_offset
 1805|       |         */
 1806|  55.8k|        acelp_out = pAacDecoderStaticChannelInfo->IMdct.overlap.time +
 1807|  55.8k|                    pAacDecoderStaticChannelInfo->IMdct.ov_offset;
 1808|       |
 1809|       |        /* Account ACELP time domain output samples to overlap buffer */
 1810|  55.8k|        pAacDecoderStaticChannelInfo->IMdct.ov_offset += lDiv;
 1811|  55.8k|      } else {
 1812|       |        /* Write ACELP time domain samples into output buffer at pTimeData +
 1813|       |         * nrSamples */
 1814|  43.9k|        acelp_out = synth + nrSamples;
 1815|       |
 1816|       |        /* Account ACELP time domain output samples to output buffer */
 1817|  43.9k|        nrSamples += lDiv;
 1818|  43.9k|      }
 1819|       |
 1820|  99.8k|      if (mod[k] == 4) {
  ------------------
  |  Branch (1820:11): [True: 1.48k, False: 98.3k]
  ------------------
 1821|  1.48k|        pAacDecoderStaticChannelInfo->acelp.wsyn_rms = scaleValue(
 1822|  1.48k|            pAacDecoderChannelInfo->data.usac.tcx_gain[k],
 1823|  1.48k|            fixMin(0,
  ------------------
  |  |  306|  1.48k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1824|  1.48k|                   pAacDecoderChannelInfo->data.usac.tcx_gain_e[k] - SF_EXC));
 1825|  1.48k|        CLpd_TcxTDConceal(&pAacDecoderStaticChannelInfo->acelp,
 1826|  1.48k|                          &pAacDecoderStaticChannelInfo->last_tcx_pitch,
 1827|  1.48k|                          pAacDecoderChannelInfo->data.usac.lsp_coeff[k],
 1828|  1.48k|                          pAacDecoderChannelInfo->data.usac.lsp_coeff[k + 1],
 1829|  1.48k|                          pAacDecoderChannelInfo->data.usac.aStability[k],
 1830|  1.48k|                          pAacDecoderStaticChannelInfo->numLostLpdFrames,
 1831|  1.48k|                          acelp_out, lFrame,
 1832|  1.48k|                          pAacDecoderStaticChannelInfo->last_tcx_noise_factor);
 1833|       |
 1834|  98.3k|      } else {
 1835|  98.3k|        FDK_ASSERT(pAacDecoderChannelInfo->data.usac.aStability[k] >=
  ------------------
  |  |  221|  98.3k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1835:9): [True: 98.3k, False: 0]
  ------------------
 1836|  98.3k|                   (FIXP_SGL)0);
 1837|  98.3k|        CLpd_AcelpDecode(&pAacDecoderStaticChannelInfo->acelp, i_offset,
 1838|  98.3k|                         pAacDecoderChannelInfo->data.usac.lsp_coeff[k],
 1839|  98.3k|                         pAacDecoderChannelInfo->data.usac.lsp_coeff[k + 1],
 1840|  98.3k|                         pAacDecoderChannelInfo->data.usac.aStability[k],
 1841|  98.3k|                         &pAacDecoderChannelInfo->data.usac.acelp[k],
 1842|  98.3k|                         pAacDecoderStaticChannelInfo->numLostLpdFrames,
 1843|  98.3k|                         last_lpc_lost, k, acelp_out,
 1844|  98.3k|                         &pitch[(k * nbSubfr) + synSfd],
 1845|  98.3k|                         &pit_gain[(k * nbSubfr) + synSfd], lFrame);
 1846|  98.3k|      }
 1847|       |
 1848|  99.8k|      if (mod[k] != 4) {
  ------------------
  |  Branch (1848:11): [True: 98.3k, False: 1.48k]
  ------------------
 1849|  98.3k|        if (last_lpd_mode != 0 &&
  ------------------
  |  Branch (1849:13): [True: 46.3k, False: 52.0k]
  ------------------
 1850|  46.3k|            pAacDecoderChannelInfo->data.usac
  ------------------
  |  Branch (1850:13): [True: 19.9k, False: 26.3k]
  ------------------
 1851|  46.3k|                .bpf_control_info) { /* FD/TCX -> ACELP transition */
 1852|       |          /* bass post-filter past FAC area (past two (one for FD short)
 1853|       |           * subframes) */
 1854|  19.9k|          int currentSf = synSfd + k * nbSubfr;
 1855|       |
 1856|  19.9k|          if ((k > 0) || (pAacDecoderStaticChannelInfo->last_core_mode !=
  ------------------
  |  Branch (1856:15): [True: 12.9k, False: 7.05k]
  |  Branch (1856:26): [True: 2.57k, False: 4.47k]
  ------------------
 1857|  15.4k|                          FD_SHORT)) { /* TCX or FD long -> ACELP */
 1858|  15.4k|            pitch[currentSf - 2] = pitch[currentSf - 1] = pitch[currentSf];
 1859|  15.4k|            pit_gain[currentSf - 2] = pit_gain[currentSf - 1] =
 1860|  15.4k|                pit_gain[currentSf];
 1861|  15.4k|          } else { /* FD short -> ACELP */
 1862|  4.47k|            pitch[currentSf - 1] = pitch[currentSf];
 1863|  4.47k|            pit_gain[currentSf - 1] = pit_gain[currentSf];
 1864|  4.47k|          }
 1865|  19.9k|        }
 1866|  98.3k|      }
 1867|  99.8k|    } else { /* TCX */
 1868|  51.4k|      int lg = lg_table[mod[k]];
 1869|  51.4k|      int isFullBandLpd = 0;
 1870|       |
 1871|       |      /* FAC management */
 1872|  51.4k|      if ((last_lpd_mode == 0) || (last_lpd_mode == 4)) /* TCX TD concealment */
  ------------------
  |  Branch (1872:11): [True: 23.5k, False: 27.9k]
  |  Branch (1872:35): [True: 2, False: 27.9k]
  ------------------
 1873|  23.5k|      {
 1874|  23.5k|        C_AALLOC_SCRATCH_START(fac_buf, FIXP_DBL, 1024 / 8);
  ------------------
  |  |  319|  23.5k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  23.5k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  23.5k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  23.5k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  23.5k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  23.5k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  23.5k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  23.5k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  23.5k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  23.5k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
 1875|       |
 1876|       |        /* pAacDecoderChannelInfo->data.usac.fac_data[k] == NULL means no FAC
 1877|       |         * data available. */
 1878|  23.5k|        if (last_frame_lost == 1 ||
  ------------------
  |  Branch (1878:13): [True: 10, False: 23.5k]
  ------------------
 1879|  23.5k|            pAacDecoderChannelInfo->data.usac.fac_data[k] == NULL) {
  ------------------
  |  Branch (1879:13): [True: 6.21k, False: 17.3k]
  ------------------
 1880|  6.22k|          FDKmemclear(fac_buf, 1024 / 8 * sizeof(FIXP_DBL));
 1881|  6.22k|          pAacDecoderChannelInfo->data.usac.fac_data[k] = fac_buf;
 1882|  6.22k|          pAacDecoderChannelInfo->data.usac.fac_data_e[k] = 0;
 1883|  6.22k|        }
 1884|       |
 1885|  23.5k|        nrSamples += CLpd_FAC_Acelp2Mdct(
 1886|  23.5k|            &pAacDecoderStaticChannelInfo->IMdct, synth + nrSamples,
 1887|  23.5k|            SPEC_TCX(pAacDecoderChannelInfo->pSpectralCoefficient, k,
  ------------------
  |  |  118|  23.5k|  ((ptr) + ((f) * (gl * 2) * (((fb) == 0) ? 1 : 2)))
  |  |  ------------------
  |  |  |  Branch (118:31): [True: 23.5k, False: 0]
  |  |  ------------------
  ------------------
 1888|  23.5k|                     pAacDecoderChannelInfo->granuleLength, isFullBandLpd),
 1889|  23.5k|            pAacDecoderChannelInfo->specScale + k, 1,
 1890|  23.5k|            pAacDecoderChannelInfo->data.usac.fac_data[k],
 1891|  23.5k|            pAacDecoderChannelInfo->data.usac.fac_data_e[k],
 1892|  23.5k|            pAacDecoderChannelInfo->granuleLength /* == fac_length */,
 1893|  23.5k|            lFrame - nrSamples, lg,
 1894|  23.5k|            FDKgetWindowSlope(lDiv,
 1895|  23.5k|                              GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1896|  23.5k|            lDiv, pAacDecoderChannelInfo->data.usac.lp_coeff[k],
 1897|  23.5k|            pAacDecoderChannelInfo->data.usac.lp_coeff_exp[k],
 1898|  23.5k|            &pAacDecoderStaticChannelInfo->acelp,
 1899|  23.5k|            pAacDecoderChannelInfo->data.usac.tcx_gain[k],
 1900|  23.5k|            (last_frame_lost || !frameOk), 0 /* is not FD FAC */
  ------------------
  |  Branch (1900:14): [True: 10, False: 23.5k]
  |  Branch (1900:33): [True: 0, False: 23.5k]
  ------------------
 1901|  23.5k|            ,
 1902|  23.5k|            last_lpd_mode, k,
 1903|  23.5k|            pAacDecoderChannelInfo
 1904|  23.5k|                ->currAliasingSymmetry /* Note: The current aliasing
 1905|       |                                          symmetry for a TCX (i.e. LPD)
 1906|       |                                          frame must always be 0 */
 1907|  23.5k|        );
 1908|       |
 1909|  23.5k|        pitch[(k * nbSubfr) + synSfd + 1] = pitch[(k * nbSubfr) + synSfd] =
 1910|  23.5k|            pitch[(k * nbSubfr) + synSfd - 1];
 1911|  23.5k|        pit_gain[(k * nbSubfr) + synSfd + 1] =
 1912|  23.5k|            pit_gain[(k * nbSubfr) + synSfd] =
 1913|  23.5k|                pit_gain[(k * nbSubfr) + synSfd - 1];
 1914|       |
 1915|  23.5k|        C_AALLOC_SCRATCH_END(fac_buf, FIXP_DBL, 1024 / 8);
  ------------------
  |  |  327|  23.5k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
 1916|  27.9k|      } else {
 1917|  27.9k|        int tl = lg;
 1918|  27.9k|        int fl = lDiv;
 1919|  27.9k|        int fr = lDiv;
 1920|       |
 1921|  27.9k|        nrSamples += imlt_block(
 1922|  27.9k|            &pAacDecoderStaticChannelInfo->IMdct, synth + nrSamples,
 1923|  27.9k|            SPEC_TCX(pAacDecoderChannelInfo->pSpectralCoefficient, k,
  ------------------
  |  |  118|  27.9k|  ((ptr) + ((f) * (gl * 2) * (((fb) == 0) ? 1 : 2)))
  |  |  ------------------
  |  |  |  Branch (118:31): [True: 27.9k, False: 0]
  |  |  ------------------
  ------------------
 1924|  27.9k|                     pAacDecoderChannelInfo->granuleLength, isFullBandLpd),
 1925|  27.9k|            pAacDecoderChannelInfo->specScale + k, 1, lFrame - nrSamples, tl,
 1926|  27.9k|            FDKgetWindowSlope(fl,
 1927|  27.9k|                              GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1928|  27.9k|            fl,
 1929|  27.9k|            FDKgetWindowSlope(fr,
 1930|  27.9k|                              GetWindowShape(&pAacDecoderChannelInfo->icsInfo)),
 1931|  27.9k|            fr, pAacDecoderChannelInfo->data.usac.tcx_gain[k],
 1932|  27.9k|            pAacDecoderChannelInfo->currAliasingSymmetry
  ------------------
  |  Branch (1932:13): [True: 0, False: 27.9k]
  ------------------
 1933|  27.9k|                ? MLT_FLAG_CURR_ALIAS_SYMMETRY
  ------------------
  |  |  122|      0|#define MLT_FLAG_CURR_ALIAS_SYMMETRY 1
  ------------------
 1934|  27.9k|                : 0);
 1935|  27.9k|      }
 1936|  51.4k|    }
 1937|       |    /* remember previous mode */
 1938|   151k|    last_last_lpd_mode = last_lpd_mode;
 1939|   151k|    last_lpd_mode = mod[k];
 1940|   151k|    last_lpc_lost = (frameOk == 0) ? 1 : 0;
  ------------------
  |  Branch (1940:21): [True: 3.59k, False: 147k]
  ------------------
 1941|       |
 1942|       |    /* Increase k to next frame */
 1943|   151k|    last_k = k;
 1944|   151k|    k += ((mod[k] & 0x3) == 0) ? 1 : (1 << (mod[k] - 1));
  ------------------
  |  Branch (1944:10): [True: 99.8k, False: 51.4k]
  ------------------
 1945|   151k|  }
 1946|       |
 1947|  42.4k|  if (frameOk) {
  ------------------
  |  Branch (1947:7): [True: 41.5k, False: 953]
  ------------------
 1948|       |    /* assume data was ok => store for concealment */
 1949|  41.5k|    FDK_ASSERT(pAacDecoderChannelInfo->data.usac.aStability[last_k] >=
  ------------------
  |  |  221|  41.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1949:5): [True: 41.5k, False: 0]
  ------------------
 1950|  41.5k|               (FIXP_SGL)0);
 1951|  41.5k|    pAacDecoderStaticChannelInfo->oldStability =
 1952|  41.5k|        pAacDecoderChannelInfo->data.usac.aStability[last_k];
 1953|  41.5k|    FDKmemcpy(pAacDecoderStaticChannelInfo->lsf_adaptive_mean,
 1954|  41.5k|              pAacDecoderChannelInfo->data.usac.lsf_adaptive_mean_cand,
 1955|  41.5k|              M_LP_FILTER_ORDER * sizeof(FIXP_LPC));
  ------------------
  |  |  117|  41.5k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1956|  41.5k|  }
 1957|       |
 1958|       |  /* store past lp coeffs for next superframe (they are only valid and needed if
 1959|       |   * last_lpd_mode was tcx) */
 1960|  42.4k|  if (last_lpd_mode > 0) {
  ------------------
  |  Branch (1960:7): [True: 10.0k, False: 32.4k]
  ------------------
 1961|  10.0k|    FDKmemcpy(pAacDecoderStaticChannelInfo->lp_coeff_old[0],
 1962|  10.0k|              pAacDecoderChannelInfo->data.usac.lp_coeff[nbDiv],
 1963|  10.0k|              M_LP_FILTER_ORDER * sizeof(FIXP_LPC));
  ------------------
  |  |  117|  10.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1964|  10.0k|    pAacDecoderStaticChannelInfo->lp_coeff_old_exp[0] =
 1965|  10.0k|        pAacDecoderChannelInfo->data.usac.lp_coeff_exp[nbDiv];
 1966|  10.0k|    FDKmemcpy(pAacDecoderStaticChannelInfo->lp_coeff_old[1],
 1967|  10.0k|              pAacDecoderChannelInfo->data.usac.lp_coeff[last_k],
 1968|  10.0k|              M_LP_FILTER_ORDER * sizeof(FIXP_LPC));
  ------------------
  |  |  117|  10.0k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
 1969|  10.0k|    pAacDecoderStaticChannelInfo->lp_coeff_old_exp[1] =
 1970|  10.0k|        pAacDecoderChannelInfo->data.usac.lp_coeff_exp[last_k];
 1971|  10.0k|  }
 1972|       |
 1973|  42.4k|  FDK_ASSERT(nrSamples == lFrame);
  ------------------
  |  |  221|  42.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1973:3): [True: 42.4k, False: 0]
  ------------------
 1974|       |
 1975|       |  /* check whether usage of bass postfilter was de-activated in the bitstream;
 1976|       |   if yes, set pitch gain to 0 */
 1977|  42.4k|  if (!(pAacDecoderChannelInfo->data.usac.bpf_control_info)) {
  ------------------
  |  Branch (1977:7): [True: 21.4k, False: 21.0k]
  ------------------
 1978|  21.4k|    if (mod[0] != 0 && (pAacDecoderStaticChannelInfo->old_bpf_control_info)) {
  ------------------
  |  Branch (1978:9): [True: 7.34k, False: 14.0k]
  |  Branch (1978:24): [True: 554, False: 6.79k]
  ------------------
 1979|  7.77k|      for (int i = 2; i < nbSubfrSuperfr; i++)
  ------------------
  |  Branch (1979:23): [True: 7.21k, False: 554]
  ------------------
 1980|  7.21k|        pit_gain[synSfd + i] = (FIXP_DBL)0;
 1981|  20.8k|    } else {
 1982|   312k|      for (int i = 0; i < nbSubfrSuperfr; i++)
  ------------------
  |  Branch (1982:23): [True: 291k, False: 20.8k]
  ------------------
 1983|   291k|        pit_gain[synSfd + i] = (FIXP_DBL)0;
 1984|  20.8k|    }
 1985|  21.4k|  }
 1986|       |
 1987|       |  /* for bass postfilter */
 1988|   296k|  for (int n = 0; n < synSfd; n++) {
  ------------------
  |  Branch (1988:19): [True: 253k, False: 42.4k]
  ------------------
 1989|   253k|    pAacDecoderStaticChannelInfo->old_T_pf[n] = pitch[nbSubfrSuperfr + n];
 1990|   253k|    pAacDecoderStaticChannelInfo->old_gain_pf[n] = pit_gain[nbSubfrSuperfr + n];
 1991|   253k|  }
 1992|       |
 1993|  42.4k|  pAacDecoderStaticChannelInfo->old_bpf_control_info =
 1994|  42.4k|      pAacDecoderChannelInfo->data.usac.bpf_control_info;
 1995|       |
 1996|  42.4k|  {
 1997|  42.4k|    INT lookahead = -BPF_DELAY;
  ------------------
  |  |  148|  42.4k|#define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  147|  42.4k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  |  |  ------------------
  |  |               #define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  ------------------
  ------------------
 1998|  42.4k|    int copySamp = (mod[nbDiv - 1] == 0) ? (aacDelay) : (aacDelay - lFac);
  ------------------
  |  Branch (1998:20): [True: 32.4k, False: 10.0k]
  ------------------
 1999|       |
 2000|       |    /* Copy enough time domain samples from MDCT to synthesis buffer as needed
 2001|       |     * by the bass postfilter */
 2002|       |
 2003|  42.4k|    lookahead += imdct_copy_ov_and_nr(&pAacDecoderStaticChannelInfo->IMdct,
 2004|  42.4k|                                      synth + nrSamples, copySamp);
 2005|       |
 2006|  42.4k|    FDK_ASSERT(lookahead == copySamp - BPF_DELAY);
  ------------------
  |  |  221|  42.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2006:5): [True: 42.4k, False: 0]
  ------------------
 2007|       |
 2008|  42.4k|    FIXP_DBL *p2_synth = synth + BPF_DELAY;
  ------------------
  |  |  148|  42.4k|#define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  147|  42.4k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  |  |  ------------------
  |  |               #define BPF_DELAY (BPF_SFD * L_SUBFR) /* bass postfilter delay (samples) */
  |  |  ------------------
  |  |  |  |  146|  42.4k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  ------------------
  ------------------
 2009|       |
 2010|       |    /* recalculate pitch gain to allow postfilering on FAC area */
 2011|   634k|    for (int i = 0; i < nbSubfrSuperfr; i++) {
  ------------------
  |  Branch (2011:21): [True: 592k, False: 42.4k]
  ------------------
 2012|   592k|      int T = pitch[i];
 2013|   592k|      FIXP_DBL gain = pit_gain[i];
 2014|       |
 2015|   592k|      if (gain > (FIXP_DBL)0) {
  ------------------
  |  Branch (2015:11): [True: 153k, False: 438k]
  ------------------
 2016|   153k|        gain = get_gain(&p2_synth[i * L_SUBFR], &p2_synth[(i * L_SUBFR) - T],
  ------------------
  |  |  146|   153k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
                      gain = get_gain(&p2_synth[i * L_SUBFR], &p2_synth[(i * L_SUBFR) - T],
  ------------------
  |  |  146|   153k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 2017|   153k|                        L_SUBFR);
  ------------------
  |  |  146|   153k|#define L_SUBFR 64 /* subframe size (5ms) */
  ------------------
 2018|   153k|        pit_gain[i] = gain;
 2019|   153k|      }
 2020|   592k|    }
 2021|       |
 2022|  42.4k|    {
 2023|  42.4k|      bass_pf_1sf_delay(p2_synth, pitch, pit_gain, lFrame, lFrame / facFB,
 2024|  42.4k|                        mod[nbDiv - 1] ? (SynDelay - (lDiv / 2)) : SynDelay,
  ------------------
  |  Branch (2024:25): [True: 10.0k, False: 32.4k]
  ------------------
 2025|  42.4k|                        pTimeData, aacOutDataHeadroom,
 2026|  42.4k|                        pAacDecoderStaticChannelInfo->mem_bpf);
 2027|  42.4k|    }
 2028|  42.4k|  }
 2029|       |
 2030|      0|  Acelp_PostProcessing(synth_buf, pAacDecoderStaticChannelInfo->old_synth,
 2031|  42.4k|                       pitch, pAacDecoderStaticChannelInfo->old_T_pf, lFrame,
 2032|  42.4k|                       synSfd, nbSubfrSuperfr);
 2033|       |
 2034|       |  /* Store last mode for next super frame */
 2035|  42.4k|  { pAacDecoderStaticChannelInfo->last_core_mode = LPD; }
 2036|  42.4k|  pAacDecoderStaticChannelInfo->last_lpd_mode = last_lpd_mode;
 2037|  42.4k|  pAacDecoderStaticChannelInfo->last_last_lpd_mode = last_last_lpd_mode;
 2038|  42.4k|  pAacDecoderStaticChannelInfo->last_lpc_lost = last_lpc_lost;
 2039|       |
 2040|  42.4k|  return error;
 2041|  42.4k|}
usacdec_lpd.cpp:_ZL10calcEnergyPKisiPi:
  741|  51.3k|                           INT *rms_e) {
  742|  51.3k|  int headroom = getScalefactor(r, lg);
  743|       |
  744|  51.3k|  FIXP_DBL rms_m = 0;
  745|       |
  746|       |  /* Calculate number of growth bits due to addition */
  747|  51.3k|  INT shift = (INT)(fNormz((FIXP_DBL)lg));
  748|  51.3k|  shift = 31 - shift;
  749|       |
  750|       |  /* Generate 1e-2 in Q-6.37 */
  751|  51.3k|  const FIXP_DBL value0_01 = 0x51eb851e;
  752|  51.3k|  const INT value0_01_exp = -6;
  753|       |
  754|       |  /* Find the exponent of the resulting energy value */
  755|  51.3k|  *rms_e = ((rs - headroom) << 1) + shift + 1;
  756|       |
  757|  51.3k|  INT delta = *rms_e - value0_01_exp;
  758|  51.3k|  if (delta > 0) {
  ------------------
  |  Branch (758:7): [True: 51.3k, False: 0]
  ------------------
  759|       |    /* Limit shift_to 31*/
  760|  51.3k|    delta = fMin(31, delta);
  761|  51.3k|    rms_m = value0_01 >> delta;
  762|  51.3k|  } else {
  763|      0|    rms_m = value0_01;
  764|      0|    *rms_e = value0_01_exp;
  765|      0|    shift = shift - delta;
  766|       |    /* Limit shift_to 31*/
  767|      0|    shift = fMin(31, shift);
  768|      0|  }
  769|       |
  770|  15.5M|  for (int i = 0; i < lg; i++) {
  ------------------
  |  Branch (770:19): [True: 15.5M, False: 51.3k]
  ------------------
  771|  15.5M|    rms_m += fPow2Div2(r[i] << headroom) >> shift;
  772|  15.5M|  }
  773|       |
  774|  51.3k|  return rms_m;
  775|  51.3k|}
usacdec_lpd.cpp:_ZL11calcTCXGainP22CAacDecoderChannelInfoPiiiii:
  793|  51.3k|                        const INT lg) {
  794|  51.3k|  if ((rms_m != (FIXP_DBL)0)) {
  ------------------
  |  Branch (794:7): [True: 51.3k, False: 0]
  ------------------
  795|  51.3k|    FIXP_DBL tcx_gain_m;
  796|  51.3k|    INT tcx_gain_e;
  797|       |
  798|  51.3k|    CLpd_DecodeGain(&tcx_gain_m, &tcx_gain_e,
  799|  51.3k|                    pAacDecoderChannelInfo->pDynData->specificTo.usac
  800|  51.3k|                        .tcx_global_gain[frame]);
  801|       |
  802|       |    /* rms * 2^rms_e = lg/sqrt(sum(spec^2)) */
  803|  51.3k|    if (rms_e & 1) {
  ------------------
  |  Branch (803:9): [True: 25.4k, False: 25.8k]
  ------------------
  804|  25.4k|      rms_m >>= 1;
  805|  25.4k|      rms_e++;
  806|  25.4k|    }
  807|       |
  808|  51.3k|    {
  809|  51.3k|      FIXP_DBL fx_lg;
  810|  51.3k|      INT fx_lg_e, s;
  811|  51.3k|      INT inv_e;
  812|       |
  813|       |      /* lg = fx_lg * 2^fx_lg_e */
  814|  51.3k|      s = fNorm((FIXP_DBL)lg);
  815|  51.3k|      fx_lg = (FIXP_DBL)lg << s;
  816|  51.3k|      fx_lg_e = DFRACT_BITS - 1 - s;
  ------------------
  |  |  113|  51.3k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  817|       |      /* 1/sqrt(rms) */
  818|  51.3k|      rms_m = invSqrtNorm2(rms_m, &inv_e);
  819|  51.3k|      rms_m = fMult(rms_m, fx_lg);
  820|  51.3k|      rms_e = inv_e - (rms_e >> 1) + fx_lg_e;
  821|  51.3k|    }
  822|       |
  823|  51.3k|    {
  824|  51.3k|      int s = fNorm(tcx_gain_m);
  825|  51.3k|      tcx_gain_m = tcx_gain_m << s;
  826|  51.3k|      tcx_gain_e -= s;
  827|  51.3k|    }
  828|       |
  829|  51.3k|    tcx_gain_m = fMultDiv2(tcx_gain_m, rms_m);
  830|  51.3k|    tcx_gain_e = tcx_gain_e + rms_e;
  831|       |
  832|       |    /* global_gain * 2^(global_gain_e+rms_e) = (10^(global_gain/28)) * rms *
  833|       |     * 2^rms_e */
  834|  51.3k|    {
  835|  51.3k|      { tcx_gain_e += 1; }
  836|  51.3k|    }
  837|       |
  838|  51.3k|    pAacDecoderChannelInfo->data.usac.tcx_gain[frame] = tcx_gain_m;
  839|  51.3k|    pAacDecoderChannelInfo->data.usac.tcx_gain_e[frame] = tcx_gain_e;
  840|       |
  841|  51.3k|    pAacDecoderChannelInfo->specScale[frame] += tcx_gain_e;
  842|  51.3k|  }
  843|  51.3k|}
usacdec_lpd.cpp:_ZL32CLpd_ReadAndMapLpdModeToModArrayPhP13FDK_BITSTREAMj:
 1121|  42.5k|    UCHAR mod[4], HANDLE_FDK_BITSTREAM hBs, UINT elFlags) {
 1122|  42.5k|  int lpd_mode;
 1123|       |
 1124|  42.5k|  {
 1125|  42.5k|    lpd_mode = FDKreadBits(hBs, 5);
 1126|       |
 1127|  42.5k|    if (lpd_mode > 25 || lpd_mode < 0) {
  ------------------
  |  Branch (1127:9): [True: 64, False: 42.4k]
  |  Branch (1127:26): [True: 0, False: 42.4k]
  ------------------
 1128|     64|      return AAC_DEC_PARSE_ERROR;
 1129|     64|    }
 1130|       |
 1131|  42.4k|    switch (lpd_mode) {
 1132|    540|      case 25:
  ------------------
  |  Branch (1132:7): [True: 540, False: 41.9k]
  ------------------
 1133|       |        /* 1 80MS frame */
 1134|    540|        mod[0] = mod[1] = mod[2] = mod[3] = 3;
 1135|    540|        break;
 1136|    336|      case 24:
  ------------------
  |  Branch (1136:7): [True: 336, False: 42.1k]
  ------------------
 1137|       |        /* 2 40MS frames */
 1138|    336|        mod[0] = mod[1] = mod[2] = mod[3] = 2;
 1139|    336|        break;
 1140|  41.5k|      default:
  ------------------
  |  Branch (1140:7): [True: 41.5k, False: 876]
  ------------------
 1141|  41.5k|        switch (lpd_mode >> 2) {
 1142|  15.0k|          case 4:
  ------------------
  |  Branch (1142:11): [True: 15.0k, False: 26.5k]
  ------------------
 1143|       |            /* lpd_mode 19 - 16  => 1 40MS and 2 20MS frames */
 1144|  15.0k|            mod[0] = mod[1] = 2;
 1145|  15.0k|            mod[2] = (lpd_mode & 1) ? 1 : 0;
  ------------------
  |  Branch (1145:22): [True: 9.92k, False: 5.13k]
  ------------------
 1146|  15.0k|            mod[3] = (lpd_mode & 2) ? 1 : 0;
  ------------------
  |  Branch (1146:22): [True: 4.21k, False: 10.8k]
  ------------------
 1147|  15.0k|            break;
 1148|  1.56k|          case 5:
  ------------------
  |  Branch (1148:11): [True: 1.56k, False: 40.0k]
  ------------------
 1149|       |            /* lpd_mode 23 - 20 => 2 20MS and 1 40MS frames */
 1150|  1.56k|            mod[2] = mod[3] = 2;
 1151|  1.56k|            mod[0] = (lpd_mode & 1) ? 1 : 0;
  ------------------
  |  Branch (1151:22): [True: 864, False: 703]
  ------------------
 1152|  1.56k|            mod[1] = (lpd_mode & 2) ? 1 : 0;
  ------------------
  |  Branch (1152:22): [True: 358, False: 1.20k]
  ------------------
 1153|  1.56k|            break;
 1154|  24.9k|          default:
  ------------------
  |  Branch (1154:11): [True: 24.9k, False: 16.6k]
  ------------------
 1155|       |            /* lpd_mode < 16 => 4 20MS frames */
 1156|  24.9k|            mod[0] = (lpd_mode & 1) ? 1 : 0;
  ------------------
  |  Branch (1156:22): [True: 3.13k, False: 21.8k]
  ------------------
 1157|  24.9k|            mod[1] = (lpd_mode & 2) ? 1 : 0;
  ------------------
  |  Branch (1157:22): [True: 5.44k, False: 19.4k]
  ------------------
 1158|  24.9k|            mod[2] = (lpd_mode & 4) ? 1 : 0;
  ------------------
  |  Branch (1158:22): [True: 7.30k, False: 17.6k]
  ------------------
 1159|  24.9k|            mod[3] = (lpd_mode & 8) ? 1 : 0;
  ------------------
  |  Branch (1159:22): [True: 3.26k, False: 21.6k]
  ------------------
 1160|  24.9k|            break;
 1161|  41.5k|        }
 1162|  41.5k|        break;
 1163|  42.4k|    }
 1164|  42.4k|  }
 1165|  42.4k|  return AAC_DEC_OK;
 1166|  42.4k|}
usacdec_lpd.cpp:_ZL10CLpd_ResetP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoi:
 1171|  29.4k|    int keep_past_signal) {
 1172|  29.4k|  int i;
 1173|       |
 1174|       |  /* Reset TCX / ACELP common memory */
 1175|  29.4k|  if (!keep_past_signal) {
  ------------------
  |  Branch (1175:7): [True: 29.4k, False: 24]
  ------------------
 1176|  29.4k|    FDKmemclear(pAacDecoderStaticChannelInfo->old_synth,
 1177|  29.4k|                sizeof(pAacDecoderStaticChannelInfo->old_synth));
 1178|  29.4k|  }
 1179|       |
 1180|       |  /* Initialize the LSFs */
 1181|   501k|  for (i = 0; i < M_LP_FILTER_ORDER; i++) {
  ------------------
  |  |  117|   501k|#define M_LP_FILTER_ORDER 16 /* LP filter order */
  ------------------
  |  Branch (1181:15): [True: 471k, False: 29.4k]
  ------------------
 1182|   471k|    pAacDecoderStaticChannelInfo->lpc4_lsf[i] = fdk_dec_lsf_init[i];
 1183|   471k|  }
 1184|       |
 1185|       |  /* Reset memory needed by bass post-filter */
 1186|  29.4k|  FDKmemclear(pAacDecoderStaticChannelInfo->mem_bpf,
 1187|  29.4k|              sizeof(pAacDecoderStaticChannelInfo->mem_bpf));
 1188|       |
 1189|  29.4k|  pAacDecoderStaticChannelInfo->old_bpf_control_info = 0;
 1190|   235k|  for (i = 0; i < SYN_SFD; i++) {
  ------------------
  |  |  197|   235k|#define SYN_SFD SYN_SFD_1024
  |  |  ------------------
  |  |  |  |  165|   235k|#define SYN_SFD_1024 (AAC_SFD_1024 - BPF_SFD) /* synthesis delay (subframe) */
  |  |  |  |  ------------------
  |  |  |  |  |  |  163|   235k|#define AAC_SFD_1024 (NB_SUBFR_SUPERFR_1024 / 2) /* AAC delay (subframe) */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   235k|  (L_FRAME_PLUS_1024 / L_SUBFR) /* number of 5ms subframe per 80ms frame */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  156|   235k|#define L_FRAME_PLUS_1024 1024 /* length of one 80ms superframe */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 (L_FRAME_PLUS_1024 / L_SUBFR) /* number of 5ms subframe per 80ms frame */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  146|   235k|#define L_SUBFR 64 /* subframe size (5ms) */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define SYN_SFD_1024 (AAC_SFD_1024 - BPF_SFD) /* synthesis delay (subframe) */
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   235k|#define BPF_SFD 1  /* bass postfilter delay (subframe) */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1190:15): [True: 206k, False: 29.4k]
  ------------------
 1191|   206k|    pAacDecoderStaticChannelInfo->old_T_pf[i] = 64;
 1192|   206k|    pAacDecoderStaticChannelInfo->old_gain_pf[i] = (FIXP_DBL)0;
 1193|   206k|  }
 1194|       |
 1195|       |  /* Reset ACELP memory */
 1196|  29.4k|  CLpd_AcelpReset(&pAacDecoderStaticChannelInfo->acelp);
 1197|       |
 1198|  29.4k|  pAacDecoderStaticChannelInfo->last_lpc_lost = 0;      /* prev_lpc_lost */
 1199|  29.4k|  pAacDecoderStaticChannelInfo->last_tcx_pitch = L_DIV; /* pitch_tcx     */
  ------------------
  |  |  192|  29.4k|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|  29.4k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  29.4k|#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|  29.4k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1200|  29.4k|  pAacDecoderStaticChannelInfo->numLostLpdFrames = 0;   /* nbLostCmpt    */
 1201|  29.4k|}
usacdec_lpd.cpp:_ZL13CLpd_TCX_ReadP13FDK_BITSTREAMP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfoiiij:
 1064|  52.1k|    int first_tcx_flag, int frame, UINT flags) {
 1065|  52.1k|  AAC_DECODER_ERROR errorAAC = AAC_DEC_OK;
 1066|  52.1k|  ARITH_CODING_ERROR error = ARITH_CODER_OK;
 1067|  52.1k|  FIXP_DBL *pSpec;
 1068|  52.1k|  int arith_reset_flag = 0;
 1069|  52.1k|  int isFullBandLpd = 0;
 1070|       |
 1071|  52.1k|  pSpec = SPEC_TCX(pAacDecoderChannelInfo->pSpectralCoefficient, frame,
  ------------------
  |  |  118|  52.1k|  ((ptr) + ((f) * (gl * 2) * (((fb) == 0) ? 1 : 2)))
  |  |  ------------------
  |  |  |  Branch (118:31): [True: 52.1k, False: 0]
  |  |  ------------------
  ------------------
 1072|  52.1k|                   pAacDecoderChannelInfo->granuleLength, isFullBandLpd);
 1073|       |
 1074|       |  /* TCX noise level */
 1075|  52.1k|  {
 1076|  52.1k|    pAacDecoderChannelInfo->pDynData->specificTo.usac.tcx_noise_factor[frame] =
 1077|  52.1k|        FDKreadBits(hBs, 3);
 1078|  52.1k|  }
 1079|       |  /* TCX global gain */
 1080|  52.1k|  pAacDecoderChannelInfo->pDynData->specificTo.usac.tcx_global_gain[frame] =
 1081|  52.1k|      FDKreadBits(hBs, 7);
 1082|       |
 1083|       |  /* Arithmetic coded residual/spectrum */
 1084|  52.1k|  if (first_tcx_flag) {
  ------------------
  |  Branch (1084:7): [True: 31.7k, False: 20.3k]
  ------------------
 1085|  31.7k|    if (flags & AC_INDEP) {
  ------------------
  |  |  319|  31.7k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
  |  Branch (1085:9): [True: 22.0k, False: 9.71k]
  ------------------
 1086|  22.0k|      arith_reset_flag = 1;
 1087|  22.0k|    } else {
 1088|  9.71k|      arith_reset_flag = FDKreadBits(hBs, 1);
 1089|  9.71k|    }
 1090|  31.7k|  }
 1091|       |
 1092|       |  /* CArco_DecodeArithData() output scale of "pSpec" is DFRACT_BITS-1 */
 1093|  52.1k|  error = CArco_DecodeArithData(pAacDecoderStaticChannelInfo->hArCo, hBs, pSpec,
 1094|  52.1k|                                lg, lg, arith_reset_flag);
 1095|       |
 1096|       |  /* Rescale residual/spectrum */
 1097|  52.1k|  {
 1098|  52.1k|    int scale = getScalefactor(pSpec, lg) - 2; /* Leave 2 bits headroom */
 1099|       |
 1100|       |    /* Exponent of CArco_DecodeArithData() output is DFRACT_BITS; integer
 1101|       |     * values. */
 1102|  52.1k|    scaleValues(pSpec, lg, scale);
 1103|  52.1k|    scale = DFRACT_BITS - 1 - scale;
  ------------------
  |  |  113|  52.1k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1104|       |
 1105|  52.1k|    pAacDecoderChannelInfo->specScale[frame] = scale;
 1106|  52.1k|  }
 1107|       |
 1108|  52.1k|  if (error == ARITH_CODER_ERROR) errorAAC = AAC_DEC_UNKNOWN;
  ------------------
  |  Branch (1108:7): [True: 370, False: 51.7k]
  ------------------
 1109|       |
 1110|  52.1k|  return errorAAC;
 1111|  52.1k|}
usacdec_lpd.cpp:_ZL14CLpd_TcxDecodeP22CAacDecoderChannelInfoP28CAacDecoderStaticChannelInfojiiii:
  948|  51.3k|    int mod, int last_mod, int frame, int frameOk) {
  949|  51.3k|  FIXP_DBL *pAlfd_gains = pAacDecoderStaticChannelInfo->last_alfd_gains;
  950|  51.3k|  ULONG *pSeed = &pAacDecoderStaticChannelInfo->nfRandomSeed;
  ------------------
  |  |  182|  51.3k|#define ULONG UINT
  ------------------
  951|  51.3k|  int lg = (pAacDecoderChannelInfo->granuleLength == 128)
  ------------------
  |  Branch (951:12): [True: 24.8k, False: 26.4k]
  ------------------
  952|  51.3k|               ? lg_table_ccfl[0][mod + 0]
  953|  51.3k|               : lg_table_ccfl[1][mod + 0];
  954|  51.3k|  int next_frame = frame + (1 << (mod - 1));
  955|  51.3k|  int isFullBandLpd = 0;
  956|       |
  957|       |  /* Obtain r[] vector by combining the quant[] and noise[] vectors */
  958|  51.3k|  {
  959|  51.3k|    FIXP_DBL noise_level;
  960|  51.3k|    FIXP_DBL *coeffs =
  961|  51.3k|        SPEC_TCX(pAacDecoderChannelInfo->pSpectralCoefficient, frame,
  ------------------
  |  |  118|  51.3k|  ((ptr) + ((f) * (gl * 2) * (((fb) == 0) ? 1 : 2)))
  |  |  ------------------
  |  |  |  Branch (118:31): [True: 51.3k, False: 0]
  |  |  ------------------
  ------------------
  962|  51.3k|                 pAacDecoderChannelInfo->granuleLength, isFullBandLpd);
  963|  51.3k|    int scale = pAacDecoderChannelInfo->specScale[frame];
  964|  51.3k|    int i, nfBgn, nfEnd;
  965|  51.3k|    UCHAR tcx_noise_factor = pAacDecoderChannelInfo->pDynData->specificTo.usac
  966|  51.3k|                                 .tcx_noise_factor[frame];
  967|       |
  968|       |    /* find pitch for bfi case */
  969|  51.3k|    pAacDecoderStaticChannelInfo->last_tcx_pitch = find_mpitch(coeffs, lg);
  970|       |
  971|  51.3k|    if (frameOk) {
  ------------------
  |  Branch (971:9): [True: 51.3k, False: 0]
  ------------------
  972|       |      /* store for concealment */
  973|  51.3k|      pAacDecoderStaticChannelInfo->last_tcx_noise_factor = tcx_noise_factor;
  974|  51.3k|    } else {
  975|       |      /* restore last frames value */
  976|      0|      tcx_noise_factor = pAacDecoderStaticChannelInfo->last_tcx_noise_factor;
  977|      0|    }
  978|       |
  979|  51.3k|    noise_level =
  980|  51.3k|        (FIXP_DBL)((LONG)FL2FXCONST_DBL(0.0625f) * (8 - tcx_noise_factor));
  ------------------
  |  |  192|  51.3k|  (FIXP_DBL)(                                                                \
  |  |  193|  51.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 51.3k, Folded]
  |  |  ------------------
  |  |  194|  51.3k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  51.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  51.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 51.3k]
  |  |  ------------------
  |  |  195|  51.3k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  51.3k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  51.3k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  51.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  51.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  51.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  51.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  981|  51.3k|    noise_level = scaleValue(noise_level, -scale);
  982|       |
  983|  51.3k|    const FIXP_DBL neg_noise_level = -noise_level;
  984|       |
  985|  51.3k|    {
  986|  51.3k|      nfBgn = lg / 6;
  987|  51.3k|      nfEnd = lg;
  988|  51.3k|    }
  989|       |
  990|  1.65M|    for (i = nfBgn; i < nfEnd - 7; i += 8) {
  ------------------
  |  Branch (990:21): [True: 1.60M, False: 51.3k]
  ------------------
  991|  1.60M|      LONG tmp;
  ------------------
  |  |  181|  1.60M|#define LONG INT
  ------------------
  992|       |
  993|       |      /* Fill all 8 consecutive zero coeffs with noise */
  994|  1.60M|      tmp = coeffs[i + 0] | coeffs[i + 1] | coeffs[i + 2] | coeffs[i + 3] |
  995|  1.60M|            coeffs[i + 4] | coeffs[i + 5] | coeffs[i + 6] | coeffs[i + 7];
  996|       |
  997|  1.60M|      if (tmp == 0) {
  ------------------
  |  Branch (997:11): [True: 1.22M, False: 378k]
  ------------------
  998|  11.0M|        for (int k = i; k < i + 8; k++) {
  ------------------
  |  Branch (998:25): [True: 9.80M, False: 1.22M]
  ------------------
  999|  9.80M|          UsacRandomSign(pSeed) ? (coeffs[k] = neg_noise_level)
  ------------------
  |  Branch (999:11): [True: 4.96M, False: 4.83M]
  ------------------
 1000|  9.80M|                                : (coeffs[k] = noise_level);
 1001|  9.80M|        }
 1002|  1.22M|      }
 1003|  1.60M|    }
 1004|  51.3k|    if ((nfEnd - i) >
  ------------------
  |  Branch (1004:9): [True: 24.8k, False: 26.4k]
  ------------------
 1005|  51.3k|        0) { /* noise filling for last "band" with less than 8 bins */
 1006|  24.8k|      LONG tmp = (LONG)coeffs[i];
  ------------------
  |  |  181|  24.8k|#define LONG INT
  ------------------
 1007|  24.8k|      int k;
 1008|       |
 1009|  24.8k|      FDK_ASSERT((nfEnd - i) < 8);
  ------------------
  |  |  221|  24.8k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1009:7): [True: 24.8k, False: 0]
  ------------------
 1010|   124k|      for (k = 1; k < (nfEnd - i); k++) {
  ------------------
  |  Branch (1010:19): [True: 99.7k, False: 24.8k]
  ------------------
 1011|  99.7k|        tmp |= (LONG)coeffs[i + k];
 1012|  99.7k|      }
 1013|  24.8k|      if (tmp == 0) {
  ------------------
  |  Branch (1013:11): [True: 20.8k, False: 4.07k]
  ------------------
 1014|   121k|        for (k = i; k < nfEnd; k++) {
  ------------------
  |  Branch (1014:21): [True: 100k, False: 20.8k]
  ------------------
 1015|   100k|          UsacRandomSign(pSeed) ? (coeffs[k] = neg_noise_level)
  ------------------
  |  Branch (1015:11): [True: 55.8k, False: 44.6k]
  ------------------
 1016|   100k|                                : (coeffs[k] = noise_level);
 1017|   100k|        }
 1018|  20.8k|      }
 1019|  24.8k|    }
 1020|  51.3k|  }
 1021|       |
 1022|  51.3k|  {
 1023|       |    /* Convert LPC to LP domain */
 1024|  51.3k|    if (last_mod == 0) {
  ------------------
  |  Branch (1024:9): [True: 18.1k, False: 33.1k]
  ------------------
 1025|       |      /* Note: The case where last_mod == 255 is handled by other means
 1026|       |       * in CLpdChannelStream_Read() */
 1027|  18.1k|      E_LPC_f_lsp_a_conversion(
 1028|  18.1k|          pAacDecoderChannelInfo->data.usac.lsp_coeff[frame],
 1029|  18.1k|          pAacDecoderChannelInfo->data.usac.lp_coeff[frame],
 1030|  18.1k|          &pAacDecoderChannelInfo->data.usac.lp_coeff_exp[frame]);
 1031|  18.1k|    }
 1032|       |
 1033|  51.3k|    E_LPC_f_lsp_a_conversion(
 1034|  51.3k|        pAacDecoderChannelInfo->data.usac.lsp_coeff[next_frame],
 1035|  51.3k|        pAacDecoderChannelInfo->data.usac.lp_coeff[next_frame],
 1036|  51.3k|        &pAacDecoderChannelInfo->data.usac.lp_coeff_exp[next_frame]);
 1037|       |
 1038|       |    /* FDNS decoding */
 1039|  51.3k|    CLpd_FdnsDecode(
 1040|  51.3k|        pAacDecoderChannelInfo, pAacDecoderStaticChannelInfo,
 1041|  51.3k|        SPEC_TCX(pAacDecoderChannelInfo->pSpectralCoefficient, frame,
  ------------------
  |  |  118|  51.3k|  ((ptr) + ((f) * (gl * 2) * (((fb) == 0) ? 1 : 2)))
  |  |  ------------------
  |  |  |  Branch (118:31): [True: 51.3k, False: 0]
  |  |  ------------------
  ------------------
 1042|  51.3k|                 pAacDecoderChannelInfo->granuleLength, isFullBandLpd),
 1043|  51.3k|        lg, frame, pAacDecoderChannelInfo->specScale + frame,
 1044|  51.3k|        pAacDecoderChannelInfo->data.usac.lp_coeff[frame],
 1045|  51.3k|        pAacDecoderChannelInfo->data.usac.lp_coeff_exp[frame],
 1046|  51.3k|        pAacDecoderChannelInfo->data.usac.lp_coeff[next_frame],
 1047|  51.3k|        pAacDecoderChannelInfo->data.usac.lp_coeff_exp[next_frame], pAlfd_gains,
 1048|  51.3k|        pAacDecoderChannelInfo->granuleLength / 2 /* == FDNS_NPTS(ccfl) */
 1049|  51.3k|    );
 1050|  51.3k|  }
 1051|  51.3k|}
usacdec_lpd.cpp:_ZL11find_mpitchPii:
  895|  51.3k|static int find_mpitch(FIXP_DBL xri[], int lg) {
  896|  51.3k|  FIXP_DBL max, pitch;
  897|  51.3k|  INT pitch_e;
  898|  51.3k|  int i, n;
  899|       |
  900|  51.3k|  max = (FIXP_DBL)0;
  901|  51.3k|  n = 2;
  902|       |
  903|       |  /* find maximum below 400Hz */
  904|   485k|  for (i = 2; i < (lg >> 4); i += 2) {
  ------------------
  |  Branch (904:15): [True: 433k, False: 51.3k]
  ------------------
  905|   433k|    FIXP_DBL tmp = fPow2Div2(xri[i]) + fPow2Div2(xri[i + 1]);
  906|   433k|    if (tmp > max) {
  ------------------
  |  Branch (906:9): [True: 36.8k, False: 396k]
  ------------------
  907|  36.8k|      max = tmp;
  908|  36.8k|      n = i;
  909|  36.8k|    }
  910|   433k|  }
  911|       |
  912|       |  // pitch = ((float)lg<<1)/(float)n;
  913|  51.3k|  pitch = fDivNorm((FIXP_DBL)lg << 1, (FIXP_DBL)n, &pitch_e);
  914|  51.3k|  pitch >>= fixMax(0, DFRACT_BITS - 1 - pitch_e - 16);
  ------------------
  |  |  307|  51.3k|#define fixMax(a, b) fMax(a, b)
  ------------------
  915|       |
  916|       |  /* find pitch multiple under 20ms */
  917|  51.3k|  if (pitch >= (FIXP_DBL)((256 << 16) - 1)) { /*231.0f*/
  ------------------
  |  Branch (917:7): [True: 26.2k, False: 25.0k]
  ------------------
  918|  26.2k|    n = 256;
  919|  26.2k|  } else {
  920|  25.0k|    FIXP_DBL mpitch = pitch;
  921|  70.0k|    while (mpitch < (FIXP_DBL)(255 << 16)) {
  ------------------
  |  Branch (921:12): [True: 44.9k, False: 25.0k]
  ------------------
  922|  44.9k|      mpitch += pitch;
  923|  44.9k|    }
  924|  25.0k|    n = (int)(mpitch - pitch) >> 16;
  925|  25.0k|  }
  926|       |
  927|  51.3k|  return (n);
  928|  51.3k|}

channel.cpp:_ZL18CLpd_FAC_getLengthii:
  152|  33.7k|static inline INT CLpd_FAC_getLength(int fNotShortBlock, int fac_length_long) {
  153|  33.7k|  if (fNotShortBlock) {
  ------------------
  |  Branch (153:7): [True: 10.6k, False: 23.1k]
  ------------------
  154|  10.6k|    return (fac_length_long);
  155|  23.1k|  } else {
  156|  23.1k|    return fac_length_long / 2;
  157|  23.1k|  }
  158|  33.7k|}
usacdec_lpd.cpp:_ZL18CLpd_FAC_getLengthii:
  152|  49.9k|static inline INT CLpd_FAC_getLength(int fNotShortBlock, int fac_length_long) {
  153|  49.9k|  if (fNotShortBlock) {
  ------------------
  |  Branch (153:7): [True: 42.2k, False: 7.64k]
  ------------------
  154|  42.2k|    return (fac_length_long);
  155|  42.2k|  } else {
  156|  7.64k|    return fac_length_long / 2;
  157|  7.64k|  }
  158|  49.9k|}
usacdec_lpd.cpp:_ZL14UsacRandomSignPj:
  193|  9.90M|int UsacRandomSign(ULONG *seed) {
  194|  9.90M|  *seed = (ULONG)((UINT64)(*seed) * 69069 + 5);
  195|       |
  196|  9.90M|  return (int)((*seed) & 0x10000);
  197|  9.90M|}

_Z12CArco_Createv:
  733|  60.9k|CArcoData *CArco_Create(void) { return GetArcoData(); }
_Z13CArco_DestroyP9CArcoData:
  735|  60.9k|void CArco_Destroy(CArcoData *pArcoData) { FreeArcoData(&pArcoData); }
_Z21CArco_DecodeArithDataP9CArcoDataP13FDK_BITSTREAMPiiii:
  741|   680k|                                         int arith_reset_flag) {
  742|   680k|  ARITH_CODING_ERROR ErrorStatus = ARITH_CODER_OK;
  743|       |
  744|       |  /* Check lg and lg_max consistency. */
  745|   680k|  if (lg_max < lg) {
  ------------------
  |  Branch (745:7): [True: 0, False: 680k]
  ------------------
  746|      0|    return ARITH_CODER_ERROR;
  747|      0|  }
  748|       |
  749|   680k|  FDKmemclear(mdctSpectrum, lg_max * sizeof(FIXP_DBL));
  750|       |
  751|       |  /* arith_map_context */
  752|   680k|  if (arith_reset_flag) {
  ------------------
  |  Branch (752:7): [True: 216k, False: 464k]
  ------------------
  753|   216k|    FDKmemclear(pArcoData->c_prev,
  754|   216k|                sizeof(pArcoData->c_prev[0]) * ((lg_max / 2) + 4));
  755|   464k|  } else {
  756|   464k|    if (lg_max != pArcoData->m_numberLinesPrev) {
  ------------------
  |  Branch (756:9): [True: 25.1k, False: 439k]
  ------------------
  757|  25.1k|      if (pArcoData->m_numberLinesPrev == 0) {
  ------------------
  |  Branch (757:11): [True: 89, False: 25.0k]
  ------------------
  758|       |        /* Cannot decode without a valid AC context */
  759|     89|        return ARITH_CODER_ERROR;
  760|     89|      }
  761|       |
  762|       |      /* short-to-long or long-to-short block transition */
  763|       |      /* Current length differs compared to previous - perform up/downmix of
  764|       |       * m_qbuf */
  765|  25.0k|      copyTableAmrwbArith2(pArcoData->c_prev, pArcoData->m_numberLinesPrev >> 1,
  766|  25.0k|                           lg_max >> 1);
  767|  25.0k|    }
  768|   464k|  }
  769|       |
  770|   680k|  pArcoData->m_numberLinesPrev = lg_max;
  771|       |
  772|   680k|  if (lg > 0) {
  ------------------
  |  Branch (772:7): [True: 266k, False: 414k]
  ------------------
  773|   266k|    ErrorStatus =
  774|   266k|        decode2(hBs, pArcoData->c_prev + 2, mdctSpectrum, lg >> 1, lg_max >> 1);
  775|   414k|  } else {
  776|   414k|    FDKmemset(&pArcoData->c_prev[2], 1,
  777|   414k|              sizeof(pArcoData->c_prev[2]) * (lg_max >> 1));
  778|   414k|  }
  779|       |
  780|   680k|  if ((INT)FDKgetValidBits(hBs) < 0) {
  ------------------
  |  Branch (780:7): [True: 1.25k, False: 679k]
  ------------------
  781|  1.25k|    return ARITH_CODER_ERROR;
  782|  1.25k|  }
  783|       |
  784|   679k|  return ErrorStatus;
  785|   680k|}
ac_arith_coder.cpp:_ZL20copyTableAmrwbArith2Phii:
  532|  25.0k|static inline void copyTableAmrwbArith2(UCHAR tab[], int sizeIn, int sizeOut) {
  533|  25.0k|  int i;
  534|  25.0k|  int j;
  535|  25.0k|  int k = 2;
  536|       |
  537|  25.0k|  tab += 2;
  538|       |
  539|  25.0k|  if (sizeIn < sizeOut) {
  ------------------
  |  Branch (539:7): [True: 9.95k, False: 15.0k]
  ------------------
  540|  9.95k|    tab[sizeOut + 0] = tab[sizeIn + 0];
  541|  9.95k|    tab[sizeOut + 1] = tab[sizeIn + 1];
  542|  9.95k|    if (sizeIn < (sizeOut >> 2)) {
  ------------------
  |  Branch (542:9): [True: 4.11k, False: 5.84k]
  ------------------
  543|  4.11k|      k = 8;
  544|  5.84k|    } else if (sizeIn == (sizeOut >> 2)) {
  ------------------
  |  Branch (544:16): [True: 3.80k, False: 2.04k]
  ------------------
  545|  3.80k|      k = 4;
  546|  3.80k|    }
  547|       |
  548|  9.95k|    i = sizeOut - 1;
  549|  9.95k|    j = sizeIn - 1;
  550|       |
  551|   748k|    for (; i >= 0; j--) {
  ------------------
  |  Branch (551:12): [True: 738k, False: 9.95k]
  ------------------
  552|   738k|      UCHAR tq_data0 = tab[j];
  553|       |
  554|  2.51M|      for (int l = (k >> 1); l > 0; l--) {
  ------------------
  |  Branch (554:30): [True: 1.77M, False: 738k]
  ------------------
  555|  1.77M|        tab[i--] = tq_data0;
  556|  1.77M|        tab[i--] = tq_data0;
  557|  1.77M|      }
  558|   738k|    }
  559|  15.0k|  } else {
  560|  15.0k|    if (sizeOut < (sizeIn >> 2)) {
  ------------------
  |  Branch (560:9): [True: 1.75k, False: 13.3k]
  ------------------
  561|  1.75k|      k = 8;
  562|  13.3k|    } else if (sizeOut == (sizeIn >> 2)) {
  ------------------
  |  Branch (562:16): [True: 905, False: 12.4k]
  ------------------
  563|    905|      k = 4;
  564|    905|    }
  565|       |
  566|  1.54M|    for (i = 0, j = 0; i < sizeOut; j += k) {
  ------------------
  |  Branch (566:24): [True: 1.52M, False: 15.0k]
  ------------------
  567|  1.52M|      UCHAR tq_data0 = tab[j];
  568|       |
  569|  1.52M|      tab[i++] = tq_data0;
  570|  1.52M|    }
  571|  15.0k|    tab[sizeOut + 0] = tab[sizeIn + 0];
  572|  15.0k|    tab[sizeOut + 1] = tab[sizeIn + 1];
  573|  15.0k|  }
  574|  25.0k|}
ac_arith_coder.cpp:_ZL7decode2P13FDK_BITSTREAMPhPiii:
  615|   266k|                                  INT n, INT nt) {
  616|   266k|  Tastat as;
  617|   266k|  int i, l, r;
  618|   266k|  INT lev, esc_nb, pki;
  619|   266k|  USHORT state_inc;
  620|   266k|  UINT s;
  621|   266k|  ARITH_CODING_ERROR ErrorStatus = ARITH_CODER_OK;
  622|       |
  623|   266k|  int c_3 = 0; /* context of current frame 3 time steps ago */
  624|   266k|  int c_2 = 0; /* context of current frame 2 time steps ago */
  625|   266k|  int c_1 = 0; /* context of current frame 1 time steps ago */
  626|   266k|  int c_0 = 1; /* context of current frame to be calculated */
  627|       |
  628|       |  /* ari_start_decoding_14bits */
  629|   266k|  as.low = 0;
  630|   266k|  as.high = ari_q4new;
  ------------------
  |  |  108|   266k|#define ari_q4new (((long)1 << cbitsnew) - 1) /* 0xFFFF */
  |  |  ------------------
  |  |  |  |  106|   266k|#define cbitsnew 16
  |  |  ------------------
  ------------------
  631|   266k|  as.vobf = FDKreadBits(bbuf, cbitsnew);
  ------------------
  |  |  106|   266k|#define cbitsnew 16
  ------------------
  632|       |
  633|       |  /* arith_map_context */
  634|   266k|  state_inc = c_prev[0] << 12;
  635|       |
  636|  8.36M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (636:15): [True: 8.15M, False: 208k]
  ------------------
  637|       |    /* arith_get_context */
  638|  8.15M|    s = state_inc >> 8;
  639|  8.15M|    s = s + (c_prev[i + 1] << 8);
  640|  8.15M|    s = (s << 4) + c_1;
  641|       |
  642|  8.15M|    state_inc = s;
  643|       |
  644|  8.15M|    if (i > 3) {
  ------------------
  |  Branch (644:9): [True: 7.26M, False: 892k]
  ------------------
  645|       |      /* Cumulative amplitude below 2 */
  646|  7.26M|      if ((c_1 + c_2 + c_3) < 5) {
  ------------------
  |  Branch (646:11): [True: 4.14M, False: 3.12M]
  ------------------
  647|  4.14M|        s += 0x10000;
  648|  4.14M|      }
  649|  7.26M|    }
  650|       |
  651|       |    /* MSBs decoding */
  652|  8.89M|    for (lev = esc_nb = 0;;) {
  653|  8.89M|      pki = get_pk_v2(s + (esc_nb << (VAL_ESC + 1)));
  ------------------
  |  |  113|  8.89M|#define VAL_ESC 16
  ------------------
  654|  8.89M|      r = ari_decode_14bits(bbuf, &as, ari_pk[pki], VAL_ESC + 1);
  ------------------
  |  |  113|  8.89M|#define VAL_ESC 16
  ------------------
  655|  8.89M|      if (r < VAL_ESC) {
  ------------------
  |  |  113|  8.89M|#define VAL_ESC 16
  ------------------
  |  Branch (655:11): [True: 8.15M, False: 733k]
  ------------------
  656|  8.15M|        break;
  657|  8.15M|      }
  658|       |
  659|   733k|      lev++;
  660|       |
  661|   733k|      if (lev > 23) return ARITH_CODER_ERROR;
  ------------------
  |  Branch (661:11): [True: 496, False: 733k]
  ------------------
  662|       |
  663|   733k|      if (esc_nb < 7) {
  ------------------
  |  Branch (663:11): [True: 717k, False: 15.9k]
  ------------------
  664|   717k|        esc_nb++;
  665|   717k|      }
  666|   733k|    }
  667|       |
  668|       |    /* Stop symbol */
  669|  8.15M|    if (r == 0) {
  ------------------
  |  Branch (669:9): [True: 4.74M, False: 3.41M]
  ------------------
  670|  4.74M|      if (esc_nb > 0) {
  ------------------
  |  Branch (670:11): [True: 57.7k, False: 4.68M]
  ------------------
  671|  57.7k|        break; /* Stop symbol */
  672|  57.7k|      }
  673|  4.68M|      c_0 = 1;
  674|  4.68M|    } else /* if (r==0) */
  675|  3.41M|    {
  676|  3.41M|      INT b = r >> 2;
  677|  3.41M|      INT a = r & 0x3;
  678|       |
  679|       |      /* LSBs decoding */
  680|  4.07M|      for (l = 0; l < lev; l++) {
  ------------------
  |  Branch (680:19): [True: 663k, False: 3.41M]
  ------------------
  681|   663k|        {
  682|   663k|          int pidx = (a == 0) ? 1 : ((b == 0) ? 0 : 2);
  ------------------
  |  Branch (682:22): [True: 142k, False: 521k]
  |  Branch (682:38): [True: 89.5k, False: 432k]
  ------------------
  683|   663k|          r = ari_decode_14bits(bbuf, &as, ari_lsb2[pidx], 4);
  684|   663k|        }
  685|   663k|        a = (a << 1) | (r & 1);
  686|   663k|        b = (b << 1) | (r >> 1);
  687|   663k|      }
  688|       |
  689|  3.41M|      pSpectralCoefficient[2 * i] = (FIXP_DBL)a;
  690|  3.41M|      pSpectralCoefficient[2 * i + 1] = (FIXP_DBL)b;
  691|       |
  692|  3.41M|      c_0 = a + b + 1;
  693|  3.41M|      if (c_0 > 0xF) {
  ------------------
  |  Branch (693:11): [True: 71.9k, False: 3.34M]
  ------------------
  694|  71.9k|        c_0 = 0xF;
  695|  71.9k|      }
  696|       |
  697|  3.41M|    } /* endif (r==0) */
  698|       |
  699|       |    /* arith_update_context */
  700|  8.10M|    c_3 = c_2;
  701|  8.10M|    c_2 = c_1;
  702|  8.10M|    c_1 = c_0;
  703|  8.10M|    c_prev[i] = (UCHAR)c_0;
  704|       |
  705|  8.10M|  } /* for (i=0; i<n; i++) */
  706|       |
  707|   266k|  FDKpushBack(bbuf, cbitsnew - 2);
  ------------------
  |  |  106|   266k|#define cbitsnew 16
  ------------------
  708|       |
  709|       |  /* We need to run only from 0 to i-1 since all other q[i][1].a,b will be
  710|       |   * cleared later */
  711|   266k|  int j = i;
  712|  8.36M|  for (i = 0; i < j; i++) {
  ------------------
  |  Branch (712:15): [True: 8.09M, False: 266k]
  ------------------
  713|  8.09M|    int bits = 0;
  714|  8.09M|    if (pSpectralCoefficient[2 * i] != (FIXP_DBL)0) bits++;
  ------------------
  |  Branch (714:9): [True: 2.54M, False: 5.55M]
  ------------------
  715|  8.09M|    if (pSpectralCoefficient[2 * i + 1] != (FIXP_DBL)0) bits++;
  ------------------
  |  Branch (715:9): [True: 2.33M, False: 5.75M]
  ------------------
  716|       |
  717|  8.09M|    if (bits) {
  ------------------
  |  Branch (717:9): [True: 3.41M, False: 4.68M]
  ------------------
  718|  3.41M|      r = FDKreadBits(bbuf, bits);
  719|  3.41M|      if (pSpectralCoefficient[2 * i] != (FIXP_DBL)0 && !(r >> (bits - 1))) {
  ------------------
  |  Branch (719:11): [True: 2.54M, False: 863k]
  |  Branch (719:57): [True: 1.62M, False: 921k]
  ------------------
  720|  1.62M|        pSpectralCoefficient[2 * i] = -pSpectralCoefficient[2 * i];
  721|  1.62M|      }
  722|  3.41M|      if (pSpectralCoefficient[2 * i + 1] != (FIXP_DBL)0 && !(r & 1)) {
  ------------------
  |  Branch (722:11): [True: 2.33M, False: 1.07M]
  |  Branch (722:61): [True: 1.56M, False: 769k]
  ------------------
  723|  1.56M|        pSpectralCoefficient[2 * i + 1] = -pSpectralCoefficient[2 * i + 1];
  724|  1.56M|      }
  725|  3.41M|    }
  726|  8.09M|  }
  727|       |
  728|   266k|  FDKmemset(&c_prev[i], 1, sizeof(c_prev[0]) * (nt - i));
  729|       |
  730|   266k|  return ErrorStatus;
  731|   266k|}
ac_arith_coder.cpp:_ZL9get_pk_v2j:
  576|  8.89M|static inline ULONG get_pk_v2(ULONG s) {
  577|  8.89M|  const ULONG *p = ari_merged_hash_ps;
  578|  8.89M|  ULONG s12 = (fMax((UINT)s, (UINT)1) << 12) - 1;
  ------------------
  |  |  182|  8.89M|#define ULONG UINT
  ------------------
  579|  8.89M|  if (s12 > p[485]) {
  ------------------
  |  Branch (579:7): [True: 4.89M, False: 4.00M]
  ------------------
  580|  4.89M|    p += 486; /* 742 - 256 = 486 */
  581|  4.89M|  } else {
  582|  4.00M|    if (s12 > p[255]) p += 256;
  ------------------
  |  Branch (582:9): [True: 115k, False: 3.88M]
  ------------------
  583|  4.00M|  }
  584|       |
  585|  8.89M|  if (s12 > p[127]) {
  ------------------
  |  Branch (585:7): [True: 409k, False: 8.48M]
  ------------------
  586|   409k|    p += 128;
  587|   409k|  }
  588|  8.89M|  if (s12 > p[63]) {
  ------------------
  |  Branch (588:7): [True: 955k, False: 7.93M]
  ------------------
  589|   955k|    p += 64;
  590|   955k|  }
  591|  8.89M|  if (s12 > p[31]) {
  ------------------
  |  Branch (591:7): [True: 1.02M, False: 7.86M]
  ------------------
  592|  1.02M|    p += 32;
  593|  1.02M|  }
  594|  8.89M|  if (s12 > p[15]) {
  ------------------
  |  Branch (594:7): [True: 4.76M, False: 4.13M]
  ------------------
  595|  4.76M|    p += 16;
  596|  4.76M|  }
  597|  8.89M|  if (s12 > p[7]) {
  ------------------
  |  Branch (597:7): [True: 1.27M, False: 7.61M]
  ------------------
  598|  1.27M|    p += 8;
  599|  1.27M|  }
  600|  8.89M|  if (s12 > p[3]) {
  ------------------
  |  Branch (600:7): [True: 4.94M, False: 3.94M]
  ------------------
  601|  4.94M|    p += 4;
  602|  4.94M|  }
  603|  8.89M|  if (s12 > p[1]) {
  ------------------
  |  Branch (603:7): [True: 5.39M, False: 3.49M]
  ------------------
  604|  5.39M|    p += 2;
  605|  5.39M|  }
  606|  8.89M|  ULONG j = p[0];
  ------------------
  |  |  182|  8.89M|#define ULONG UINT
  ------------------
  607|  8.89M|  if (s12 > j) j = p[1];
  ------------------
  |  Branch (607:7): [True: 4.13M, False: 4.76M]
  ------------------
  608|  8.89M|  if (s != (j >> 12)) j >>= 6;
  ------------------
  |  Branch (608:7): [True: 4.68M, False: 4.20M]
  ------------------
  609|  8.89M|  return (j & 0x3F);
  610|  8.89M|}
ac_arith_coder.cpp:_ZL17ari_decode_14bitsP13FDK_BITSTREAMP6TastatPKsi:
  432|  9.55M|                                    const SHORT *RESTRICT c_freq, int cfl) {
  433|  9.55M|  INT symbol;
  434|  9.55M|  INT low, high, range, value;
  435|  9.55M|  INT c;
  436|  9.55M|  const SHORT *p;
  437|       |
  438|  9.55M|  low = s->low;
  439|  9.55M|  high = s->high;
  440|  9.55M|  value = s->vobf;
  441|       |
  442|  9.55M|  range = high - low + 1;
  443|  9.55M|  c = (((int)(value - low + 1)) << stat_bitsnew) - ((int)1);
  ------------------
  |  |  107|  9.55M|#define stat_bitsnew 14
  ------------------
  444|  9.55M|  p = (const SHORT *)(c_freq - 1);
  445|       |
  446|  9.55M|  if (cfl == (VAL_ESC + 1)) {
  ------------------
  |  |  113|  9.55M|#define VAL_ESC 16
  ------------------
  |  Branch (446:7): [True: 8.89M, False: 663k]
  ------------------
  447|       |    /* In 50% of all cases, the first entry is the right one, so we check it
  448|       |     * prior to all others */
  449|  8.89M|    if ((p[1] * range) > c) {
  ------------------
  |  Branch (449:9): [True: 4.14M, False: 4.74M]
  ------------------
  450|  4.14M|      p += 1;
  451|  4.14M|      if ((p[8] * range) > c) {
  ------------------
  |  Branch (451:11): [True: 1.25M, False: 2.89M]
  ------------------
  452|  1.25M|        p += 8;
  453|  1.25M|      }
  454|  4.14M|      if ((p[4] * range) > c) {
  ------------------
  |  Branch (454:11): [True: 1.91M, False: 2.23M]
  ------------------
  455|  1.91M|        p += 4;
  456|  1.91M|      }
  457|  4.14M|      if ((p[2] * range) > c) {
  ------------------
  |  Branch (457:11): [True: 1.90M, False: 2.24M]
  ------------------
  458|  1.90M|        p += 2;
  459|  1.90M|      }
  460|  4.14M|      if ((p[1] * range) > c) {
  ------------------
  |  Branch (460:11): [True: 2.11M, False: 2.03M]
  ------------------
  461|  2.11M|        p += 1;
  462|  2.11M|      }
  463|  4.14M|    }
  464|  8.89M|  } else if (cfl == 4) {
  ------------------
  |  Branch (464:14): [True: 663k, False: 0]
  ------------------
  465|   663k|    if ((p[2] * range) > c) {
  ------------------
  |  Branch (465:9): [True: 249k, False: 414k]
  ------------------
  466|   249k|      p += 2;
  467|   249k|    }
  468|   663k|    if ((p[1] * range) > c) {
  ------------------
  |  Branch (468:9): [True: 334k, False: 329k]
  ------------------
  469|   334k|      p += 1;
  470|   334k|    }
  471|   663k|  } else if (cfl == 2) {
  ------------------
  |  Branch (471:14): [True: 0, False: 0]
  ------------------
  472|      0|    if ((p[1] * range) > c) {
  ------------------
  |  Branch (472:9): [True: 0, False: 0]
  ------------------
  473|      0|      p += 1;
  474|      0|    }
  475|      0|  } else if (cfl == 27) {
  ------------------
  |  Branch (475:14): [True: 0, False: 0]
  ------------------
  476|      0|    const SHORT *p_24 = p + 24;
  477|       |
  478|      0|    if ((p[16] * range) > c) {
  ------------------
  |  Branch (478:9): [True: 0, False: 0]
  ------------------
  479|      0|      p += 16;
  480|      0|    }
  481|      0|    if ((p[8] * range) > c) {
  ------------------
  |  Branch (481:9): [True: 0, False: 0]
  ------------------
  482|      0|      p += 8;
  483|      0|    }
  484|      0|    if (p != p_24) {
  ------------------
  |  Branch (484:9): [True: 0, False: 0]
  ------------------
  485|      0|      if ((p[4] * range) > c) {
  ------------------
  |  Branch (485:11): [True: 0, False: 0]
  ------------------
  486|      0|        p += 4;
  487|      0|      }
  488|      0|    }
  489|      0|    if ((p[2] * range) > c) {
  ------------------
  |  Branch (489:9): [True: 0, False: 0]
  ------------------
  490|      0|      p += 2;
  491|      0|    }
  492|       |
  493|      0|    if (p != &p_24[2]) {
  ------------------
  |  Branch (493:9): [True: 0, False: 0]
  ------------------
  494|      0|      if ((p[1] * range) > c) {
  ------------------
  |  Branch (494:11): [True: 0, False: 0]
  ------------------
  495|      0|        p += 1;
  496|      0|      }
  497|      0|    }
  498|      0|  }
  499|       |
  500|  9.55M|  symbol = (INT)(p - (const SHORT *)(c_freq - 1));
  501|       |
  502|  9.55M|  if (symbol) {
  ------------------
  |  Branch (502:7): [True: 4.59M, False: 4.96M]
  ------------------
  503|  4.59M|    high = low + mul_sbc_14bits(range, c_freq[symbol - 1]) - 1;
  504|  4.59M|  }
  505|       |
  506|  9.55M|  low += mul_sbc_14bits(range, c_freq[symbol]);
  507|       |
  508|  9.55M|  USHORT us_high = (USHORT)high;
  509|  9.55M|  USHORT us_low = (USHORT)low;
  510|  27.4M|  while (1) {
  ------------------
  |  Branch (510:10): [True: 27.4M, Folded]
  ------------------
  511|  27.4M|    if (us_high & 0x8000) {
  ------------------
  |  Branch (511:9): [True: 22.2M, False: 5.29M]
  ------------------
  512|  22.2M|      if (!(us_low & 0x8000)) {
  ------------------
  |  Branch (512:11): [True: 17.7M, False: 4.44M]
  ------------------
  513|  17.7M|        if (us_low & 0x4000 && !(us_high & 0x4000)) {
  ------------------
  |  Branch (513:13): [True: 12.0M, False: 5.71M]
  |  Branch (513:32): [True: 8.20M, False: 3.84M]
  ------------------
  514|  8.20M|          us_low -= 0x4000;
  515|  8.20M|          us_high -= 0x4000;
  516|  8.20M|          value -= 0x4000;
  517|  8.20M|        } else
  518|  9.55M|          break;
  519|  17.7M|      }
  520|  22.2M|    }
  521|  17.9M|    us_low = us_low << 1;
  522|  17.9M|    us_high = (us_high << 1) | 1;
  523|  17.9M|    value = (value << 1) | FDKreadBit(hBs);
  524|  17.9M|  }
  525|  9.55M|  s->low = (int)us_low;
  526|  9.55M|  s->high = (int)us_high;
  527|  9.55M|  s->vobf = value & 0xFFFF;
  528|       |
  529|  9.55M|  return symbol;
  530|  9.55M|}
ac_arith_coder.cpp:_ZL14mul_sbc_14bitsii:
  427|  14.1M|static inline INT mul_sbc_14bits(INT r, INT c) {
  428|  14.1M|  return (((INT)r) * ((INT)c)) >> stat_bitsnew;
  ------------------
  |  |  107|  14.1M|#define stat_bitsnew 14
  ------------------
  429|  14.1M|}

FDK_drcDec_Open:
  216|  21.8k|                const DRC_DEC_FUNCTIONAL_RANGE functionalRange) {
  217|  21.8k|  DRC_ERROR dErr = DE_OK;
  218|  21.8k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  219|  21.8k|  HANDLE_DRC_DECODER hDrcDec;
  220|       |
  221|  21.8k|  *phDrcDec = (HANDLE_DRC_DECODER)FDKcalloc(1, sizeof(DRC_DECODER));
  222|  21.8k|  if (!*phDrcDec) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (222:7): [True: 0, False: 21.8k]
  ------------------
  223|  21.8k|  hDrcDec = *phDrcDec;
  224|       |
  225|  21.8k|  hDrcDec->functionalRange = functionalRange;
  226|       |
  227|  21.8k|  hDrcDec->status = DRC_DEC_NOT_INITIALIZED;
  228|  21.8k|  hDrcDec->codecMode = DRC_DEC_CODEC_MODE_UNDEFINED;
  229|       |
  230|  21.8k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (230:7): [True: 21.8k, False: 0]
  ------------------
  231|  21.8k|    sErr = drcDec_SelectionProcess_Create(&(hDrcDec->hSelectionProc));
  232|  21.8k|    if (sErr) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (232:9): [True: 0, False: 21.8k]
  ------------------
  233|  21.8k|    sErr = drcDec_SelectionProcess_Init(hDrcDec->hSelectionProc);
  234|  21.8k|    if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (234:9): [True: 0, False: 21.8k]
  ------------------
  235|  21.8k|    hDrcDec->selProcInputDiff = 1;
  236|  21.8k|  }
  237|       |
  238|  21.8k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (238:7): [True: 21.8k, False: 0]
  ------------------
  239|  21.8k|    dErr = drcDec_GainDecoder_Open(&(hDrcDec->hGainDec));
  240|  21.8k|    if (dErr) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (240:9): [True: 0, False: 21.8k]
  ------------------
  241|  21.8k|  }
  242|       |
  243|  21.8k|  return DRC_DEC_OK;
  244|  21.8k|}
FDK_drcDec_SetCodecMode:
  248|   545k|                        const DRC_DEC_CODEC_MODE codecMode) {
  249|   545k|  DRC_ERROR dErr = DE_OK;
  250|   545k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  251|       |
  252|   545k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (252:7): [True: 0, False: 545k]
  ------------------
  253|       |
  254|   545k|  if (hDrcDec->codecMode ==
  ------------------
  |  Branch (254:7): [True: 12.6k, False: 533k]
  ------------------
  255|   545k|      DRC_DEC_CODEC_MODE_UNDEFINED) { /* Set codec mode, if it is set for the
  256|       |                                         first time */
  257|  12.6k|    hDrcDec->codecMode = codecMode;
  258|       |
  259|  12.6k|    if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (259:9): [True: 12.6k, False: 0]
  ------------------
  260|  12.6k|      sErr = drcDec_SelectionProcess_SetCodecMode(
  261|  12.6k|          hDrcDec->hSelectionProc, (SEL_PROC_CODEC_MODE)codecMode);
  262|  12.6k|      if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (262:11): [True: 0, False: 12.6k]
  ------------------
  263|  12.6k|      hDrcDec->selProcInputDiff = 1;
  264|  12.6k|    }
  265|       |
  266|  12.6k|    if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (266:9): [True: 12.6k, False: 0]
  ------------------
  267|  12.6k|      DELAY_MODE delayMode;
  268|  12.6k|      int timeDomainSupported;
  269|  12.6k|      SUBBAND_DOMAIN_MODE subbandDomainSupported;
  270|       |
  271|  12.6k|      switch (hDrcDec->codecMode) {
  272|      0|        case DRC_DEC_MPEG_4_AAC:
  ------------------
  |  Branch (272:9): [True: 0, False: 12.6k]
  ------------------
  273|  12.6k|        case DRC_DEC_MPEG_D_USAC:
  ------------------
  |  Branch (273:9): [True: 12.6k, False: 0]
  ------------------
  274|  12.6k|        case DRC_DEC_MPEG_H_3DA:
  ------------------
  |  Branch (274:9): [True: 0, False: 12.6k]
  ------------------
  275|  12.6k|        default:
  ------------------
  |  Branch (275:9): [True: 0, False: 12.6k]
  ------------------
  276|  12.6k|          delayMode = DM_REGULAR_DELAY;
  277|  12.6k|      }
  278|       |
  279|  12.6k|      switch (hDrcDec->codecMode) {
  280|      0|        case DRC_DEC_MPEG_4_AAC:
  ------------------
  |  Branch (280:9): [True: 0, False: 12.6k]
  ------------------
  281|  12.6k|        case DRC_DEC_MPEG_D_USAC:
  ------------------
  |  Branch (281:9): [True: 12.6k, False: 0]
  ------------------
  282|  12.6k|          timeDomainSupported = 1;
  283|  12.6k|          subbandDomainSupported = SDM_OFF;
  284|  12.6k|          break;
  285|      0|        case DRC_DEC_MPEG_H_3DA:
  ------------------
  |  Branch (285:9): [True: 0, False: 12.6k]
  ------------------
  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: 12.6k]
  ------------------
  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: 12.6k]
  ------------------
  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: 12.6k]
  ------------------
  299|      0|          timeDomainSupported = 0;
  300|      0|          subbandDomainSupported = SDM_STFT256;
  301|      0|          break;
  302|       |
  303|      0|        default:
  ------------------
  |  Branch (303:9): [True: 0, False: 12.6k]
  ------------------
  304|      0|          timeDomainSupported = 0;
  305|      0|          subbandDomainSupported = SDM_OFF;
  306|  12.6k|      }
  307|       |
  308|  12.6k|      dErr = drcDec_GainDecoder_SetCodecDependentParameters(
  309|  12.6k|          hDrcDec->hGainDec, delayMode, timeDomainSupported,
  310|  12.6k|          subbandDomainSupported);
  311|  12.6k|      if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (311:11): [True: 0, False: 12.6k]
  ------------------
  312|  12.6k|    }
  313|  12.6k|  }
  314|       |
  315|       |  /* Don't allow changing codecMode if it has already been set. */
  316|   545k|  if (hDrcDec->codecMode != codecMode) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (316:7): [True: 0, False: 545k]
  ------------------
  317|       |
  318|   545k|  return DRC_DEC_OK;
  319|   545k|}
FDK_drcDec_Init:
  323|   299k|                const int sampleRate, const int baseChannelCount) {
  324|   299k|  DRC_ERROR dErr = DE_OK;
  325|   299k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  326|       |
  327|   299k|  if (hDrcDec == NULL || frameSize == 0 || sampleRate == 0 ||
  ------------------
  |  Branch (327:7): [True: 0, False: 299k]
  |  Branch (327:26): [True: 196, False: 298k]
  |  Branch (327:44): [True: 0, False: 298k]
  ------------------
  328|   298k|      baseChannelCount == 0)
  ------------------
  |  Branch (328:7): [True: 0, False: 298k]
  ------------------
  329|    196|    return DRC_DEC_OK; /* return without doing anything */
  330|       |
  331|   298k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (331:7): [True: 298k, False: 0]
  ------------------
  332|   298k|    sErr = drcDec_SelectionProcess_SetParam(
  333|   298k|        hDrcDec->hSelectionProc, SEL_PROC_BASE_CHANNEL_COUNT,
  334|   298k|        (FIXP_DBL)baseChannelCount, &(hDrcDec->selProcInputDiff));
  335|   298k|    if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (335:9): [True: 0, False: 298k]
  ------------------
  336|   298k|    sErr = drcDec_SelectionProcess_SetParam(
  337|   298k|        hDrcDec->hSelectionProc, SEL_PROC_SAMPLE_RATE, (FIXP_DBL)sampleRate,
  338|   298k|        &(hDrcDec->selProcInputDiff));
  339|   298k|    if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (339:9): [True: 0, False: 298k]
  ------------------
  340|   298k|  }
  341|       |
  342|   298k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (342:7): [True: 298k, False: 0]
  ------------------
  343|   298k|    dErr = drcDec_GainDecoder_SetParam(hDrcDec->hGainDec, GAIN_DEC_FRAME_SIZE,
  344|   298k|                                       frameSize);
  345|   298k|    if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (345:9): [True: 0, False: 298k]
  ------------------
  346|   298k|    dErr = drcDec_GainDecoder_SetParam(hDrcDec->hGainDec, GAIN_DEC_SAMPLE_RATE,
  347|   298k|                                       sampleRate);
  348|   298k|    if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (348:9): [True: 0, False: 298k]
  ------------------
  349|   298k|    dErr = drcDec_GainDecoder_Init(hDrcDec->hGainDec);
  350|   298k|    if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (350:9): [True: 0, False: 298k]
  ------------------
  351|   298k|  }
  352|       |
  353|   298k|  hDrcDec->status = DRC_DEC_INITIALIZED;
  354|       |
  355|   298k|  startSelectionProcess(hDrcDec);
  356|       |
  357|   298k|  return DRC_DEC_OK;
  358|   298k|}
FDK_drcDec_Close:
  361|  21.8k|FDK_drcDec_Close(HANDLE_DRC_DECODER* phDrcDec) {
  362|  21.8k|  HANDLE_DRC_DECODER hDrcDec;
  363|       |
  364|  21.8k|  if (phDrcDec == NULL) {
  ------------------
  |  Branch (364:7): [True: 0, False: 21.8k]
  ------------------
  365|      0|    return DRC_DEC_OK;
  366|      0|  }
  367|       |
  368|  21.8k|  hDrcDec = *phDrcDec;
  369|       |
  370|  21.8k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (370:7): [True: 0, False: 21.8k]
  ------------------
  371|       |
  372|  21.8k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (372:7): [True: 21.8k, False: 0]
  ------------------
  373|  21.8k|    drcDec_GainDecoder_Close(&(hDrcDec->hGainDec));
  374|  21.8k|  }
  375|       |
  376|  21.8k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (376:7): [True: 21.8k, False: 0]
  ------------------
  377|  21.8k|    drcDec_SelectionProcess_Delete(&(hDrcDec->hSelectionProc));
  378|  21.8k|  }
  379|       |
  380|  21.8k|  FDKfree(*phDrcDec);
  381|  21.8k|  *phDrcDec = NULL;
  382|       |
  383|  21.8k|  return DRC_DEC_OK;
  384|  21.8k|}
FDK_drcDec_SetParam:
  389|  46.3k|                    const FIXP_DBL requestValue) {
  390|  46.3k|  DRC_ERROR dErr = DE_OK;
  391|  46.3k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  392|  46.3k|  int invalidParameter = 0;
  393|       |
  394|  46.3k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (394:7): [True: 0, False: 46.3k]
  ------------------
  395|       |
  396|  46.3k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (396:7): [True: 46.3k, False: 0]
  ------------------
  397|  46.3k|    switch (requestType) {
  398|  15.4k|      case DRC_DEC_SAMPLE_RATE:
  ------------------
  |  Branch (398:7): [True: 15.4k, False: 30.9k]
  ------------------
  399|  15.4k|        dErr = drcDec_GainDecoder_SetParam(
  400|  15.4k|            hDrcDec->hGainDec, GAIN_DEC_SAMPLE_RATE, (int)requestValue);
  401|  15.4k|        if (dErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (401:13): [True: 0, False: 15.4k]
  ------------------
  402|  15.4k|        break;
  403|  15.4k|      case DRC_DEC_FRAME_SIZE:
  ------------------
  |  Branch (403:7): [True: 15.4k, False: 30.9k]
  ------------------
  404|  15.4k|        dErr = drcDec_GainDecoder_SetParam(
  405|  15.4k|            hDrcDec->hGainDec, GAIN_DEC_FRAME_SIZE, (int)requestValue);
  406|  15.4k|        if (dErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (406:13): [True: 0, False: 15.4k]
  ------------------
  407|  15.4k|        break;
  408|  15.4k|      default:
  ------------------
  |  Branch (408:7): [True: 15.4k, False: 30.9k]
  ------------------
  409|  15.4k|        invalidParameter |= DRC_DEC_GAIN;
  410|  46.3k|    }
  411|  46.3k|  }
  412|       |
  413|  46.3k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (413:7): [True: 46.3k, False: 0]
  ------------------
  414|  46.3k|    switch (requestType) {
  415|      0|      case DRC_DEC_BOOST:
  ------------------
  |  Branch (415:7): [True: 0, False: 46.3k]
  ------------------
  416|      0|        sErr = drcDec_SelectionProcess_SetParam(hDrcDec->hSelectionProc,
  417|      0|                                                SEL_PROC_BOOST, requestValue,
  418|      0|                                                &(hDrcDec->selProcInputDiff));
  419|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (419:13): [True: 0, False: 0]
  ------------------
  420|      0|        break;
  421|      0|      case DRC_DEC_COMPRESS:
  ------------------
  |  Branch (421:7): [True: 0, False: 46.3k]
  ------------------
  422|      0|        sErr = drcDec_SelectionProcess_SetParam(hDrcDec->hSelectionProc,
  423|      0|                                                SEL_PROC_COMPRESS, requestValue,
  424|      0|                                                &(hDrcDec->selProcInputDiff));
  425|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (425:13): [True: 0, False: 0]
  ------------------
  426|      0|        break;
  427|      0|      case DRC_DEC_LOUDNESS_NORMALIZATION_ON:
  ------------------
  |  Branch (427:7): [True: 0, False: 46.3k]
  ------------------
  428|      0|        sErr = drcDec_SelectionProcess_SetParam(
  429|      0|            hDrcDec->hSelectionProc, SEL_PROC_LOUDNESS_NORMALIZATION_ON,
  430|      0|            requestValue, &(hDrcDec->selProcInputDiff));
  431|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (431:13): [True: 0, False: 0]
  ------------------
  432|      0|        break;
  433|  15.4k|      case DRC_DEC_TARGET_LOUDNESS:
  ------------------
  |  Branch (433:7): [True: 15.4k, False: 30.9k]
  ------------------
  434|  15.4k|        sErr = drcDec_SelectionProcess_SetParam(
  435|  15.4k|            hDrcDec->hSelectionProc, SEL_PROC_TARGET_LOUDNESS, requestValue,
  436|  15.4k|            &(hDrcDec->selProcInputDiff));
  437|  15.4k|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (437:13): [True: 0, False: 15.4k]
  ------------------
  438|  15.4k|        break;
  439|  15.4k|      case DRC_DEC_EFFECT_TYPE:
  ------------------
  |  Branch (439:7): [True: 0, False: 46.3k]
  ------------------
  440|      0|        sErr = drcDec_SelectionProcess_SetParam(
  441|      0|            hDrcDec->hSelectionProc, SEL_PROC_EFFECT_TYPE, requestValue,
  442|      0|            &(hDrcDec->selProcInputDiff));
  443|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (443:13): [True: 0, False: 0]
  ------------------
  444|      0|        break;
  445|      0|      case DRC_DEC_DOWNMIX_ID:
  ------------------
  |  Branch (445:7): [True: 0, False: 46.3k]
  ------------------
  446|      0|        sErr = drcDec_SelectionProcess_SetParam(
  447|      0|            hDrcDec->hSelectionProc, SEL_PROC_DOWNMIX_ID, requestValue,
  448|      0|            &(hDrcDec->selProcInputDiff));
  449|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (449:13): [True: 0, False: 0]
  ------------------
  450|      0|        break;
  451|      0|      case DRC_DEC_TARGET_CHANNEL_COUNT_REQUESTED:
  ------------------
  |  Branch (451:7): [True: 0, False: 46.3k]
  ------------------
  452|      0|        sErr = drcDec_SelectionProcess_SetParam(
  453|      0|            hDrcDec->hSelectionProc, SEL_PROC_TARGET_CHANNEL_COUNT,
  454|      0|            requestValue, &(hDrcDec->selProcInputDiff));
  455|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (455:13): [True: 0, False: 0]
  ------------------
  456|      0|        break;
  457|      0|      case DRC_DEC_BASE_CHANNEL_COUNT:
  ------------------
  |  Branch (457:7): [True: 0, False: 46.3k]
  ------------------
  458|      0|        sErr = drcDec_SelectionProcess_SetParam(
  459|      0|            hDrcDec->hSelectionProc, SEL_PROC_BASE_CHANNEL_COUNT, requestValue,
  460|      0|            &(hDrcDec->selProcInputDiff));
  461|      0|        if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (461:13): [True: 0, False: 0]
  ------------------
  462|      0|        break;
  463|      0|      case DRC_DEC_LOUDNESS_MEASUREMENT_METHOD:
  ------------------
  |  Branch (463:7): [True: 0, False: 46.3k]
  ------------------
  464|      0|        sErr = drcDec_SelectionProcess_SetParam(
  465|      0|            hDrcDec->hSelectionProc, SEL_PROC_LOUDNESS_MEASUREMENT_METHOD,
  466|      0|            requestValue, &(hDrcDec->selProcInputDiff));
  467|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (467:13): [True: 0, False: 0]
  ------------------
  468|      0|        break;
  469|      0|      case DRC_DEC_ALBUM_MODE:
  ------------------
  |  Branch (469:7): [True: 0, False: 46.3k]
  ------------------
  470|      0|        sErr = drcDec_SelectionProcess_SetParam(
  471|      0|            hDrcDec->hSelectionProc, SEL_PROC_ALBUM_MODE, requestValue,
  472|      0|            &(hDrcDec->selProcInputDiff));
  473|      0|        if (sErr) return DRC_DEC_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (473:13): [True: 0, False: 0]
  ------------------
  474|      0|        break;
  475|  30.9k|      default:
  ------------------
  |  Branch (475:7): [True: 30.9k, False: 15.4k]
  ------------------
  476|  30.9k|        invalidParameter |= DRC_DEC_SELECTION;
  477|  46.3k|    }
  478|  46.3k|  }
  479|       |
  480|  46.3k|  if (invalidParameter == hDrcDec->functionalRange)
  ------------------
  |  Branch (480:7): [True: 0, False: 46.3k]
  ------------------
  481|      0|    return DRC_DEC_INVALID_PARAM;
  482|       |
  483|       |  /* All parameters need a new start of the selection process */
  484|  46.3k|  startSelectionProcess(hDrcDec);
  485|       |
  486|  46.3k|  return DRC_DEC_OK;
  487|  46.3k|}
FDK_drcDec_GetParam:
  490|   713k|                         const DRC_DEC_USERPARAM requestType) {
  491|   713k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (491:7): [True: 0, False: 713k]
  ------------------
  492|       |
  493|   713k|  switch (requestType) {
  494|      0|    case DRC_DEC_BOOST:
  ------------------
  |  Branch (494:5): [True: 0, False: 713k]
  ------------------
  495|      0|      return (LONG)hDrcDec->selProcOutput.boost;
  496|      0|    case DRC_DEC_COMPRESS:
  ------------------
  |  Branch (496:5): [True: 0, False: 713k]
  ------------------
  497|      0|      return (LONG)hDrcDec->selProcOutput.compress;
  498|      0|    case DRC_DEC_IS_MULTIBAND_DRC_1:
  ------------------
  |  Branch (498:5): [True: 0, False: 713k]
  ------------------
  499|      0|      return (LONG)bitstreamContainsMultibandDrc(&hDrcDec->uniDrcConfig, 0);
  500|      0|    case DRC_DEC_IS_MULTIBAND_DRC_2:
  ------------------
  |  Branch (500:5): [True: 0, False: 713k]
  ------------------
  501|      0|      return (LONG)bitstreamContainsMultibandDrc(&hDrcDec->uniDrcConfig, 0x7F);
  502|   695k|    case DRC_DEC_IS_ACTIVE: {
  ------------------
  |  Branch (502:5): [True: 695k, False: 17.9k]
  ------------------
  503|       |      /* MPEG-D DRC is considered active (and overrides MPEG-4 DRC), if
  504|       |       * uniDrc payload is present (loudnessInfoSet and/or uniDrcConfig)
  505|       |       * at least one of DRC and Loudness Control is switched on */
  506|   695k|      int drcOn = drcDec_SelectionProcess_GetParam(
  507|   695k|          hDrcDec->hSelectionProc, SEL_PROC_DYNAMIC_RANGE_CONTROL_ON);
  508|   695k|      int lnOn = drcDec_SelectionProcess_GetParam(
  509|   695k|          hDrcDec->hSelectionProc, SEL_PROC_LOUDNESS_NORMALIZATION_ON);
  510|   695k|      int uniDrcPayloadPresent =
  511|   695k|          (hDrcDec->loudnessInfoSet.loudnessInfoCount > 0);
  512|   695k|      uniDrcPayloadPresent |=
  513|   695k|          (hDrcDec->loudnessInfoSet.loudnessInfoAlbumCount > 0);
  514|   695k|      uniDrcPayloadPresent |=
  515|   695k|          (hDrcDec->uniDrcConfig.drcInstructionsUniDrcCount > 0);
  516|   695k|      uniDrcPayloadPresent |=
  517|   695k|          (hDrcDec->uniDrcConfig.downmixInstructionsCount > 0);
  518|   695k|      return (LONG)(uniDrcPayloadPresent && (drcOn || lnOn));
  ------------------
  |  Branch (518:21): [True: 35.9k, False: 659k]
  |  Branch (518:46): [True: 35.9k, False: 0]
  |  Branch (518:55): [True: 0, False: 0]
  ------------------
  519|      0|    }
  520|      0|    case DRC_DEC_TARGET_CHANNEL_COUNT_SELECTED:
  ------------------
  |  Branch (520:5): [True: 0, False: 713k]
  ------------------
  521|      0|      return (LONG)hDrcDec->selProcOutput.targetChannelCount;
  522|  17.9k|    case DRC_DEC_OUTPUT_LOUDNESS:
  ------------------
  |  Branch (522:5): [True: 17.9k, False: 695k]
  ------------------
  523|  17.9k|      return (LONG)hDrcDec->selProcOutput.outputLoudness;
  524|      0|    default:
  ------------------
  |  Branch (524:5): [True: 0, False: 713k]
  ------------------
  525|      0|      return 0;
  526|   713k|  }
  527|   713k|}
FDK_drcDec_SetChannelGains:
  569|  15.4k|                                const int audioBufferChannelOffset) {
  570|  15.4k|  int err;
  571|       |
  572|  15.4k|  if (hDrcDec == NULL) return;
  ------------------
  |  Branch (572:7): [True: 0, False: 15.4k]
  ------------------
  573|       |
  574|  15.4k|  err = drcDec_GainDecoder_SetLoudnessNormalizationGainDb(
  575|  15.4k|      hDrcDec->hGainDec, hDrcDec->selProcOutput.loudnessNormalizationGainDb);
  576|  15.4k|  if (err) return;
  ------------------
  |  Branch (576:7): [True: 0, False: 15.4k]
  ------------------
  577|       |
  578|  15.4k|  drcDec_GainDecoder_SetChannelGains(hDrcDec->hGainDec, numChannels, frameSize,
  579|  15.4k|                                     channelGainDb, audioBufferChannelOffset,
  580|  15.4k|                                     audioBuffer);
  581|  15.4k|}
FDK_drcDec_ReadUniDrcConfig:
  585|   346k|                            HANDLE_FDK_BITSTREAM hBitstream) {
  586|   346k|  DRC_ERROR dErr = DE_OK;
  587|       |
  588|   346k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (588:7): [True: 0, False: 346k]
  ------------------
  589|       |
  590|   346k|  if (hDrcDec->codecMode == DRC_DEC_MPEG_D_USAC) {
  ------------------
  |  Branch (590:7): [True: 346k, False: 0]
  ------------------
  591|   346k|    dErr = drcDec_readUniDrcConfig(hBitstream, &(hDrcDec->uniDrcConfig));
  592|   346k|  } else
  593|      0|    return DRC_DEC_NOT_OK;
  594|       |
  595|   346k|  if (dErr) {
  ------------------
  |  Branch (595:7): [True: 110k, False: 235k]
  ------------------
  596|       |    /* clear config, if parsing error occured */
  597|   110k|    FDKmemclear(&hDrcDec->uniDrcConfig, sizeof(hDrcDec->uniDrcConfig));
  598|   110k|    hDrcDec->uniDrcConfig.diff = 1;
  599|   110k|  }
  600|       |
  601|   346k|  startSelectionProcess(hDrcDec);
  602|       |
  603|   346k|  return DRC_DEC_OK;
  604|   346k|}
FDK_drcDec_ReadLoudnessInfoSet:
  680|   199k|                               HANDLE_FDK_BITSTREAM hBitstream) {
  681|   199k|  DRC_ERROR dErr = DE_OK;
  682|       |
  683|   199k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (683:7): [True: 0, False: 199k]
  ------------------
  684|       |
  685|   199k|  if (hDrcDec->codecMode == DRC_DEC_MPEG_D_USAC) {
  ------------------
  |  Branch (685:7): [True: 199k, False: 0]
  ------------------
  686|   199k|    dErr = drcDec_readLoudnessInfoSet(hBitstream, &(hDrcDec->loudnessInfoSet));
  687|   199k|  } else
  688|      0|    return DRC_DEC_NOT_OK;
  689|       |
  690|   199k|  if (dErr) {
  ------------------
  |  Branch (690:7): [True: 7.58k, False: 192k]
  ------------------
  691|       |    /* clear config, if parsing error occurred */
  692|  7.58k|    FDKmemclear(&hDrcDec->loudnessInfoSet, sizeof(hDrcDec->loudnessInfoSet));
  693|  7.58k|    hDrcDec->loudnessInfoSet.diff = 1;
  694|  7.58k|  }
  695|       |
  696|   199k|  startSelectionProcess(hDrcDec);
  697|       |
  698|   199k|  return DRC_DEC_OK;
  699|   199k|}
FDK_drcDec_ReadUniDrcGain:
  723|  6.65k|                          HANDLE_FDK_BITSTREAM hBitstream) {
  724|  6.65k|  DRC_ERROR dErr = DE_OK;
  725|       |
  726|  6.65k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (726:7): [True: 0, False: 6.65k]
  ------------------
  727|  6.65k|  if (!hDrcDec->status) {
  ------------------
  |  Branch (727:7): [True: 0, False: 6.65k]
  ------------------
  728|      0|    return DRC_DEC_OK;
  729|      0|  }
  730|       |
  731|  6.65k|  dErr = drcDec_readUniDrcGain(
  732|  6.65k|      hBitstream, &(hDrcDec->uniDrcConfig),
  733|  6.65k|      drcDec_GainDecoder_GetFrameSize(hDrcDec->hGainDec),
  734|  6.65k|      drcDec_GainDecoder_GetDeltaTminDefault(hDrcDec->hGainDec),
  735|  6.65k|      &(hDrcDec->uniDrcGain));
  736|  6.65k|  if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (736:7): [True: 300, False: 6.35k]
  ------------------
  737|       |
  738|  6.35k|  if (_getGainStatus(&(hDrcDec->uniDrcGain))) {
  ------------------
  |  Branch (738:7): [True: 6.06k, False: 297]
  ------------------
  739|  6.06k|    hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD;
  740|  6.06k|  }
  741|       |
  742|  6.35k|  return DRC_DEC_OK;
  743|  6.65k|}
FDK_drcDec_Preprocess:
  770|  15.4k|FDK_drcDec_Preprocess(HANDLE_DRC_DECODER hDrcDec) {
  771|  15.4k|  DRC_ERROR dErr = DE_OK;
  772|       |
  773|  15.4k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (773:7): [True: 0, False: 15.4k]
  ------------------
  774|  15.4k|  if (!hDrcDec->status) return DRC_DEC_NOT_READY;
  ------------------
  |  Branch (774:7): [True: 0, False: 15.4k]
  ------------------
  775|  15.4k|  if (!(hDrcDec->functionalRange & DRC_DEC_GAIN)) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (775:7): [True: 0, False: 15.4k]
  ------------------
  776|       |
  777|  15.4k|  if (hDrcDec->status != DRC_DEC_NEW_GAIN_PAYLOAD) {
  ------------------
  |  Branch (777:7): [True: 8.89k, False: 6.56k]
  ------------------
  778|       |    /* no new gain payload was read, e.g. during concalment or flushing.
  779|       |       Generate DRC gains based on the stored DRC gains of last frames */
  780|  8.89k|    drcDec_GainDecoder_Conceal(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig),
  781|  8.89k|                               &(hDrcDec->uniDrcGain));
  782|  8.89k|  }
  783|       |
  784|  15.4k|  dErr = drcDec_GainDecoder_Preprocess(
  785|  15.4k|      hDrcDec->hGainDec, &(hDrcDec->uniDrcGain),
  786|  15.4k|      hDrcDec->selProcOutput.loudnessNormalizationGainDb,
  787|  15.4k|      hDrcDec->selProcOutput.boost, hDrcDec->selProcOutput.compress);
  788|  15.4k|  if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (788:7): [True: 746, False: 14.7k]
  ------------------
  789|  14.7k|  hDrcDec->status = DRC_DEC_INTERPOLATION_PREPARED;
  790|       |
  791|  14.7k|  return DRC_DEC_OK;
  792|  15.4k|}
FDK_drcDec_ProcessTime:
  799|  30.9k|                       const int timeDataChannelOffset) {
  800|  30.9k|  DRC_ERROR dErr = DE_OK;
  801|       |
  802|  30.9k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (802:7): [True: 0, False: 30.9k]
  ------------------
  803|  30.9k|  if (!(hDrcDec->functionalRange & DRC_DEC_GAIN)) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (803:7): [True: 0, False: 30.9k]
  ------------------
  804|  30.9k|  if (hDrcDec->status != DRC_DEC_INTERPOLATION_PREPARED)
  ------------------
  |  Branch (804:7): [True: 1.49k, False: 29.4k]
  ------------------
  805|  1.49k|    return DRC_DEC_NOT_READY;
  806|       |
  807|  29.4k|  dErr = drcDec_GainDecoder_ProcessTimeDomain(
  808|  29.4k|      hDrcDec->hGainDec, delaySamples, (GAIN_DEC_LOCATION)drcLocation,
  809|  29.4k|      channelOffset, drcChannelOffset, numChannelsProcessed,
  810|  29.4k|      timeDataChannelOffset, realBuffer);
  811|  29.4k|  if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (811:7): [True: 1.47k, False: 27.9k]
  ------------------
  812|       |
  813|  27.9k|  return DRC_DEC_OK;
  814|  29.4k|}
FDK_drcDec_ApplyDownmix:
  842|  15.4k|                        int* pNChannels) {
  843|  15.4k|  SEL_PROC_OUTPUT* pSelProcOutput = &(hDrcDec->selProcOutput);
  844|  15.4k|  int baseChCnt = pSelProcOutput->baseChannelCount;
  845|  15.4k|  int targetChCnt = pSelProcOutput->targetChannelCount;
  846|  15.4k|  int frameSize, n, ic, oc;
  847|  15.4k|  FIXP_DBL tmp_out[8];
  848|  15.4k|  FIXP_DBL* audioChannels[8];
  849|       |
  850|  15.4k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (850:7): [True: 0, False: 15.4k]
  ------------------
  851|  15.4k|  if (!(hDrcDec->functionalRange & DRC_DEC_GAIN)) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (851:7): [True: 0, False: 15.4k]
  ------------------
  852|       |
  853|       |  /* only downmix is performed here, no upmix.
  854|       |     Downmix is only performed if downmix coefficients are provided.
  855|       |     All other cases of downmix and upmix are treated by pcmDmx library. */
  856|  15.4k|  if (pSelProcOutput->downmixMatrixPresent == 0)
  ------------------
  |  Branch (856:7): [True: 15.4k, False: 0]
  ------------------
  857|  15.4k|    return DRC_DEC_OK;                             /* no downmix */
  858|      0|  if (targetChCnt >= baseChCnt) return DRC_DEC_OK; /* downmix only */
  ------------------
  |  Branch (858:7): [True: 0, False: 0]
  ------------------
  859|       |
  860|       |  /* sanity checks */
  861|      0|  if (realBuffer == NULL) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (861:7): [True: 0, False: 0]
  ------------------
  862|      0|  if (reverseInChannelMap == NULL) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (862:7): [True: 0, False: 0]
  ------------------
  863|      0|  if (reverseOutChannelMap == NULL) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (863:7): [True: 0, False: 0]
  ------------------
  864|      0|  if (baseChCnt > 8) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (864:7): [True: 0, False: 0]
  ------------------
  865|      0|  if (baseChCnt != *pNChannels) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (865:7): [True: 0, False: 0]
  ------------------
  866|      0|  if (targetChCnt > 8) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (866:7): [True: 0, False: 0]
  ------------------
  867|       |
  868|      0|  frameSize = drcDec_GainDecoder_GetFrameSize(hDrcDec->hGainDec);
  869|       |
  870|      0|  for (ic = 0; ic < baseChCnt; ic++) {
  ------------------
  |  Branch (870:16): [True: 0, False: 0]
  ------------------
  871|      0|    audioChannels[ic] = &(realBuffer[ic * frameSize]);
  872|      0|  }
  873|       |
  874|       |  /* in-place downmix */
  875|      0|  for (n = 0; n < frameSize; n++) {
  ------------------
  |  Branch (875:15): [True: 0, False: 0]
  ------------------
  876|      0|    for (oc = 0; oc < targetChCnt; oc++) {
  ------------------
  |  Branch (876:18): [True: 0, False: 0]
  ------------------
  877|      0|      tmp_out[oc] = (FIXP_DBL)0;
  878|      0|      for (ic = 0; ic < baseChCnt; ic++) {
  ------------------
  |  Branch (878:20): [True: 0, False: 0]
  ------------------
  879|      0|        tmp_out[oc] +=
  880|      0|            fMultDiv2(audioChannels[ic][n],
  881|      0|                      pSelProcOutput->downmixMatrix[reverseInChannelMap[ic]]
  882|      0|                                                   [reverseOutChannelMap[oc]])
  883|      0|            << 3;
  884|      0|      }
  885|      0|    }
  886|      0|    for (oc = 0; oc < targetChCnt; oc++) {
  ------------------
  |  Branch (886:18): [True: 0, False: 0]
  ------------------
  887|      0|      if (oc >= baseChCnt) break;
  ------------------
  |  Branch (887:11): [True: 0, False: 0]
  ------------------
  888|      0|      audioChannels[oc][n] = tmp_out[oc];
  889|      0|    }
  890|      0|  }
  891|       |
  892|      0|  for (oc = targetChCnt; oc < baseChCnt; oc++) {
  ------------------
  |  Branch (892:26): [True: 0, False: 0]
  ------------------
  893|      0|    FDKmemset(audioChannels[oc], 0, frameSize * sizeof(FIXP_DBL));
  894|      0|  }
  895|       |
  896|      0|  *pNChannels = targetChCnt;
  897|       |
  898|      0|  return DRC_DEC_OK;
  899|      0|}
FDK_drcDecLib.cpp:_ZL21startSelectionProcessP13s_drc_decoder:
  180|   891k|static void startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) {
  181|   891k|  int uniDrcConfigHasChanged = 0;
  182|   891k|  SEL_PROC_OUTPUT oldSelProcOutput = hDrcDec->selProcOutput;
  183|       |
  184|   891k|  if (!hDrcDec->status) return;
  ------------------
  |  Branch (184:7): [True: 91.1k, False: 799k]
  ------------------
  185|       |
  186|   799k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (186:7): [True: 799k, False: 0]
  ------------------
  187|   799k|    uniDrcConfigHasChanged = hDrcDec->uniDrcConfig.diff;
  188|   799k|    if (hDrcDec->uniDrcConfig.diff || hDrcDec->loudnessInfoSet.diff ||
  ------------------
  |  Branch (188:9): [True: 96.2k, False: 703k]
  |  Branch (188:39): [True: 3.13k, False: 700k]
  ------------------
  189|   700k|        hDrcDec->selProcInputDiff) {
  ------------------
  |  Branch (189:9): [True: 298k, False: 401k]
  ------------------
  190|       |      /* in case of an error, signal that selection process was not successful
  191|       |       */
  192|   397k|      hDrcDec->selProcOutput.numSelectedDrcSets = 0;
  193|       |
  194|   397k|      drcDec_SelectionProcess_Process(
  195|   397k|          hDrcDec->hSelectionProc, &(hDrcDec->uniDrcConfig),
  196|   397k|          &(hDrcDec->loudnessInfoSet), &(hDrcDec->selProcOutput));
  197|       |
  198|   397k|      hDrcDec->selProcInputDiff = 0;
  199|   397k|      hDrcDec->uniDrcConfig.diff = 0;
  200|   397k|      hDrcDec->loudnessInfoSet.diff = 0;
  201|   397k|    }
  202|   799k|  }
  203|       |
  204|   799k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (204:7): [True: 799k, False: 0]
  ------------------
  205|   799k|    if (isResetNeeded(hDrcDec, oldSelProcOutput) || uniDrcConfigHasChanged) {
  ------------------
  |  Branch (205:9): [True: 29.0k, False: 770k]
  |  Branch (205:53): [True: 85.2k, False: 685k]
  ------------------
  206|   114k|      drcDec_GainDecoder_Config(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig),
  207|   114k|                                hDrcDec->selProcOutput.numSelectedDrcSets,
  208|   114k|                                hDrcDec->selProcOutput.selectedDrcSetIds,
  209|   114k|                                hDrcDec->selProcOutput.selectedDownmixIds);
  210|   114k|    }
  211|   799k|  }
  212|   799k|}
FDK_drcDecLib.cpp:_ZL13isResetNeededP13s_drc_decoder26s_selection_process_output:
  153|   799k|                         const SEL_PROC_OUTPUT oldSelProcOutput) {
  154|   799k|  int i, resetNeeded = 0;
  155|       |
  156|   799k|  if (hDrcDec->selProcOutput.numSelectedDrcSets !=
  ------------------
  |  Branch (156:7): [True: 26.6k, False: 773k]
  ------------------
  157|   799k|      oldSelProcOutput.numSelectedDrcSets) {
  158|  26.6k|    resetNeeded = 1;
  159|   773k|  } else {
  160|  1.57M|    for (i = 0; i < hDrcDec->selProcOutput.numSelectedDrcSets; i++) {
  ------------------
  |  Branch (160:17): [True: 800k, False: 773k]
  ------------------
  161|   800k|      if (hDrcDec->selProcOutput.selectedDrcSetIds[i] !=
  ------------------
  |  Branch (161:11): [True: 2.35k, False: 797k]
  ------------------
  162|   800k|          oldSelProcOutput.selectedDrcSetIds[i])
  163|  2.35k|        resetNeeded = 1;
  164|   800k|      if (hDrcDec->selProcOutput.selectedDownmixIds[i] !=
  ------------------
  |  Branch (164:11): [True: 1.65k, False: 798k]
  ------------------
  165|   800k|          oldSelProcOutput.selectedDownmixIds[i])
  166|  1.65k|        resetNeeded = 1;
  167|   800k|    }
  168|   773k|  }
  169|       |
  170|   799k|  if (hDrcDec->selProcOutput.boost != oldSelProcOutput.boost) resetNeeded = 1;
  ------------------
  |  Branch (170:7): [True: 18.3k, False: 781k]
  ------------------
  171|   799k|  if (hDrcDec->selProcOutput.compress != oldSelProcOutput.compress)
  ------------------
  |  Branch (171:7): [True: 18.3k, False: 781k]
  ------------------
  172|  18.3k|    resetNeeded = 1;
  173|       |
  174|       |  /* Note: Changes in downmix matrix are not caught, as they don't affect the
  175|       |   * DRC gain decoder */
  176|       |
  177|   799k|  return resetNeeded;
  178|   799k|}
FDK_drcDecLib.cpp:_ZL14_getGainStatusP12UNI_DRC_GAIN:
  148|  6.35k|static int _getGainStatus(HANDLE_UNI_DRC_GAIN hUniDrcGain) {
  149|  6.35k|  return hUniDrcGain->status;
  150|  6.35k|}

_Z23drcDec_GainDecoder_OpenPP16DRC_GAIN_DECODER:
  158|  21.8k|drcDec_GainDecoder_Open(HANDLE_DRC_GAIN_DECODER* phGainDec) {
  159|  21.8k|  DRC_GAIN_DECODER* hGainDec = NULL;
  160|       |
  161|  21.8k|  hGainDec = (DRC_GAIN_DECODER*)FDKcalloc(1, sizeof(DRC_GAIN_DECODER));
  162|  21.8k|  if (hGainDec == NULL) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (162:7): [True: 0, False: 21.8k]
  ------------------
  163|       |
  164|  21.8k|  hGainDec->multiBandActiveDrcIndex = -1;
  165|  21.8k|  hGainDec->channelGainActiveDrcIndex = -1;
  166|       |
  167|  21.8k|  *phGainDec = hGainDec;
  168|       |
  169|  21.8k|  return DE_OK;
  170|  21.8k|}
_Z23drcDec_GainDecoder_InitP16DRC_GAIN_DECODER:
  173|   298k|drcDec_GainDecoder_Init(HANDLE_DRC_GAIN_DECODER hGainDec) {
  174|   298k|  DRC_ERROR err = DE_OK;
  175|       |
  176|   298k|  err = initGainDec(hGainDec);
  177|   298k|  if (err) return err;
  ------------------
  |  Branch (177:7): [True: 0, False: 298k]
  ------------------
  178|       |
  179|   298k|  initDrcGainBuffers(hGainDec->frameSize, &hGainDec->drcGainBuffers);
  180|       |
  181|   298k|  return err;
  182|   298k|}
_Z27drcDec_GainDecoder_SetParamP16DRC_GAIN_DECODER14GAIN_DEC_PARAMi:
  187|   628k|                            const int paramValue) {
  188|   628k|  switch (paramType) {
  189|   314k|    case GAIN_DEC_FRAME_SIZE:
  ------------------
  |  Branch (189:5): [True: 314k, False: 314k]
  ------------------
  190|   314k|      if (paramValue < 0) return DE_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (190:11): [True: 0, False: 314k]
  ------------------
  191|   314k|      hGainDec->frameSize = paramValue;
  192|   314k|      break;
  193|   314k|    case GAIN_DEC_SAMPLE_RATE:
  ------------------
  |  Branch (193:5): [True: 314k, False: 314k]
  ------------------
  194|   314k|      if (paramValue < 0) return DE_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (194:11): [True: 0, False: 314k]
  ------------------
  195|   314k|      hGainDec->deltaTminDefault = getDeltaTmin(paramValue);
  196|   314k|      break;
  197|      0|    default:
  ------------------
  |  Branch (197:5): [True: 0, False: 628k]
  ------------------
  198|      0|      return DE_PARAM_INVALID;
  199|   628k|  }
  200|   628k|  return DE_OK;
  201|   628k|}
_Z46drcDec_GainDecoder_SetCodecDependentParametersP16DRC_GAIN_DECODER10DELAY_MODEi19SUBBAND_DOMAIN_MODE:
  207|  12.6k|    const SUBBAND_DOMAIN_MODE subbandDomainSupported) {
  208|  12.6k|  if ((delayMode != DM_REGULAR_DELAY) && (delayMode != DM_LOW_DELAY)) {
  ------------------
  |  Branch (208:7): [True: 0, False: 12.6k]
  |  Branch (208:42): [True: 0, False: 0]
  ------------------
  209|      0|    return DE_NOT_OK;
  210|      0|  }
  211|  12.6k|  hGainDec->delayMode = delayMode;
  212|  12.6k|  hGainDec->timeDomainSupported = timeDomainSupported;
  213|  12.6k|  hGainDec->subbandDomainSupported = subbandDomainSupported;
  214|       |
  215|  12.6k|  return DE_OK;
  216|  12.6k|}
_Z25drcDec_GainDecoder_ConfigP16DRC_GAIN_DECODERP14UNI_DRC_CONFIGhPKaPKh:
  223|   114k|                          const UCHAR* selectedDownmixIds) {
  224|   114k|  DRC_ERROR err = DE_OK;
  225|   114k|  int a;
  226|       |
  227|   114k|  hGainDec->nActiveDrcs = 0;
  228|   114k|  hGainDec->multiBandActiveDrcIndex = -1;
  229|   114k|  hGainDec->channelGainActiveDrcIndex = -1;
  230|   229k|  for (a = 0; a < numSelectedDrcSets; a++) {
  ------------------
  |  Branch (230:15): [True: 116k, False: 113k]
  ------------------
  231|   116k|    err = initActiveDrc(hGainDec, hUniDrcConfig, selectedDrcSetIds[a],
  232|   116k|                        selectedDownmixIds[a]);
  233|   116k|    if (err) return err;
  ------------------
  |  Branch (233:9): [True: 1.04k, False: 115k]
  ------------------
  234|   116k|  }
  235|       |
  236|   113k|  err = initActiveDrcOffset(hGainDec);
  237|   113k|  if (err) return err;
  ------------------
  |  Branch (237:7): [True: 472, False: 112k]
  ------------------
  238|       |
  239|   112k|  return err;
  240|   113k|}
_Z24drcDec_GainDecoder_ClosePP16DRC_GAIN_DECODER:
  243|  21.8k|drcDec_GainDecoder_Close(HANDLE_DRC_GAIN_DECODER* phGainDec) {
  244|  21.8k|  if (*phGainDec != NULL) {
  ------------------
  |  Branch (244:7): [True: 21.8k, False: 0]
  ------------------
  245|  21.8k|    FDKfree(*phGainDec);
  246|  21.8k|    *phGainDec = NULL;
  247|  21.8k|  }
  248|       |
  249|  21.8k|  return DE_OK;
  250|  21.8k|}
_Z29drcDec_GainDecoder_PreprocessP16DRC_GAIN_DECODERP12UNI_DRC_GAINiss:
  256|  15.4k|                              const FIXP_SGL boost, const FIXP_SGL compress) {
  257|  15.4k|  DRC_ERROR err = DE_OK;
  258|  15.4k|  int a, c;
  259|       |
  260|       |  /* lnbPointer is the index on the most recent node buffer */
  261|  15.4k|  hGainDec->drcGainBuffers.lnbPointer++;
  262|  15.4k|  if (hGainDec->drcGainBuffers.lnbPointer >= NUM_LNB_FRAMES)
  ------------------
  |  |  111|  15.4k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (262:7): [True: 2.84k, False: 12.6k]
  ------------------
  263|  2.84k|    hGainDec->drcGainBuffers.lnbPointer = 0;
  264|       |
  265|  40.2k|  for (a = 0; a < hGainDec->nActiveDrcs; a++) {
  ------------------
  |  Branch (265:15): [True: 25.5k, False: 14.7k]
  ------------------
  266|       |    /* prepare gain interpolation of sequences used by copying and modifying
  267|       |     * nodes in node buffers */
  268|  25.5k|    err = prepareDrcGain(hGainDec, hUniDrcGain, compress, boost,
  269|  25.5k|                         loudnessNormalizationGainDb, a);
  270|  25.5k|    if (err) return err;
  ------------------
  |  Branch (270:9): [True: 746, False: 24.7k]
  ------------------
  271|  25.5k|  }
  272|       |
  273|  58.8k|  for (a = 0; a < MAX_ACTIVE_DRCS; a++) {
  ------------------
  |  |  108|  58.8k|#define MAX_ACTIVE_DRCS 3
  ------------------
  |  Branch (273:15): [True: 44.1k, False: 14.7k]
  ------------------
  274|   397k|    for (c = 0; c < 8; c++) {
  ------------------
  |  Branch (274:17): [True: 353k, False: 44.1k]
  ------------------
  275|   353k|      hGainDec->activeDrc[a]
  276|   353k|          .lnbIndexForChannel[c][hGainDec->drcGainBuffers.lnbPointer] =
  277|   353k|          -1; /* "no DRC processing" */
  278|   353k|    }
  279|  44.1k|    hGainDec->activeDrc[a].subbandGainsReady = 0;
  280|  44.1k|  }
  281|       |
  282|   132k|  for (c = 0; c < 8; c++) {
  ------------------
  |  Branch (282:15): [True: 117k, False: 14.7k]
  ------------------
  283|   117k|    hGainDec->drcGainBuffers
  284|   117k|        .channelGain[c][hGainDec->drcGainBuffers.lnbPointer] =
  285|   117k|        FL2FXCONST_DBL(1.0f / (float)(1 << 8));
  ------------------
  |  |  192|   117k|  (FIXP_DBL)(                                                                \
  |  |  193|   117k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 117k, Folded]
  |  |  ------------------
  |  |  194|   117k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   117k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   117k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 117k]
  |  |  ------------------
  |  |  195|   117k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   117k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   117k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   117k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   117k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   117k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   117k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  286|   117k|  }
  287|       |
  288|  14.7k|  return err;
  289|  15.4k|}
_Z26drcDec_GainDecoder_ConcealP16DRC_GAIN_DECODERP14UNI_DRC_CONFIGP12UNI_DRC_GAIN:
  296|  8.89k|                           HANDLE_UNI_DRC_GAIN hUniDrcGain) {
  297|  8.89k|  int seq, gainSequenceCount;
  298|  8.89k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
  299|  8.89k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  8.89k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  8.89k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
  300|  8.89k|  if (pCoef && pCoef->gainSequenceCount) {
  ------------------
  |  Branch (300:7): [True: 6.69k, False: 2.19k]
  |  Branch (300:16): [True: 6.42k, False: 274]
  ------------------
  301|  6.42k|    gainSequenceCount = fMin(pCoef->gainSequenceCount, (UCHAR)12);
  302|  6.42k|  } else {
  303|  2.47k|    gainSequenceCount = 1;
  304|  2.47k|  }
  305|       |
  306|  38.8k|  for (seq = 0; seq < gainSequenceCount; seq++) {
  ------------------
  |  Branch (306:17): [True: 29.9k, False: 8.89k]
  ------------------
  307|  29.9k|    int lastNodeIndex = 0;
  308|  29.9k|    FIXP_SGL lastGainDb = (FIXP_SGL)0;
  309|       |
  310|  29.9k|    lastNodeIndex = hUniDrcGain->nNodes[seq] - 1;
  311|  29.9k|    if ((lastNodeIndex >= 0) && (lastNodeIndex < 16)) {
  ------------------
  |  Branch (311:9): [True: 27.7k, False: 2.23k]
  |  Branch (311:33): [True: 26.9k, False: 760]
  ------------------
  312|  26.9k|      lastGainDb = hUniDrcGain->gainNode[seq][lastNodeIndex].gainDb;
  313|  26.9k|    }
  314|       |
  315|  29.9k|    hUniDrcGain->nNodes[seq] = 1;
  316|  29.9k|    if (lastGainDb > (FIXP_SGL)0) {
  ------------------
  |  Branch (316:9): [True: 5.01k, False: 24.9k]
  ------------------
  317|  5.01k|      hUniDrcGain->gainNode[seq][0].gainDb =
  318|  5.01k|          FX_DBL2FX_SGL(fMult(FL2FXCONST_SGL(0.9f), lastGainDb));
  ------------------
  |  |  220|  20.0k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  5.01k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  5.01k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 5.01k]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 5.01k, Folded]
  |  |  ------------------
  ------------------
  319|  24.9k|    } else {
  320|  24.9k|      hUniDrcGain->gainNode[seq][0].gainDb =
  321|  24.9k|          FX_DBL2FX_SGL(fMult(FL2FXCONST_SGL(0.98f), lastGainDb));
  ------------------
  |  |  220|  99.7k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  24.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  24.9k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 24.9k]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 24.9k, Folded]
  |  |  ------------------
  ------------------
  322|  24.9k|    }
  323|  29.9k|    hUniDrcGain->gainNode[seq][0].time = hGainDec->frameSize - 1;
  324|  29.9k|  }
  325|  8.89k|  return DE_OK;
  326|  8.89k|}
_Z34drcDec_GainDecoder_SetChannelGainsP16DRC_GAIN_DECODERiiPKiiPi:
  333|  15.4k|                                        FIXP_DBL* audioBuffer) {
  334|  15.4k|  int c, i;
  335|       |
  336|  15.4k|  if (hGainDec->channelGainActiveDrcIndex >= 0) {
  ------------------
  |  Branch (336:7): [True: 12.7k, False: 2.67k]
  ------------------
  337|       |    /* channel gains will be applied in drcDec_GainDecoder_ProcessTimeDomain or
  338|       |     * drcDec_GainDecoder_ProcessSubbandDomain, respectively. */
  339|  12.7k|    _setChannelGains(hGainDec, numChannels, channelGainDb);
  340|       |
  341|  12.7k|    if (!hGainDec->status) { /* overwrite previous channel gains at startup */
  ------------------
  |  Branch (341:9): [True: 333, False: 12.4k]
  ------------------
  342|    333|      DRC_GAIN_BUFFERS* pDrcGainBuffers = &hGainDec->drcGainBuffers;
  343|    671|      for (c = 0; c < numChannels; c++) {
  ------------------
  |  Branch (343:19): [True: 338, False: 333]
  ------------------
  344|  2.02k|        for (i = 0; i < NUM_LNB_FRAMES; i++) {
  ------------------
  |  |  111|  2.02k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (344:21): [True: 1.69k, False: 338]
  ------------------
  345|  1.69k|          pDrcGainBuffers->channelGain[c][i] = hGainDec->channelGain[c];
  346|  1.69k|        }
  347|    338|      }
  348|    333|      hGainDec->status = 1;
  349|    333|    }
  350|  12.7k|  } else {
  351|       |    /* smooth and apply channel gains */
  352|  2.67k|    FIXP_DBL prevChannelGain[8];
  353|  6.62k|    for (c = 0; c < numChannels; c++) {
  ------------------
  |  Branch (353:17): [True: 3.94k, False: 2.67k]
  ------------------
  354|  3.94k|      prevChannelGain[c] = hGainDec->channelGain[c];
  355|  3.94k|    }
  356|       |
  357|  2.67k|    _setChannelGains(hGainDec, numChannels, channelGainDb);
  358|       |
  359|  2.67k|    if (!hGainDec->status) { /* overwrite previous channel gains at startup */
  ------------------
  |  Branch (359:9): [True: 254, False: 2.42k]
  ------------------
  360|    604|      for (c = 0; c < numChannels; c++)
  ------------------
  |  Branch (360:19): [True: 350, False: 254]
  ------------------
  361|    350|        prevChannelGain[c] = hGainDec->channelGain[c];
  362|    254|      hGainDec->status = 1;
  363|    254|    }
  364|       |
  365|  6.62k|    for (c = 0; c < numChannels; c++) {
  ------------------
  |  Branch (365:17): [True: 3.94k, False: 2.67k]
  ------------------
  366|  3.94k|      INT n_min = fMin(fMin(CntLeadingZeros(prevChannelGain[c]),
  ------------------
  |  |  308|  3.94k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  367|  3.94k|                            CntLeadingZeros(hGainDec->channelGain[c])) -
  ------------------
  |  |  308|  3.94k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  368|  3.94k|                           1,
  369|  3.94k|                       9);
  370|  3.94k|      FIXP_DBL gain = prevChannelGain[c] << n_min;
  371|  3.94k|      FIXP_DBL stepsize = ((hGainDec->channelGain[c] << n_min) - gain);
  372|  3.94k|      if (stepsize != (FIXP_DBL)0) {
  ------------------
  |  Branch (372:11): [True: 252, False: 3.69k]
  ------------------
  373|    252|        if (frameSize == 1024)
  ------------------
  |  Branch (373:13): [True: 0, False: 252]
  ------------------
  374|      0|          stepsize = stepsize >> 10;
  375|    252|        else
  376|    252|          stepsize = (LONG)stepsize / frameSize;
  377|    252|      }
  378|  3.94k|      n_min = 9 - n_min;
  379|       |#ifdef FUNCTION_drcDec_GainDecoder_SetChannelGains_func1
  380|       |      drcDec_GainDecoder_SetChannelGains_func1(audioBuffer, gain, stepsize,
  381|       |                                               n_min, frameSize);
  382|       |#else
  383|  6.48M|      for (i = 0; i < frameSize; i++) {
  ------------------
  |  Branch (383:19): [True: 6.48M, False: 3.94k]
  ------------------
  384|  6.48M|        audioBuffer[i] = fMultDiv2(audioBuffer[i], gain) << n_min;
  385|  6.48M|        gain += stepsize;
  386|  6.48M|      }
  387|  3.94k|#endif
  388|  3.94k|      audioBuffer += audioBufferChannelOffset;
  389|  3.94k|    }
  390|  2.67k|  }
  391|  15.4k|}
_Z36drcDec_GainDecoder_ProcessTimeDomainP16DRC_GAIN_DECODERi17GAIN_DEC_LOCATIONiiiiPi:
  398|  29.4k|    const int timeDataChannelOffset, FIXP_DBL* audioIOBuffer) {
  399|  29.4k|  DRC_ERROR err = DE_OK;
  400|  29.4k|  int a;
  401|       |
  402|  29.4k|  if (!hGainDec->timeDomainSupported) {
  ------------------
  |  Branch (402:7): [True: 0, False: 29.4k]
  ------------------
  403|      0|    return DE_NOT_OK;
  404|      0|  }
  405|       |
  406|  76.0k|  for (a = 0; a < hGainDec->nActiveDrcs; a++) {
  ------------------
  |  Branch (406:15): [True: 48.0k, False: 27.9k]
  ------------------
  407|  48.0k|    if (!_fitsLocation(hGainDec->activeDrc[a].pInst, drcLocation)) continue;
  ------------------
  |  Branch (407:9): [True: 23.3k, False: 24.7k]
  ------------------
  408|       |
  409|       |    /* Apply DRC */
  410|  24.7k|    err = processDrcTime(hGainDec, a, delaySamples, channelOffset,
  411|  24.7k|                         drcChannelOffset, numChannelsProcessed,
  412|  24.7k|                         timeDataChannelOffset, audioIOBuffer);
  413|  24.7k|    if (err) return err;
  ------------------
  |  Branch (413:9): [True: 1.47k, False: 23.3k]
  ------------------
  414|  24.7k|  }
  415|       |
  416|  27.9k|  return err;
  417|  29.4k|}
_Z49drcDec_GainDecoder_SetLoudnessNormalizationGainDbP16DRC_GAIN_DECODERi:
  449|  15.4k|    HANDLE_DRC_GAIN_DECODER hGainDec, FIXP_DBL loudnessNormalizationGainDb) {
  450|  15.4k|  hGainDec->loudnessNormalisationGainDb = loudnessNormalizationGainDb;
  451|       |
  452|  15.4k|  return DE_OK;
  453|  15.4k|}
_Z31drcDec_GainDecoder_GetFrameSizeP16DRC_GAIN_DECODER:
  455|  6.65k|int drcDec_GainDecoder_GetFrameSize(HANDLE_DRC_GAIN_DECODER hGainDec) {
  456|  6.65k|  if (hGainDec == NULL) return -1;
  ------------------
  |  Branch (456:7): [True: 0, False: 6.65k]
  ------------------
  457|       |
  458|  6.65k|  return hGainDec->frameSize;
  459|  6.65k|}
_Z38drcDec_GainDecoder_GetDeltaTminDefaultP16DRC_GAIN_DECODER:
  461|  6.65k|int drcDec_GainDecoder_GetDeltaTminDefault(HANDLE_DRC_GAIN_DECODER hGainDec) {
  462|  6.65k|  if (hGainDec == NULL) return -1;
  ------------------
  |  Branch (462:7): [True: 0, False: 6.65k]
  ------------------
  463|       |
  464|  6.65k|  return hGainDec->deltaTminDefault;
  465|  6.65k|}
drcDec_gainDecoder.cpp:_ZL16_setChannelGainsP16DRC_GAIN_DECODERiPKi:
  134|  15.4k|                             const FIXP_DBL* channelGainDb) {
  135|  15.4k|  int i, channelGain_e;
  136|  15.4k|  FIXP_DBL channelGain;
  137|  15.4k|  FDK_ASSERT(numChannelGains <= 8);
  ------------------
  |  |  221|  15.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 15.4k, False: 0]
  ------------------
  138|  32.2k|  for (i = 0; i < numChannelGains; i++) {
  ------------------
  |  Branch (138:15): [True: 16.8k, False: 15.4k]
  ------------------
  139|  16.8k|    if (channelGainDb[i] == (FIXP_DBL)MINVAL_DBL) {
  ------------------
  |  |  158|  16.8k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (139:9): [True: 0, False: 16.8k]
  ------------------
  140|      0|      hGainDec->channelGain[i] = (FIXP_DBL)0;
  141|  16.8k|    } else {
  142|       |      /* add loudness normalisation gain (dB) to channel gain (dB) */
  143|  16.8k|      FIXP_DBL tmp_channelGainDb = (channelGainDb[i] >> 1) +
  144|  16.8k|                                   (hGainDec->loudnessNormalisationGainDb >> 2);
  145|  16.8k|      tmp_channelGainDb =
  146|  16.8k|          SATURATE_LEFT_SHIFT(tmp_channelGainDb, 1, DFRACT_BITS);
  ------------------
  |  |  251|  16.8k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 16.8k]
  |  |  ------------------
  |  |  252|  16.8k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  16.8k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 16.8k]
  |  |  ------------------
  |  |  254|  16.8k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  16.8k|             : ((LONG)(src) << (scale)))
  ------------------
  147|  16.8k|      channelGain = dB2lin(tmp_channelGainDb, 8, &channelGain_e);
  148|  16.8k|      hGainDec->channelGain[i] = scaleValue(channelGain, channelGain_e - 8);
  149|  16.8k|    }
  150|  16.8k|  }
  151|  15.4k|}
drcDec_gainDecoder.cpp:_ZL13_fitsLocationP24DRC_INSTRUCTIONS_UNI_DRC17GAIN_DEC_LOCATION:
  115|  48.0k|                         const GAIN_DEC_LOCATION drcLocation) {
  116|  48.0k|  int downmixId = pInst->drcApplyToDownmix ? pInst->downmixId[0] : 0;
  ------------------
  |  Branch (116:19): [True: 19.6k, False: 28.4k]
  ------------------
  117|  48.0k|  switch (drcLocation) {
  ------------------
  |  Branch (117:11): [True: 48.0k, False: 0]
  ------------------
  118|  24.7k|    case GAIN_DEC_DRC1:
  ------------------
  |  Branch (118:5): [True: 24.7k, False: 23.3k]
  ------------------
  119|  24.7k|      return (downmixId == 0);
  120|      0|    case GAIN_DEC_DRC1_DRC2:
  ------------------
  |  Branch (120:5): [True: 0, False: 48.0k]
  ------------------
  121|      0|      return ((downmixId == 0) || (downmixId == DOWNMIX_ID_ANY_DOWNMIX));
  ------------------
  |  |  123|      0|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (121:15): [True: 0, False: 0]
  |  Branch (121:35): [True: 0, False: 0]
  ------------------
  122|      0|    case GAIN_DEC_DRC2:
  ------------------
  |  Branch (122:5): [True: 0, False: 48.0k]
  ------------------
  123|      0|      return (downmixId == DOWNMIX_ID_ANY_DOWNMIX);
  ------------------
  |  |  123|      0|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  124|      0|    case GAIN_DEC_DRC3:
  ------------------
  |  Branch (124:5): [True: 0, False: 48.0k]
  ------------------
  125|      0|      return ((downmixId != 0) && (downmixId != DOWNMIX_ID_ANY_DOWNMIX));
  ------------------
  |  |  123|      0|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (125:15): [True: 0, False: 0]
  |  Branch (125:35): [True: 0, False: 0]
  ------------------
  126|  23.3k|    case GAIN_DEC_DRC2_DRC3:
  ------------------
  |  Branch (126:5): [True: 23.3k, False: 24.7k]
  ------------------
  127|  23.3k|      return (downmixId != 0);
  128|  48.0k|  }
  129|      0|  return 0;
  130|  48.0k|}

_Z16_decodeHuffmanCWPA2_KaP13FDK_BITSTREAM:
  157|   255k|{
  158|   255k|  SCHAR index = 0;
  159|   255k|  int value, bit;
  160|       |
  161|   972k|  while (index >= 0) {
  ------------------
  |  Branch (161:10): [True: 717k, False: 255k]
  ------------------
  162|   717k|    bit = FDKreadBits(hBs, 1);
  163|   717k|    index = h[index][bit];
  164|   717k|  }
  165|       |
  166|   255k|  value = index + 64; /* Add offset */
  167|       |
  168|   255k|  return value;
  169|   255k|}
_Z21drcDec_readUniDrcGainP13FDK_BITSTREAMP14UNI_DRC_CONFIGiiP12UNI_DRC_GAIN:
  482|  6.65k|                      HANDLE_UNI_DRC_GAIN hUniDrcGain) {
  483|  6.65k|  DRC_ERROR err = DE_OK;
  484|  6.65k|  int seq, gainSequenceCount;
  485|  6.65k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
  486|  6.65k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  6.65k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  6.65k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
  487|  6.65k|  if (hUniDrcGain == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (487:7): [True: 0, False: 6.65k]
  ------------------
  488|  6.65k|  hUniDrcGain->status = 0;
  489|  6.65k|  if (pCoef) {
  ------------------
  |  Branch (489:7): [True: 6.44k, False: 213]
  ------------------
  490|  6.44k|    gainSequenceCount = fMin(pCoef->gainSequenceCount, (UCHAR)12);
  491|  6.44k|  } else {
  492|    213|    gainSequenceCount = 0;
  493|    213|  }
  494|       |
  495|  34.2k|  for (seq = 0; seq < gainSequenceCount; seq++) {
  ------------------
  |  Branch (495:17): [True: 27.7k, False: 6.51k]
  ------------------
  496|  27.7k|    UCHAR index = pCoef->gainSetIndexForGainSequence[seq];
  497|  27.7k|    GAIN_SET* gainSet;
  498|  27.7k|    int timeDeltaMin;
  499|  27.7k|    UCHAR tmpNNodes = 0;
  500|  27.7k|    GAIN_NODE tmpNodes[16];
  501|       |
  502|  27.7k|    if ((index >= pCoef->gainSetCount) || (index >= 12)) return DE_NOT_OK;
  ------------------
  |  Branch (502:9): [True: 149, False: 27.5k]
  |  Branch (502:43): [True: 0, False: 27.5k]
  ------------------
  503|  27.5k|    gainSet = &(pCoef->gainSet[index]);
  504|       |
  505|  27.5k|    timeDeltaMin = _getTimeDeltaMin(gainSet, deltaTminDefault);
  506|       |
  507|  27.5k|    _readDrcGainSequence(hBs, gainSet, frameSize, timeDeltaMin, &tmpNNodes,
  508|  27.5k|                         tmpNodes);
  509|       |
  510|  27.5k|    hUniDrcGain->nNodes[seq] = tmpNNodes;
  511|  27.5k|    FDKmemcpy(hUniDrcGain->gainNode[seq], tmpNodes,
  512|  27.5k|              fMin(tmpNNodes, (UCHAR)16) * sizeof(GAIN_NODE));
  513|  27.5k|  }
  514|       |
  515|  6.51k|  if (pCoef && (gainSequenceCount ==
  ------------------
  |  Branch (515:7): [True: 6.29k, False: 213]
  |  Branch (515:16): [True: 5.90k, False: 394]
  ------------------
  516|  6.29k|                pCoef->gainSequenceCount)) { /* all sequences have been read */
  517|  5.90k|    hUniDrcGain->uniDrcGainExtPresent = FDKreadBits(hBs, 1);
  518|  5.90k|    if (hUniDrcGain->uniDrcGainExtPresent == 1) {
  ------------------
  |  Branch (518:9): [True: 1.52k, False: 4.37k]
  ------------------
  519|  1.52k|      err = _readUniDrcGainExtension(hBs, &(hUniDrcGain->uniDrcGainExtension));
  520|  1.52k|      if (err) return err;
  ------------------
  |  Branch (520:11): [True: 151, False: 1.37k]
  ------------------
  521|  1.52k|    }
  522|  5.90k|  }
  523|       |
  524|  6.35k|  if (err == DE_OK && gainSequenceCount > 0) {
  ------------------
  |  Branch (524:7): [True: 6.35k, False: 0]
  |  Branch (524:23): [True: 6.06k, False: 297]
  ------------------
  525|  6.06k|    hUniDrcGain->status = 1;
  526|  6.06k|  }
  527|  6.35k|  return err;
  528|  6.51k|}
_Z23drcDec_readUniDrcConfigP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1676|   346k|                        HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1677|   346k|  DRC_ERROR err = DE_OK;
 1678|   346k|  int i, diff = 0;
 1679|   346k|  int drcDescriptionBasicPresent, drcCoefficientsBasicCount,
 1680|   346k|      drcInstructionsBasicCount;
 1681|   346k|  CHANNEL_LAYOUT tmpChan;
 1682|   346k|  FDKmemclear(&tmpChan, sizeof(CHANNEL_LAYOUT));
 1683|   346k|  if (hUniDrcConfig == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1683:7): [True: 0, False: 346k]
  ------------------
 1684|       |
 1685|   346k|  diff |= _compAssign(&hUniDrcConfig->sampleRatePresent, FDKreadBits(hBs, 1));
 1686|       |
 1687|   346k|  if (hUniDrcConfig->sampleRatePresent == 1) {
  ------------------
  |  Branch (1687:7): [True: 8.26k, False: 337k]
  ------------------
 1688|  8.26k|    diff |=
 1689|  8.26k|        _compAssign(&hUniDrcConfig->sampleRate, FDKreadBits(hBs, 18) + 1000);
 1690|  8.26k|  }
 1691|       |
 1692|   346k|  diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV0,
 1693|   346k|                      FDKreadBits(hBs, 7));
 1694|       |
 1695|   346k|  drcDescriptionBasicPresent = FDKreadBits(hBs, 1);
 1696|   346k|  if (drcDescriptionBasicPresent == 1) {
  ------------------
  |  Branch (1696:7): [True: 6.90k, False: 339k]
  ------------------
 1697|  6.90k|    drcCoefficientsBasicCount = FDKreadBits(hBs, 3);
 1698|  6.90k|    drcInstructionsBasicCount = FDKreadBits(hBs, 4);
 1699|   339k|  } else {
 1700|   339k|    drcCoefficientsBasicCount = 0;
 1701|   339k|    drcInstructionsBasicCount = 0;
 1702|   339k|  }
 1703|       |
 1704|   346k|  diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV0,
 1705|   346k|                      FDKreadBits(hBs, 3));
 1706|   346k|  diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV0,
 1707|   346k|                      FDKreadBits(hBs, 6));
 1708|       |
 1709|   346k|  err = _readChannelLayout(hBs, &tmpChan);
 1710|   346k|  if (err) return err;
  ------------------
  |  Branch (1710:7): [True: 18.0k, False: 328k]
  ------------------
 1711|       |
 1712|   328k|  if (!diff)
  ------------------
  |  Branch (1712:7): [True: 259k, False: 68.0k]
  ------------------
 1713|   259k|    diff |= (FDKmemcmp(&tmpChan, &hUniDrcConfig->channelLayout,
 1714|   259k|                       sizeof(CHANNEL_LAYOUT)) != 0);
 1715|   328k|  hUniDrcConfig->channelLayout = tmpChan;
 1716|       |
 1717|   328k|  hUniDrcConfig->downmixInstructionsCount =
 1718|   328k|      fMin(hUniDrcConfig->downmixInstructionsCountV0, (UCHAR)6);
 1719|  1.75M|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV0; i++) {
  ------------------
  |  Branch (1719:15): [True: 1.43M, False: 325k]
  ------------------
 1720|  1.43M|    DOWNMIX_INSTRUCTIONS tmpDown;
 1721|  1.43M|    FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1722|  1.43M|    err = _readDownmixInstructions(hBs, 0, &hUniDrcConfig->channelLayout,
 1723|  1.43M|                                   &tmpDown);
 1724|  1.43M|    if (err) return err;
  ------------------
  |  Branch (1724:9): [True: 2.37k, False: 1.43M]
  ------------------
 1725|  1.43M|    if (i >= 6) continue;
  ------------------
  |  Branch (1725:9): [True: 1.07M, False: 359k]
  ------------------
 1726|   359k|    if (!diff)
  ------------------
  |  Branch (1726:9): [True: 120k, False: 238k]
  ------------------
 1727|   120k|      diff |= (FDKmemcmp(&tmpDown, &(hUniDrcConfig->downmixInstructions[i]),
 1728|   120k|                         sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1729|   359k|    hUniDrcConfig->downmixInstructions[i] = tmpDown;
 1730|   359k|  }
 1731|       |
 1732|   337k|  for (i = 0; i < drcCoefficientsBasicCount; i++) {
  ------------------
  |  Branch (1732:15): [True: 12.2k, False: 325k]
  ------------------
 1733|  12.2k|    _skipDrcCoefficientsBasic(hBs);
 1734|  12.2k|  }
 1735|   345k|  for (i = 0; i < drcInstructionsBasicCount; i++) {
  ------------------
  |  Branch (1735:15): [True: 20.2k, False: 325k]
  ------------------
 1736|  20.2k|    _skipDrcInstructionsBasic(hBs);
 1737|  20.2k|  }
 1738|       |
 1739|   325k|  hUniDrcConfig->drcCoefficientsUniDrcCount =
 1740|   325k|      fMin(hUniDrcConfig->drcCoefficientsUniDrcCountV0, (UCHAR)2);
 1741|   399k|  for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1741:15): [True: 74.5k, False: 324k]
  ------------------
 1742|  74.5k|    DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1743|  74.5k|    FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1744|  74.5k|    err = _readDrcCoefficientsUniDrc(hBs, 0, &tmpCoef);
 1745|  74.5k|    if (err) return err;
  ------------------
  |  Branch (1745:9): [True: 1.06k, False: 73.5k]
  ------------------
 1746|  73.5k|    if (i >= 2) continue;
  ------------------
  |  Branch (1746:9): [True: 4.73k, False: 68.7k]
  ------------------
 1747|  68.7k|    if (!diff)
  ------------------
  |  Branch (1747:9): [True: 26.1k, False: 42.6k]
  ------------------
 1748|  26.1k|      diff |= (FDKmemcmp(&tmpCoef, &(hUniDrcConfig->drcCoefficientsUniDrc[i]),
 1749|  26.1k|                         sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1750|  68.7k|    hUniDrcConfig->drcCoefficientsUniDrc[i] = tmpCoef;
 1751|  68.7k|  }
 1752|       |
 1753|   324k|  hUniDrcConfig->drcInstructionsUniDrcCount =
 1754|   324k|      fMin(hUniDrcConfig->drcInstructionsUniDrcCountV0, (UCHAR)12);
 1755|   587k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1755:15): [True: 280k, False: 307k]
  ------------------
 1756|   280k|    DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1757|   280k|    FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1758|   280k|    err = _readDrcInstructionsUniDrc(hBs, 0, hUniDrcConfig, &tmpInst);
 1759|   280k|    if (err) return err;
  ------------------
  |  Branch (1759:9): [True: 17.2k, False: 262k]
  ------------------
 1760|   262k|    if (i >= 12) continue;
  ------------------
  |  Branch (1760:9): [True: 104k, False: 158k]
  ------------------
 1761|   158k|    if (!diff)
  ------------------
  |  Branch (1761:9): [True: 91.3k, False: 66.9k]
  ------------------
 1762|  91.3k|      diff |= (FDKmemcmp(&tmpInst, &(hUniDrcConfig->drcInstructionsUniDrc[i]),
 1763|  91.3k|                         sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1764|   158k|    hUniDrcConfig->drcInstructionsUniDrc[i] = tmpInst;
 1765|   158k|  }
 1766|       |
 1767|   307k|  diff |=
 1768|   307k|      _compAssign(&hUniDrcConfig->uniDrcConfigExtPresent, FDKreadBits(hBs, 1));
 1769|   307k|  hUniDrcConfig->diff = diff;
 1770|       |
 1771|   307k|  if (hUniDrcConfig->uniDrcConfigExtPresent == 1) {
  ------------------
  |  Branch (1771:7): [True: 93.9k, False: 213k]
  ------------------
 1772|  93.9k|    err = _readUniDrcConfigExtension(hBs, hUniDrcConfig);
 1773|  93.9k|    if (err) return err;
  ------------------
  |  Branch (1773:9): [True: 71.5k, False: 22.4k]
  ------------------
 1774|  93.9k|  }
 1775|       |
 1776|   235k|  return err;
 1777|   307k|}
_Z26drcDec_readLoudnessInfoSetP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1995|   199k|                           HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1996|   199k|  DRC_ERROR err = DE_OK;
 1997|   199k|  int i, diff = 0;
 1998|   199k|  if (hLoudnessInfoSet == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1998:7): [True: 0, False: 199k]
  ------------------
 1999|       |
 2000|   199k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV0,
 2001|   199k|                      FDKreadBits(hBs, 6));
 2002|   199k|  diff |=
 2003|   199k|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV0, FDKreadBits(hBs, 6));
 2004|       |
 2005|   199k|  hLoudnessInfoSet->loudnessInfoAlbumCount =
 2006|   199k|      fMin(hLoudnessInfoSet->loudnessInfoAlbumCountV0, (UCHAR)12);
 2007|   220k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV0; i++) {
  ------------------
  |  Branch (2007:15): [True: 26.3k, False: 194k]
  ------------------
 2008|  26.3k|    LOUDNESS_INFO tmpLoud;
 2009|  26.3k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2010|  26.3k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2011|  26.3k|    if (err) return err;
  ------------------
  |  Branch (2011:9): [True: 5.00k, False: 21.3k]
  ------------------
 2012|  21.3k|    if (i >= 12) continue;
  ------------------
  |  Branch (2012:9): [True: 6.06k, False: 15.2k]
  ------------------
 2013|  15.2k|    if (!diff)
  ------------------
  |  Branch (2013:9): [True: 2.10k, False: 13.1k]
  ------------------
 2014|  2.10k|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfoAlbum[i]),
 2015|  2.10k|                         sizeof(LOUDNESS_INFO)) != 0);
 2016|  15.2k|    hLoudnessInfoSet->loudnessInfoAlbum[i] = tmpLoud;
 2017|  15.2k|  }
 2018|       |
 2019|   194k|  hLoudnessInfoSet->loudnessInfoCount =
 2020|   194k|      fMin(hLoudnessInfoSet->loudnessInfoCountV0, (UCHAR)12);
 2021|   202k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV0; i++) {
  ------------------
  |  Branch (2021:15): [True: 8.32k, False: 194k]
  ------------------
 2022|  8.32k|    LOUDNESS_INFO tmpLoud;
 2023|  8.32k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2024|  8.32k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2025|  8.32k|    if (err) return err;
  ------------------
  |  Branch (2025:9): [True: 515, False: 7.81k]
  ------------------
 2026|  7.81k|    if (i >= 12) continue;
  ------------------
  |  Branch (2026:9): [True: 1.72k, False: 6.09k]
  ------------------
 2027|  6.09k|    if (!diff)
  ------------------
  |  Branch (2027:9): [True: 1.91k, False: 4.17k]
  ------------------
 2028|  1.91k|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[i]),
 2029|  1.91k|                         sizeof(LOUDNESS_INFO)) != 0);
 2030|  6.09k|    hLoudnessInfoSet->loudnessInfo[i] = tmpLoud;
 2031|  6.09k|  }
 2032|       |
 2033|   194k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoSetExtPresent,
 2034|   194k|                      FDKreadBits(hBs, 1));
 2035|   194k|  hLoudnessInfoSet->diff = diff;
 2036|       |
 2037|   194k|  if (hLoudnessInfoSet->loudnessInfoSetExtPresent) {
  ------------------
  |  Branch (2037:7): [True: 3.53k, False: 190k]
  ------------------
 2038|  3.53k|    err = _readLoudnessInfoSetExtension(hBs, hLoudnessInfoSet);
 2039|  3.53k|    if (err) return err;
  ------------------
  |  Branch (2039:9): [True: 2.06k, False: 1.46k]
  ------------------
 2040|  3.53k|  }
 2041|       |
 2042|   192k|  return err;
 2043|   194k|}
drcDec_reader.cpp:_ZL16_getTimeDeltaMinPK8GAIN_SETi:
  130|  27.5k|static int _getTimeDeltaMin(const GAIN_SET* pGset, const int deltaTminDefault) {
  131|  27.5k|  if (pGset->timeDeltaMinPresent) {
  ------------------
  |  Branch (131:7): [True: 2.77k, False: 24.7k]
  ------------------
  132|  2.77k|    return pGset->timeDeltaMin;
  133|  24.7k|  } else {
  134|  24.7k|    return deltaTminDefault;
  135|  24.7k|  }
  136|  27.5k|}
drcDec_reader.cpp:_ZL20_readDrcGainSequenceP13FDK_BITSTREAMP8GAIN_SETiiPhP9GAIN_NODE:
  410|  27.5k|                                 UCHAR* pNNodes, GAIN_NODE pNodes[16]) {
  411|  27.5k|  SHORT timeBufPrevFrame[16], timeBufCurFrame[16];
  412|  27.5k|  int nNodesNodeRes, nNodesCur, k, m;
  413|       |
  414|  27.5k|  if (gainSet->gainCodingProfile == GCP_CONSTANT) {
  ------------------
  |  Branch (414:7): [True: 1.28k, False: 26.2k]
  ------------------
  415|  1.28k|    *pNNodes = 1;
  416|  1.28k|    pNodes[0].time = frameSize - 1;
  417|  1.28k|    pNodes[0].gainDb = (FIXP_SGL)0;
  418|  26.2k|  } else {
  419|  26.2k|    _readNodes(hBs, gainSet, frameSize, timeDeltaMin, pNNodes, pNodes);
  420|       |
  421|       |    /* count number of nodes in node reservoir */
  422|  26.2k|    nNodesNodeRes = 0;
  423|  26.2k|    nNodesCur = 0;
  424|       |    /* count and buffer nodes from node reservoir */
  425|   178k|    for (k = 0; k < *pNNodes; k++) {
  ------------------
  |  Branch (425:17): [True: 151k, False: 26.2k]
  ------------------
  426|   151k|      if (k >= 16) continue;
  ------------------
  |  Branch (426:11): [True: 49.2k, False: 102k]
  ------------------
  427|   102k|      if (pNodes[k].time >= frameSize) {
  ------------------
  |  Branch (427:11): [True: 30.6k, False: 71.8k]
  ------------------
  428|       |        /* write node reservoir times into buffer */
  429|  30.6k|        timeBufPrevFrame[nNodesNodeRes] = pNodes[k].time;
  430|  30.6k|        nNodesNodeRes++;
  431|  71.8k|      } else { /* times from current frame */
  432|  71.8k|        timeBufCurFrame[nNodesCur] = pNodes[k].time;
  433|  71.8k|        nNodesCur++;
  434|  71.8k|      }
  435|   102k|    }
  436|       |    /* compose right time order (bit reservoir first) */
  437|  56.9k|    for (k = 0; k < nNodesNodeRes; k++) {
  ------------------
  |  Branch (437:17): [True: 30.6k, False: 26.2k]
  ------------------
  438|       |      /* subtract two time frameSize: one to remove node reservoir offset and
  439|       |       * one to get the negative index relative to the current frame
  440|       |       */
  441|  30.6k|      pNodes[k].time = timeBufPrevFrame[k] - 2 * frameSize;
  442|  30.6k|    }
  443|       |    /* ...and times from current frame */
  444|  98.0k|    for (m = 0; m < nNodesCur; m++, k++) {
  ------------------
  |  Branch (444:17): [True: 71.8k, False: 26.2k]
  ------------------
  445|  71.8k|      pNodes[k].time = timeBufCurFrame[m];
  446|  71.8k|    }
  447|  26.2k|  }
  448|  27.5k|}
drcDec_reader.cpp:_ZL10_readNodesP13FDK_BITSTREAMP8GAIN_SETiiPhP9GAIN_NODE:
  375|  26.2k|                       UCHAR* pNNodes, GAIN_NODE* pNodes) {
  376|  26.2k|  int timeOffset, drcGainCodingMode, nNodes;
  377|  26.2k|  int Z = _getZ(frameSize / timeDeltaMin);
  378|  26.2k|  if (gainSet->timeAlignment == 0) {
  ------------------
  |  Branch (378:7): [True: 23.5k, False: 2.73k]
  ------------------
  379|  23.5k|    timeOffset = -1;
  380|  23.5k|  } else {
  381|  2.73k|    timeOffset = -timeDeltaMin +
  382|  2.73k|                 (timeDeltaMin - 1) /
  383|  2.73k|                     2; /* timeOffset = - deltaTmin + floor((deltaTmin-1)/2); */
  384|  2.73k|  }
  385|       |
  386|  26.2k|  drcGainCodingMode = FDKreadBits(hBs, 1);
  387|  26.2k|  if (drcGainCodingMode == 0) {
  ------------------
  |  Branch (387:7): [True: 13.9k, False: 12.2k]
  ------------------
  388|       |    /* "simple" mode: only one node at the end of the frame with slope = 0 */
  389|  13.9k|    nNodes = 1;
  390|  13.9k|    pNodes[0].gainDb = _decodeGainInitial(
  391|  13.9k|        hBs, (GAIN_CODING_PROFILE)gainSet->gainCodingProfile);
  392|  13.9k|    pNodes[0].time = frameSize + timeOffset;
  393|  13.9k|  } else {
  394|  12.2k|    nNodes = _decodeNNodes(hBs);
  395|       |
  396|  12.2k|    _decodeSlopes(hBs, (GAIN_INTERPOLATION_TYPE)gainSet->gainInterpolationType,
  397|  12.2k|                  nNodes, pNodes);
  398|       |
  399|  12.2k|    _decodeTimes(hBs, timeDeltaMin, frameSize, gainSet->fullFrame, timeOffset,
  400|  12.2k|                 Z, nNodes, pNodes);
  401|       |
  402|  12.2k|    _decodeGains(hBs, (GAIN_CODING_PROFILE)gainSet->gainCodingProfile, nNodes,
  403|  12.2k|                 pNodes);
  404|  12.2k|  }
  405|  26.2k|  *pNNodes = (UCHAR)nNodes;
  406|  26.2k|}
drcDec_reader.cpp:_ZL5_getZi:
  119|  26.2k|static int _getZ(const int nNodesMax) {
  120|       |  /* Z is the minimum codeword length that is needed to encode all possible
  121|       |   * timeDelta values */
  122|       |  /* Z = ceil(log2(2*nNodesMax)) */
  123|  26.2k|  int Z = 1;
  124|   184k|  while ((1 << Z) < (2 * nNodesMax)) {
  ------------------
  |  Branch (124:10): [True: 158k, False: 26.2k]
  ------------------
  125|   158k|    Z++;
  126|   158k|  }
  127|  26.2k|  return Z;
  128|  26.2k|}
drcDec_reader.cpp:_ZL18_decodeGainInitialP13FDK_BITSTREAM19GAIN_CODING_PROFILE:
  213|  26.2k|    HANDLE_FDK_BITSTREAM hBs, const GAIN_CODING_PROFILE gainCodingProfile) {
  214|  26.2k|  int sign, magn;
  215|  26.2k|  FIXP_SGL gainInitial = (FIXP_SGL)0;
  216|  26.2k|  switch (gainCodingProfile) {
  ------------------
  |  Branch (216:11): [True: 26.2k, False: 0]
  ------------------
  217|  19.1k|    case GCP_REGULAR:
  ------------------
  |  Branch (217:5): [True: 19.1k, False: 7.11k]
  ------------------
  218|  19.1k|      sign = FDKreadBits(hBs, 1);
  219|  19.1k|      magn = FDKreadBits(hBs, 8);
  220|       |
  221|  19.1k|      gainInitial =
  222|  19.1k|          (FIXP_SGL)(magn << (FRACT_BITS - 1 - 3 - 7)); /* magn * 0.125; */
  ------------------
  |  |  112|  19.1k|#define FRACT_BITS 16  /* single precision */
  ------------------
  223|  19.1k|      if (sign) gainInitial = -gainInitial;
  ------------------
  |  Branch (223:11): [True: 3.88k, False: 15.2k]
  ------------------
  224|  19.1k|      break;
  225|  3.39k|    case GCP_FADING:
  ------------------
  |  Branch (225:5): [True: 3.39k, False: 22.8k]
  ------------------
  226|  3.39k|      sign = FDKreadBits(hBs, 1);
  227|  3.39k|      if (sign == 0)
  ------------------
  |  Branch (227:11): [True: 1.46k, False: 1.93k]
  ------------------
  228|  1.46k|        gainInitial = (FIXP_SGL)0;
  229|  1.93k|      else {
  230|  1.93k|        magn = FDKreadBits(hBs, 10);
  231|  1.93k|        gainInitial = -(FIXP_SGL)(
  232|  1.93k|            (magn + 1) << (FRACT_BITS - 1 - 3 - 7)); /* - (magn + 1) * 0.125; */
  ------------------
  |  |  112|  1.93k|#define FRACT_BITS 16  /* single precision */
  ------------------
  233|  1.93k|      }
  234|  3.39k|      break;
  235|  3.72k|    case GCP_CLIPPING_DUCKING:
  ------------------
  |  Branch (235:5): [True: 3.72k, False: 22.5k]
  ------------------
  236|  3.72k|      sign = FDKreadBits(hBs, 1);
  237|  3.72k|      if (sign == 0)
  ------------------
  |  Branch (237:11): [True: 1.38k, False: 2.33k]
  ------------------
  238|  1.38k|        gainInitial = (FIXP_SGL)0;
  239|  2.33k|      else {
  240|  2.33k|        magn = FDKreadBits(hBs, 8);
  241|  2.33k|        gainInitial = -(FIXP_SGL)(
  242|  2.33k|            (magn + 1) << (FRACT_BITS - 1 - 3 - 7)); /* - (magn + 1) * 0.125; */
  ------------------
  |  |  112|  2.33k|#define FRACT_BITS 16  /* single precision */
  ------------------
  243|  2.33k|      }
  244|  3.72k|      break;
  245|      0|    case GCP_CONSTANT:
  ------------------
  |  Branch (245:5): [True: 0, False: 26.2k]
  ------------------
  246|      0|      break;
  247|  26.2k|  }
  248|  26.2k|  return gainInitial;
  249|  26.2k|}
drcDec_reader.cpp:_ZL13_decodeNNodesP13FDK_BITSTREAM:
  251|  12.2k|static int _decodeNNodes(HANDLE_FDK_BITSTREAM hBs) {
  252|  12.2k|  int nNodes = 0, endMarker = 0;
  253|       |
  254|       |  /* decode number of nodes */
  255|   150k|  while (endMarker != 1) {
  ------------------
  |  Branch (255:10): [True: 137k, False: 12.2k]
  ------------------
  256|   137k|    nNodes++;
  257|   137k|    if (nNodes >= 128) break;
  ------------------
  |  Branch (257:9): [True: 32, False: 137k]
  ------------------
  258|   137k|    endMarker = FDKreadBits(hBs, 1);
  259|   137k|  }
  260|  12.2k|  return nNodes;
  261|  12.2k|}
drcDec_reader.cpp:_ZL13_decodeSlopesP13FDK_BITSTREAM23GAIN_INTERPOLATION_TYPEiP9GAIN_NODE:
  290|  12.2k|                          const int nNodes, GAIN_NODE* pNodes) {
  291|  12.2k|  int k = 0;
  292|       |
  293|  12.2k|  if (gainInterpolationType == GIT_SPLINE) {
  ------------------
  |  Branch (293:7): [True: 9.26k, False: 3.02k]
  ------------------
  294|       |    /* decode slope steepness */
  295|   139k|    for (k = 0; k < nNodes; k++) {
  ------------------
  |  Branch (295:17): [True: 129k, False: 9.26k]
  ------------------
  296|   129k|      _decodeHuffmanCW((Huffman)&slopeSteepness_huffman, hBs);
  297|   129k|    }
  298|  9.26k|  }
  299|  12.2k|}
drcDec_reader.cpp:_ZL12_decodeTimesP13FDK_BITSTREAMiiiiiiP9GAIN_NODE:
  325|  12.2k|                         GAIN_NODE* pNodes) {
  326|  12.2k|  int timeDelta, k;
  327|  12.2k|  int timeOffs = timeOffset;
  328|  12.2k|  int frameEndFlag, nodeTimeTmp, nodeResFlag;
  329|       |
  330|  12.2k|  if (fullFrame == 0) {
  ------------------
  |  Branch (330:7): [True: 9.87k, False: 2.41k]
  ------------------
  331|  9.87k|    frameEndFlag = FDKreadBits(hBs, 1);
  332|  9.87k|  } else {
  333|  2.41k|    frameEndFlag = 1;
  334|  2.41k|  }
  335|       |
  336|  12.2k|  if (frameEndFlag ==
  ------------------
  |  Branch (336:7): [True: 6.66k, False: 5.62k]
  ------------------
  337|  12.2k|      1) { /* frameEndFlag == 1 signals that the last node is at the end of the
  338|       |              DRC frame */
  339|  6.66k|    nodeResFlag = 0;
  340|  51.1k|    for (k = 0; k < nNodes - 1; k++) {
  ------------------
  |  Branch (340:17): [True: 44.4k, False: 6.66k]
  ------------------
  341|       |      /* decode a delta time value */
  342|  44.4k|      timeDelta = _decodeTimeDelta(hBs, Z);
  343|  44.4k|      if (k >= (16 - 1)) continue;
  ------------------
  |  Branch (343:11): [True: 19.2k, False: 25.2k]
  ------------------
  344|       |      /* frameEndFlag == 1 needs special handling for last node with node
  345|       |       * reservoir */
  346|  25.2k|      nodeTimeTmp = timeOffs + timeDelta * deltaTmin;
  347|  25.2k|      if (nodeTimeTmp > frameSize + timeOffset) {
  ------------------
  |  Branch (347:11): [True: 10.6k, False: 14.6k]
  ------------------
  348|  10.6k|        if (nodeResFlag == 0) {
  ------------------
  |  Branch (348:13): [True: 1.63k, False: 8.99k]
  ------------------
  349|  1.63k|          pNodes[k].time = frameSize + timeOffset;
  350|  1.63k|          nodeResFlag = 1;
  351|  1.63k|        }
  352|  10.6k|        pNodes[k + 1].time = nodeTimeTmp;
  353|  14.6k|      } else {
  354|  14.6k|        pNodes[k].time = nodeTimeTmp;
  355|  14.6k|      }
  356|  25.2k|      timeOffs = nodeTimeTmp;
  357|  25.2k|    }
  358|  6.66k|    if (nodeResFlag == 0) {
  ------------------
  |  Branch (358:9): [True: 5.03k, False: 1.63k]
  ------------------
  359|  5.03k|      k = fMin(k, 16 - 1);
  360|  5.03k|      pNodes[k].time = frameSize + timeOffset;
  361|  5.03k|    }
  362|  6.66k|  } else {
  363|  92.2k|    for (k = 0; k < nNodes; k++) {
  ------------------
  |  Branch (363:17): [True: 86.5k, False: 5.62k]
  ------------------
  364|       |      /* decode a delta time value */
  365|  86.5k|      timeDelta = _decodeTimeDelta(hBs, Z);
  366|  86.5k|      if (k >= 16) continue;
  ------------------
  |  Branch (366:11): [True: 30.0k, False: 56.5k]
  ------------------
  367|  56.5k|      pNodes[k].time = timeOffs + timeDelta * deltaTmin;
  368|  56.5k|      timeOffs = pNodes[k].time;
  369|  56.5k|    }
  370|  5.62k|  }
  371|  12.2k|}
drcDec_reader.cpp:_ZL16_decodeTimeDeltaP13FDK_BITSTREAMi:
  301|   131k|static int _decodeTimeDelta(HANDLE_FDK_BITSTREAM hBs, const int Z) {
  302|   131k|  int prefix, mu;
  303|       |
  304|   131k|  prefix = FDKreadBits(hBs, 2);
  305|   131k|  switch (prefix) {
  306|  80.9k|    case 0x0:
  ------------------
  |  Branch (306:5): [True: 80.9k, False: 50.1k]
  ------------------
  307|  80.9k|      return 1;
  308|  21.0k|    case 0x1:
  ------------------
  |  Branch (308:5): [True: 21.0k, False: 109k]
  ------------------
  309|  21.0k|      mu = FDKreadBits(hBs, 2);
  310|  21.0k|      return mu + 2;
  311|  16.1k|    case 0x2:
  ------------------
  |  Branch (311:5): [True: 16.1k, False: 114k]
  ------------------
  312|  16.1k|      mu = FDKreadBits(hBs, 3);
  313|  16.1k|      return mu + 6;
  314|  12.9k|    case 0x3:
  ------------------
  |  Branch (314:5): [True: 12.9k, False: 118k]
  ------------------
  315|  12.9k|      mu = FDKreadBits(hBs, Z);
  316|  12.9k|      return mu + 14;
  317|      0|    default:
  ------------------
  |  Branch (317:5): [True: 0, False: 131k]
  ------------------
  318|      0|      return 0;
  319|   131k|  }
  320|   131k|}
drcDec_reader.cpp:_ZL12_decodeGainsP13FDK_BITSTREAM19GAIN_CODING_PROFILEiP9GAIN_NODE:
  265|  12.2k|                         const int nNodes, GAIN_NODE* pNodes) {
  266|  12.2k|  int k, deltaGain;
  267|  12.2k|  Huffman deltaGainCodebook;
  268|       |
  269|  12.2k|  pNodes[0].gainDb = _decodeGainInitial(hBs, gainCodingProfile);
  270|       |
  271|  12.2k|  if (gainCodingProfile == GCP_CLIPPING_DUCKING) {
  ------------------
  |  Branch (271:7): [True: 2.50k, False: 9.78k]
  ------------------
  272|  2.50k|    deltaGainCodebook = (Huffman)&deltaGain_codingProfile_2_huffman;
  273|  9.78k|  } else {
  274|  9.78k|    deltaGainCodebook = (Huffman)&deltaGain_codingProfile_0_1_huffman;
  275|  9.78k|  }
  276|       |
  277|   137k|  for (k = 1; k < nNodes; k++) {
  ------------------
  |  Branch (277:15): [True: 125k, False: 12.2k]
  ------------------
  278|   125k|    deltaGain = _decodeHuffmanCW(deltaGainCodebook, hBs);
  279|   125k|    if (k >= 16) continue;
  ------------------
  |  Branch (279:9): [True: 49.2k, False: 76.1k]
  ------------------
  280|       |    /* gain_dB_e = 7 */
  281|  76.1k|    pNodes[k].gainDb =
  282|  76.1k|        pNodes[k - 1].gainDb +
  283|  76.1k|        (FIXP_SGL)(deltaGain << (FRACT_BITS - 1 - 7 -
  ------------------
  |  |  112|  76.1k|#define FRACT_BITS 16  /* single precision */
  ------------------
  284|  76.1k|                                 3)); /* pNodes[k-1].gainDb + 0.125*deltaGain */
  285|  76.1k|  }
  286|  12.2k|}
drcDec_reader.cpp:_ZL24_readUniDrcGainExtensionP13FDK_BITSTREAMP22UNI_DRC_GAIN_EXTENSION:
  451|  1.52k|                                          UNI_DRC_GAIN_EXTENSION* pExt) {
  452|  1.52k|  DRC_ERROR err = DE_OK;
  453|  1.52k|  int k, bitSizeLen, extSizeBits, bitSize;
  454|       |
  455|  1.52k|  k = 0;
  456|  1.52k|  pExt->uniDrcGainExtType[k] = FDKreadBits(hBs, 4);
  457|  3.80k|  while (pExt->uniDrcGainExtType[k] != UNIDRCGAINEXT_TERM) {
  ------------------
  |  |  115|  3.80k|#define UNIDRCGAINEXT_TERM 0x0
  ------------------
  |  Branch (457:10): [True: 2.43k, False: 1.37k]
  ------------------
  458|  2.43k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (458:9): [True: 151, False: 2.28k]
  ------------------
  459|  2.28k|    bitSizeLen = FDKreadBits(hBs, 3);
  460|  2.28k|    extSizeBits = bitSizeLen + 4;
  461|       |
  462|  2.28k|    bitSize = FDKreadBits(hBs, extSizeBits);
  463|  2.28k|    pExt->extBitSize[k] = bitSize + 1;
  464|       |
  465|  2.28k|    switch (pExt->uniDrcGainExtType[k]) {
  466|       |      /* add future extensions here */
  467|  2.28k|      default:
  ------------------
  |  Branch (467:7): [True: 2.28k, False: 0]
  ------------------
  468|  2.28k|        FDKpushFor(hBs, pExt->extBitSize[k]);
  469|  2.28k|        break;
  470|  2.28k|    }
  471|  2.28k|    k++;
  472|  2.28k|    pExt->uniDrcGainExtType[k] = FDKreadBits(hBs, 4);
  473|  2.28k|  }
  474|       |
  475|  1.37k|  return err;
  476|  1.52k|}
drcDec_reader.cpp:_ZL11_compAssignPhh:
  139|  2.48M|static inline int _compAssign(UCHAR* dest, const UCHAR src) {
  140|  2.48M|  int diff = 0;
  141|  2.48M|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (141:7): [True: 328k, False: 2.15M]
  ------------------
  142|  2.48M|  *dest = src;
  143|  2.48M|  return diff;
  144|  2.48M|}
drcDec_reader.cpp:_ZL11_compAssignPjj:
  146|  8.26k|static inline int _compAssign(ULONG* dest, const ULONG src) {
  147|  8.26k|  int diff = 0;
  148|  8.26k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (148:7): [True: 5.63k, False: 2.63k]
  ------------------
  149|  8.26k|  *dest = src;
  150|  8.26k|  return diff;
  151|  8.26k|}
drcDec_reader.cpp:_ZL18_readChannelLayoutP13FDK_BITSTREAMP14CHANNEL_LAYOUT:
 1478|   346k|                                    CHANNEL_LAYOUT* pChan) {
 1479|   346k|  DRC_ERROR err = DE_OK;
 1480|       |
 1481|   346k|  pChan->baseChannelCount = FDKreadBits(hBs, 7);
 1482|       |
 1483|   346k|  if (pChan->baseChannelCount > 8) return DE_NOT_OK;
  ------------------
  |  Branch (1483:7): [True: 18.0k, False: 328k]
  ------------------
 1484|       |
 1485|   328k|  pChan->layoutSignalingPresent = FDKreadBits(hBs, 1);
 1486|       |
 1487|   328k|  if (pChan->layoutSignalingPresent) {
  ------------------
  |  Branch (1487:7): [True: 29.3k, False: 298k]
  ------------------
 1488|  29.3k|    pChan->definedLayout = FDKreadBits(hBs, 8);
 1489|       |
 1490|  29.3k|    if (pChan->definedLayout == 0) {
  ------------------
  |  Branch (1490:9): [True: 1.43k, False: 27.8k]
  ------------------
 1491|  1.43k|      int i;
 1492|  9.03k|      for (i = 0; i < pChan->baseChannelCount; i++) {
  ------------------
  |  Branch (1492:19): [True: 7.59k, False: 1.43k]
  ------------------
 1493|  7.59k|        if (i < 8) {
  ------------------
  |  Branch (1493:13): [True: 7.59k, False: 0]
  ------------------
 1494|  7.59k|          pChan->speakerPosition[i] = FDKreadBits(hBs, 7);
 1495|  7.59k|        } else {
 1496|      0|          FDKpushFor(hBs, 7);
 1497|      0|        }
 1498|  7.59k|      }
 1499|  1.43k|    }
 1500|  29.3k|  }
 1501|   328k|  return err;
 1502|   346k|}
drcDec_reader.cpp:_ZL24_readDownmixInstructionsP13FDK_BITSTREAMiP14CHANNEL_LAYOUTP20DOWNMIX_INSTRUCTIONS:
 1507|  2.35M|                                          DOWNMIX_INSTRUCTIONS* pDown) {
 1508|  2.35M|  DRC_ERROR err = DE_OK;
 1509|       |
 1510|  2.35M|  pDown->downmixId = FDKreadBits(hBs, 7);
 1511|  2.35M|  pDown->targetChannelCount = FDKreadBits(hBs, 7);
 1512|  2.35M|  pDown->targetLayout = FDKreadBits(hBs, 8);
 1513|  2.35M|  pDown->downmixCoefficientsPresent = FDKreadBits(hBs, 1);
 1514|       |
 1515|  2.35M|  if (pDown->downmixCoefficientsPresent) {
  ------------------
  |  Branch (1515:7): [True: 828k, False: 1.52M]
  ------------------
 1516|   828k|    int nDownmixCoeffs = pDown->targetChannelCount * pChan->baseChannelCount;
 1517|   828k|    int i;
 1518|   828k|    if (nDownmixCoeffs > 8 * 8) return DE_NOT_OK;
  ------------------
  |  Branch (1518:9): [True: 4.55k, False: 824k]
  ------------------
 1519|   824k|    if (version == 0) {
  ------------------
  |  Branch (1519:9): [True: 559k, False: 264k]
  ------------------
 1520|   559k|      pDown->bsDownmixOffset = 0;
 1521|   609k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1521:19): [True: 50.4k, False: 559k]
  ------------------
 1522|       |        /* LFE downmix coefficients are not supported. */
 1523|  50.4k|        pDown->downmixCoefficient[i] = downmixCoeff[FDKreadBits(hBs, 4)];
 1524|  50.4k|      }
 1525|   559k|    } else {
 1526|   264k|      pDown->bsDownmixOffset = FDKreadBits(hBs, 4);
 1527|   471k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1527:19): [True: 206k, False: 264k]
  ------------------
 1528|   206k|        pDown->downmixCoefficient[i] = downmixCoeffV1[FDKreadBits(hBs, 5)];
 1529|   206k|      }
 1530|   264k|    }
 1531|   824k|  }
 1532|  2.34M|  return err;
 1533|  2.35M|}
drcDec_reader.cpp:_ZL25_skipDrcCoefficientsBasicP13FDK_BITSTREAM:
 1104|  12.2k|static void _skipDrcCoefficientsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1105|  12.2k|  FDKpushFor(hBs, 4); /* drcLocation */
 1106|  12.2k|  FDKpushFor(hBs, 7); /* drcCharacteristic */
 1107|  12.2k|}
drcDec_reader.cpp:_ZL25_skipDrcInstructionsBasicP13FDK_BITSTREAM:
 1215|  20.2k|static void _skipDrcInstructionsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1216|  20.2k|  int drcSetEffect;
 1217|  20.2k|  int additionalDownmixIdPresent, additionalDownmixIdCount,
 1218|  20.2k|      limiterPeakTargetPresent;
 1219|  20.2k|  int drcSetTargetLoudnessPresent, drcSetTargetLoudnessValueLowerPresent;
 1220|       |
 1221|  20.2k|  FDKpushFor(hBs, 6); /* drcSetId */
 1222|  20.2k|  FDKpushFor(hBs, 4); /* drcLocation */
 1223|  20.2k|  FDKpushFor(hBs, 7); /* downmixId */
 1224|  20.2k|  additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1225|  20.2k|  if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1225:7): [True: 3.45k, False: 16.8k]
  ------------------
 1226|  3.45k|    additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1227|  3.45k|    FDKpushFor(hBs, 7 * additionalDownmixIdCount); /* additionalDownmixId */
 1228|  3.45k|  }
 1229|       |
 1230|  20.2k|  drcSetEffect = FDKreadBits(hBs, 16);
 1231|  20.2k|  if (!(drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF))) {
  ------------------
  |  Branch (1231:7): [True: 16.5k, False: 3.71k]
  ------------------
 1232|  16.5k|    limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1233|  16.5k|    if (limiterPeakTargetPresent) {
  ------------------
  |  Branch (1233:9): [True: 1.67k, False: 14.8k]
  ------------------
 1234|  1.67k|      FDKpushFor(hBs, 8); /* bsLimiterPeakTarget */
 1235|  1.67k|    }
 1236|  16.5k|  }
 1237|       |
 1238|  20.2k|  drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1239|  20.2k|  if (drcSetTargetLoudnessPresent) {
  ------------------
  |  Branch (1239:7): [True: 3.43k, False: 16.8k]
  ------------------
 1240|  3.43k|    FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueUpper */
 1241|  3.43k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1242|  3.43k|    if (drcSetTargetLoudnessValueLowerPresent) {
  ------------------
  |  Branch (1242:9): [True: 1.61k, False: 1.81k]
  ------------------
 1243|  1.61k|      FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueLower */
 1244|  1.61k|    }
 1245|  3.43k|  }
 1246|  20.2k|}
drcDec_reader.cpp:_ZL26_readDrcCoefficientsUniDrcP13FDK_BITSTREAMiP24DRC_COEFFICIENTS_UNI_DRC:
 1111|   120k|                                            DRC_COEFFICIENTS_UNI_DRC* pCoef) {
 1112|   120k|  DRC_ERROR err = DE_OK;
 1113|   120k|  int i, bsDrcFrameSize;
 1114|   120k|  int gainSequenceIndex = -1;
 1115|       |
 1116|   120k|  pCoef->drcLocation = FDKreadBits(hBs, 4);
 1117|   120k|  pCoef->drcFrameSizePresent = FDKreadBits(hBs, 1);
 1118|       |
 1119|   120k|  if (pCoef->drcFrameSizePresent == 1) {
  ------------------
  |  Branch (1119:7): [True: 65.2k, False: 55.6k]
  ------------------
 1120|  65.2k|    bsDrcFrameSize = FDKreadBits(hBs, 15);
 1121|  65.2k|    pCoef->drcFrameSize = bsDrcFrameSize + 1;
 1122|  65.2k|  }
 1123|   120k|  if (version == 0) {
  ------------------
  |  Branch (1123:7): [True: 74.5k, False: 46.3k]
  ------------------
 1124|  74.5k|    int gainSequenceCount = 0, gainSetCount;
 1125|  74.5k|    pCoef->characteristicLeftCount = 0;
 1126|  74.5k|    pCoef->characteristicRightCount = 0;
 1127|  74.5k|    gainSetCount = FDKreadBits(hBs, 6);
 1128|  74.5k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1129|   110k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1129:17): [True: 37.3k, False: 73.5k]
  ------------------
 1130|  37.3k|      GAIN_SET tmpGset;
 1131|  37.3k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1132|  37.3k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1133|  37.3k|      if (err) return err;
  ------------------
  |  Branch (1133:11): [True: 1.06k, False: 36.2k]
  ------------------
 1134|  36.2k|      gainSequenceCount += tmpGset.bandCount;
 1135|       |
 1136|  36.2k|      if (i >= 12) continue;
  ------------------
  |  Branch (1136:11): [True: 14.9k, False: 21.2k]
  ------------------
 1137|  21.2k|      pCoef->gainSet[i] = tmpGset;
 1138|  21.2k|    }
 1139|  73.5k|    pCoef->gainSequenceCount = gainSequenceCount;
 1140|  73.5k|  } else { /* (version == 1) */
 1141|  46.3k|    UCHAR drcCharacteristicLeftPresent, drcCharacteristicRightPresent;
 1142|  46.3k|    UCHAR shapeFiltersPresent, shapeFilterCount, tmpPresent;
 1143|  46.3k|    int gainSetCount;
 1144|  46.3k|    drcCharacteristicLeftPresent = FDKreadBits(hBs, 1);
 1145|  46.3k|    if (drcCharacteristicLeftPresent) {
  ------------------
  |  Branch (1145:9): [True: 7.06k, False: 39.2k]
  ------------------
 1146|  7.06k|      pCoef->characteristicLeftCount = FDKreadBits(hBs, 4);
 1147|  7.06k|      if ((pCoef->characteristicLeftCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1147:11): [True: 0, False: 7.06k]
  ------------------
 1148|  67.7k|      for (i = 0; i < pCoef->characteristicLeftCount; i++) {
  ------------------
  |  Branch (1148:19): [True: 60.6k, False: 7.06k]
  ------------------
 1149|  60.6k|        err = _readCustomDrcCharacteristic(
 1150|  60.6k|            hBs, CS_LEFT, &(pCoef->characteristicLeftFormat[i + 1]),
 1151|  60.6k|            &(pCoef->customCharacteristicLeft[i + 1]), 0);
 1152|  60.6k|        if (err) return err;
  ------------------
  |  Branch (1152:13): [True: 0, False: 60.6k]
  ------------------
 1153|  60.6k|      }
 1154|  7.06k|    }
 1155|  46.3k|    drcCharacteristicRightPresent = FDKreadBits(hBs, 1);
 1156|  46.3k|    if (drcCharacteristicRightPresent) {
  ------------------
  |  Branch (1156:9): [True: 3.07k, False: 43.2k]
  ------------------
 1157|  3.07k|      pCoef->characteristicRightCount = FDKreadBits(hBs, 4);
 1158|  3.07k|      if ((pCoef->characteristicRightCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1158:11): [True: 0, False: 3.07k]
  ------------------
 1159|  14.6k|      for (i = 0; i < pCoef->characteristicRightCount; i++) {
  ------------------
  |  Branch (1159:19): [True: 11.5k, False: 3.07k]
  ------------------
 1160|  11.5k|        err = _readCustomDrcCharacteristic(
 1161|  11.5k|            hBs, CS_RIGHT, &(pCoef->characteristicRightFormat[i + 1]),
 1162|  11.5k|            &(pCoef->customCharacteristicRight[i + 1]), 0);
 1163|  11.5k|        if (err) return err;
  ------------------
  |  Branch (1163:13): [True: 0, False: 11.5k]
  ------------------
 1164|  11.5k|      }
 1165|  3.07k|    }
 1166|  46.3k|    shapeFiltersPresent = FDKreadBits(hBs, 1);
 1167|  46.3k|    if (shapeFiltersPresent) {
  ------------------
  |  Branch (1167:9): [True: 6.17k, False: 40.1k]
  ------------------
 1168|  6.17k|      shapeFilterCount = FDKreadBits(hBs, 4);
 1169|  41.0k|      for (i = 0; i < shapeFilterCount; i++) {
  ------------------
  |  Branch (1169:19): [True: 34.8k, False: 6.17k]
  ------------------
 1170|  34.8k|        tmpPresent = FDKreadBits(hBs, 1);
 1171|  34.8k|        if (tmpPresent) /* lfCutParams */
  ------------------
  |  Branch (1171:13): [True: 11.6k, False: 23.1k]
  ------------------
 1172|  11.6k|          FDKpushFor(hBs, 5);
 1173|       |
 1174|  34.8k|        tmpPresent = FDKreadBits(hBs, 1);
 1175|  34.8k|        if (tmpPresent) /* lfBoostParams */
  ------------------
  |  Branch (1175:13): [True: 12.4k, False: 22.4k]
  ------------------
 1176|  12.4k|          FDKpushFor(hBs, 5);
 1177|       |
 1178|  34.8k|        tmpPresent = FDKreadBits(hBs, 1);
 1179|  34.8k|        if (tmpPresent) /* hfCutParams */
  ------------------
  |  Branch (1179:13): [True: 10.4k, False: 24.4k]
  ------------------
 1180|  10.4k|          FDKpushFor(hBs, 5);
 1181|       |
 1182|  34.8k|        tmpPresent = FDKreadBits(hBs, 1);
 1183|  34.8k|        if (tmpPresent) /* hfBoostParams */
  ------------------
  |  Branch (1183:13): [True: 11.4k, False: 23.4k]
  ------------------
 1184|  11.4k|          FDKpushFor(hBs, 5);
 1185|  34.8k|      }
 1186|  6.17k|    }
 1187|  46.3k|    pCoef->gainSequenceCount = FDKreadBits(hBs, 6);
 1188|  46.3k|    gainSetCount = FDKreadBits(hBs, 6);
 1189|  46.3k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1190|   122k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1190:17): [True: 82.2k, False: 39.8k]
  ------------------
 1191|  82.2k|      GAIN_SET tmpGset;
 1192|  82.2k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1193|  82.2k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1194|  82.2k|      if (err) return err;
  ------------------
  |  Branch (1194:11): [True: 6.50k, False: 75.7k]
  ------------------
 1195|       |
 1196|  75.7k|      if (i >= 12) continue;
  ------------------
  |  Branch (1196:11): [True: 34.7k, False: 40.9k]
  ------------------
 1197|  40.9k|      pCoef->gainSet[i] = tmpGset;
 1198|  40.9k|    }
 1199|  46.3k|  }
 1200|  1.47M|  for (i = 0; i < 12; i++) {
  ------------------
  |  Branch (1200:15): [True: 1.35M, False: 113k]
  ------------------
 1201|  1.35M|    pCoef->gainSetIndexForGainSequence[i] = 255;
 1202|  1.35M|  }
 1203|   170k|  for (i = 0; i < pCoef->gainSetCount; i++) {
  ------------------
  |  Branch (1203:15): [True: 57.3k, False: 113k]
  ------------------
 1204|  57.3k|    int b;
 1205|   105k|    for (b = 0; b < pCoef->gainSet[i].bandCount; b++) {
  ------------------
  |  Branch (1205:17): [True: 47.9k, False: 57.3k]
  ------------------
 1206|  47.9k|      if (pCoef->gainSet[i].gainSequenceIndex[b] >= 12) continue;
  ------------------
  |  Branch (1206:11): [True: 4.94k, False: 42.9k]
  ------------------
 1207|  42.9k|      pCoef->gainSetIndexForGainSequence[pCoef->gainSet[i]
 1208|  42.9k|                                             .gainSequenceIndex[b]] = i;
 1209|  42.9k|    }
 1210|  57.3k|  }
 1211|       |
 1212|   113k|  return err;
 1213|   120k|}
drcDec_reader.cpp:_ZL12_readGainSetP13FDK_BITSTREAMiPiP8GAIN_SETi:
  708|   119k|                              int isBox) {
  709|   119k|  if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (709:7): [True: 0, False: 119k]
  ------------------
  710|   119k|  pGSet->gainCodingProfile = FDKreadBits(hBs, 2);
  711|   119k|  pGSet->gainInterpolationType = FDKreadBits(hBs, 1);
  712|   119k|  pGSet->fullFrame = FDKreadBits(hBs, 1);
  713|   119k|  pGSet->timeAlignment = FDKreadBits(hBs, 1);
  714|   119k|  pGSet->timeDeltaMinPresent = FDKreadBits(hBs, 1);
  715|       |
  716|   119k|  if (pGSet->timeDeltaMinPresent) {
  ------------------
  |  Branch (716:7): [True: 26.1k, False: 93.3k]
  ------------------
  717|  26.1k|    int bsTimeDeltaMin;
  718|  26.1k|    if (isBox) FDKpushFor(hBs, 5); /* reserved */
  ------------------
  |  Branch (718:9): [True: 0, False: 26.1k]
  ------------------
  719|  26.1k|    bsTimeDeltaMin = FDKreadBits(hBs, 11);
  720|  26.1k|    pGSet->timeDeltaMin = bsTimeDeltaMin + 1;
  721|  26.1k|  }
  722|       |
  723|   119k|  if (pGSet->gainCodingProfile != GCP_CONSTANT) {
  ------------------
  |  Branch (723:7): [True: 98.1k, False: 21.4k]
  ------------------
  724|  98.1k|    int i;
  725|  98.1k|    if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (725:9): [True: 0, False: 98.1k]
  ------------------
  726|  98.1k|    pGSet->bandCount = FDKreadBits(hBs, 4);
  727|  98.1k|    if (pGSet->bandCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (727:9): [True: 7.56k, False: 90.5k]
  ------------------
  728|       |
  729|  90.5k|    if ((pGSet->bandCount > 1) || isBox) {
  ------------------
  |  Branch (729:9): [True: 13.7k, False: 76.8k]
  |  Branch (729:35): [True: 0, False: 76.8k]
  ------------------
  730|  13.7k|      pGSet->drcBandType = FDKreadBits(hBs, 1);
  731|  13.7k|    }
  732|       |
  733|   133k|    for (i = 0; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (733:17): [True: 43.2k, False: 90.5k]
  ------------------
  734|  43.2k|      if (version == 0) {
  ------------------
  |  Branch (734:11): [True: 14.2k, False: 28.9k]
  ------------------
  735|  14.2k|        *gainSequenceIndex = (*gainSequenceIndex) + 1;
  736|  28.9k|      } else {
  737|  28.9k|        int indexPresent;
  738|  28.9k|        indexPresent = (isBox) ? 1 : FDKreadBits(hBs, 1);
  ------------------
  |  Branch (738:24): [True: 0, False: 28.9k]
  ------------------
  739|  28.9k|        if (indexPresent) {
  ------------------
  |  Branch (739:13): [True: 8.67k, False: 20.2k]
  ------------------
  740|  8.67k|          int bsIndex;
  741|  8.67k|          bsIndex = FDKreadBits(hBs, 6);
  742|  8.67k|          *gainSequenceIndex = bsIndex;
  743|  20.2k|        } else {
  744|  20.2k|          *gainSequenceIndex = (*gainSequenceIndex) + 1;
  745|  20.2k|        }
  746|  28.9k|      }
  747|  43.2k|      pGSet->gainSequenceIndex[i] = *gainSequenceIndex;
  748|  43.2k|      _readDrcCharacteristic(hBs, version, &(pGSet->drcCharacteristic[i]),
  749|  43.2k|                             isBox);
  750|  43.2k|    }
  751|   117k|    for (i = 1; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (751:17): [True: 26.9k, False: 90.5k]
  ------------------
  752|  26.9k|      _readBandBorder(hBs, &(pGSet->bandBorder[i]), pGSet->drcBandType, isBox);
  753|  26.9k|    }
  754|  90.5k|  } else {
  755|  21.4k|    pGSet->bandCount = 1;
  756|  21.4k|    *gainSequenceIndex = (*gainSequenceIndex) + 1;
  757|  21.4k|    pGSet->gainSequenceIndex[0] = *gainSequenceIndex;
  758|  21.4k|  }
  759|       |
  760|   112k|  return DE_OK;
  761|   119k|}
drcDec_reader.cpp:_ZL22_readDrcCharacteristicP13FDK_BITSTREAMiP18DRC_CHARACTERISTICi:
  669|  43.2k|                                   DRC_CHARACTERISTIC* pDChar, int isBox) {
  670|  43.2k|  if (version == 0) {
  ------------------
  |  Branch (670:7): [True: 14.2k, False: 28.9k]
  ------------------
  671|  14.2k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (671:9): [True: 0, False: 14.2k]
  ------------------
  672|  14.2k|    pDChar->cicpIndex = FDKreadBits(hBs, 7);
  673|  14.2k|    if (pDChar->cicpIndex > 0) {
  ------------------
  |  Branch (673:9): [True: 10.8k, False: 3.39k]
  ------------------
  674|  10.8k|      pDChar->present = 1;
  675|  10.8k|      pDChar->isCICP = 1;
  676|  10.8k|    } else {
  677|  3.39k|      pDChar->present = 0;
  678|  3.39k|    }
  679|  28.9k|  } else {
  680|  28.9k|    pDChar->present = FDKreadBits(hBs, 1);
  681|  28.9k|    if (isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (681:9): [True: 0, False: 28.9k]
  ------------------
  682|  28.9k|    if (pDChar->present) {
  ------------------
  |  Branch (682:9): [True: 4.76k, False: 24.1k]
  ------------------
  683|  4.76k|      if (!isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (683:11): [True: 4.76k, False: 0]
  ------------------
  684|  4.76k|      if (pDChar->isCICP) {
  ------------------
  |  Branch (684:11): [True: 2.64k, False: 2.11k]
  ------------------
  685|  2.64k|        if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (685:13): [True: 0, False: 2.64k]
  ------------------
  686|  2.64k|        pDChar->cicpIndex = FDKreadBits(hBs, 7);
  687|  2.64k|      } else {
  688|  2.11k|        pDChar->custom.left = FDKreadBits(hBs, 4);
  689|  2.11k|        pDChar->custom.right = FDKreadBits(hBs, 4);
  690|  2.11k|      }
  691|  4.76k|    }
  692|  28.9k|  }
  693|  43.2k|}
drcDec_reader.cpp:_ZL15_readBandBorderP13FDK_BITSTREAMP11BAND_BORDERii:
  696|  26.9k|                            int drcBandType, int isBox) {
  697|  26.9k|  if (drcBandType) {
  ------------------
  |  Branch (697:7): [True: 9.62k, False: 17.3k]
  ------------------
  698|  9.62k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (698:9): [True: 0, False: 9.62k]
  ------------------
  699|  9.62k|    pBBord->crossoverFreqIndex = FDKreadBits(hBs, 4);
  700|  17.3k|  } else {
  701|  17.3k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (701:9): [True: 0, False: 17.3k]
  ------------------
  702|  17.3k|    pBBord->startSubBandIndex = FDKreadBits(hBs, 10);
  703|  17.3k|  }
  704|  26.9k|}
drcDec_reader.cpp:_ZL28_readCustomDrcCharacteristicP13FDK_BITSTREAM19CHARACTERISTIC_SIDEPhP15CUSTOM_DRC_CHARi:
  767|  72.2k|                                              int isBox) {
  768|  72.2k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (768:7): [True: 0, False: 72.2k]
  ------------------
  769|  72.2k|  *pCharacteristicFormat = FDKreadBits(hBs, 1);
  770|  72.2k|  if (*pCharacteristicFormat == CF_SIGMOID) {
  ------------------
  |  Branch (770:7): [True: 41.7k, False: 30.4k]
  ------------------
  771|  41.7k|    int bsGain, bsIoRatio, bsExp;
  772|  41.7k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (772:9): [True: 0, False: 41.7k]
  ------------------
  773|  41.7k|    bsGain = FDKreadBits(hBs, 6);
  774|  41.7k|    if (side == CS_LEFT) {
  ------------------
  |  Branch (774:9): [True: 33.1k, False: 8.65k]
  ------------------
  775|  33.1k|      pCChar->sigmoid.gain = (FIXP_SGL)(bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  33.1k|#define FRACT_BITS 16  /* single precision */
  ------------------
  776|  33.1k|    } else {
  777|  8.65k|      pCChar->sigmoid.gain = (FIXP_SGL)(-bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  8.65k|#define FRACT_BITS 16  /* single precision */
  ------------------
  778|  8.65k|    }
  779|  41.7k|    bsIoRatio = FDKreadBits(hBs, 4);
  780|       |    /* pCChar->sigmoid.ioRatio = 0.05 + 0.15 * bsIoRatio; */
  781|  41.7k|    pCChar->sigmoid.ioRatio =
  782|  41.7k|        FL2FXCONST_SGL(0.05f / (float)(1 << 2)) +
  ------------------
  |  |  180|  41.7k|  (FIXP_SGL)(                                                                \
  |  |  181|  41.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 41.7k, Folded]
  |  |  ------------------
  |  |  182|  41.7k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  41.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  41.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 41.7k]
  |  |  ------------------
  |  |  183|  41.7k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  41.7k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  41.7k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  41.7k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  41.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  41.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  41.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|  41.7k|        (FIXP_SGL)((((3 * bsIoRatio) << (FRACT_BITS - 1)) / 5) >> 4);
  ------------------
  |  |  112|  41.7k|#define FRACT_BITS 16  /* single precision */
  ------------------
  784|  41.7k|    bsExp = FDKreadBits(hBs, 4);
  785|  41.7k|    if (bsExp < 15) {
  ------------------
  |  Branch (785:9): [True: 36.2k, False: 5.56k]
  ------------------
  786|  36.2k|      pCChar->sigmoid.exp = (FIXP_SGL)((1 + 2 * bsExp) << (FRACT_BITS - 1 - 5));
  ------------------
  |  |  112|  36.2k|#define FRACT_BITS 16  /* single precision */
  ------------------
  787|  36.2k|    } else {
  788|  5.56k|      pCChar->sigmoid.exp = (FIXP_SGL)MAXVAL_SGL; /* represents infinity */
  ------------------
  |  |  152|  5.56k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  789|  5.56k|    }
  790|  41.7k|    pCChar->sigmoid.flipSign = FDKreadBits(hBs, 1);
  791|  41.7k|  } else { /* CF_NODES */
  792|  30.4k|    int i, bsCharacteristicNodeCount, bsNodeLevelDelta, bsNodeGain;
  793|  30.4k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (793:9): [True: 0, False: 30.4k]
  ------------------
  794|  30.4k|    bsCharacteristicNodeCount = FDKreadBits(hBs, 2);
  795|  30.4k|    pCChar->nodes.characteristicNodeCount = bsCharacteristicNodeCount + 1;
  796|  30.4k|    if (pCChar->nodes.characteristicNodeCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (796:9): [True: 0, False: 30.4k]
  ------------------
  797|  30.4k|    pCChar->nodes.nodeLevel[0] = DRC_INPUT_LOUDNESS_TARGET_SGL;
  ------------------
  |  |  140|  30.4k|#define DRC_INPUT_LOUDNESS_TARGET_SGL FL2FXCONST_SGL(-31.0f / (float)(1 << 7))
  |  |  ------------------
  |  |  |  |  180|  30.4k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  30.4k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [Folded, False: 30.4k]
  |  |  |  |  ------------------
  |  |  |  |  182|  30.4k|          ? ((((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|  30.4k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  30.4k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  30.4k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:14): [Folded, False: 30.4k]
  |  |  |  |  ------------------
  |  |  |  |  187|  30.4k|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|  30.4k|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|  30.4k|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  188|  30.4k|                 ? (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|  30.4k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  30.4k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  30.4k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  798|  30.4k|    pCChar->nodes.nodeGain[0] = (FIXP_SGL)0;
  799|   116k|    for (i = 0; i < pCChar->nodes.characteristicNodeCount; i++) {
  ------------------
  |  Branch (799:17): [True: 85.5k, False: 30.4k]
  ------------------
  800|  85.5k|      if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (800:11): [True: 0, False: 85.5k]
  ------------------
  801|  85.5k|      bsNodeLevelDelta = FDKreadBits(hBs, 5);
  802|  85.5k|      if (side == CS_LEFT) {
  ------------------
  |  Branch (802:11): [True: 78.5k, False: 7.01k]
  ------------------
  803|  78.5k|        pCChar->nodes.nodeLevel[i + 1] =
  804|  78.5k|            pCChar->nodes.nodeLevel[i] -
  805|  78.5k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  78.5k|#define FRACT_BITS 16  /* single precision */
  ------------------
  806|  78.5k|      } else {
  807|  7.01k|        pCChar->nodes.nodeLevel[i + 1] =
  808|  7.01k|            pCChar->nodes.nodeLevel[i] +
  809|  7.01k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  7.01k|#define FRACT_BITS 16  /* single precision */
  ------------------
  810|  7.01k|      }
  811|  85.5k|      bsNodeGain = FDKreadBits(hBs, 8);
  812|  85.5k|      pCChar->nodes.nodeGain[i + 1] = (FIXP_SGL)(
  813|  85.5k|          (bsNodeGain - 128)
  814|  85.5k|          << (FRACT_BITS - 1 - 1 - 7)); /* 0.5f * bsNodeGain - 64.0f; */
  ------------------
  |  |  112|  85.5k|#define FRACT_BITS 16  /* single precision */
  ------------------
  815|  85.5k|    }
  816|  30.4k|  }
  817|  72.2k|  return DE_OK;
  818|  72.2k|}
drcDec_reader.cpp:_ZL26_readDrcInstructionsUniDrcP13FDK_BITSTREAMiP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRC:
 1251|   334k|                                            DRC_INSTRUCTIONS_UNI_DRC* pInst) {
 1252|   334k|  DRC_ERROR err = DE_OK;
 1253|   334k|  int i, g, c;
 1254|   334k|  int downmixIdPresent, additionalDownmixIdPresent, additionalDownmixIdCount;
 1255|   334k|  int bsLimiterPeakTarget, channelCount;
 1256|   334k|  DRC_COEFFICIENTS_UNI_DRC* pCoef = NULL;
 1257|   334k|  int repeatParameters, bsRepeatParametersCount;
 1258|   334k|  int repeatSequenceIndex, bsRepeatSequenceCount;
 1259|   334k|  SCHAR* gainSetIndex = pInst->gainSetIndex;
 1260|   334k|  SCHAR channelGroupForChannel[8];
 1261|   334k|  DUCKING_MODIFICATION duckingModificationForChannelGroup[8];
 1262|       |
 1263|   334k|  pInst->drcSetId = FDKreadBits(hBs, 6);
 1264|   334k|  if (version == 0) {
  ------------------
  |  Branch (1264:7): [True: 280k, False: 54.4k]
  ------------------
 1265|       |    /* Assume all v0 DRC sets to be manageable in terms of complexity */
 1266|   280k|    pInst->drcSetComplexityLevel = 2;
 1267|   280k|  } else {
 1268|  54.4k|    pInst->drcSetComplexityLevel = FDKreadBits(hBs, 4);
 1269|  54.4k|  }
 1270|   334k|  pInst->drcLocation = FDKreadBits(hBs, 4);
 1271|   334k|  if (version == 0) {
  ------------------
  |  Branch (1271:7): [True: 280k, False: 54.4k]
  ------------------
 1272|   280k|    downmixIdPresent = 1;
 1273|   280k|  } else {
 1274|  54.4k|    downmixIdPresent = FDKreadBits(hBs, 1);
 1275|  54.4k|  }
 1276|   334k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1276:7): [True: 300k, False: 34.1k]
  ------------------
 1277|   300k|    pInst->downmixId[0] = FDKreadBits(hBs, 7);
 1278|   300k|    if (version == 0) {
  ------------------
  |  Branch (1278:9): [True: 280k, False: 20.3k]
  ------------------
 1279|   280k|      if (pInst->downmixId[0] == 0)
  ------------------
  |  Branch (1279:11): [True: 194k, False: 85.6k]
  ------------------
 1280|   194k|        pInst->drcApplyToDownmix = 0;
 1281|  85.6k|      else
 1282|  85.6k|        pInst->drcApplyToDownmix = 1;
 1283|   280k|    } else {
 1284|  20.3k|      pInst->drcApplyToDownmix = FDKreadBits(hBs, 1);
 1285|  20.3k|    }
 1286|       |
 1287|   300k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1288|   300k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1288:9): [True: 63.0k, False: 237k]
  ------------------
 1289|  63.0k|      additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1290|  63.0k|      if ((1 + additionalDownmixIdCount) > 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1290:11): [True: 0, False: 63.0k]
  ------------------
 1291|   170k|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (1291:19): [True: 107k, False: 63.0k]
  ------------------
 1292|   107k|        pInst->downmixId[i + 1] = FDKreadBits(hBs, 7);
 1293|   107k|      }
 1294|  63.0k|      pInst->downmixIdCount = 1 + additionalDownmixIdCount;
 1295|   237k|    } else {
 1296|   237k|      pInst->downmixIdCount = 1;
 1297|   237k|    }
 1298|   300k|  } else {
 1299|  34.1k|    pInst->downmixId[0] = 0;
 1300|  34.1k|    pInst->downmixIdCount = 1;
 1301|  34.1k|  }
 1302|       |
 1303|   334k|  pInst->drcSetEffect = FDKreadBits(hBs, 16);
 1304|       |
 1305|   334k|  if ((pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) == 0) {
  ------------------
  |  Branch (1305:7): [True: 273k, False: 60.9k]
  ------------------
 1306|   273k|    pInst->limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1307|   273k|    if (pInst->limiterPeakTargetPresent) {
  ------------------
  |  Branch (1307:9): [True: 26.5k, False: 247k]
  ------------------
 1308|  26.5k|      bsLimiterPeakTarget = FDKreadBits(hBs, 8);
 1309|  26.5k|      pInst->limiterPeakTarget = -(FIXP_SGL)(
 1310|  26.5k|          bsLimiterPeakTarget
 1311|  26.5k|          << (FRACT_BITS - 1 - 3 - 5)); /* - bsLimiterPeakTarget * 0.125; */
  ------------------
  |  |  112|  26.5k|#define FRACT_BITS 16  /* single precision */
  ------------------
 1312|  26.5k|    }
 1313|   273k|  }
 1314|       |
 1315|   334k|  pInst->drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1316|       |
 1317|       |  /* set default values */
 1318|   334k|  pInst->drcSetTargetLoudnessValueUpper = 0;
 1319|   334k|  pInst->drcSetTargetLoudnessValueLower = -63;
 1320|       |
 1321|   334k|  if (pInst->drcSetTargetLoudnessPresent == 1) {
  ------------------
  |  Branch (1321:7): [True: 52.8k, False: 281k]
  ------------------
 1322|  52.8k|    int bsDrcSetTargetLoudnessValueUpper, bsDrcSetTargetLoudnessValueLower;
 1323|  52.8k|    int drcSetTargetLoudnessValueLowerPresent;
 1324|  52.8k|    bsDrcSetTargetLoudnessValueUpper = FDKreadBits(hBs, 6);
 1325|  52.8k|    pInst->drcSetTargetLoudnessValueUpper =
 1326|  52.8k|        bsDrcSetTargetLoudnessValueUpper - 63;
 1327|  52.8k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1328|  52.8k|    if (drcSetTargetLoudnessValueLowerPresent == 1) {
  ------------------
  |  Branch (1328:9): [True: 10.1k, False: 42.7k]
  ------------------
 1329|  10.1k|      bsDrcSetTargetLoudnessValueLower = FDKreadBits(hBs, 6);
 1330|  10.1k|      pInst->drcSetTargetLoudnessValueLower =
 1331|  10.1k|          bsDrcSetTargetLoudnessValueLower - 63;
 1332|  10.1k|    }
 1333|  52.8k|  }
 1334|       |
 1335|   334k|  pInst->dependsOnDrcSetPresent = FDKreadBits(hBs, 1);
 1336|       |
 1337|   334k|  pInst->noIndependentUse = 0;
 1338|   334k|  if (pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (1338:7): [True: 40.3k, False: 294k]
  ------------------
 1339|  40.3k|    pInst->dependsOnDrcSet = FDKreadBits(hBs, 6);
 1340|   294k|  } else {
 1341|   294k|    pInst->noIndependentUse = FDKreadBits(hBs, 1);
 1342|   294k|  }
 1343|       |
 1344|   334k|  if (version == 0) {
  ------------------
  |  Branch (1344:7): [True: 280k, False: 54.4k]
  ------------------
 1345|   280k|    pInst->requiresEq = 0;
 1346|   280k|  } else {
 1347|  54.4k|    pInst->requiresEq = FDKreadBits(hBs, 1);
 1348|  54.4k|  }
 1349|       |
 1350|   334k|  pCoef = selectDrcCoefficients(hUniDrcConfig, pInst->drcLocation);
 1351|       |
 1352|   334k|  pInst->drcChannelCount = channelCount =
 1353|   334k|      hUniDrcConfig->channelLayout.baseChannelCount;
 1354|       |
 1355|   334k|  if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (1355:7): [True: 60.9k, False: 273k]
  ------------------
 1356|  60.9k|    DUCKING_MODIFICATION* pDModForChannel =
 1357|  60.9k|        pInst->duckingModificationForChannel;
 1358|  60.9k|    c = 0;
 1359|   168k|    while (c < channelCount) {
  ------------------
  |  Branch (1359:12): [True: 110k, False: 57.9k]
  ------------------
 1360|   110k|      int bsGainSetIndex;
 1361|   110k|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1362|   110k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1362:11): [True: 0, False: 110k]
  ------------------
 1363|   110k|      gainSetIndex[c] = bsGainSetIndex - 1;
 1364|   110k|      _decodeDuckingModification(hBs, &(pDModForChannel[c]), 0);
 1365|       |
 1366|   110k|      c++;
 1367|   110k|      repeatParameters = FDKreadBits(hBs, 1);
 1368|   110k|      if (repeatParameters == 1) {
  ------------------
  |  Branch (1368:11): [True: 7.89k, False: 102k]
  ------------------
 1369|  7.89k|        bsRepeatParametersCount = FDKreadBits(hBs, 5);
 1370|  7.89k|        bsRepeatParametersCount += 1;
 1371|  34.5k|        for (i = 0; i < bsRepeatParametersCount; i++) {
  ------------------
  |  Branch (1371:21): [True: 29.6k, False: 4.84k]
  ------------------
 1372|  29.6k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1372:15): [True: 3.04k, False: 26.6k]
  ------------------
 1373|  26.6k|          gainSetIndex[c] = gainSetIndex[c - 1];
 1374|  26.6k|          pDModForChannel[c] = pDModForChannel[c - 1];
 1375|  26.6k|          c++;
 1376|  26.6k|        }
 1377|  7.89k|      }
 1378|   110k|    }
 1379|  57.9k|    if (c > channelCount) {
  ------------------
  |  Branch (1379:9): [True: 265, False: 57.6k]
  ------------------
 1380|    265|      return DE_NOT_OK;
 1381|    265|    }
 1382|       |
 1383|  57.6k|    err = deriveDrcChannelGroups(
 1384|  57.6k|        pInst->drcSetEffect, pInst->drcChannelCount, gainSetIndex,
 1385|  57.6k|        pDModForChannel, &pInst->nDrcChannelGroups,
 1386|  57.6k|        pInst->gainSetIndexForChannelGroup, channelGroupForChannel,
 1387|  57.6k|        duckingModificationForChannelGroup);
 1388|  57.6k|    if (err) return (err);
  ------------------
  |  Branch (1388:9): [True: 18.4k, False: 39.2k]
  ------------------
 1389|   273k|  } else {
 1390|   273k|    int deriveChannelCount = 0;
 1391|   273k|    if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1391:10): [True: 237k, False: 36.0k]
  |  Branch (1391:28): [True: 2.25k, False: 33.8k]
  ------------------
 1392|   239k|        (pInst->downmixId[0] != DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|   239k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (1392:9): [True: 49.1k, False: 190k]
  ------------------
 1393|  49.1k|        (pInst->downmixId[0] != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  49.1k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1393:9): [True: 47.0k, False: 2.11k]
  ------------------
 1394|  47.0k|        (pInst->downmixIdCount == 1)) {
  ------------------
  |  Branch (1394:9): [True: 35.4k, False: 11.5k]
  ------------------
 1395|  35.4k|      if (hUniDrcConfig->downmixInstructionsCount != 0) {
  ------------------
  |  Branch (1395:11): [True: 2.37k, False: 33.0k]
  ------------------
 1396|  2.37k|        DOWNMIX_INSTRUCTIONS* pDown =
 1397|  2.37k|            selectDownmixInstructions(hUniDrcConfig, pInst->downmixId[0]);
 1398|  2.37k|        if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1398:13): [True: 2.03k, False: 339]
  ------------------
 1399|    339|        pInst->drcChannelCount = channelCount =
 1400|    339|            pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1401|  33.0k|      } else {
 1402|  33.0k|        deriveChannelCount = 1;
 1403|  33.0k|        channelCount = 1;
 1404|  33.0k|      }
 1405|   238k|    } else if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1405:17): [True: 203k, False: 35.0k]
  |  Branch (1405:35): [True: 1.23k, False: 33.8k]
  ------------------
 1406|   204k|               ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   204k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1406:17): [True: 2.11k, False: 202k]
  ------------------
 1407|   202k|                (pInst->downmixIdCount > 1))) {
  ------------------
  |  Branch (1407:17): [True: 12.3k, False: 189k]
  ------------------
 1408|       |      /* Set maximum channel count as upper border. The effective channel count
 1409|       |       * is set at the process function. */
 1410|  14.4k|      pInst->drcChannelCount = 8;
 1411|  14.4k|      channelCount = 1;
 1412|  14.4k|    }
 1413|       |
 1414|   271k|    c = 0;
 1415|   988k|    while (c < channelCount) {
  ------------------
  |  Branch (1415:12): [True: 727k, False: 261k]
  ------------------
 1416|   727k|      int bsGainSetIndex;
 1417|   727k|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1418|   727k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1418:11): [True: 212, False: 726k]
  ------------------
 1419|   726k|      gainSetIndex[c] = bsGainSetIndex - 1;
 1420|   726k|      c++;
 1421|   726k|      repeatSequenceIndex = FDKreadBits(hBs, 1);
 1422|       |
 1423|   726k|      if (repeatSequenceIndex == 1) {
  ------------------
  |  Branch (1423:11): [True: 29.3k, False: 697k]
  ------------------
 1424|  29.3k|        bsRepeatSequenceCount = FDKreadBits(hBs, 5);
 1425|  29.3k|        bsRepeatSequenceCount += 1;
 1426|  29.3k|        if (deriveChannelCount) {
  ------------------
  |  Branch (1426:13): [True: 17.3k, False: 12.0k]
  ------------------
 1427|  17.3k|          channelCount = 1 + bsRepeatSequenceCount;
 1428|  17.3k|        }
 1429|   135k|        for (i = 0; i < bsRepeatSequenceCount; i++) {
  ------------------
  |  Branch (1429:21): [True: 115k, False: 19.4k]
  ------------------
 1430|   115k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1430:15): [True: 9.97k, False: 105k]
  ------------------
 1431|   105k|          gainSetIndex[c] = bsGainSetIndex - 1;
 1432|   105k|          c++;
 1433|   105k|        }
 1434|  29.3k|      }
 1435|   726k|    }
 1436|   261k|    if (c > channelCount) {
  ------------------
  |  Branch (1436:9): [True: 502, False: 260k]
  ------------------
 1437|    502|      return DE_NOT_OK;
 1438|    502|    }
 1439|   260k|    if (deriveChannelCount) {
  ------------------
  |  Branch (1439:9): [True: 24.7k, False: 236k]
  ------------------
 1440|  24.7k|      pInst->drcChannelCount = channelCount;
 1441|  24.7k|    }
 1442|       |
 1443|       |    /* DOWNMIX_ID_ANY_DOWNMIX: channelCount is 1. Distribute gainSetIndex to all
 1444|       |     * channels. */
 1445|   260k|    if ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   260k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1445:9): [True: 2.10k, False: 258k]
  ------------------
 1446|   258k|        (pInst->downmixIdCount > 1)) {
  ------------------
  |  Branch (1446:9): [True: 12.1k, False: 246k]
  ------------------
 1447|   111k|      for (c = 1; c < pInst->drcChannelCount; c++) {
  ------------------
  |  Branch (1447:19): [True: 97.4k, False: 14.2k]
  ------------------
 1448|  97.4k|        gainSetIndex[c] = gainSetIndex[0];
 1449|  97.4k|      }
 1450|  14.2k|    }
 1451|       |
 1452|   260k|    err = deriveDrcChannelGroups(pInst->drcSetEffect, pInst->drcChannelCount,
 1453|   260k|                                 gainSetIndex, NULL, &pInst->nDrcChannelGroups,
 1454|   260k|                                 pInst->gainSetIndexForChannelGroup,
 1455|   260k|                                 channelGroupForChannel, NULL);
 1456|   260k|    if (err) return (err);
  ------------------
  |  Branch (1456:9): [True: 0, False: 260k]
  ------------------
 1457|       |
 1458|   334k|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (1458:17): [True: 73.9k, False: 260k]
  ------------------
 1459|  73.9k|      int set, bandCount;
 1460|  73.9k|      set = pInst->gainSetIndexForChannelGroup[g];
 1461|       |
 1462|       |      /* get bandCount */
 1463|  73.9k|      if (pCoef != NULL && set < pCoef->gainSetCount) {
  ------------------
  |  Branch (1463:11): [True: 37.0k, False: 36.8k]
  |  Branch (1463:28): [True: 2.19k, False: 34.8k]
  ------------------
 1464|  2.19k|        bandCount = pCoef->gainSet[set].bandCount;
 1465|  71.7k|      } else {
 1466|  71.7k|        bandCount = 1;
 1467|  71.7k|      }
 1468|       |
 1469|  73.9k|      _decodeGainModification(hBs, version, bandCount,
 1470|  73.9k|                              pInst->gainModificationForChannelGroup[g], 0);
 1471|  73.9k|    }
 1472|   260k|  }
 1473|       |
 1474|   300k|  return err;
 1475|   334k|}
drcDec_reader.cpp:_ZL26_decodeDuckingModificationP13FDK_BITSTREAMP20DUCKING_MODIFICATIONi:
  535|   110k|                                       DUCKING_MODIFICATION* pDMod, int isBox) {
  536|   110k|  int bsDuckingScaling, sigma, mu;
  537|       |
  538|   110k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (538:7): [True: 0, False: 110k]
  ------------------
  539|   110k|  pDMod->duckingScalingPresent = FDKreadBits(hBs, 1);
  540|       |
  541|   110k|  if (pDMod->duckingScalingPresent) {
  ------------------
  |  Branch (541:7): [True: 14.7k, False: 95.4k]
  ------------------
  542|  14.7k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (542:9): [True: 0, False: 14.7k]
  ------------------
  543|  14.7k|    bsDuckingScaling = FDKreadBits(hBs, 4);
  544|  14.7k|    sigma = bsDuckingScaling >> 3;
  545|  14.7k|    mu = bsDuckingScaling & 0x7;
  546|       |
  547|  14.7k|    if (sigma) {
  ------------------
  |  Branch (547:9): [True: 6.96k, False: 7.74k]
  ------------------
  548|  6.96k|      pDMod->duckingScaling = (FIXP_SGL)(
  549|  6.96k|          (7 - mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 - 0.125 * (1 + mu); */
  ------------------
  |  |  112|  6.96k|#define FRACT_BITS 16  /* single precision */
  ------------------
  550|  7.74k|    } else {
  551|  7.74k|      pDMod->duckingScaling = (FIXP_SGL)(
  552|  7.74k|          (9 + mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 + 0.125 * (1 + mu); */
  ------------------
  |  |  112|  7.74k|#define FRACT_BITS 16  /* single precision */
  ------------------
  553|  7.74k|    }
  554|  95.4k|  } else {
  555|  95.4k|    pDMod->duckingScaling = (FIXP_SGL)(1 << (FRACT_BITS - 1 - 2)); /* 1.0 */
  ------------------
  |  |  112|  95.4k|#define FRACT_BITS 16  /* single precision */
  ------------------
  556|  95.4k|  }
  557|   110k|}
drcDec_reader.cpp:_ZL23_decodeGainModificationP13FDK_BITSTREAMiiP17GAIN_MODIFICATIONi:
  561|  73.9k|                                    int isBox) {
  562|  73.9k|  int sign, bsGainOffset, bsAttenuationScaling, bsAmplificationScaling;
  563|       |
  564|  73.9k|  if (version > 0) {
  ------------------
  |  Branch (564:7): [True: 19.7k, False: 54.1k]
  ------------------
  565|  19.7k|    int b, shapeFilterPresent;
  566|       |
  567|  19.7k|    if (isBox) {
  ------------------
  |  Branch (567:9): [True: 0, False: 19.7k]
  ------------------
  568|      0|      FDKpushFor(hBs, 4); /* reserved */
  569|      0|      bandCount = FDKreadBits(hBs, 4);
  570|      0|    }
  571|       |
  572|  40.0k|    for (b = 0; b < bandCount; b++) {
  ------------------
  |  Branch (572:17): [True: 20.3k, False: 19.7k]
  ------------------
  573|  20.3k|      if (isBox) {
  ------------------
  |  Branch (573:11): [True: 0, False: 20.3k]
  ------------------
  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|  20.3k|      if (!isBox)
  ------------------
  |  Branch (581:11): [True: 20.3k, False: 0]
  ------------------
  582|  20.3k|        pGMod[b].targetCharacteristicLeftPresent = FDKreadBits(hBs, 1);
  583|  20.3k|      if (pGMod[b].targetCharacteristicLeftPresent) {
  ------------------
  |  Branch (583:11): [True: 5.39k, False: 14.9k]
  ------------------
  584|  5.39k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (584:13): [True: 0, False: 5.39k]
  ------------------
  585|  5.39k|        pGMod[b].targetCharacteristicLeftIndex = FDKreadBits(hBs, 4);
  586|  5.39k|      }
  587|  20.3k|      if (!isBox)
  ------------------
  |  Branch (587:11): [True: 20.3k, False: 0]
  ------------------
  588|  20.3k|        pGMod[b].targetCharacteristicRightPresent = FDKreadBits(hBs, 1);
  589|  20.3k|      if (pGMod[b].targetCharacteristicRightPresent) {
  ------------------
  |  Branch (589:11): [True: 2.29k, False: 18.0k]
  ------------------
  590|  2.29k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (590:13): [True: 0, False: 2.29k]
  ------------------
  591|  2.29k|        pGMod[b].targetCharacteristicRightIndex = FDKreadBits(hBs, 4);
  592|  2.29k|      }
  593|  20.3k|      if (!isBox) pGMod[b].gainScalingPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (593:11): [True: 20.3k, False: 0]
  ------------------
  594|  20.3k|      if (pGMod[b].gainScalingPresent) {
  ------------------
  |  Branch (594:11): [True: 2.73k, False: 17.5k]
  ------------------
  595|  2.73k|        bsAttenuationScaling = FDKreadBits(hBs, 4);
  596|  2.73k|        pGMod[b].attenuationScaling = (FIXP_SGL)(
  597|  2.73k|            bsAttenuationScaling
  598|  2.73k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  2.73k|#define FRACT_BITS 16  /* single precision */
  ------------------
  599|  2.73k|        bsAmplificationScaling = FDKreadBits(hBs, 4);
  600|  2.73k|        pGMod[b].amplificationScaling = (FIXP_SGL)(
  601|  2.73k|            bsAmplificationScaling
  602|  2.73k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  2.73k|#define FRACT_BITS 16  /* single precision */
  ------------------
  603|  2.73k|      }
  604|  20.3k|      if (!isBox) pGMod[b].gainOffsetPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (604:11): [True: 20.3k, False: 0]
  ------------------
  605|  20.3k|      if (pGMod[b].gainOffsetPresent) {
  ------------------
  |  Branch (605:11): [True: 7.13k, False: 13.1k]
  ------------------
  606|  7.13k|        if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (606:13): [True: 0, False: 7.13k]
  ------------------
  607|  7.13k|        sign = FDKreadBits(hBs, 1);
  608|  7.13k|        bsGainOffset = FDKreadBits(hBs, 5);
  609|  7.13k|        pGMod[b].gainOffset = (FIXP_SGL)(
  610|  7.13k|            (1 + bsGainOffset)
  611|  7.13k|            << (FRACT_BITS - 1 - 2 - 4)); /* (1+bsGainOffset) * 0.25; */
  ------------------
  |  |  112|  7.13k|#define FRACT_BITS 16  /* single precision */
  ------------------
  612|  7.13k|        if (sign) {
  ------------------
  |  Branch (612:13): [True: 1.59k, False: 5.54k]
  ------------------
  613|  1.59k|          pGMod[b].gainOffset = -pGMod[b].gainOffset;
  614|  1.59k|        }
  615|  7.13k|      }
  616|  20.3k|    }
  617|  19.7k|    if (bandCount == 1) {
  ------------------
  |  Branch (617:9): [True: 18.8k, False: 876]
  ------------------
  618|  18.8k|      shapeFilterPresent = FDKreadBits(hBs, 1);
  619|  18.8k|      if (shapeFilterPresent) {
  ------------------
  |  Branch (619:11): [True: 6.99k, False: 11.8k]
  ------------------
  620|  6.99k|        if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (620:13): [True: 0, False: 6.99k]
  ------------------
  621|  6.99k|        FDKpushFor(hBs, 4);            /* pGMod->shapeFilterIndex */
  622|  11.8k|      } else {
  623|  11.8k|        if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (623:13): [True: 0, False: 11.8k]
  ------------------
  624|  11.8k|      }
  625|  18.8k|    }
  626|  54.1k|  } else {
  627|  54.1k|    int b, gainScalingPresent, gainOffsetPresent;
  628|  54.1k|    FIXP_SGL attenuationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  54.1k|  (FIXP_SGL)(                                                                \
  |  |  181|  54.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 54.1k, Folded]
  |  |  ------------------
  |  |  182|  54.1k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  54.1k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  54.1k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 54.1k]
  |  |  ------------------
  |  |  183|  54.1k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  54.1k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  54.1k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  54.1k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  54.1k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  54.1k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  54.1k|          : ((((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|  54.1k|             amplificationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  54.1k|  (FIXP_SGL)(                                                                \
  |  |  181|  54.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 54.1k, Folded]
  |  |  ------------------
  |  |  182|  54.1k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  54.1k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  54.1k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 54.1k]
  |  |  ------------------
  |  |  183|  54.1k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  54.1k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  54.1k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  54.1k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  54.1k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  54.1k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  54.1k|          : ((((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|  54.1k|             gainOffset = (FIXP_SGL)0;
  631|  54.1k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (631:9): [True: 0, False: 54.1k]
  ------------------
  632|  54.1k|    gainScalingPresent = FDKreadBits(hBs, 1);
  633|  54.1k|    if (gainScalingPresent) {
  ------------------
  |  Branch (633:9): [True: 8.20k, False: 45.9k]
  ------------------
  634|  8.20k|      bsAttenuationScaling = FDKreadBits(hBs, 4);
  635|  8.20k|      attenuationScaling = (FIXP_SGL)(
  636|  8.20k|          bsAttenuationScaling
  637|  8.20k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  8.20k|#define FRACT_BITS 16  /* single precision */
  ------------------
  638|  8.20k|      bsAmplificationScaling = FDKreadBits(hBs, 4);
  639|  8.20k|      amplificationScaling = (FIXP_SGL)(
  640|  8.20k|          bsAmplificationScaling
  641|  8.20k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  8.20k|#define FRACT_BITS 16  /* single precision */
  ------------------
  642|  8.20k|    }
  643|  54.1k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (643:9): [True: 0, False: 54.1k]
  ------------------
  644|  54.1k|    gainOffsetPresent = FDKreadBits(hBs, 1);
  645|  54.1k|    if (gainOffsetPresent) {
  ------------------
  |  Branch (645:9): [True: 31.7k, False: 22.4k]
  ------------------
  646|  31.7k|      if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (646:11): [True: 0, False: 31.7k]
  ------------------
  647|  31.7k|      sign = FDKreadBits(hBs, 1);
  648|  31.7k|      bsGainOffset = FDKreadBits(hBs, 5);
  649|  31.7k|      gainOffset =
  650|  31.7k|          (FIXP_SGL)((1 + bsGainOffset) << (FRACT_BITS - 1 - 2 -
  ------------------
  |  |  112|  31.7k|#define FRACT_BITS 16  /* single precision */
  ------------------
  651|  31.7k|                                            4)); /* (1+bsGainOffset) * 0.25; */
  652|  31.7k|      if (sign) {
  ------------------
  |  Branch (652:11): [True: 20.9k, False: 10.8k]
  ------------------
  653|  20.9k|        gainOffset = -gainOffset;
  654|  20.9k|      }
  655|  31.7k|    }
  656|   270k|    for (b = 0; b < 4; b++) {
  ------------------
  |  Branch (656:17): [True: 216k, False: 54.1k]
  ------------------
  657|   216k|      pGMod[b].targetCharacteristicLeftPresent = 0;
  658|   216k|      pGMod[b].targetCharacteristicRightPresent = 0;
  659|   216k|      pGMod[b].gainScalingPresent = gainScalingPresent;
  660|   216k|      pGMod[b].attenuationScaling = attenuationScaling;
  661|   216k|      pGMod[b].amplificationScaling = amplificationScaling;
  662|   216k|      pGMod[b].gainOffsetPresent = gainOffsetPresent;
  663|   216k|      pGMod[b].gainOffset = gainOffset;
  664|   216k|    }
  665|  54.1k|  }
  666|  73.9k|}
drcDec_reader.cpp:_ZL26_readUniDrcConfigExtensionP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1636|  93.9k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1637|  93.9k|  DRC_ERROR err = DE_OK;
 1638|  93.9k|  int k, bitSizeLen, extSizeBits, bitSize;
 1639|  93.9k|  INT nBitsRemaining;
 1640|  93.9k|  UNI_DRC_CONFIG_EXTENSION* pExt = &(hUniDrcConfig->uniDrcConfigExt);
 1641|       |
 1642|  93.9k|  k = 0;
 1643|  93.9k|  pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1644|   223k|  while (pExt->uniDrcConfigExtType[k] != UNIDRCCONFEXT_TERM) {
  ------------------
  |  |  117|   223k|#define UNIDRCCONFEXT_TERM 0x0
  ------------------
  |  Branch (1644:10): [True: 200k, False: 22.4k]
  ------------------
 1645|   200k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1645:9): [True: 5.49k, False: 195k]
  ------------------
 1646|   195k|    bitSizeLen = FDKreadBits(hBs, 4);
 1647|   195k|    extSizeBits = bitSizeLen + 4;
 1648|       |
 1649|   195k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1650|   195k|    pExt->extBitSize[k] = bitSize + 1;
 1651|   195k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1652|       |
 1653|   195k|    switch (pExt->uniDrcConfigExtType[k]) {
 1654|  68.3k|      case UNIDRCCONFEXT_V1:
  ------------------
  |  |  112|  68.3k|#define UNIDRCCONFEXT_V1 0x2
  ------------------
  |  Branch (1654:7): [True: 68.3k, False: 126k]
  ------------------
 1655|  68.3k|        err = _readDrcExtensionV1(hBs, hUniDrcConfig);
 1656|  68.3k|        if (err) return err;
  ------------------
  |  Branch (1656:13): [True: 25.8k, False: 42.5k]
  ------------------
 1657|  42.5k|        if (nBitsRemaining !=
  ------------------
  |  Branch (1657:13): [True: 40.1k, False: 2.36k]
  ------------------
 1658|  42.5k|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1659|  40.1k|          return DE_NOT_OK;
 1660|  2.36k|        break;
 1661|  51.1k|      case UNIDRCCONFEXT_PARAM_DRC:
  ------------------
  |  |  111|  51.1k|#define UNIDRCCONFEXT_PARAM_DRC 0x1
  ------------------
  |  Branch (1661:7): [True: 51.1k, False: 143k]
  ------------------
 1662|       |      /* add future extensions here */
 1663|   126k|      default:
  ------------------
  |  Branch (1663:7): [True: 75.5k, False: 119k]
  ------------------
 1664|   126k|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1665|   126k|        break;
 1666|   195k|    }
 1667|   129k|    k++;
 1668|   129k|    pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1669|   129k|  }
 1670|       |
 1671|  22.4k|  return err;
 1672|  93.9k|}
drcDec_reader.cpp:_ZL19_readDrcExtensionV1P13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1536|  68.3k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1537|  68.3k|  DRC_ERROR err = DE_OK;
 1538|  68.3k|  int downmixInstructionsV1Present;
 1539|  68.3k|  int drcCoeffsAndInstructionsUniDrcV1Present;
 1540|  68.3k|  int loudEqInstructionsPresent, loudEqInstructionsCount;
 1541|  68.3k|  int eqPresent, eqInstructionsCount;
 1542|  68.3k|  int i, offset;
 1543|  68.3k|  int diff = hUniDrcConfig->diff;
 1544|       |
 1545|  68.3k|  downmixInstructionsV1Present = FDKreadBits(hBs, 1);
 1546|  68.3k|  if (downmixInstructionsV1Present == 1) {
  ------------------
  |  Branch (1546:7): [True: 38.4k, False: 29.9k]
  ------------------
 1547|  38.4k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1,
 1548|  38.4k|                        FDKreadBits(hBs, 7));
 1549|  38.4k|    offset = hUniDrcConfig->downmixInstructionsCountV0;
 1550|  38.4k|    hUniDrcConfig->downmixInstructionsCount = fMin(
 1551|  38.4k|        (UCHAR)(offset + hUniDrcConfig->downmixInstructionsCountV1), (UCHAR)6);
 1552|   954k|    for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV1; i++) {
  ------------------
  |  Branch (1552:17): [True: 918k, False: 36.2k]
  ------------------
 1553|   918k|      DOWNMIX_INSTRUCTIONS tmpDown;
 1554|   918k|      FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1555|   918k|      err = _readDownmixInstructions(hBs, 1, &hUniDrcConfig->channelLayout,
 1556|   918k|                                     &tmpDown);
 1557|   918k|      if (err) return err;
  ------------------
  |  Branch (1557:11): [True: 2.17k, False: 915k]
  ------------------
 1558|   915k|      if ((offset + i) >= 6) continue;
  ------------------
  |  Branch (1558:11): [True: 884k, False: 31.7k]
  ------------------
 1559|  31.7k|      if (!diff)
  ------------------
  |  Branch (1559:11): [True: 208, False: 31.5k]
  ------------------
 1560|    208|        diff |= (FDKmemcmp(&tmpDown,
 1561|    208|                           &(hUniDrcConfig->downmixInstructions[offset + i]),
 1562|    208|                           sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1563|  31.7k|      hUniDrcConfig->downmixInstructions[offset + i] = tmpDown;
 1564|  31.7k|    }
 1565|  38.4k|  } else {
 1566|  29.9k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1, 0);
 1567|  29.9k|  }
 1568|       |
 1569|  66.2k|  drcCoeffsAndInstructionsUniDrcV1Present = FDKreadBits(hBs, 1);
 1570|  66.2k|  if (drcCoeffsAndInstructionsUniDrcV1Present == 1) {
  ------------------
  |  Branch (1570:7): [True: 35.9k, False: 30.2k]
  ------------------
 1571|  35.9k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1,
 1572|  35.9k|                        FDKreadBits(hBs, 3));
 1573|  35.9k|    offset = hUniDrcConfig->drcCoefficientsUniDrcCountV0;
 1574|  35.9k|    hUniDrcConfig->drcCoefficientsUniDrcCount =
 1575|  35.9k|        fMin((UCHAR)(offset + hUniDrcConfig->drcCoefficientsUniDrcCountV1),
 1576|  35.9k|             (UCHAR)2);
 1577|  75.7k|    for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV1; i++) {
  ------------------
  |  Branch (1577:17): [True: 46.3k, False: 29.4k]
  ------------------
 1578|  46.3k|      DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1579|  46.3k|      FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1580|  46.3k|      err = _readDrcCoefficientsUniDrc(hBs, 1, &tmpCoef);
 1581|  46.3k|      if (err) return err;
  ------------------
  |  Branch (1581:11): [True: 6.50k, False: 39.8k]
  ------------------
 1582|  39.8k|      if ((offset + i) >= 2) continue;
  ------------------
  |  Branch (1582:11): [True: 10.6k, False: 29.1k]
  ------------------
 1583|  29.1k|      if (!diff)
  ------------------
  |  Branch (1583:11): [True: 1.07k, False: 28.1k]
  ------------------
 1584|  1.07k|        diff |= (FDKmemcmp(&tmpCoef,
 1585|  1.07k|                           &(hUniDrcConfig->drcCoefficientsUniDrc[offset + i]),
 1586|  1.07k|                           sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1587|  29.1k|      hUniDrcConfig->drcCoefficientsUniDrc[offset + i] = tmpCoef;
 1588|  29.1k|    }
 1589|       |
 1590|  29.4k|    diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV1,
 1591|  29.4k|                        FDKreadBits(hBs, 6));
 1592|  29.4k|    offset = hUniDrcConfig->drcInstructionsUniDrcCount;
 1593|  29.4k|    hUniDrcConfig->drcInstructionsUniDrcCount =
 1594|  29.4k|        fMin((UCHAR)(offset + hUniDrcConfig->drcInstructionsUniDrcCountV1),
 1595|  29.4k|             (UCHAR)12);
 1596|  66.6k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (1596:17): [True: 54.4k, False: 12.2k]
  ------------------
 1597|  54.4k|      DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1598|  54.4k|      FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1599|  54.4k|      err = _readDrcInstructionsUniDrc(hBs, 1, hUniDrcConfig, &tmpInst);
 1600|  54.4k|      if (err) return err;
  ------------------
  |  Branch (1600:11): [True: 17.2k, False: 37.2k]
  ------------------
 1601|  37.2k|      if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1601:11): [True: 305, False: 36.9k]
  ------------------
 1602|  36.9k|      if (!diff)
  ------------------
  |  Branch (1602:11): [True: 2.08k, False: 34.8k]
  ------------------
 1603|  2.08k|        diff |= (FDKmemcmp(&tmpInst,
 1604|  2.08k|                           &(hUniDrcConfig->drcInstructionsUniDrc[offset + i]),
 1605|  2.08k|                           sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1606|  36.9k|      hUniDrcConfig->drcInstructionsUniDrc[offset + i] = tmpInst;
 1607|  36.9k|    }
 1608|  30.2k|  } else {
 1609|  30.2k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1, 0);
 1610|  30.2k|    diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV1, 0);
 1611|  30.2k|  }
 1612|       |
 1613|  42.5k|  loudEqInstructionsPresent = FDKreadBits(hBs, 1);
 1614|  42.5k|  if (loudEqInstructionsPresent == 1) {
  ------------------
  |  Branch (1614:7): [True: 19.4k, False: 23.0k]
  ------------------
 1615|  19.4k|    loudEqInstructionsCount = FDKreadBits(hBs, 4);
 1616|   144k|    for (i = 0; i < loudEqInstructionsCount; i++) {
  ------------------
  |  Branch (1616:17): [True: 124k, False: 19.4k]
  ------------------
 1617|   124k|      _skipLoudEqInstructions(hBs);
 1618|   124k|    }
 1619|  19.4k|  }
 1620|       |
 1621|  42.5k|  eqPresent = FDKreadBits(hBs, 1);
 1622|  42.5k|  if (eqPresent == 1) {
  ------------------
  |  Branch (1622:7): [True: 18.2k, False: 24.2k]
  ------------------
 1623|  18.2k|    _skipEqCoefficients(hBs);
 1624|  18.2k|    eqInstructionsCount = FDKreadBits(hBs, 4);
 1625|  85.3k|    for (i = 0; i < eqInstructionsCount; i++) {
  ------------------
  |  Branch (1625:17): [True: 67.0k, False: 18.2k]
  ------------------
 1626|  67.0k|      _skipEqInstructions(hBs, hUniDrcConfig);
 1627|  67.0k|    }
 1628|  18.2k|  }
 1629|       |
 1630|  42.5k|  hUniDrcConfig->diff = diff;
 1631|       |
 1632|  42.5k|  return err;
 1633|  66.2k|}
drcDec_reader.cpp:_ZL23_skipLoudEqInstructionsP13FDK_BITSTREAM:
  820|   124k|static void _skipLoudEqInstructions(HANDLE_FDK_BITSTREAM hBs) {
  821|   124k|  int i;
  822|   124k|  int downmixIdPresent, additionalDownmixIdPresent,
  823|   124k|      additionalDownmixIdCount = 0;
  824|   124k|  int drcSetIdPresent, additionalDrcSetIdPresent, additionalDrcSetIdCount = 0;
  825|   124k|  int eqSetIdPresent, additionalEqSetIdPresent, additionalEqSetIdCount = 0;
  826|   124k|  int loudEqGainSequenceCount, drcCharacteristicFormatIsCICP;
  827|       |
  828|   124k|  FDKpushFor(hBs, 4); /* loudEqSetId */
  829|   124k|  FDKpushFor(hBs, 4); /* drcLocation */
  830|   124k|  downmixIdPresent = FDKreadBits(hBs, 1);
  831|   124k|  if (downmixIdPresent) {
  ------------------
  |  Branch (831:7): [True: 55.9k, False: 68.9k]
  ------------------
  832|  55.9k|    FDKpushFor(hBs, 7); /* downmixId */
  833|  55.9k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
  834|  55.9k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (834:9): [True: 26.5k, False: 29.3k]
  ------------------
  835|  26.5k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
  836|  1.51M|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (836:19): [True: 1.48M, False: 26.5k]
  ------------------
  837|  1.48M|        FDKpushFor(hBs, 7); /* additionalDownmixId */
  838|  1.48M|      }
  839|  26.5k|    }
  840|  55.9k|  }
  841|       |
  842|   124k|  drcSetIdPresent = FDKreadBits(hBs, 1);
  843|   124k|  if (drcSetIdPresent) {
  ------------------
  |  Branch (843:7): [True: 34.5k, False: 90.2k]
  ------------------
  844|  34.5k|    FDKpushFor(hBs, 6); /* drcSetId */
  845|  34.5k|    additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
  846|  34.5k|    if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (846:9): [True: 13.2k, False: 21.2k]
  ------------------
  847|  13.2k|      additionalDrcSetIdCount = FDKreadBits(hBs, 6);
  848|   541k|      for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (848:19): [True: 528k, False: 13.2k]
  ------------------
  849|   528k|        FDKpushFor(hBs, 6); /* additionalDrcSetId; */
  850|   528k|      }
  851|  13.2k|    }
  852|  34.5k|  }
  853|       |
  854|   124k|  eqSetIdPresent = FDKreadBits(hBs, 1);
  855|   124k|  if (eqSetIdPresent) {
  ------------------
  |  Branch (855:7): [True: 32.1k, False: 92.6k]
  ------------------
  856|  32.1k|    FDKpushFor(hBs, 6); /* eqSetId */
  857|  32.1k|    additionalEqSetIdPresent = FDKreadBits(hBs, 1);
  858|  32.1k|    if (additionalEqSetIdPresent) {
  ------------------
  |  Branch (858:9): [True: 12.8k, False: 19.2k]
  ------------------
  859|  12.8k|      additionalEqSetIdCount = FDKreadBits(hBs, 6);
  860|   448k|      for (i = 0; i < additionalEqSetIdCount; i++) {
  ------------------
  |  Branch (860:19): [True: 435k, False: 12.8k]
  ------------------
  861|   435k|        FDKpushFor(hBs, 6); /* additionalEqSetId; */
  862|   435k|      }
  863|  12.8k|    }
  864|  32.1k|  }
  865|       |
  866|   124k|  FDKpushFor(hBs, 1); /* loudnessAfterDrc */
  867|   124k|  FDKpushFor(hBs, 1); /* loudnessAfterEq */
  868|   124k|  loudEqGainSequenceCount = FDKreadBits(hBs, 6);
  869|  2.43M|  for (i = 0; i < loudEqGainSequenceCount; i++) {
  ------------------
  |  Branch (869:15): [True: 2.30M, False: 124k]
  ------------------
  870|  2.30M|    FDKpushFor(hBs, 6); /* gainSequenceIndex */
  871|  2.30M|    drcCharacteristicFormatIsCICP = FDKreadBits(hBs, 1);
  872|  2.30M|    if (drcCharacteristicFormatIsCICP) {
  ------------------
  |  Branch (872:9): [True: 932k, False: 1.37M]
  ------------------
  873|   932k|      FDKpushFor(hBs, 7); /* drcCharacteristic */
  874|  1.37M|    } else {
  875|  1.37M|      FDKpushFor(hBs, 4); /* drcCharacteristicLeftIndex */
  876|  1.37M|      FDKpushFor(hBs, 4); /* drcCharacteristicRightIndex */
  877|  1.37M|    }
  878|  2.30M|    FDKpushFor(hBs, 6); /* frequencyRangeIndex */
  879|  2.30M|    FDKpushFor(hBs, 3); /* bsLoudEqScaling */
  880|  2.30M|    FDKpushFor(hBs, 5); /* bsLoudEqOffset */
  881|  2.30M|  }
  882|   124k|}
drcDec_reader.cpp:_ZL19_skipEqCoefficientsP13FDK_BITSTREAM:
  911|  18.2k|static void _skipEqCoefficients(HANDLE_FDK_BITSTREAM hBs) {
  912|  18.2k|  int j, k;
  913|  18.2k|  int eqDelayMaxPresent;
  914|  18.2k|  int uniqueFilterBlockCount, filterElementCount, filterElementGainPresent;
  915|  18.2k|  int uniqueTdFilterElementCount, eqFilterFormat, bsRealZeroRadiusOneCount,
  916|  18.2k|      realZeroCount, genericZeroCount, realPoleCount, complexPoleCount,
  917|  18.2k|      firFilterOrder;
  918|  18.2k|  int uniqueEqSubbandGainsCount, eqSubbandGainRepresentation,
  919|  18.2k|      eqSubbandGainCount;
  920|  18.2k|  int eqSubbandGainFormat;
  921|       |
  922|  18.2k|  eqDelayMaxPresent = FDKreadBits(hBs, 1);
  923|  18.2k|  if (eqDelayMaxPresent) {
  ------------------
  |  Branch (923:7): [True: 8.84k, False: 9.45k]
  ------------------
  924|  8.84k|    FDKpushFor(hBs, 8); /* bsEqDelayMax */
  925|  8.84k|  }
  926|       |
  927|  18.2k|  uniqueFilterBlockCount = FDKreadBits(hBs, 6);
  928|   462k|  for (j = 0; j < uniqueFilterBlockCount; j++) {
  ------------------
  |  Branch (928:15): [True: 444k, False: 18.2k]
  ------------------
  929|   444k|    filterElementCount = FDKreadBits(hBs, 6);
  930|  6.93M|    for (k = 0; k < filterElementCount; k++) {
  ------------------
  |  Branch (930:17): [True: 6.48M, False: 444k]
  ------------------
  931|  6.48M|      FDKpushFor(hBs, 6); /* filterElementIndex */
  932|  6.48M|      filterElementGainPresent = FDKreadBits(hBs, 1);
  933|  6.48M|      if (filterElementGainPresent) {
  ------------------
  |  Branch (933:11): [True: 2.41M, False: 4.07M]
  ------------------
  934|  2.41M|        FDKpushFor(hBs, 10); /* bsFilterElementGain */
  935|  2.41M|      }
  936|  6.48M|    }
  937|   444k|  }
  938|  18.2k|  uniqueTdFilterElementCount = FDKreadBits(hBs, 6);
  939|   228k|  for (j = 0; j < uniqueTdFilterElementCount; j++) {
  ------------------
  |  Branch (939:15): [True: 209k, False: 18.2k]
  ------------------
  940|   209k|    eqFilterFormat = FDKreadBits(hBs, 1);
  941|   209k|    if (eqFilterFormat == 0) { /* pole/zero */
  ------------------
  |  Branch (941:9): [True: 140k, False: 68.7k]
  ------------------
  942|   140k|      bsRealZeroRadiusOneCount = FDKreadBits(hBs, 3);
  943|   140k|      realZeroCount = FDKreadBits(hBs, 6);
  944|   140k|      genericZeroCount = FDKreadBits(hBs, 6);
  945|   140k|      realPoleCount = FDKreadBits(hBs, 4);
  946|   140k|      complexPoleCount = FDKreadBits(hBs, 4);
  947|   140k|      FDKpushFor(hBs, 2 * bsRealZeroRadiusOneCount * 1);
  948|   140k|      FDKpushFor(hBs, realZeroCount * 8);
  949|   140k|      FDKpushFor(hBs, genericZeroCount * 14);
  950|   140k|      FDKpushFor(hBs, realPoleCount * 8);
  951|   140k|      FDKpushFor(hBs, complexPoleCount * 14);
  952|   140k|    } else { /* FIR coefficients */
  953|  68.7k|      firFilterOrder = FDKreadBits(hBs, 7);
  954|  68.7k|      FDKpushFor(hBs, 1);
  955|  68.7k|      FDKpushFor(hBs, (firFilterOrder / 2 + 1) * 11);
  956|  68.7k|    }
  957|   209k|  }
  958|  18.2k|  uniqueEqSubbandGainsCount = FDKreadBits(hBs, 6);
  959|  18.2k|  if (uniqueEqSubbandGainsCount > 0) {
  ------------------
  |  Branch (959:7): [True: 8.23k, False: 10.0k]
  ------------------
  960|  8.23k|    eqSubbandGainRepresentation = FDKreadBits(hBs, 1);
  961|  8.23k|    eqSubbandGainFormat = FDKreadBits(hBs, 4);
  962|  8.23k|    switch (eqSubbandGainFormat) {
  963|    343|      case GF_QMF32:
  ------------------
  |  Branch (963:7): [True: 343, False: 7.89k]
  ------------------
  964|    343|        eqSubbandGainCount = 32;
  965|    343|        break;
  966|    457|      case GF_QMFHYBRID39:
  ------------------
  |  Branch (966:7): [True: 457, False: 7.77k]
  ------------------
  967|    457|        eqSubbandGainCount = 39;
  968|    457|        break;
  969|    631|      case GF_QMF64:
  ------------------
  |  Branch (969:7): [True: 631, False: 7.60k]
  ------------------
  970|    631|        eqSubbandGainCount = 64;
  971|    631|        break;
  972|    344|      case GF_QMFHYBRID71:
  ------------------
  |  Branch (972:7): [True: 344, False: 7.89k]
  ------------------
  973|    344|        eqSubbandGainCount = 71;
  974|    344|        break;
  975|     88|      case GF_QMF128:
  ------------------
  |  Branch (975:7): [True: 88, False: 8.14k]
  ------------------
  976|     88|        eqSubbandGainCount = 128;
  977|     88|        break;
  978|    284|      case GF_QMFHYBRID135:
  ------------------
  |  Branch (978:7): [True: 284, False: 7.95k]
  ------------------
  979|    284|        eqSubbandGainCount = 135;
  980|    284|        break;
  981|    408|      case GF_UNIFORM:
  ------------------
  |  Branch (981:7): [True: 408, False: 7.82k]
  ------------------
  982|  6.08k|      default:
  ------------------
  |  Branch (982:7): [True: 5.68k, False: 2.55k]
  ------------------
  983|  6.08k|        eqSubbandGainCount = FDKreadBits(hBs, 8);
  984|  6.08k|        eqSubbandGainCount++;
  985|  6.08k|        break;
  986|  8.23k|    }
  987|   213k|    for (k = 0; k < uniqueEqSubbandGainsCount; k++) {
  ------------------
  |  Branch (987:17): [True: 205k, False: 8.23k]
  ------------------
  988|   205k|      if (eqSubbandGainRepresentation == 1) {
  ------------------
  |  Branch (988:11): [True: 95.7k, False: 109k]
  ------------------
  989|  95.7k|        _skipEqSubbandGainSpline(hBs);
  990|   109k|      } else {
  991|   109k|        FDKpushFor(hBs, eqSubbandGainCount * 9);
  992|   109k|      }
  993|   205k|    }
  994|  8.23k|  }
  995|  18.2k|}
drcDec_reader.cpp:_ZL24_skipEqSubbandGainSplineP13FDK_BITSTREAM:
  884|  95.7k|static void _skipEqSubbandGainSpline(HANDLE_FDK_BITSTREAM hBs) {
  885|  95.7k|  int nEqNodes, k, bits;
  886|  95.7k|  nEqNodes = FDKreadBits(hBs, 5);
  887|  95.7k|  nEqNodes += 2;
  888|  1.13M|  for (k = 0; k < nEqNodes; k++) {
  ------------------
  |  Branch (888:15): [True: 1.04M, False: 95.7k]
  ------------------
  889|  1.04M|    bits = FDKreadBits(hBs, 1);
  890|  1.04M|    if (!bits) {
  ------------------
  |  Branch (890:9): [True: 541k, False: 502k]
  ------------------
  891|   541k|      FDKpushFor(hBs, 4);
  892|   541k|    }
  893|  1.04M|  }
  894|  95.7k|  FDKpushFor(hBs, 4 * (nEqNodes - 1));
  895|  95.7k|  bits = FDKreadBits(hBs, 2);
  896|  95.7k|  switch (bits) {
  ------------------
  |  Branch (896:11): [True: 95.7k, False: 0]
  ------------------
  897|  56.3k|    case 0:
  ------------------
  |  Branch (897:5): [True: 56.3k, False: 39.3k]
  ------------------
  898|  56.3k|      FDKpushFor(hBs, 5);
  899|  56.3k|      break;
  900|  13.1k|    case 1:
  ------------------
  |  Branch (900:5): [True: 13.1k, False: 82.5k]
  ------------------
  901|  24.4k|    case 2:
  ------------------
  |  Branch (901:5): [True: 11.2k, False: 84.4k]
  ------------------
  902|  24.4k|      FDKpushFor(hBs, 4);
  903|  24.4k|      break;
  904|  14.9k|    case 3:
  ------------------
  |  Branch (904:5): [True: 14.9k, False: 80.8k]
  ------------------
  905|  14.9k|      FDKpushFor(hBs, 3);
  906|  14.9k|      break;
  907|  95.7k|  }
  908|  95.7k|  FDKpushFor(hBs, 5 * (nEqNodes - 1));
  909|  95.7k|}
drcDec_reader.cpp:_ZL19_skipEqInstructionsP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1019|  67.0k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1020|  67.0k|  DRC_ERROR err = DE_OK;
 1021|  67.0k|  int c, i, k, channelCount;
 1022|  67.0k|  int downmixIdPresent, downmixId, eqApplyToDownmix, additionalDownmixIdPresent,
 1023|  67.0k|      additionalDownmixIdCount = 0;
 1024|  67.0k|  int additionalDrcSetIdPresent, additionalDrcSetIdCount;
 1025|  67.0k|  int dependsOnEqSetPresent, eqChannelGroupCount, tdFilterCascadePresent,
 1026|  67.0k|      subbandGainsPresent, eqTransitionDurationPresent;
 1027|  67.0k|  UCHAR eqChannelGroupForChannel[8];
 1028|       |
 1029|  67.0k|  FDKpushFor(hBs, 6); /* eqSetId */
 1030|  67.0k|  FDKpushFor(hBs, 4); /* eqSetComplexityLevel */
 1031|  67.0k|  downmixIdPresent = FDKreadBits(hBs, 1);
 1032|  67.0k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1032:7): [True: 20.4k, False: 46.6k]
  ------------------
 1033|  20.4k|    downmixId = FDKreadBits(hBs, 7);
 1034|  20.4k|    eqApplyToDownmix = FDKreadBits(hBs, 1);
 1035|  20.4k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1036|  20.4k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1036:9): [True: 8.16k, False: 12.2k]
  ------------------
 1037|  8.16k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
 1038|  8.16k|      FDKpushFor(hBs, additionalDownmixIdCount * 7); /* additionalDownmixId */
 1039|  8.16k|    }
 1040|  46.6k|  } else {
 1041|  46.6k|    downmixId = 0;
 1042|  46.6k|    eqApplyToDownmix = 0;
 1043|  46.6k|  }
 1044|  67.0k|  FDKpushFor(hBs, 6); /* drcSetId */
 1045|  67.0k|  additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
 1046|  67.0k|  if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (1046:7): [True: 16.7k, False: 50.3k]
  ------------------
 1047|  16.7k|    additionalDrcSetIdCount = FDKreadBits(hBs, 6);
 1048|   469k|    for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (1048:17): [True: 452k, False: 16.7k]
  ------------------
 1049|   452k|      FDKpushFor(hBs, 6); /* additionalDrcSetId */
 1050|   452k|    }
 1051|  16.7k|  }
 1052|  67.0k|  FDKpushFor(hBs, 16); /* eqSetPurpose */
 1053|  67.0k|  dependsOnEqSetPresent = FDKreadBits(hBs, 1);
 1054|  67.0k|  if (dependsOnEqSetPresent) {
  ------------------
  |  Branch (1054:7): [True: 16.4k, False: 50.6k]
  ------------------
 1055|  16.4k|    FDKpushFor(hBs, 6); /* dependsOnEqSet */
 1056|  50.6k|  } else {
 1057|  50.6k|    FDKpushFor(hBs, 1); /* noIndependentEqUse */
 1058|  50.6k|  }
 1059|       |
 1060|  67.0k|  channelCount = hUniDrcConfig->channelLayout.baseChannelCount;
 1061|  67.0k|  if ((downmixIdPresent == 1) && (eqApplyToDownmix == 1) && (downmixId != 0) &&
  ------------------
  |  Branch (1061:7): [True: 20.4k, False: 46.6k]
  |  Branch (1061:34): [True: 11.0k, False: 9.40k]
  |  Branch (1061:61): [True: 10.2k, False: 812]
  ------------------
 1062|  10.2k|      (downmixId != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  10.2k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1062:7): [True: 8.66k, False: 1.58k]
  ------------------
 1063|  8.66k|      (additionalDownmixIdCount == 0)) {
  ------------------
  |  Branch (1063:7): [True: 4.23k, False: 4.42k]
  ------------------
 1064|  4.23k|    DOWNMIX_INSTRUCTIONS* pDown =
 1065|  4.23k|        selectDownmixInstructions(hUniDrcConfig, downmixId);
 1066|  4.23k|    if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1066:9): [True: 4.00k, False: 238]
  ------------------
 1067|       |
 1068|    238|    channelCount =
 1069|    238|        pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1070|  62.8k|  } else if ((downmixId == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|  62.8k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1070:14): [True: 1.62k, False: 61.2k]
  ------------------
 1071|  61.2k|             (additionalDownmixIdCount > 1)) {
  ------------------
  |  Branch (1071:14): [True: 6.25k, False: 54.9k]
  ------------------
 1072|  7.88k|    channelCount = 1;
 1073|  7.88k|  }
 1074|       |
 1075|  63.0k|  eqChannelGroupCount = 0;
 1076|   159k|  for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (1076:15): [True: 96.4k, False: 62.8k]
  ------------------
 1077|  96.4k|    int newGroup = 1;
 1078|  96.4k|    if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1078:9): [True: 237, False: 96.1k]
  ------------------
 1079|  96.1k|    eqChannelGroupForChannel[c] = FDKreadBits(hBs, 7);
 1080|   202k|    for (k = 0; k < c; k++) {
  ------------------
  |  Branch (1080:17): [True: 106k, False: 96.1k]
  ------------------
 1081|   106k|      if (eqChannelGroupForChannel[c] == eqChannelGroupForChannel[k]) {
  ------------------
  |  Branch (1081:11): [True: 49.4k, False: 56.8k]
  ------------------
 1082|  49.4k|        newGroup = 0;
 1083|  49.4k|      }
 1084|   106k|    }
 1085|  96.1k|    if (newGroup == 1) {
  ------------------
  |  Branch (1085:9): [True: 66.3k, False: 29.8k]
  ------------------
 1086|  66.3k|      eqChannelGroupCount += 1;
 1087|  66.3k|    }
 1088|  96.1k|  }
 1089|  62.8k|  tdFilterCascadePresent = FDKreadBits(hBs, 1);
 1090|  62.8k|  if (tdFilterCascadePresent) {
  ------------------
  |  Branch (1090:7): [True: 16.5k, False: 46.2k]
  ------------------
 1091|  16.5k|    _skipTdFilterCascade(hBs, eqChannelGroupCount);
 1092|  16.5k|  }
 1093|  62.8k|  subbandGainsPresent = FDKreadBits(hBs, 1);
 1094|  62.8k|  if (subbandGainsPresent) {
  ------------------
  |  Branch (1094:7): [True: 15.6k, False: 47.1k]
  ------------------
 1095|  15.6k|    FDKpushFor(hBs, eqChannelGroupCount * 6); /* subbandGainsIndex */
 1096|  15.6k|  }
 1097|  62.8k|  eqTransitionDurationPresent = FDKreadBits(hBs, 1);
 1098|  62.8k|  if (eqTransitionDurationPresent) {
  ------------------
  |  Branch (1098:7): [True: 13.7k, False: 49.0k]
  ------------------
 1099|  13.7k|    FDKpushFor(hBs, 5); /* bsEqTransitionDuration */
 1100|  13.7k|  }
 1101|  62.8k|  return err;
 1102|  63.0k|}
drcDec_reader.cpp:_ZL20_skipTdFilterCascadeP13FDK_BITSTREAMi:
  998|  16.5k|                                 const int eqChannelGroupCount) {
  999|  16.5k|  int i, eqCascadeGainPresent, filterBlockCount, eqPhaseAlignmentPresent;
 1000|  36.1k|  for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1000:15): [True: 19.5k, False: 16.5k]
  ------------------
 1001|  19.5k|    eqCascadeGainPresent = FDKreadBits(hBs, 1);
 1002|  19.5k|    if (eqCascadeGainPresent) {
  ------------------
  |  Branch (1002:9): [True: 6.67k, False: 12.9k]
  ------------------
 1003|  6.67k|      FDKpushFor(hBs, 10); /* bsEqCascadeGain */
 1004|  6.67k|    }
 1005|  19.5k|    filterBlockCount = FDKreadBits(hBs, 4);
 1006|  19.5k|    FDKpushFor(hBs, filterBlockCount * 7); /* filterBlockIndex */
 1007|  19.5k|  }
 1008|  16.5k|  eqPhaseAlignmentPresent = FDKreadBits(hBs, 1);
 1009|  16.5k|  {
 1010|  16.5k|    if (eqPhaseAlignmentPresent) {
  ------------------
  |  Branch (1010:9): [True: 6.81k, False: 9.73k]
  ------------------
 1011|  13.9k|      for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1011:19): [True: 7.14k, False: 6.81k]
  ------------------
 1012|  7.14k|        FDKpushFor(hBs, (eqChannelGroupCount - i - 1) * 1);
 1013|  7.14k|      }
 1014|  6.81k|    }
 1015|  16.5k|  }
 1016|  16.5k|}
drcDec_reader.cpp:_ZL17_readLoudnessInfoP13FDK_BITSTREAMiP13LOUDNESS_INFO:
 1853|  53.5k|                                   LOUDNESS_INFO* loudnessInfo) {
 1854|  53.5k|  DRC_ERROR err = DE_OK;
 1855|  53.5k|  int bsSamplePeakLevel, bsTruePeakLevel, i;
 1856|  53.5k|  int measurementCount;
 1857|       |
 1858|  53.5k|  loudnessInfo->drcSetId = FDKreadBits(hBs, 6);
 1859|  53.5k|  if (version >= 1) {
  ------------------
  |  Branch (1859:7): [True: 18.8k, False: 34.6k]
  ------------------
 1860|  18.8k|    loudnessInfo->eqSetId = FDKreadBits(hBs, 6);
 1861|  34.6k|  } else {
 1862|  34.6k|    loudnessInfo->eqSetId = 0;
 1863|  34.6k|  }
 1864|  53.5k|  loudnessInfo->downmixId = FDKreadBits(hBs, 7);
 1865|       |
 1866|  53.5k|  loudnessInfo->samplePeakLevelPresent = FDKreadBits(hBs, 1);
 1867|  53.5k|  if (loudnessInfo->samplePeakLevelPresent) {
  ------------------
  |  Branch (1867:7): [True: 9.12k, False: 44.4k]
  ------------------
 1868|  9.12k|    bsSamplePeakLevel = FDKreadBits(hBs, 12);
 1869|  9.12k|    if (bsSamplePeakLevel == 0) {
  ------------------
  |  Branch (1869:9): [True: 382, False: 8.73k]
  ------------------
 1870|    382|      loudnessInfo->samplePeakLevelPresent = 0;
 1871|    382|      loudnessInfo->samplePeakLevel = (FIXP_DBL)0;
 1872|  8.73k|    } else { /* 20.0 - bsSamplePeakLevel * 0.03125; */
 1873|  8.73k|      loudnessInfo->samplePeakLevel =
 1874|  8.73k|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|  8.73k|  (FIXP_DBL)(                                                                \
  |  |  193|  8.73k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 8.73k, Folded]
  |  |  ------------------
  |  |  194|  8.73k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  8.73k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.73k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 8.73k]
  |  |  ------------------
  |  |  195|  8.73k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  8.73k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  8.73k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  8.73k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  8.73k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.73k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  8.73k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (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|  8.73k|          (FIXP_DBL)(bsSamplePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|  8.73k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1876|  8.73k|    }
 1877|  9.12k|  }
 1878|       |
 1879|  53.5k|  loudnessInfo->truePeakLevelPresent = FDKreadBits(hBs, 1);
 1880|  53.5k|  if (loudnessInfo->truePeakLevelPresent) {
  ------------------
  |  Branch (1880:7): [True: 6.34k, False: 47.2k]
  ------------------
 1881|  6.34k|    bsTruePeakLevel = FDKreadBits(hBs, 12);
 1882|  6.34k|    if (bsTruePeakLevel == 0) {
  ------------------
  |  Branch (1882:9): [True: 361, False: 5.98k]
  ------------------
 1883|    361|      loudnessInfo->truePeakLevelPresent = 0;
 1884|    361|      loudnessInfo->truePeakLevel = (FIXP_DBL)0;
 1885|  5.98k|    } else {
 1886|  5.98k|      loudnessInfo->truePeakLevel =
 1887|  5.98k|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|  5.98k|  (FIXP_DBL)(                                                                \
  |  |  193|  5.98k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 5.98k, Folded]
  |  |  ------------------
  |  |  194|  5.98k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  5.98k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.98k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 5.98k]
  |  |  ------------------
  |  |  195|  5.98k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  5.98k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  5.98k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  5.98k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  5.98k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.98k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  5.98k|          : ((((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|  5.98k|          (FIXP_DBL)(bsTruePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|  5.98k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1889|  5.98k|    }
 1890|  6.34k|    loudnessInfo->truePeakLevelMeasurementSystem = FDKreadBits(hBs, 4);
 1891|  6.34k|    loudnessInfo->truePeakLevelReliability = FDKreadBits(hBs, 2);
 1892|  6.34k|  }
 1893|       |
 1894|  53.5k|  measurementCount = FDKreadBits(hBs, 4);
 1895|  53.5k|  loudnessInfo->measurementCount = fMin(measurementCount, 8);
 1896|   119k|  for (i = 0; i < measurementCount; i++) {
  ------------------
  |  Branch (1896:15): [True: 72.4k, False: 47.1k]
  ------------------
 1897|  72.4k|    LOUDNESS_MEASUREMENT tmpMeas;
 1898|  72.4k|    FDKmemclear(&tmpMeas, sizeof(LOUDNESS_MEASUREMENT));
 1899|  72.4k|    err = _readLoudnessMeasurement(hBs, &tmpMeas);
 1900|  72.4k|    if (err) return err;
  ------------------
  |  Branch (1900:9): [True: 6.40k, False: 66.0k]
  ------------------
 1901|  66.0k|    if (i >= 8) continue;
  ------------------
  |  Branch (1901:9): [True: 3.40k, False: 62.6k]
  ------------------
 1902|  62.6k|    loudnessInfo->loudnessMeasurement[i] = tmpMeas;
 1903|  62.6k|  }
 1904|       |
 1905|  47.1k|  return err;
 1906|  53.5k|}
drcDec_reader.cpp:_ZL24_readLoudnessMeasurementP13FDK_BITSTREAMP20LOUDNESS_MEASUREMENT:
 1839|  72.4k|                                          LOUDNESS_MEASUREMENT* pMeas) {
 1840|  72.4k|  DRC_ERROR err = DE_OK;
 1841|       |
 1842|  72.4k|  pMeas->methodDefinition = FDKreadBits(hBs, 4);
 1843|  72.4k|  err =
 1844|  72.4k|      _decodeMethodValue(hBs, pMeas->methodDefinition, &pMeas->methodValue, 0);
 1845|  72.4k|  if (err) return err;
  ------------------
  |  Branch (1845:7): [True: 6.40k, False: 66.0k]
  ------------------
 1846|  66.0k|  pMeas->measurementSystem = FDKreadBits(hBs, 4);
 1847|  66.0k|  pMeas->reliability = FDKreadBits(hBs, 2);
 1848|       |
 1849|  66.0k|  return err;
 1850|  72.4k|}
drcDec_reader.cpp:_ZL18_decodeMethodValueP13FDK_BITSTREAMhPii:
 1785|  72.4k|                                    FIXP_DBL* methodValue, INT isBox) {
 1786|  72.4k|  int tmp;
 1787|  72.4k|  FIXP_DBL val;
 1788|  72.4k|  switch (methodDefinition) {
 1789|  17.6k|    case MD_UNKNOWN_OTHER:
  ------------------
  |  Branch (1789:5): [True: 17.6k, False: 54.7k]
  ------------------
 1790|  21.4k|    case MD_PROGRAM_LOUDNESS:
  ------------------
  |  Branch (1790:5): [True: 3.73k, False: 68.6k]
  ------------------
 1791|  30.6k|    case MD_ANCHOR_LOUDNESS:
  ------------------
  |  Branch (1791:5): [True: 9.25k, False: 63.1k]
  ------------------
 1792|  31.3k|    case MD_MAX_OF_LOUDNESS_RANGE:
  ------------------
  |  Branch (1792:5): [True: 646, False: 71.7k]
  ------------------
 1793|  41.5k|    case MD_MOMENTARY_LOUDNESS_MAX:
  ------------------
  |  Branch (1793:5): [True: 10.2k, False: 62.1k]
  ------------------
 1794|  46.3k|    case MD_SHORT_TERM_LOUDNESS_MAX:
  ------------------
  |  Branch (1794:5): [True: 4.75k, False: 67.6k]
  ------------------
 1795|  46.3k|      tmp = FDKreadBits(hBs, 8);
 1796|  46.3k|      val = FL2FXCONST_DBL(-57.75f / (float)(1 << 7)) +
  ------------------
  |  |  192|  46.3k|  (FIXP_DBL)(                                                                \
  |  |  193|  46.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 46.3k]
  |  |  ------------------
  |  |  194|  46.3k|          ? ((((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|  46.3k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  46.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  46.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 46.3k]
  |  |  ------------------
  |  |  199|  46.3k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  46.3k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  46.3k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  46.3k|                 ? (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|  46.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  46.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  46.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1797|  46.3k|            (FIXP_DBL)(
 1798|  46.3k|                tmp << (DFRACT_BITS - 1 - 2 - 7)); /* -57.75 + tmp * 0.25; */
  ------------------
  |  |  113|  46.3k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1799|  46.3k|      break;
 1800|  4.59k|    case MD_LOUDNESS_RANGE:
  ------------------
  |  Branch (1800:5): [True: 4.59k, False: 67.8k]
  ------------------
 1801|  4.59k|      tmp = FDKreadBits(hBs, 8);
 1802|  4.59k|      if (tmp == 0)
  ------------------
  |  Branch (1802:11): [True: 551, False: 4.04k]
  ------------------
 1803|    551|        val = (FIXP_DBL)0;
 1804|  4.04k|      else if (tmp <= 128)
  ------------------
  |  Branch (1804:16): [True: 2.87k, False: 1.16k]
  ------------------
 1805|  2.87k|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 2 - 7)); /* tmp * 0.25; */
  ------------------
  |  |  113|  2.87k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1806|  1.16k|      else if (tmp <= 204) {
  ------------------
  |  Branch (1806:16): [True: 452, False: 714]
  ------------------
 1807|    452|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 1 - 7)) -
  ------------------
  |  |  113|    452|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1808|    452|              FL2FXCONST_DBL(32.0f / (float)(1 << 7)); /* 0.5 * tmp - 32.0f; */
  ------------------
  |  |  192|    452|  (FIXP_DBL)(                                                                \
  |  |  193|    452|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 452, Folded]
  |  |  ------------------
  |  |  194|    452|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    452|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    452|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 452]
  |  |  ------------------
  |  |  195|    452|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    452|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    452|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    452|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    452|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    452|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    452|          : ((((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|    714|      } else {
 1810|       |        /* downscale by 1 more bit to prevent overflow at intermediate result */
 1811|    714|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 8)) -
  ------------------
  |  |  113|    714|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1812|    714|              FL2FXCONST_DBL(134.0f / (float)(1 << 8)); /* tmp - 134.0; */
  ------------------
  |  |  192|    714|  (FIXP_DBL)(                                                                \
  |  |  193|    714|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 714, Folded]
  |  |  ------------------
  |  |  194|    714|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    714|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    714|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 714]
  |  |  ------------------
  |  |  195|    714|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    714|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    714|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    714|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    714|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    714|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    714|          : ((((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|    714|        val <<= 1;
 1814|    714|      }
 1815|  4.59k|      break;
 1816|  4.64k|    case MD_MIXING_LEVEL:
  ------------------
  |  Branch (1816:5): [True: 4.64k, False: 67.7k]
  ------------------
 1817|  4.64k|      tmp = FDKreadBits(hBs, isBox ? 8 : 5);
  ------------------
  |  Branch (1817:30): [True: 0, False: 4.64k]
  ------------------
 1818|  4.64k|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)) +
  ------------------
  |  |  113|  4.64k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1819|  4.64k|            FL2FXCONST_DBL(80.0f / (float)(1 << 7)); /* tmp + 80.0; */
  ------------------
  |  |  192|  4.64k|  (FIXP_DBL)(                                                                \
  |  |  193|  4.64k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 4.64k, Folded]
  |  |  ------------------
  |  |  194|  4.64k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  4.64k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.64k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 4.64k]
  |  |  ------------------
  |  |  195|  4.64k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  4.64k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  4.64k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  4.64k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  4.64k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.64k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  4.64k|          : ((((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|  4.64k|      break;
 1821|  6.07k|    case MD_ROOM_TYPE:
  ------------------
  |  Branch (1821:5): [True: 6.07k, False: 66.3k]
  ------------------
 1822|  6.07k|      tmp = FDKreadBits(hBs, isBox ? 8 : 2);
  ------------------
  |  Branch (1822:30): [True: 0, False: 6.07k]
  ------------------
 1823|  6.07k|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)); /* tmp; */
  ------------------
  |  |  113|  6.07k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1824|  6.07k|      break;
 1825|  4.35k|    case MD_SHORT_TERM_LOUDNESS:
  ------------------
  |  Branch (1825:5): [True: 4.35k, False: 68.0k]
  ------------------
 1826|  4.35k|      tmp = FDKreadBits(hBs, 8);
 1827|  4.35k|      val = FL2FXCONST_DBL(-116.0f / (float)(1 << 7)) +
  ------------------
  |  |  192|  4.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  4.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 4.35k]
  |  |  ------------------
  |  |  194|  4.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  4.35k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  4.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 4.35k]
  |  |  ------------------
  |  |  199|  4.35k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  4.35k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  4.35k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  4.35k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  4.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  4.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1828|  4.35k|            (FIXP_DBL)(
 1829|  4.35k|                tmp << (DFRACT_BITS - 1 - 1 - 7)); /* -116.0 + tmp * 0.5; */
  ------------------
  |  |  113|  4.35k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1830|  4.35k|      break;
 1831|  6.40k|    default:
  ------------------
  |  Branch (1831:5): [True: 6.40k, False: 66.0k]
  ------------------
 1832|  6.40k|      return DE_NOT_OK; /* invalid methodDefinition value */
 1833|  72.4k|  }
 1834|  66.0k|  *methodValue = val;
 1835|  66.0k|  return DE_OK;
 1836|  72.4k|}
drcDec_reader.cpp:_ZL29_readLoudnessInfoSetExtensionP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1955|  3.53k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1956|  3.53k|  DRC_ERROR err = DE_OK;
 1957|  3.53k|  int k, bitSizeLen, extSizeBits, bitSize;
 1958|  3.53k|  INT nBitsRemaining;
 1959|  3.53k|  LOUDNESS_INFO_SET_EXTENSION* pExt = &(hLoudnessInfoSet->loudnessInfoSetExt);
 1960|       |
 1961|  3.53k|  k = 0;
 1962|  3.53k|  pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1963|  8.23k|  while (pExt->loudnessInfoSetExtType[k] != UNIDRCLOUDEXT_TERM) {
  ------------------
  |  |  116|  8.23k|#define UNIDRCLOUDEXT_TERM 0x0
  ------------------
  |  Branch (1963:10): [True: 6.76k, False: 1.46k]
  ------------------
 1964|  6.76k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1964:9): [True: 261, False: 6.50k]
  ------------------
 1965|  6.50k|    bitSizeLen = FDKreadBits(hBs, 4);
 1966|  6.50k|    extSizeBits = bitSizeLen + 4;
 1967|       |
 1968|  6.50k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1969|  6.50k|    pExt->extBitSize[k] = bitSize + 1;
 1970|  6.50k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1971|       |
 1972|  6.50k|    switch (pExt->loudnessInfoSetExtType[k]) {
 1973|  2.67k|      case UNIDRCLOUDEXT_EQ:
  ------------------
  |  |  113|  2.67k|#define UNIDRCLOUDEXT_EQ 0x1
  ------------------
  |  Branch (1973:7): [True: 2.67k, False: 3.83k]
  ------------------
 1974|  2.67k|        err = _readLoudnessInfoSetExtEq(hBs, hLoudnessInfoSet);
 1975|  2.67k|        if (err) return err;
  ------------------
  |  Branch (1975:13): [True: 891, False: 1.78k]
  ------------------
 1976|  1.78k|        if (nBitsRemaining !=
  ------------------
  |  Branch (1976:13): [True: 913, False: 869]
  ------------------
 1977|  1.78k|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1978|    913|          return DE_NOT_OK;
 1979|    869|        break;
 1980|       |      /* add future extensions here */
 1981|  3.83k|      default:
  ------------------
  |  Branch (1981:7): [True: 3.83k, False: 2.67k]
  ------------------
 1982|  3.83k|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1983|  3.83k|        break;
 1984|  6.50k|    }
 1985|  4.70k|    k++;
 1986|  4.70k|    pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1987|  4.70k|  }
 1988|       |
 1989|  1.46k|  return err;
 1990|  3.53k|}
drcDec_reader.cpp:_ZL25_readLoudnessInfoSetExtEqP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1909|  2.67k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1910|  2.67k|  DRC_ERROR err = DE_OK;
 1911|  2.67k|  int i, offset;
 1912|  2.67k|  int diff = hLoudnessInfoSet->diff;
 1913|       |
 1914|  2.67k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV1,
 1915|  2.67k|                      FDKreadBits(hBs, 6));
 1916|  2.67k|  diff |=
 1917|  2.67k|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV1, FDKreadBits(hBs, 6));
 1918|       |
 1919|  2.67k|  offset = hLoudnessInfoSet->loudnessInfoAlbumCountV0;
 1920|  2.67k|  hLoudnessInfoSet->loudnessInfoAlbumCount = fMin(
 1921|  2.67k|      (UCHAR)(offset + hLoudnessInfoSet->loudnessInfoAlbumCountV1), (UCHAR)12);
 1922|  12.0k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV1; i++) {
  ------------------
  |  Branch (1922:15): [True: 9.73k, False: 2.33k]
  ------------------
 1923|  9.73k|    LOUDNESS_INFO tmpLoud;
 1924|  9.73k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1925|  9.73k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1926|  9.73k|    if (err) return err;
  ------------------
  |  Branch (1926:9): [True: 340, False: 9.39k]
  ------------------
 1927|  9.39k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1927:9): [True: 6.39k, False: 3.00k]
  ------------------
 1928|  3.00k|    if (!diff)
  ------------------
  |  Branch (1928:9): [True: 226, False: 2.78k]
  ------------------
 1929|    226|      diff |= (FDKmemcmp(&tmpLoud,
 1930|    226|                         &(hLoudnessInfoSet->loudnessInfoAlbum[offset + i]),
 1931|    226|                         sizeof(LOUDNESS_INFO)) != 0);
 1932|  3.00k|    hLoudnessInfoSet->loudnessInfoAlbum[offset + i] = tmpLoud;
 1933|  3.00k|  }
 1934|       |
 1935|  2.33k|  offset = hLoudnessInfoSet->loudnessInfoCountV0;
 1936|  2.33k|  hLoudnessInfoSet->loudnessInfoCount =
 1937|  2.33k|      fMin((UCHAR)(offset + hLoudnessInfoSet->loudnessInfoCountV1), (UCHAR)12);
 1938|  10.9k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV1; i++) {
  ------------------
  |  Branch (1938:15): [True: 9.13k, False: 1.78k]
  ------------------
 1939|  9.13k|    LOUDNESS_INFO tmpLoud;
 1940|  9.13k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1941|  9.13k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1942|  9.13k|    if (err) return err;
  ------------------
  |  Branch (1942:9): [True: 551, False: 8.58k]
  ------------------
 1943|  8.58k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1943:9): [True: 5.83k, False: 2.75k]
  ------------------
 1944|  2.75k|    if (!diff)
  ------------------
  |  Branch (1944:9): [True: 375, False: 2.37k]
  ------------------
 1945|    375|      diff |=
 1946|    375|          (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[offset + i]),
 1947|    375|                     sizeof(LOUDNESS_INFO)) != 0);
 1948|  2.75k|    hLoudnessInfoSet->loudnessInfo[offset + i] = tmpLoud;
 1949|  2.75k|  }
 1950|  1.78k|  hLoudnessInfoSet->diff = diff;
 1951|  1.78k|  return err;
 1952|  2.33k|}

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

_Z12getDeltaTmini:
  108|   314k|int getDeltaTmin(const int sampleRate) {
  109|       |  /* half_ms = round (0.0005 * sampleRate); */
  110|   314k|  int half_ms = (sampleRate + 1000) / 2000;
  111|   314k|  int deltaTmin = 1;
  112|   314k|  if (sampleRate < 1000) {
  ------------------
  |  Branch (112:7): [True: 313, False: 314k]
  ------------------
  113|    313|    return DE_NOT_OK;
  114|    313|  }
  115|  1.91M|  while (deltaTmin <= half_ms) {
  ------------------
  |  Branch (115:10): [True: 1.60M, False: 314k]
  ------------------
  116|  1.60M|    deltaTmin = deltaTmin << 1;
  117|  1.60M|  }
  118|   314k|  return deltaTmin;
  119|   314k|}
_Z21selectDrcCoefficientsP14UNI_DRC_CONFIGi:
  122|  1.89M|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int location) {
  123|  1.89M|  int n;
  124|  1.89M|  int c = -1;
  125|  2.59M|  for (n = 0; n < hUniDrcConfig->drcCoefficientsUniDrcCount; n++) {
  ------------------
  |  Branch (125:15): [True: 693k, False: 1.89M]
  ------------------
  126|   693k|    if (hUniDrcConfig->drcCoefficientsUniDrc[n].drcLocation == location) {
  ------------------
  |  Branch (126:9): [True: 364k, False: 328k]
  ------------------
  127|   364k|      c = n;
  128|   364k|    }
  129|   693k|  }
  130|  1.89M|  if (c >= 0) {
  ------------------
  |  Branch (130:7): [True: 312k, False: 1.58M]
  ------------------
  131|   312k|    return &(hUniDrcConfig->drcCoefficientsUniDrc[c]);
  132|   312k|  }
  133|  1.58M|  return NULL; /* possible during bitstream parsing */
  134|  1.89M|}
_Z21selectDrcInstructionsP14UNI_DRC_CONFIGi:
  137|  1.66M|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int drcSetId) {
  138|  1.66M|  int i;
  139|  2.97M|  for (i = 0; i < hUniDrcConfig->drcInstructionsCountInclVirtual; i++) {
  ------------------
  |  Branch (139:15): [True: 2.97M, False: 0]
  ------------------
  140|  2.97M|    if (hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId == drcSetId) {
  ------------------
  |  Branch (140:9): [True: 1.66M, False: 1.30M]
  ------------------
  141|  1.66M|      return &(hUniDrcConfig->drcInstructionsUniDrc[i]);
  142|  1.66M|    }
  143|  2.97M|  }
  144|      0|  return NULL;
  145|  1.66M|}
_Z25selectDownmixInstructionsP14UNI_DRC_CONFIGi:
  148|  6.61k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int downmixId) {
  149|  6.61k|  int i;
  150|  15.3k|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) {
  ------------------
  |  Branch (150:15): [True: 9.32k, False: 6.03k]
  ------------------
  151|  9.32k|    if (hUniDrcConfig->downmixInstructions[i].downmixId == downmixId) {
  ------------------
  |  Branch (151:9): [True: 577, False: 8.75k]
  ------------------
  152|    577|      return &(hUniDrcConfig->downmixInstructions[i]);
  153|    577|    }
  154|  9.32k|  }
  155|  6.03k|  return NULL;
  156|  6.61k|}
_Z22deriveDrcChannelGroupsiiPKaPK20DUCKING_MODIFICATIONPhPaS5_PS1_:
  168|   324k|{
  169|   324k|  int duckingSequence = -1;
  170|   324k|  int c, n, g, match, idx;
  171|   324k|  FIXP_SGL factor;
  172|   324k|  FIXP_SGL uniqueScaling[8];
  173|       |
  174|  2.92M|  for (g = 0; g < 8; g++) {
  ------------------
  |  Branch (174:15): [True: 2.59M, False: 324k]
  ------------------
  175|  2.59M|    uniqueIndex[g] = -10;
  176|  2.59M|    uniqueScaling[g] = FIXP_SGL(-1.0f);
  177|  2.59M|  }
  178|       |
  179|   324k|  g = 0;
  180|       |
  181|   324k|  if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (181:7): [True: 28.0k, False: 296k]
  ------------------
  182|  54.3k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (182:17): [True: 26.6k, False: 27.7k]
  ------------------
  183|  26.6k|      match = 0;
  184|  26.6k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (184:11): [True: 0, False: 26.6k]
  ------------------
  185|  26.6k|      idx = gainSetIndex[c];
  186|  26.6k|      factor = duckingModificationForChannel[c].duckingScaling;
  187|  26.6k|      if (idx < 0) {
  ------------------
  |  Branch (187:11): [True: 15.1k, False: 11.4k]
  ------------------
  188|  15.9k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (188:21): [True: 8.62k, False: 7.37k]
  ------------------
  189|  8.62k|          if (uniqueScaling[n] == factor) {
  ------------------
  |  Branch (189:15): [True: 7.79k, False: 822]
  ------------------
  190|  7.79k|            match = 1;
  191|  7.79k|            groupForChannel[c] = n;
  192|  7.79k|            break;
  193|  7.79k|          }
  194|  8.62k|        }
  195|  15.1k|        if (match == 0) {
  ------------------
  |  Branch (195:13): [True: 7.37k, False: 7.79k]
  ------------------
  196|  7.37k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (196:15): [True: 0, False: 7.37k]
  ------------------
  197|  7.37k|          uniqueIndex[g] = idx;
  198|  7.37k|          uniqueScaling[g] = factor;
  199|  7.37k|          groupForChannel[c] = g;
  200|  7.37k|          g++;
  201|  7.37k|        }
  202|  15.1k|      } else {
  203|  11.4k|        if ((duckingSequence > 0) && (duckingSequence != idx)) {
  ------------------
  |  Branch (203:13): [True: 1.21k, False: 10.2k]
  |  Branch (203:38): [True: 347, False: 865]
  ------------------
  204|    347|          return DE_NOT_OK;
  205|    347|        }
  206|  11.0k|        duckingSequence = idx;
  207|  11.0k|        groupForChannel[c] = -1;
  208|  11.0k|      }
  209|  26.6k|    }
  210|  27.7k|    if (duckingSequence == -1) {
  ------------------
  |  Branch (210:9): [True: 18.0k, False: 9.65k]
  ------------------
  211|  18.0k|      return DE_NOT_OK;
  212|  18.0k|    }
  213|   296k|  } else if (drcSetEffect & EB_DUCK_SELF) {
  ------------------
  |  Branch (213:14): [True: 32.1k, False: 264k]
  ------------------
  214|   127k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (214:17): [True: 94.9k, False: 32.1k]
  ------------------
  215|  94.9k|      match = 0;
  216|  94.9k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (216:11): [True: 0, False: 94.9k]
  ------------------
  217|  94.9k|      idx = gainSetIndex[c];
  218|  94.9k|      factor = duckingModificationForChannel[c].duckingScaling;
  219|  94.9k|      if (idx >= 0) {
  ------------------
  |  Branch (219:11): [True: 41.4k, False: 53.5k]
  ------------------
  220|  94.7k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (220:21): [True: 61.1k, False: 33.5k]
  ------------------
  221|  61.1k|          if ((uniqueIndex[n] == idx) && (uniqueScaling[n] == factor)) {
  ------------------
  |  Branch (221:15): [True: 11.8k, False: 49.3k]
  |  Branch (221:42): [True: 7.86k, False: 3.99k]
  ------------------
  222|  7.86k|            match = 1;
  223|  7.86k|            groupForChannel[c] = n;
  224|  7.86k|            break;
  225|  7.86k|          }
  226|  61.1k|        }
  227|  41.4k|        if (match == 0) {
  ------------------
  |  Branch (227:13): [True: 33.5k, False: 7.86k]
  ------------------
  228|  33.5k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (228:15): [True: 0, False: 33.5k]
  ------------------
  229|  33.5k|          uniqueIndex[g] = idx;
  230|  33.5k|          uniqueScaling[g] = factor;
  231|  33.5k|          groupForChannel[c] = g;
  232|  33.5k|          g++;
  233|  33.5k|        }
  234|  53.5k|      } else {
  235|  53.5k|        groupForChannel[c] = -1;
  236|  53.5k|      }
  237|  94.9k|    }
  238|   264k|  } else { /* no ducking */
  239|  1.13M|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (239:17): [True: 871k, False: 264k]
  ------------------
  240|   871k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (240:11): [True: 0, False: 871k]
  ------------------
  241|   871k|      idx = gainSetIndex[c];
  242|   871k|      match = 0;
  243|   871k|      if (idx >= 0) {
  ------------------
  |  Branch (243:11): [True: 193k, False: 678k]
  ------------------
  244|   243k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (244:21): [True: 165k, False: 77.9k]
  ------------------
  245|   165k|          if (uniqueIndex[n] == idx) {
  ------------------
  |  Branch (245:15): [True: 115k, False: 50.0k]
  ------------------
  246|   115k|            match = 1;
  247|   115k|            groupForChannel[c] = n;
  248|   115k|            break;
  249|   115k|          }
  250|   165k|        }
  251|   193k|        if (match == 0) {
  ------------------
  |  Branch (251:13): [True: 77.9k, False: 115k]
  ------------------
  252|  77.9k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (252:15): [True: 0, False: 77.9k]
  ------------------
  253|  77.9k|          uniqueIndex[g] = idx;
  254|  77.9k|          groupForChannel[c] = g;
  255|  77.9k|          g++;
  256|  77.9k|        }
  257|   678k|      } else {
  258|   678k|        groupForChannel[c] = -1;
  259|   678k|      }
  260|   871k|    }
  261|   264k|  }
  262|   306k|  *nDrcChannelGroups = g;
  263|       |
  264|   306k|  if (drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (264:7): [True: 41.7k, False: 264k]
  ------------------
  265|  82.1k|    for (g = 0; g < *nDrcChannelGroups; g++) {
  ------------------
  |  Branch (265:17): [True: 40.3k, False: 41.7k]
  ------------------
  266|  40.3k|      if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (266:11): [True: 6.81k, False: 33.5k]
  ------------------
  267|  6.81k|        uniqueIndex[g] = duckingSequence;
  268|  6.81k|      }
  269|  40.3k|      duckingModificationForChannelGroup[g].duckingScaling = uniqueScaling[g];
  270|  40.3k|      if (uniqueScaling[g] != FL2FXCONST_SGL(1.0f / (float)(1 << 2))) {
  ------------------
  |  |  180|  40.3k|  (FIXP_SGL)(                                                                \
  |  |  181|  40.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 40.3k, Folded]
  |  |  ------------------
  |  |  182|  40.3k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  40.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  40.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 40.3k]
  |  |  ------------------
  |  |  183|  40.3k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  40.3k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  40.3k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  40.3k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  40.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  40.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  40.3k|          : ((((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: 15.0k, False: 25.3k]
  ------------------
  271|  15.0k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 1;
  272|  25.3k|      } else {
  273|  25.3k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 0;
  274|  25.3k|      }
  275|  40.3k|    }
  276|  41.7k|  }
  277|       |
  278|   306k|  return DE_OK;
  279|   324k|}
_Z6dB2liniiPi:
  282|  16.8k|dB2lin(const FIXP_DBL dB_m, const int dB_e, int* pLin_e) {
  283|       |  /* get linear value from dB.
  284|       |     return lin_val = 10^(dB_val/20) = 2^(log2(10)/20*dB_val)
  285|       |     with dB_val = dB_m *2^dB_e and lin_val = lin_m * 2^lin_e */
  286|  16.8k|  FIXP_DBL lin_m =
  287|  16.8k|      f2Pow(fMult(dB_m, FL2FXCONST_DBL(0.1660964f * (float)(1 << 2))), dB_e - 2,
  ------------------
  |  |  192|  16.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.8k, Folded]
  |  |  ------------------
  |  |  194|  16.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.8k]
  |  |  ------------------
  |  |  195|  16.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.8k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  288|  16.8k|            pLin_e);
  289|       |
  290|  16.8k|  return lin_m;
  291|  16.8k|}
_Z12approxDb2liniiPi:
  314|   102k|approxDb2lin(const FIXP_DBL dB_m, const int dB_e, int* pLin_e) {
  315|       |  /* get linear value from approximate dB.
  316|       |     return lin_val = 2^(dB_val/6)
  317|       |     with dB_val = dB_m *2^dB_e and lin_val = lin_m * 2^lin_e */
  318|   102k|  FIXP_DBL lin_m =
  319|   102k|      f2Pow(fMult(dB_m, FL2FXCONST_DBL(0.1666667f * (float)(1 << 2))), dB_e - 2,
  ------------------
  |  |  192|   102k|  (FIXP_DBL)(                                                                \
  |  |  193|   102k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 102k, Folded]
  |  |  ------------------
  |  |  194|   102k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   102k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   102k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 102k]
  |  |  ------------------
  |  |  195|   102k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   102k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   102k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   102k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   102k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   102k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   102k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  320|   102k|            pLin_e);
  321|       |
  322|   102k|  return lin_m;
  323|   102k|}

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

_Z14prepareDrcGainP16DRC_GAIN_DECODERP12UNI_DRC_GAINssii:
  644|  25.5k|               const int activeDrcIndex) {
  645|  25.5k|  int b, g, gainElementIndex;
  646|  25.5k|  DRC_GAIN_BUFFERS* drcGainBuffers = &(hGainDec->drcGainBuffers);
  647|  25.5k|  NODE_MODIFICATION nodeMod;
  648|  25.5k|  FDKmemclear(&nodeMod, sizeof(NODE_MODIFICATION));
  649|  25.5k|  ACTIVE_DRC* pActiveDrc = &(hGainDec->activeDrc[activeDrcIndex]);
  650|  25.5k|  DRC_INSTRUCTIONS_UNI_DRC* pInst = pActiveDrc->pInst;
  651|  25.5k|  if (pInst == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (651:7): [True: 0, False: 25.5k]
  ------------------
  652|       |
  653|  25.5k|  nodeMod.drcSetEffect = pInst->drcSetEffect;
  654|       |
  655|  25.5k|  nodeMod.compress = compress;
  656|  25.5k|  nodeMod.boost = boost;
  657|  25.5k|  nodeMod.loudnessNormalizationGainDb = loudnessNormalizationGainDb;
  658|  25.5k|  nodeMod.limiterPeakTargetPresent = pInst->limiterPeakTargetPresent;
  659|  25.5k|  nodeMod.limiterPeakTarget = pInst->limiterPeakTarget;
  660|       |
  661|  25.5k|  gainElementIndex = 0;
  662|  37.5k|  for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (662:15): [True: 12.7k, False: 24.7k]
  ------------------
  663|  12.7k|    int gainSetIndex = 0;
  664|  12.7k|    int nDrcBands = 0;
  665|  12.7k|    DRC_COEFFICIENTS_UNI_DRC* pCoef = pActiveDrc->pCoef;
  666|  12.7k|    if (pCoef == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (666:9): [True: 0, False: 12.7k]
  ------------------
  667|       |
  668|  12.7k|    if (!pActiveDrc->channelGroupIsParametricDrc[g]) {
  ------------------
  |  Branch (668:9): [True: 11.5k, False: 1.24k]
  ------------------
  669|  11.5k|      gainSetIndex = pInst->gainSetIndexForChannelGroup[g];
  670|       |
  671|  11.5k|      if (nodeMod.drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (671:11): [True: 1.80k, False: 9.74k]
  ------------------
  672|  1.80k|        nodeMod.pDMod = &(pActiveDrc->duckingModificationForChannelGroup[g]);
  673|  1.80k|        nodeMod.pGMod = NULL;
  674|  9.74k|      } else {
  675|  9.74k|        nodeMod.pGMod = pInst->gainModificationForChannelGroup[g];
  676|  9.74k|        nodeMod.pDMod = NULL;
  677|  9.74k|      }
  678|       |
  679|  11.5k|      nDrcBands = pActiveDrc->bandCountForChannelGroup[g];
  680|  40.8k|      for (b = 0; b < nDrcBands; b++) {
  ------------------
  |  Branch (680:19): [True: 30.0k, False: 10.8k]
  ------------------
  681|  30.0k|        DRC_ERROR err = DE_OK;
  682|  30.0k|        GAIN_SET* pGainSet = &(pCoef->gainSet[gainSetIndex]);
  683|  30.0k|        int seq = pGainSet->gainSequenceIndex[b];
  684|  30.0k|        DRC_CHARACTERISTIC* pDChar = &(pGainSet->drcCharacteristic[b]);
  685|       |
  686|       |        /* linearNodeBuffer contains a copy of the gain sequences (consisting of
  687|       |           nodes) that are relevant for decoding. It also contains gain
  688|       |           sequences of previous frames. */
  689|  30.0k|        LINEAR_NODE_BUFFER* pLnb =
  690|  30.0k|            &(drcGainBuffers->linearNodeBuffer[pActiveDrc->activeDrcOffset +
  691|  30.0k|                                               gainElementIndex]);
  692|  30.0k|        int i, lnbp;
  693|  30.0k|        lnbp = drcGainBuffers->lnbPointer;
  694|  30.0k|        pLnb->gainInterpolationType =
  695|  30.0k|            (GAIN_INTERPOLATION_TYPE)pGainSet->gainInterpolationType;
  696|       |
  697|  30.0k|        err = _prepareDrcCharacteristic(pDChar, pCoef, b, &nodeMod);
  698|  30.0k|        if (err) return err;
  ------------------
  |  Branch (698:13): [True: 746, False: 29.2k]
  ------------------
  699|       |
  700|       |        /* copy a node buffer and convert from dB to linear */
  701|  29.2k|        pLnb->nNodes[lnbp] = fMin((int)hUniDrcGain->nNodes[seq], 16);
  702|   131k|        for (i = 0; i < pLnb->nNodes[lnbp]; i++) {
  ------------------
  |  Branch (702:21): [True: 102k, False: 29.2k]
  ------------------
  703|   102k|          FIXP_DBL gainLin, slopeLin;
  704|   102k|          err = _toLinear(&nodeMod, b, hUniDrcGain->gainNode[seq][i].gainDb,
  705|   102k|                          (FIXP_SGL)0, &gainLin, &slopeLin);
  706|   102k|          if (err) return err;
  ------------------
  |  Branch (706:15): [True: 0, False: 102k]
  ------------------
  707|   102k|          pLnb->linearNode[lnbp][i].gainLin = gainLin;
  708|   102k|          pLnb->linearNode[lnbp][i].time = hUniDrcGain->gainNode[seq][i].time;
  709|   102k|        }
  710|  29.2k|        gainElementIndex++;
  711|  29.2k|      }
  712|  11.5k|    } else {
  713|       |      /* parametric DRC not supported */
  714|  1.24k|      gainElementIndex++;
  715|  1.24k|    }
  716|  12.7k|  }
  717|  24.7k|  return DE_OK;
  718|  25.5k|}
drcGainDec_preprocess.cpp:_ZL25_prepareDrcCharacteristicPK18DRC_CHARACTERISTICP24DRC_COEFFICIENTS_UNI_DRCiP17NODE_MODIFICATION:
  214|  30.0k|                                           NODE_MODIFICATION* pNodeMod) {
  215|  30.0k|  DRC_ERROR err = DE_OK;
  216|  30.0k|  pNodeMod->drcCharacteristicPresent = pDChar->present;
  217|  30.0k|  if (pNodeMod->drcCharacteristicPresent) {
  ------------------
  |  Branch (217:7): [True: 28.8k, False: 1.15k]
  ------------------
  218|  28.8k|    if (pDChar->isCICP == 1) {
  ------------------
  |  Branch (218:9): [True: 28.8k, False: 0]
  ------------------
  219|  28.8k|      err = _getCicpCharacteristic(pDChar->cicpIndex,
  220|  28.8k|                                   pNodeMod->characteristicFormatSource,
  221|  28.8k|                                   pNodeMod->pCCharSource);
  222|  28.8k|      if (err) return err;
  ------------------
  |  Branch (222:11): [True: 746, False: 28.1k]
  ------------------
  223|  28.8k|    } else {
  224|      0|      pNodeMod->characteristicFormatSource[CS_LEFT] =
  225|      0|          (CHARACTERISTIC_FORMAT)
  226|      0|              pCoef->characteristicLeftFormat[pDChar->custom.left];
  227|      0|      pNodeMod->pCCharSource[CS_LEFT] =
  228|      0|          &(pCoef->customCharacteristicLeft[pDChar->custom.left]);
  229|      0|      pNodeMod->characteristicFormatSource[CS_RIGHT] =
  230|      0|          (CHARACTERISTIC_FORMAT)
  231|      0|              pCoef->characteristicRightFormat[pDChar->custom.right];
  232|      0|      pNodeMod->pCCharSource[CS_RIGHT] =
  233|      0|          &(pCoef->customCharacteristicRight[pDChar->custom.right]);
  234|      0|    }
  235|  28.1k|    err = _isSlopeNegative(pNodeMod->characteristicFormatSource,
  236|  28.1k|                           pNodeMod->pCCharSource, &pNodeMod->slopeIsNegative);
  237|  28.1k|    if (err) return err;
  ------------------
  |  Branch (237:9): [True: 0, False: 28.1k]
  ------------------
  238|       |
  239|  28.1k|    if (pNodeMod->pGMod != NULL) {
  ------------------
  |  Branch (239:9): [True: 26.7k, False: 1.37k]
  ------------------
  240|  26.7k|      if (pNodeMod->pGMod[b].targetCharacteristicLeftPresent) {
  ------------------
  |  Branch (240:11): [True: 0, False: 26.7k]
  ------------------
  241|      0|        pNodeMod->characteristicFormatTarget[CS_LEFT] =
  242|      0|            (CHARACTERISTIC_FORMAT)pCoef->characteristicLeftFormat
  243|      0|                [pNodeMod->pGMod[b].targetCharacteristicLeftIndex];
  244|      0|        pNodeMod->pCCharTarget[CS_LEFT] =
  245|      0|            &(pCoef->customCharacteristicLeft
  246|      0|                  [pNodeMod->pGMod[b].targetCharacteristicLeftIndex]);
  247|      0|      }
  248|  26.7k|      if (pNodeMod->pGMod[b].targetCharacteristicRightPresent) {
  ------------------
  |  Branch (248:11): [True: 0, False: 26.7k]
  ------------------
  249|      0|        pNodeMod->characteristicFormatTarget[CS_RIGHT] =
  250|      0|            (CHARACTERISTIC_FORMAT)pCoef->characteristicRightFormat
  251|      0|                [pNodeMod->pGMod[b].targetCharacteristicRightIndex];
  252|      0|        pNodeMod->pCCharTarget[CS_RIGHT] =
  253|      0|            &(pCoef->customCharacteristicRight
  254|      0|                  [pNodeMod->pGMod[b].targetCharacteristicRightIndex]);
  255|      0|      }
  256|  26.7k|    }
  257|  28.1k|  }
  258|  29.2k|  return DE_OK;
  259|  30.0k|}
drcGainDec_preprocess.cpp:_ZL22_getCicpCharacteristiciP21CHARACTERISTIC_FORMATPPK15CUSTOM_DRC_CHAR:
  133|  28.8k|    const CUSTOM_DRC_CHAR* pCCharSource[2]) {
  134|  28.8k|  if ((cicpCharacteristic < 1) || (cicpCharacteristic > 11)) {
  ------------------
  |  Branch (134:7): [True: 0, False: 28.8k]
  |  Branch (134:35): [True: 746, False: 28.1k]
  ------------------
  135|    746|    return DE_NOT_OK;
  136|    746|  }
  137|       |
  138|  28.1k|  if (cicpCharacteristic < 7) { /* sigmoid characteristic */
  ------------------
  |  Branch (138:7): [True: 9.23k, False: 18.9k]
  ------------------
  139|  9.23k|    pCharacteristicFormat[CS_LEFT] = CF_SIGMOID;
  140|  9.23k|    pCCharSource[CS_LEFT] =
  141|  9.23k|        (const CUSTOM_DRC_CHAR*)(&cicpDrcCharSigmoidLeft[cicpCharacteristic -
  142|  9.23k|                                                         1]);
  143|  9.23k|    pCharacteristicFormat[CS_RIGHT] = CF_SIGMOID;
  144|  9.23k|    pCCharSource[CS_RIGHT] =
  145|  9.23k|        (const CUSTOM_DRC_CHAR*)(&cicpDrcCharSigmoidRight[cicpCharacteristic -
  146|  9.23k|                                                          1]);
  147|  18.9k|  } else { /* nodes characteristic */
  148|  18.9k|    pCharacteristicFormat[CS_LEFT] = CF_NODES;
  149|  18.9k|    pCCharSource[CS_LEFT] =
  150|  18.9k|        (const CUSTOM_DRC_CHAR*)(&cicpDrcCharNodesLeft[cicpCharacteristic - 7]);
  151|  18.9k|    pCharacteristicFormat[CS_RIGHT] = CF_NODES;
  152|  18.9k|    pCCharSource[CS_RIGHT] =
  153|  18.9k|        (const CUSTOM_DRC_CHAR*)(&cicpDrcCharNodesRight[cicpCharacteristic -
  154|  18.9k|                                                        7]);
  155|  18.9k|  }
  156|  28.1k|  return DE_OK;
  157|  28.8k|}
drcGainDec_preprocess.cpp:_ZL16_isSlopeNegativePK21CHARACTERISTIC_FORMATPPK15CUSTOM_DRC_CHARPi:
  191|  28.1k|                                  int* pSlopeIsNegative) {
  192|  28.1k|  DRC_ERROR err = DE_OK;
  193|  28.1k|  int slopeSign[2] = {0, 0};
  194|       |
  195|  28.1k|  err = _getSlopeSign(drcCharFormat[CS_LEFT], pCChar[CS_LEFT],
  196|  28.1k|                      &slopeSign[CS_LEFT]);
  197|  28.1k|  if (err) return err;
  ------------------
  |  Branch (197:7): [True: 0, False: 28.1k]
  ------------------
  198|       |
  199|  28.1k|  err = _getSlopeSign(drcCharFormat[CS_RIGHT], pCChar[CS_RIGHT],
  200|  28.1k|                      &slopeSign[CS_RIGHT]);
  201|  28.1k|  if (err) return err;
  ------------------
  |  Branch (201:7): [True: 0, False: 28.1k]
  ------------------
  202|       |
  203|  28.1k|  if ((slopeSign[CS_LEFT] || slopeSign[CS_RIGHT]) &&
  ------------------
  |  Branch (203:8): [True: 28.1k, False: 0]
  |  Branch (203:30): [True: 0, False: 0]
  ------------------
  204|  28.1k|      (slopeSign[CS_LEFT] == -slopeSign[CS_RIGHT]))
  ------------------
  |  Branch (204:7): [True: 0, False: 28.1k]
  ------------------
  205|      0|    return DE_NOT_OK; /* DRC characteristic is not invertible */
  206|       |
  207|  28.1k|  *pSlopeIsNegative = (slopeSign[CS_LEFT] < 0);
  208|  28.1k|  return DE_OK;
  209|  28.1k|}
drcGainDec_preprocess.cpp:_ZL13_getSlopeSign21CHARACTERISTIC_FORMATPK15CUSTOM_DRC_CHARPi:
  166|  56.2k|                               const CUSTOM_DRC_CHAR* pCChar, int* pSlopeSign) {
  167|  56.2k|  if (drcCharFormat == CF_SIGMOID) {
  ------------------
  |  Branch (167:7): [True: 18.4k, False: 37.8k]
  ------------------
  168|  18.4k|    *pSlopeSign = (pCChar->sigmoid.flipSign ? 1 : -1);
  ------------------
  |  Branch (168:20): [True: 0, False: 18.4k]
  ------------------
  169|  37.8k|  } else {
  170|  37.8k|    int k, slopeSign = 0, tmp_slopeSign;
  171|   133k|    for (k = 0; k < pCChar->nodes.characteristicNodeCount; k++) {
  ------------------
  |  Branch (171:17): [True: 95.6k, False: 37.8k]
  ------------------
  172|  95.6k|      if (pCChar->nodes.nodeLevel[k + 1] > pCChar->nodes.nodeLevel[k]) {
  ------------------
  |  Branch (172:11): [True: 75.1k, False: 20.5k]
  ------------------
  173|  75.1k|        tmp_slopeSign =
  174|  75.1k|            _getSign(pCChar->nodes.nodeGain[k + 1] - pCChar->nodes.nodeGain[k]);
  175|  75.1k|      } else {
  176|  20.5k|        tmp_slopeSign = -_getSign(pCChar->nodes.nodeGain[k + 1] -
  177|  20.5k|                                  pCChar->nodes.nodeGain[k]);
  178|  20.5k|      }
  179|  95.6k|      if ((slopeSign || tmp_slopeSign) && (slopeSign == -tmp_slopeSign))
  ------------------
  |  Branch (179:12): [True: 37.3k, False: 58.3k]
  |  Branch (179:25): [True: 37.8k, False: 20.5k]
  |  Branch (179:43): [True: 0, False: 75.1k]
  ------------------
  180|      0|        return DE_NOT_OK; /* DRC characteristic is not invertible */
  181|  95.6k|      else
  182|  95.6k|        slopeSign = tmp_slopeSign;
  183|  95.6k|    }
  184|  37.8k|    *pSlopeSign = slopeSign;
  185|  37.8k|  }
  186|  56.2k|  return DE_OK;
  187|  56.2k|}
drcGainDec_preprocess.cpp:_ZL8_getSigns:
  159|  95.6k|static int _getSign(FIXP_SGL in) {
  160|  95.6k|  if (in > (FIXP_DBL)0) return 1;
  ------------------
  |  Branch (160:7): [True: 18.9k, False: 76.7k]
  ------------------
  161|  76.7k|  if (in < (FIXP_DBL)0) return -1;
  ------------------
  |  Branch (161:7): [True: 56.2k, False: 20.5k]
  ------------------
  162|  20.5k|  return 0;
  163|  76.7k|}
drcGainDec_preprocess.cpp:_ZL9_toLinearPK17NODE_MODIFICATIONissPiS2_:
  508|   102k|{
  509|   102k|  FIXP_DBL gainRatio_m = FL2FXCONST_DBL(1.0f / (float)(1 << 1));
  ------------------
  |  |  192|   102k|  (FIXP_DBL)(                                                                \
  |  |  193|   102k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 102k, Folded]
  |  |  ------------------
  |  |  194|   102k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   102k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   102k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 102k]
  |  |  ------------------
  |  |  195|   102k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   102k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   102k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   102k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   102k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   102k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   102k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  510|   102k|  GAIN_MODIFICATION* pGMod = NULL;
  511|   102k|  DUCKING_MODIFICATION* pDMod = nodeMod->pDMod;
  512|   102k|  FIXP_DBL tmp_dbl, gainDb_modified, gainDb_offset, gainDb_out, gainLin_m,
  513|   102k|      slopeLin_m;
  514|   102k|  int gainLin_e, gainRatio_e = 1, gainDb_out_e;
  515|   102k|  if (nodeMod->pGMod != NULL) {
  ------------------
  |  Branch (515:7): [True: 100k, False: 2.09k]
  ------------------
  516|   100k|    pGMod = &(nodeMod->pGMod[drcBand]);
  517|   100k|  }
  518|   102k|  if (((nodeMod->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) == 0) &&
  ------------------
  |  Branch (518:7): [True: 100k, False: 2.09k]
  ------------------
  519|   100k|      (nodeMod->drcSetEffect != EB_FADE) &&
  ------------------
  |  Branch (519:7): [True: 99.8k, False: 376]
  ------------------
  520|  99.8k|      (nodeMod->drcSetEffect != EB_CLIPPING)) {
  ------------------
  |  Branch (520:7): [True: 99.1k, False: 757]
  ------------------
  521|  99.1k|    DRC_ERROR err = DE_OK;
  522|  99.1k|    FIXP_DBL gainDbMapped;
  523|       |
  524|  99.1k|    if ((pGMod != NULL) && (nodeMod->drcCharacteristicPresent)) {
  ------------------
  |  Branch (524:9): [True: 99.1k, False: 0]
  |  Branch (524:28): [True: 97.2k, False: 1.89k]
  ------------------
  525|  97.2k|      if (((gainDb > (FIXP_SGL)0) && nodeMod->slopeIsNegative) ||
  ------------------
  |  Branch (525:12): [True: 13.8k, False: 83.3k]
  |  Branch (525:38): [True: 13.8k, False: 0]
  ------------------
  526|  83.3k|          ((gainDb < (FIXP_SGL)0) && !nodeMod->slopeIsNegative)) {
  ------------------
  |  Branch (526:12): [True: 66.6k, False: 16.6k]
  |  Branch (526:38): [True: 0, False: 66.6k]
  ------------------
  527|       |        /* left side */
  528|  13.8k|        if (pGMod->targetCharacteristicLeftPresent == 1) {
  ------------------
  |  Branch (528:13): [True: 0, False: 13.8k]
  ------------------
  529|      0|          err = _mapGain(nodeMod->characteristicFormatSource[CS_LEFT],
  530|      0|                         nodeMod->pCCharSource[CS_LEFT],
  531|      0|                         nodeMod->characteristicFormatTarget[CS_LEFT],
  532|      0|                         nodeMod->pCCharTarget[CS_LEFT], gainDb, &gainDbMapped);
  533|      0|          if (err) return err;
  ------------------
  |  Branch (533:15): [True: 0, False: 0]
  ------------------
  534|      0|          gainRatio_m = fDivNormSigned(
  535|      0|              gainDbMapped, FX_SGL2FX_DBL(gainDb),
  ------------------
  |  |  219|      0|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  536|      0|              &gainRatio_e); /* target characteristic in payload */
  537|      0|        }
  538|  13.8k|      }
  539|       |
  540|  83.3k|      else { /* if (((gainDb < (FIXP_SGL)0) && nodeMod->slopeIsNegative) ||
  541|       |                ((gainDb > (FIXP_SGL)0) && !nodeMod->slopeIsNegative)) */
  542|       |
  543|       |        /* right side */
  544|  83.3k|        if (pGMod->targetCharacteristicRightPresent == 1) {
  ------------------
  |  Branch (544:13): [True: 0, False: 83.3k]
  ------------------
  545|      0|          err =
  546|      0|              _mapGain(nodeMod->characteristicFormatSource[CS_RIGHT],
  547|      0|                       nodeMod->pCCharSource[CS_RIGHT],
  548|      0|                       nodeMod->characteristicFormatTarget[CS_RIGHT],
  549|      0|                       nodeMod->pCCharTarget[CS_RIGHT], gainDb, &gainDbMapped);
  550|      0|          if (err) return err;
  ------------------
  |  Branch (550:15): [True: 0, False: 0]
  ------------------
  551|      0|          gainRatio_m = fDivNormSigned(
  552|      0|              gainDbMapped, FX_SGL2FX_DBL(gainDb),
  ------------------
  |  |  219|      0|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  553|      0|              &gainRatio_e); /* target characteristic in payload */
  554|      0|        }
  555|  83.3k|      }
  556|  97.2k|    }
  557|  99.1k|    if (gainDb < (FIXP_SGL)0) {
  ------------------
  |  Branch (557:9): [True: 67.5k, False: 31.5k]
  ------------------
  558|  67.5k|      gainRatio_m = fMultDiv2(gainRatio_m, nodeMod->compress);
  559|  67.5k|    } else {
  560|  31.5k|      gainRatio_m = fMultDiv2(gainRatio_m, nodeMod->boost);
  561|  31.5k|    }
  562|  99.1k|    gainRatio_e += 2;
  563|  99.1k|  }
  564|   102k|  if ((pGMod != NULL) && (pGMod->gainScalingPresent == 1)) {
  ------------------
  |  Branch (564:7): [True: 100k, False: 2.09k]
  |  Branch (564:26): [True: 96.0k, False: 4.21k]
  ------------------
  565|  96.0k|    if (gainDb < (FIXP_SGL)0) {
  ------------------
  |  Branch (565:9): [True: 65.6k, False: 30.3k]
  ------------------
  566|  65.6k|      gainRatio_m = fMultDiv2(gainRatio_m, pGMod->attenuationScaling);
  567|  65.6k|    } else {
  568|  30.3k|      gainRatio_m = fMultDiv2(gainRatio_m, pGMod->amplificationScaling);
  569|  30.3k|    }
  570|  96.0k|    gainRatio_e += 3;
  571|  96.0k|  }
  572|   102k|  if ((pDMod != NULL) &&
  ------------------
  |  Branch (572:7): [True: 2.09k, False: 100k]
  ------------------
  573|  2.09k|      (nodeMod->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) &&
  ------------------
  |  Branch (573:7): [True: 2.09k, False: 0]
  ------------------
  574|  2.09k|      (pDMod->duckingScalingPresent == 1)) {
  ------------------
  |  Branch (574:7): [True: 1.36k, False: 723]
  ------------------
  575|  1.36k|    gainRatio_m = fMultDiv2(gainRatio_m, pDMod->duckingScaling);
  576|  1.36k|    gainRatio_e += 3;
  577|  1.36k|  }
  578|       |
  579|   102k|  gainDb_modified =
  580|   102k|      fMultDiv2(gainDb, gainRatio_m); /* resulting e: 7 + gainRatio_e + 1*/
  581|   102k|  gainDb_offset = (FIXP_DBL)0;
  582|       |
  583|   102k|  if ((pGMod != NULL) && (pGMod->gainOffsetPresent == 1)) {
  ------------------
  |  Branch (583:7): [True: 100k, False: 2.09k]
  |  Branch (583:26): [True: 94.2k, False: 6.01k]
  ------------------
  584|       |    /* *gainLin *= (float)pow(2.0, (double)(pGMod->gainOffset/6.0f)); */
  585|  94.2k|    gainDb_offset += FX_SGL2FX_DBL(pGMod->gainOffset) >> 4; /* resulting e: 8 */
  ------------------
  |  |  219|  94.2k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  94.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  94.2k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  586|  94.2k|  }
  587|   102k|  if ((nodeMod->limiterPeakTargetPresent == 1) &&
  ------------------
  |  Branch (587:7): [True: 93.4k, False: 8.90k]
  ------------------
  588|  93.4k|      (nodeMod->drcSetEffect ==
  ------------------
  |  Branch (588:7): [True: 741, False: 92.6k]
  ------------------
  589|  93.4k|       EB_CLIPPING)) { /* The only drcSetEffect is "clipping prevention" */
  590|       |    /* loudnessNormalizationGainModificationDb is included in
  591|       |     * loudnessNormalizationGainDb */
  592|       |    /* *gainLin *= (float)pow(2.0, max(0.0, -nodeModification->limiterPeakTarget
  593|       |     * - nodeModification->loudnessNormalizationGainDb)/6.0); */
  594|    741|    gainDb_offset += fMax(
  595|    741|        (FIXP_DBL)0,
  596|    741|        (FX_SGL2FX_DBL(-nodeMod->limiterPeakTarget) >> 3) -
  ------------------
  |  |  219|    741|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    741|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    741|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  597|    741|            (nodeMod->loudnessNormalizationGainDb >> 1)); /* resulting e: 8 */
  598|    741|  }
  599|   102k|  if (gainDb_offset != (FIXP_DBL)0) {
  ------------------
  |  Branch (599:7): [True: 94.2k, False: 8.06k]
  ------------------
  600|  94.2k|    gainDb_out = fAddNorm(gainDb_modified, 7 + gainRatio_e + 1, gainDb_offset,
  601|  94.2k|                          8, &gainDb_out_e);
  602|  94.2k|  } else {
  603|  8.06k|    gainDb_out = gainDb_modified;
  604|  8.06k|    gainDb_out_e = 7 + gainRatio_e + 1;
  605|  8.06k|  }
  606|       |
  607|       |  /* *gainLin = (float)pow(2.0, (double)(gainDb_modified[1] / 6.0f)); */
  608|   102k|  gainLin_m = approxDb2lin(gainDb_out, gainDb_out_e, &gainLin_e);
  609|   102k|  *gainLin = scaleValueSaturate(gainLin_m, gainLin_e - 7);
  610|       |
  611|       |  /* *slopeLin = SLOPE_FACTOR_DB_TO_LINEAR * gainRatio * *gainLin * slopeDb; */
  612|   102k|  if (slopeDb == (FIXP_SGL)0) {
  ------------------
  |  Branch (612:7): [True: 102k, False: 0]
  ------------------
  613|   102k|    *slopeLin = (FIXP_DBL)0;
  614|   102k|  } else {
  615|      0|    tmp_dbl =
  616|      0|        fMult(slopeDb, SLOPE_FACTOR_DB_TO_LINEAR); /* resulting e: 2 - 3 = -1 */
  ------------------
  |  |  111|      0|  FL2FXCONST_DBL(0.1151f * (float)(1 << 3)) /* ln(10) / 20 */
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  617|      0|    tmp_dbl = fMult(tmp_dbl, gainRatio_m); /* resulting e: -1 + gainRatio_e */
  618|      0|    if (gainDb_offset !=
  ------------------
  |  Branch (618:9): [True: 0, False: 0]
  ------------------
  619|      0|        (FIXP_DBL)0) { /* recalculate gainLin from gainDb that wasn't modified
  620|       |                          by gainOffset and limiterPeakTarget */
  621|      0|      gainLin_m = approxDb2lin(gainDb_modified, 7 + gainRatio_e, &gainLin_e);
  622|      0|    }
  623|      0|    slopeLin_m = fMult(tmp_dbl, gainLin_m);
  624|      0|    *slopeLin =
  625|      0|        scaleValueSaturate(slopeLin_m, -1 + gainRatio_e + gainLin_e - 7);
  626|      0|  }
  627|       |
  628|   102k|  if ((nodeMod->limiterPeakTargetPresent == 1) &&
  ------------------
  |  Branch (628:7): [True: 93.4k, False: 8.90k]
  ------------------
  629|  93.4k|      (nodeMod->drcSetEffect == EB_CLIPPING)) {
  ------------------
  |  Branch (629:7): [True: 741, False: 92.6k]
  ------------------
  630|    741|    if (*gainLin >= FL2FXCONST_DBL(1.0f / (float)(1 << 7))) {
  ------------------
  |  |  192|    741|  (FIXP_DBL)(                                                                \
  |  |  193|    741|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 741, Folded]
  |  |  ------------------
  |  |  194|    741|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    741|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    741|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 741]
  |  |  ------------------
  |  |  195|    741|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    741|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    741|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    741|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    741|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    741|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    741|          : ((((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 (630:9): [True: 460, False: 281]
  ------------------
  631|    460|      *gainLin = FL2FXCONST_DBL(1.0f / (float)(1 << 7));
  ------------------
  |  |  192|    460|  (FIXP_DBL)(                                                                \
  |  |  193|    460|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 460, Folded]
  |  |  ------------------
  |  |  194|    460|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    460|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    460|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 460]
  |  |  ------------------
  |  |  195|    460|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    460|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    460|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    460|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    460|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    460|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    460|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  632|    460|      *slopeLin = (FIXP_DBL)0;
  633|    460|    }
  634|    741|  }
  635|       |
  636|   102k|  return DE_OK;
  637|   102k|}

_Z14processDrcTimeP16DRC_GAIN_DECODERiiiiiiPi:
  254|  24.7k|               const int timeDataChannelOffset, FIXP_DBL* deinterleavedAudio) {
  255|  24.7k|  DRC_ERROR err = DE_OK;
  256|  24.7k|  int c, b, i;
  257|  24.7k|  ACTIVE_DRC* pActiveDrc = &(hGainDec->activeDrc[activeDrcIndex]);
  258|  24.7k|  DRC_GAIN_BUFFERS* pDrcGainBuffers = &(hGainDec->drcGainBuffers);
  259|  24.7k|  int lnbPointer = pDrcGainBuffers->lnbPointer, lnbIx;
  260|  24.7k|  LINEAR_NODE_BUFFER* pLinearNodeBuffer = pDrcGainBuffers->linearNodeBuffer;
  261|  24.7k|  LINEAR_NODE_BUFFER* pDummyLnb = &(pDrcGainBuffers->dummyLnb);
  262|  24.7k|  int offset = 0;
  263|       |
  264|  24.7k|  if (hGainDec->delayMode == DM_REGULAR_DELAY) {
  ------------------
  |  Branch (264:7): [True: 24.7k, False: 0]
  ------------------
  265|  24.7k|    offset = hGainDec->frameSize;
  266|  24.7k|  }
  267|       |
  268|  24.7k|  if ((delaySamples + offset) >
  ------------------
  |  Branch (268:7): [True: 0, False: 24.7k]
  ------------------
  269|  24.7k|      (NUM_LNB_FRAMES - 2) *
  ------------------
  |  |  111|  24.7k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  270|  24.7k|          hGainDec->frameSize) /* if delaySamples is too big, NUM_LNB_FRAMES
  271|       |                                  should be increased */
  272|      0|    return DE_NOT_OK;
  273|       |
  274|  24.7k|  err = _prepareLnbIndex(pActiveDrc, channelOffset, drcChannelOffset,
  275|  24.7k|                         numChannelsProcessed, lnbPointer);
  276|  24.7k|  if (err) return err;
  ------------------
  |  Branch (276:7): [True: 0, False: 24.7k]
  ------------------
  277|       |
  278|  24.7k|  deinterleavedAudio +=
  279|  24.7k|      channelOffset * timeDataChannelOffset; /* apply channelOffset */
  280|       |
  281|       |  /* signal processing loop */
  282|  49.4k|  for (c = channelOffset; c < channelOffset + numChannelsProcessed; c++) {
  ------------------
  |  Branch (282:27): [True: 26.1k, False: 23.3k]
  ------------------
  283|  26.1k|    if (activeDrcIndex == hGainDec->channelGainActiveDrcIndex)
  ------------------
  |  Branch (283:9): [True: 12.2k, False: 13.8k]
  ------------------
  284|  12.2k|      pDrcGainBuffers->channelGain[c][lnbPointer] = hGainDec->channelGain[c];
  285|       |
  286|  26.1k|    b = 0;
  287|  26.1k|    {
  288|  26.1k|      LINEAR_NODE_BUFFER *pLnb, *pLnbPrevious;
  289|  26.1k|      NODE_LIN nodePrevious;
  290|  26.1k|      int lnbPointerDiff;
  291|  26.1k|      FIXP_DBL channelGain;
  292|       |      /* get pointer to oldest linearNodes */
  293|  26.1k|      lnbIx = lnbPointer + 1 - NUM_LNB_FRAMES;
  ------------------
  |  |  111|  26.1k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  294|  47.2k|      while (lnbIx < 0) lnbIx += NUM_LNB_FRAMES;
  ------------------
  |  |  111|  21.0k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (294:14): [True: 21.0k, False: 26.1k]
  ------------------
  295|       |
  296|  26.1k|      if (activeDrcIndex == hGainDec->channelGainActiveDrcIndex)
  ------------------
  |  Branch (296:11): [True: 12.2k, False: 13.8k]
  ------------------
  297|  12.2k|        channelGain = pDrcGainBuffers->channelGain[c][lnbIx];
  298|  13.8k|      else
  299|  13.8k|        channelGain = FL2FXCONST_DBL(1.0f / (float)(1 << 8));
  ------------------
  |  |  192|  13.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  13.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 13.8k, Folded]
  |  |  ------------------
  |  |  194|  13.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  13.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  13.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 13.8k]
  |  |  ------------------
  |  |  195|  13.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  13.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  13.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  13.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  13.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  13.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  13.8k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|       |
  301|       |      /* Loop over all node buffers in linearNodeBuffer.
  302|       |         All nodes which are not relevant for the current frame are sorted out
  303|       |         inside _processNodeSegments. */
  304|   128k|      for (i = 0; i < NUM_LNB_FRAMES - 1; i++) {
  ------------------
  |  |  111|   128k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (304:19): [True: 103k, False: 24.6k]
  ------------------
  305|       |        /* Prepare previous node */
  306|   103k|        if (pActiveDrc->lnbIndexForChannel[c][lnbIx] >= 0)
  ------------------
  |  Branch (306:13): [True: 38.7k, False: 64.8k]
  ------------------
  307|  38.7k|          pLnbPrevious = &(
  308|  38.7k|              pLinearNodeBuffer[pActiveDrc->lnbIndexForChannel[c][lnbIx] + b]);
  309|  64.8k|        else
  310|  64.8k|          pLnbPrevious = pDummyLnb;
  311|   103k|        nodePrevious =
  312|   103k|            pLnbPrevious->linearNode[lnbIx][pLnbPrevious->nNodes[lnbIx] - 1];
  313|   103k|        nodePrevious.time -= hGainDec->frameSize;
  314|   103k|        if (channelGain != FL2FXCONST_DBL(1.0f / (float)(1 << 8)))
  ------------------
  |  |  192|   103k|  (FIXP_DBL)(                                                                \
  |  |  193|   103k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 103k, Folded]
  |  |  ------------------
  |  |  194|   103k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   103k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   103k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 103k]
  |  |  ------------------
  |  |  195|   103k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   103k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   103k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   103k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   103k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   103k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   103k|          : ((((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 (314:13): [True: 256, False: 103k]
  ------------------
  315|    256|          nodePrevious.gainLin = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|    256|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 256]
  |  |  ------------------
  |  |  252|    256|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|    256|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 256]
  |  |  ------------------
  |  |  254|    256|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|    256|             : ((LONG)(src) << (scale)))
  ------------------
  316|   103k|              fMultDiv2(nodePrevious.gainLin,
  317|   103k|                        pDrcGainBuffers->channelGain[c][lnbIx]),
  318|   103k|              9, DFRACT_BITS);
  319|       |
  320|       |        /* Prepare current linearNodeBuffer instance */
  321|   103k|        lnbIx++;
  322|   103k|        if (lnbIx >= NUM_LNB_FRAMES) lnbIx = 0;
  ------------------
  |  |  111|   103k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (322:13): [True: 20.9k, False: 82.6k]
  ------------------
  323|       |
  324|       |        /* if lnbIndexForChannel changes over time, use the old indices for
  325|       |         * smooth transitions */
  326|   103k|        if (pActiveDrc->lnbIndexForChannel[c][lnbIx] >= 0)
  ------------------
  |  Branch (326:13): [True: 38.7k, False: 64.7k]
  ------------------
  327|  38.7k|          pLnb = &(
  328|  38.7k|              pLinearNodeBuffer[pActiveDrc->lnbIndexForChannel[c][lnbIx] + b]);
  329|  64.7k|        else /* lnbIndexForChannel = -1 means "no DRC processing", due to
  330|       |                drcInstructionsIndex < 0, drcSetId < 0 or channel group < 0 */
  331|  64.7k|          pLnb = pDummyLnb;
  332|       |
  333|   103k|        if (activeDrcIndex == hGainDec->channelGainActiveDrcIndex)
  ------------------
  |  Branch (333:13): [True: 49.0k, False: 54.4k]
  ------------------
  334|  49.0k|          channelGain = pDrcGainBuffers->channelGain[c][lnbIx];
  335|       |
  336|       |        /* number of frames of offset with respect to lnbPointer */
  337|   103k|        lnbPointerDiff = i - (NUM_LNB_FRAMES - 2);
  ------------------
  |  |  111|   103k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  338|       |
  339|   103k|        err = _processNodeSegments(
  340|   103k|            hGainDec->frameSize, pLnb->gainInterpolationType,
  341|   103k|            pLnb->nNodes[lnbIx], pLnb->linearNode[lnbIx],
  342|   103k|            lnbPointerDiff * hGainDec->frameSize + delaySamples + offset, 1,
  343|   103k|            nodePrevious, channelGain, deinterleavedAudio);
  344|   103k|        if (err) return err;
  ------------------
  |  Branch (344:13): [True: 1.47k, False: 102k]
  ------------------
  345|   103k|      }
  346|  24.6k|      deinterleavedAudio += timeDataChannelOffset; /* proceed to next channel */
  347|  24.6k|    }
  348|  24.6k|  }
  349|  23.3k|  return DE_OK;
  350|  24.7k|}
drcGainDec_process.cpp:_ZL16_prepareLnbIndexP10ACTIVE_DRCiiii:
  113|  24.7k|                                  const int lnbPointer) {
  114|  24.7k|  int g, c;
  115|  24.7k|  DRC_INSTRUCTIONS_UNI_DRC* pInst = pActiveDrc->pInst;
  116|       |
  117|       |  /* channelOffset: start index of physical channels
  118|       |     numChannelsProcessed: number of processed channels, physical channels and
  119|       |     DRC channels channelOffset + drcChannelOffset: start index of DRC channels,
  120|       |        i.e. the channel order referenced in pInst.sequenceIndex */
  121|       |
  122|       |  /* sanity checks */
  123|  24.7k|  if ((channelOffset + numChannelsProcessed) > 8) return DE_NOT_OK;
  ------------------
  |  Branch (123:7): [True: 0, False: 24.7k]
  ------------------
  124|       |
  125|  24.7k|  if ((channelOffset + drcChannelOffset + numChannelsProcessed) > 8)
  ------------------
  |  Branch (125:7): [True: 0, False: 24.7k]
  ------------------
  126|      0|    return DE_NOT_OK;
  127|       |
  128|  24.7k|  if ((channelOffset + drcChannelOffset) < 0) return DE_NOT_OK;
  ------------------
  |  Branch (128:7): [True: 0, False: 24.7k]
  ------------------
  129|       |
  130|       |  /* prepare lnbIndexForChannel, a map of indices from each channel to its
  131|       |   * corresponding linearNodeBuffer instance */
  132|  50.9k|  for (c = channelOffset; c < channelOffset + numChannelsProcessed; c++) {
  ------------------
  |  Branch (132:27): [True: 26.1k, False: 24.7k]
  ------------------
  133|  26.1k|    if (pInst->drcSetId > 0) {
  ------------------
  |  Branch (133:9): [True: 10.3k, False: 15.8k]
  ------------------
  134|  10.3k|      int drcChannel = c + drcChannelOffset;
  135|       |      /* fallback for configuration with more physical channels than DRC
  136|       |         channels: reuse DRC gain of first channel. This is necessary for HE-AAC
  137|       |         mono with stereo output */
  138|  10.3k|      if (drcChannel >= pInst->drcChannelCount) drcChannel = 0;
  ------------------
  |  Branch (138:11): [True: 281, False: 10.0k]
  ------------------
  139|  10.3k|      g = pActiveDrc->channelGroupForChannel[drcChannel];
  140|  10.3k|      if ((g >= 0) && !pActiveDrc->channelGroupIsParametricDrc[g]) {
  ------------------
  |  Branch (140:11): [True: 10.0k, False: 276]
  |  Branch (140:23): [True: 9.65k, False: 404]
  ------------------
  141|  9.65k|        pActiveDrc->lnbIndexForChannel[c][lnbPointer] =
  142|  9.65k|            pActiveDrc->activeDrcOffset + pActiveDrc->gainElementForGroup[g];
  143|  9.65k|      }
  144|  10.3k|    }
  145|  26.1k|  }
  146|       |
  147|  24.7k|  return DE_OK;
  148|  24.7k|}
drcGainDec_process.cpp:_ZL20_processNodeSegmentsi23GAIN_INTERPOLATION_TYPEiPK8NODE_LINisS0_iPi:
  206|   103k|    const FIXP_DBL channelGain, FIXP_DBL* buffer) {
  207|   103k|  DRC_ERROR err = DE_OK;
  208|   103k|  SHORT timePrev, duration, start, stop, time;
  209|   103k|  int n;
  210|   103k|  FIXP_DBL gainLin = FL2FXCONST_DBL(1.0f / (float)(1 << 7)), gainLinPrev;
  ------------------
  |  |  192|   103k|  (FIXP_DBL)(                                                                \
  |  |  193|   103k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 103k, Folded]
  |  |  ------------------
  |  |  194|   103k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   103k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   103k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 103k]
  |  |  ------------------
  |  |  195|   103k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   103k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   103k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   103k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   103k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   103k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   103k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|   103k|  FIXP_DBL slopeLin = (FIXP_DBL)0, slopeLinPrev = (FIXP_DBL)0;
  212|       |
  213|   103k|  timePrev = nodePrevious.time + offset;
  214|   103k|  gainLinPrev = nodePrevious.gainLin;
  215|   445k|  for (n = 0; n < nNodes; n++) {
  ------------------
  |  Branch (215:15): [True: 342k, False: 102k]
  ------------------
  216|   342k|    time = pNodeLin[n].time + offset;
  217|   342k|    duration = time - timePrev;
  218|   342k|    gainLin = pNodeLin[n].gainLin;
  219|   342k|    if (channelGain != FL2FXCONST_DBL(1.0f / (float)(1 << 8)))
  ------------------
  |  |  192|   342k|  (FIXP_DBL)(                                                                \
  |  |  193|   342k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 342k, Folded]
  |  |  ------------------
  |  |  194|   342k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   342k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   342k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 342k]
  |  |  ------------------
  |  |  195|   342k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   342k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   342k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   342k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   342k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   342k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   342k|          : ((((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 (219:9): [True: 256, False: 342k]
  ------------------
  220|    256|      gainLin =
  221|    256|          SATURATE_LEFT_SHIFT(fMultDiv2(gainLin, channelGain), 9, DFRACT_BITS);
  ------------------
  |  |  251|    256|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 256]
  |  |  ------------------
  |  |  252|    256|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|    256|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 256]
  |  |  ------------------
  |  |  254|    256|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|    256|             : ((LONG)(src) << (scale)))
  ------------------
  222|       |
  223|   342k|    if ((timePrev >= (frameSize - 1)) ||
  ------------------
  |  Branch (223:9): [True: 97.4k, False: 245k]
  ------------------
  224|   258k|        (time < 0)) { /* This segment (between previous and current node) lies
  ------------------
  |  Branch (224:9): [True: 160k, False: 84.6k]
  ------------------
  225|       |                         outside of this audio frame */
  226|   258k|      timePrev = time;
  227|   258k|      gainLinPrev = gainLin;
  228|   258k|      slopeLinPrev = slopeLin;
  229|   258k|      continue;
  230|   258k|    }
  231|       |
  232|       |    /* start and stop are the boundaries of the region of this segment that lie
  233|       |       within this audio frame. Their values are relative to the beginning of
  234|       |       this segment. stop is the first sample that isn't processed any more. */
  235|  84.6k|    start = fMax(-timePrev, 1);
  236|  84.6k|    stop = fMin(time, (SHORT)(frameSize - 1)) - timePrev + 1;
  237|       |
  238|  84.6k|    err = _interpolateDrcGain(gainInterpolationType, timePrev, duration, start,
  239|  84.6k|                              stop, stepsize, gainLinPrev, gainLin,
  240|  84.6k|                              slopeLinPrev, slopeLin, buffer);
  241|  84.6k|    if (err) return err;
  ------------------
  |  Branch (241:9): [True: 1.47k, False: 83.1k]
  ------------------
  242|       |
  243|  83.1k|    timePrev = time;
  244|  83.1k|    gainLinPrev = gainLin;
  245|  83.1k|  }
  246|   102k|  return err;
  247|   103k|}
drcGainDec_process.cpp:_ZL19_interpolateDrcGain23GAIN_INTERPOLATION_TYPEsssssiiiiPi:
  156|  84.6k|    const FIXP_DBL slopeRight, FIXP_DBL* buffer) {
  157|  84.6k|  int n, n_buf;
  158|  84.6k|  int start_modulo, start_offset;
  159|       |
  160|  84.6k|  if (tGainStep < 0) {
  ------------------
  |  Branch (160:7): [True: 1.47k, False: 83.1k]
  ------------------
  161|  1.47k|    return DE_NOT_OK;
  162|  1.47k|  }
  163|  83.1k|  if (tGainStep == 0) {
  ------------------
  |  Branch (163:7): [True: 49, False: 83.0k]
  ------------------
  164|     49|    return DE_OK;
  165|     49|  }
  166|       |
  167|       |  /* get start index offset and buffer index for downsampled interpolation */
  168|       |  /* start_modulo = (start+timePrev)%stepsize; */ /* stepsize is a power of 2 */
  169|  83.0k|  start_modulo = (start + timePrev) & (stepsize - 1);
  170|  83.0k|  start_offset = (start_modulo ? stepsize - start_modulo : 0);
  ------------------
  |  Branch (170:19): [True: 0, False: 83.0k]
  ------------------
  171|       |  /* n_buf = (start + timePrev + start_offset)/stepsize; */
  172|  83.0k|  n_buf = (start + timePrev + start_offset) >> (15 - fixnormz_S(stepsize));
  173|       |
  174|  83.0k|  { /* gainInterpolationType == GIT_LINEAR */
  175|  83.0k|    LONG a;
  ------------------
  |  |  181|  83.0k|#define LONG INT
  ------------------
  176|       |    /* runs = ceil((stop - start - start_offset)/stepsize). This works for
  177|       |     * stepsize = 2^N only. */
  178|  83.0k|    INT runs = (INT)(stop - start - start_offset + stepsize - 1) >>
  179|  83.0k|               (30 - CountLeadingBits(stepsize));
  ------------------
  |  |  309|  83.0k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  180|  83.0k|    INT n_min = fMin(
  181|  83.0k|        fMin(CntLeadingZeros(gainRight), CntLeadingZeros(gainLeft)) - 1, 8);
  ------------------
  |  |  308|  83.0k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
                      fMin(CntLeadingZeros(gainRight), CntLeadingZeros(gainLeft)) - 1, 8);
  ------------------
  |  |  308|  83.0k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  182|  83.0k|    a = (LONG)((gainRight << n_min) - (gainLeft << n_min)) / tGainStep;
  183|  83.0k|    LONG a_step = a * stepsize;
  ------------------
  |  |  181|  83.0k|#define LONG INT
  ------------------
  184|  83.0k|    n = start + start_offset;
  185|  83.0k|    a = a * n + (LONG)(gainLeft << n_min);
  186|  83.0k|    buffer += n_buf;
  187|       |#if defined(FUNCTION_interpolateDrcGain_func1)
  188|       |    interpolateDrcGain_func1(buffer, a, a_step, n_min, runs);
  189|       |#else
  190|  83.0k|    a -= a_step;
  191|  83.0k|    n_min = 8 - n_min;
  192|  26.6M|    for (int i = 0; i < runs; i++) {
  ------------------
  |  Branch (192:21): [True: 26.5M, False: 83.0k]
  ------------------
  193|  26.5M|      a += a_step;
  194|  26.5M|      buffer[i] = fMultDiv2(buffer[i], (FIXP_DBL)a) << n_min;
  195|  26.5M|    }
  196|  83.0k|#endif /* defined(FUNCTION_interpolateDrcGain_func1) */
  197|  83.0k|  }
  198|  83.0k|  return DE_OK;
  199|  83.1k|}

FDK_crc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   331k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   331k|  FDKsyncCache(hBitStream);
  579|   331k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   331k|}
FDK_crc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   358k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   358k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 358k, False: 0]
  ------------------
  454|   358k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   358k|                 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|   358k|  hBitStream->BitsInCache = 0;
  461|   358k|  hBitStream->CacheWord = 0;
  462|   358k|}
FDK_crc.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|  27.0k|                                     const INT numberOfBits) {
  564|  27.0k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 0, False: 27.0k]
  ------------------
  565|      0|    FDKpushFor(hBitStream, numberOfBits);
  566|  27.0k|  else
  567|  27.0k|    FDKpushBack(hBitStream, -numberOfBits);
  568|  27.0k|}
FDK_crc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  27.0k|                            const UINT numberOfBits) {
  540|  27.0k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  54.1k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 6.41k, False: 20.6k]
  ------------------
  541|  6.41k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 6.41k, False: 0]
  ------------------
  542|  6.41k|    hBitStream->BitsInCache += numberOfBits;
  543|  6.41k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  20.6k|  } else {
  545|  20.6k|    FDKsyncCache(hBitStream);
  546|  20.6k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  20.6k|  }
  548|  27.0k|}
FDK_crc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  1.89M|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  1.89M|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 68.3k, False: 1.82M]
  ------------------
  230|  68.3k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  68.3k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  68.3k|#define CACHE_BITS 32
  ------------------
  232|  68.3k|    return hBitStream->CacheWord >> 31;
  233|  68.3k|  }
  234|  1.82M|  hBitStream->BitsInCache--;
  235|       |
  236|  1.82M|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  1.89M|}
aacdec_drc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   852k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   852k|  FDKsyncCache(hBitStream);
  579|   852k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   852k|}
aacdec_drc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  1.22M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  1.22M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 1.22M, False: 0]
  ------------------
  454|  1.22M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  1.22M|                 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|  1.22M|  hBitStream->BitsInCache = 0;
  461|  1.22M|  hBitStream->CacheWord = 0;
  462|  1.22M|}
aacdec_drc.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  2.97M|                            const UINT numberOfBits) {
  212|  2.97M|  UINT bits = 0;
  213|  2.97M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  2.97M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  2.97M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 2.97M, False: 0]
  ------------------
  216|  2.97M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 525k, False: 2.45M]
  ------------------
  217|   525k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 525k, False: 0]
  ------------------
  218|   525k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   525k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   525k|#define CACHE_BITS 32
  ------------------
  220|   525k|  }
  221|       |
  222|  2.97M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  2.97M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  2.97M|         BitMask[numberOfBits];
  226|  2.97M|}
aacdec_drc.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|   373k|                                     const INT numberOfBits) {
  564|   373k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 358k, False: 15.4k]
  ------------------
  565|   358k|    FDKpushFor(hBitStream, numberOfBits);
  566|  15.4k|  else
  567|  15.4k|    FDKpushBack(hBitStream, -numberOfBits);
  568|   373k|}
aacdec_drc.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   358k|                           const UINT numberOfBits) {
  552|   358k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 358k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|   358k|  } else {
  556|   358k|    FDKsyncCache(hBitStream);
  557|   358k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   358k|                    hBitStream->ConfigCache);
  559|   358k|  }
  560|   358k|}
aacdec_drc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  15.4k|                            const UINT numberOfBits) {
  540|  15.4k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  30.8k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 4.01k, False: 11.3k]
  ------------------
  541|  4.01k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 4.01k, False: 0]
  ------------------
  542|  4.01k|    hBitStream->BitsInCache += numberOfBits;
  543|  4.01k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  11.3k|  } else {
  545|  11.3k|    FDKsyncCache(hBitStream);
  546|  11.3k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  11.3k|  }
  548|  15.4k|}
aacdec_hcr.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  17.4k|                            const UINT numberOfBits) {
  212|  17.4k|  UINT bits = 0;
  213|  17.4k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  17.4k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  17.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 17.4k, False: 0]
  ------------------
  216|  17.4k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 5.48k, False: 11.9k]
  ------------------
  217|  5.48k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 5.48k, False: 0]
  ------------------
  218|  5.48k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  5.48k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  5.48k|#define CACHE_BITS 32
  ------------------
  220|  5.48k|  }
  221|       |
  222|  17.4k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  17.4k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  17.4k|         BitMask[numberOfBits];
  226|  17.4k|}
aacdec_hcr.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  41.9k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  41.9k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 41.9k, False: 0]
  ------------------
  454|  41.9k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  41.9k|                 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|  41.9k|  hBitStream->BitsInCache = 0;
  461|  41.9k|  hBitStream->CacheWord = 0;
  462|  41.9k|}
aacdec_hcr.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  25.3k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  25.3k|  FDKsyncCache(hBitStream);
  579|  25.3k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  25.3k|}
aacdec_hcr.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|  8.11k|                                     const INT numberOfBits) {
  564|  8.11k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 0, False: 8.11k]
  ------------------
  565|      0|    FDKpushFor(hBitStream, numberOfBits);
  566|  8.11k|  else
  567|  8.11k|    FDKpushBack(hBitStream, -numberOfBits);
  568|  8.11k|}
aacdec_hcr.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  8.11k|                            const UINT numberOfBits) {
  540|  8.11k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  16.2k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 2.04k, False: 6.06k]
  ------------------
  541|  2.04k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 2.04k, False: 0]
  ------------------
  542|  2.04k|    hBitStream->BitsInCache += numberOfBits;
  543|  2.04k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  6.06k|  } else {
  545|  6.06k|    FDKsyncCache(hBitStream);
  546|  6.06k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  6.06k|  }
  548|  8.11k|}
aacdec_hcr_bit.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  1.97M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  1.97M|  FDKsyncCache(hBitStream);
  579|  1.97M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  1.97M|}
aacdec_hcr_bit.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  3.15M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  3.15M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 3.15M, False: 0]
  ------------------
  454|  3.15M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  3.15M|                 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|  3.15M|  hBitStream->BitsInCache = 0;
  461|  3.15M|  hBitStream->CacheWord = 0;
  462|  3.15M|}
aacdec_hcr_bit.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|   402k|                                     const INT numberOfBits) {
  564|   402k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 383k, False: 19.2k]
  ------------------
  565|   383k|    FDKpushFor(hBitStream, numberOfBits);
  566|  19.2k|  else
  567|  19.2k|    FDKpushBack(hBitStream, -numberOfBits);
  568|   402k|}
aacdec_hcr_bit.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   383k|                           const UINT numberOfBits) {
  552|   383k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 383k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|   383k|  } else {
  556|   383k|    FDKsyncCache(hBitStream);
  557|   383k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   383k|                    hBitStream->ConfigCache);
  559|   383k|  }
  560|   383k|}
aacdec_hcr_bit.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  1.97M|                            const UINT numberOfBits) {
  212|  1.97M|  UINT bits = 0;
  213|  1.97M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  1.97M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  1.97M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 1.97M, False: 0]
  ------------------
  216|  1.97M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.97M, False: 0]
  ------------------
  217|  1.97M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.97M, False: 0]
  ------------------
  218|  1.97M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.97M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.97M|#define CACHE_BITS 32
  ------------------
  220|  1.97M|  }
  221|       |
  222|  1.97M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  1.97M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  1.97M|         BitMask[numberOfBits];
  226|  1.97M|}
aacdec_hcr_bit.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|   804k|                            const UINT numberOfBits) {
  540|   804k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  1.60M|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 1.55k, False: 803k]
  ------------------
  541|  1.55k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 1.55k, False: 0]
  ------------------
  542|  1.55k|    hBitStream->BitsInCache += numberOfBits;
  543|  1.55k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|   803k|  } else {
  545|   803k|    FDKsyncCache(hBitStream);
  546|   803k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|   803k|  }
  548|   804k|}
aacdec_pns.cpp:_ZL16FDKpushBackCacheP13FDK_BITSTREAMj:
  533|  79.1k|                                 const UINT numberOfBits) {
  534|  79.1k|  FDK_ASSERT((hBitStream->BitsInCache + numberOfBits) <= CACHE_BITS);
  ------------------
  |  |  221|  79.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (534:3): [True: 79.1k, False: 0]
  ------------------
  535|  79.1k|  hBitStream->BitsInCache += numberOfBits;
  536|  79.1k|}
aacdec_pns.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   161k|                            const UINT numberOfBits) {
  212|   161k|  UINT bits = 0;
  213|   161k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   161k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   161k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 161k, False: 0]
  ------------------
  216|   161k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 9.28k, False: 151k]
  ------------------
  217|  9.28k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 9.28k, False: 0]
  ------------------
  218|  9.28k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  9.28k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  9.28k|#define CACHE_BITS 32
  ------------------
  220|  9.28k|  }
  221|       |
  222|   161k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   161k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   161k|         BitMask[numberOfBits];
  226|   161k|}
aacdec_tns.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  1.86M|                            const UINT numberOfBits) {
  212|  1.86M|  UINT bits = 0;
  213|  1.86M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  1.86M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  1.86M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 1.86M, False: 0]
  ------------------
  216|  1.86M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 115k, False: 1.75M]
  ------------------
  217|   115k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 115k, False: 0]
  ------------------
  218|   115k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   115k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   115k|#define CACHE_BITS 32
  ------------------
  220|   115k|  }
  221|       |
  222|  1.86M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  1.86M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  1.86M|         BitMask[numberOfBits];
  226|  1.86M|}
aacdec_tns.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  87.3k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  87.3k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 12.1k, False: 75.2k]
  ------------------
  230|  12.1k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  12.1k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  12.1k|#define CACHE_BITS 32
  ------------------
  232|  12.1k|    return hBitStream->CacheWord >> 31;
  233|  12.1k|  }
  234|  75.2k|  hBitStream->BitsInCache--;
  235|       |
  236|  75.2k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  87.3k|}
aacdecoder.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  1.65M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  1.65M|  FDKsyncCache(hBitStream);
  579|  1.65M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  1.65M|}
aacdecoder.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  2.12M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  2.12M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 2.12M, False: 0]
  ------------------
  454|  2.12M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  2.12M|                 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|  2.12M|  hBitStream->BitsInCache = 0;
  461|  2.12M|  hBitStream->CacheWord = 0;
  462|  2.12M|}
aacdecoder.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   257k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   257k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 244k, False: 12.5k]
  ------------------
  230|   244k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|   244k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|   244k|#define CACHE_BITS 32
  ------------------
  232|   244k|    return hBitStream->CacheWord >> 31;
  233|   244k|  }
  234|  12.5k|  hBitStream->BitsInCache--;
  235|       |
  236|  12.5k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   257k|}
aacdecoder.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   572k|                            const UINT numberOfBits) {
  212|   572k|  UINT bits = 0;
  213|   572k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   572k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   572k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 572k, False: 0]
  ------------------
  216|   572k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 359k, False: 213k]
  ------------------
  217|   359k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 359k, False: 0]
  ------------------
  218|   359k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   359k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   359k|#define CACHE_BITS 32
  ------------------
  220|   359k|  }
  221|       |
  222|   572k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   572k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   572k|         BitMask[numberOfBits];
  226|   572k|}
aacdecoder.cpp:_ZL12escapedValueP13FDK_BITSTREAMiii:
  306|  7.30k|                             int nBits2, int nBits3) {
  307|  7.30k|  UINT value = FDKreadBits(hBitStream, nBits1);
  308|       |
  309|  7.30k|  if (value == (UINT)(1 << nBits1) - 1) {
  ------------------
  |  Branch (309:7): [True: 596, False: 6.71k]
  ------------------
  310|    596|    UINT valueAdd = FDKreadBits(hBitStream, nBits2);
  311|    596|    value += valueAdd;
  312|    596|    if (valueAdd == (UINT)(1 << nBits2) - 1) {
  ------------------
  |  Branch (312:9): [True: 28, False: 568]
  ------------------
  313|     28|      value += FDKreadBits(hBitStream, nBits3);
  314|     28|    }
  315|    596|  }
  316|       |
  317|  7.30k|  return value;
  318|  7.30k|}
aacdecoder.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   214k|                           const UINT numberOfBits) {
  552|   214k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 21.6k, False: 193k]
  ------------------
  553|  21.6k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 21.6k, False: 0]
  ------------------
  554|  21.6k|    hBitStream->BitsInCache -= numberOfBits;
  555|   193k|  } else {
  556|   193k|    FDKsyncCache(hBitStream);
  557|   193k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   193k|                    hBitStream->ConfigCache);
  559|   193k|  }
  560|   214k|}
aacdecoder.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|   131k|                            const UINT numberOfBits) {
  540|   131k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|   262k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 87.3k, False: 43.7k]
  ------------------
  541|  87.3k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 87.3k, False: 0]
  ------------------
  542|  87.3k|    hBitStream->BitsInCache += numberOfBits;
  543|  87.3k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  87.3k|  } else {
  545|  43.7k|    FDKsyncCache(hBitStream);
  546|  43.7k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  43.7k|  }
  548|   131k|}
aacdecoder.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|  75.2k|                                     const INT numberOfBits) {
  564|  75.2k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 33.5k, False: 41.7k]
  ------------------
  565|  33.5k|    FDKpushFor(hBitStream, numberOfBits);
  566|  41.7k|  else
  567|  41.7k|    FDKpushBack(hBitStream, -numberOfBits);
  568|  75.2k|}
aacdecoder.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|   136k|                             UINT alignmentAnchor) {
  497|   136k|  FDKsyncCache(hBitStream);
  498|   136k|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 136k, False: 0]
  ------------------
  499|   136k|    FDK_pushForward(
  500|   136k|        &hBitStream->hBitBuf,
  501|   136k|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|   136k|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|   136k|                         0x07)) &
  504|   136k|            0x07,
  505|   136k|        hBitStream->ConfigCache);
  506|   136k|  } 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|   136k|}
aacdecoder_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|   371k|                      FDK_BS_CFG config = BS_READER) {
  167|   371k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|   371k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|   371k|  hBitStream->ConfigCache = config;
  172|   371k|}
aacdecoder_lib.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  1.08M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  1.08M|  FDKsyncCache(hBitStream);
  579|  1.08M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  1.08M|}
aacdecoder_lib.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  1.09M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  1.09M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 1.09M, False: 0]
  ------------------
  454|  1.09M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  1.09M|                 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|  1.09M|  hBitStream->BitsInCache = 0;
  461|  1.09M|  hBitStream->CacheWord = 0;
  462|  1.09M|}
aacdecoder_lib.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  2.06k|                           const UINT numberOfBits) {
  552|  2.06k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 2.06k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|  2.06k|  } else {
  556|  2.06k|    FDKsyncCache(hBitStream);
  557|  2.06k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  2.06k|                    hBitStream->ConfigCache);
  559|  2.06k|  }
  560|  2.06k|}
aacdecoder_lib.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  2.06k|                            const UINT numberOfBits) {
  540|  2.06k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  4.13k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 3, False: 2.06k]
  ------------------
  541|      3|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 3, False: 0]
  ------------------
  542|      3|    hBitStream->BitsInCache += numberOfBits;
  543|      3|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  2.06k|  } else {
  545|  2.06k|    FDKsyncCache(hBitStream);
  546|  2.06k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  2.06k|  }
  548|  2.06k|}
ac_arith_coder.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  3.67M|                            const UINT numberOfBits) {
  212|  3.67M|  UINT bits = 0;
  213|  3.67M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  3.67M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  3.67M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 3.67M, False: 0]
  ------------------
  216|  3.67M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 464k, False: 3.21M]
  ------------------
  217|   464k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 464k, False: 0]
  ------------------
  218|   464k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   464k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   464k|#define CACHE_BITS 32
  ------------------
  220|   464k|  }
  221|       |
  222|  3.67M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  3.67M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  3.67M|         BitMask[numberOfBits];
  226|  3.67M|}
ac_arith_coder.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  17.9M|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  17.9M|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 535k, False: 17.4M]
  ------------------
  230|   535k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|   535k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|   535k|#define CACHE_BITS 32
  ------------------
  232|   535k|    return hBitStream->CacheWord >> 31;
  233|   535k|  }
  234|  17.4M|  hBitStream->BitsInCache--;
  235|       |
  236|  17.4M|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  17.9M|}
ac_arith_coder.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|   266k|                            const UINT numberOfBits) {
  540|   266k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|   532k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 201k, False: 65.2k]
  ------------------
  541|   201k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 201k, False: 0]
  ------------------
  542|   201k|    hBitStream->BitsInCache += numberOfBits;
  543|   201k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|   201k|  } else {
  545|  65.2k|    FDKsyncCache(hBitStream);
  546|  65.2k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  65.2k|  }
  548|   266k|}
ac_arith_coder.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   947k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   947k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 947k, False: 0]
  ------------------
  454|   947k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   947k|                 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|   947k|  hBitStream->BitsInCache = 0;
  461|   947k|  hBitStream->CacheWord = 0;
  462|   947k|}
ac_arith_coder.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   680k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   680k|  FDKsyncCache(hBitStream);
  579|   680k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   680k|}
block.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   774k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   774k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 28.6k, False: 746k]
  ------------------
  230|  28.6k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  28.6k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  28.6k|#define CACHE_BITS 32
  ------------------
  232|  28.6k|    return hBitStream->CacheWord >> 31;
  233|  28.6k|  }
  234|   746k|  hBitStream->BitsInCache--;
  235|       |
  236|   746k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   774k|}
block.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   130M|                            const UINT numberOfBits) {
  212|   130M|  UINT bits = 0;
  213|   130M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   130M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   130M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 130M, False: 0]
  ------------------
  216|   130M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 16.5M, False: 113M]
  ------------------
  217|  16.5M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 16.5M, False: 0]
  ------------------
  218|  16.5M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  16.5M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  16.5M|#define CACHE_BITS 32
  ------------------
  220|  16.5M|  }
  221|       |
  222|   130M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   130M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   130M|         BitMask[numberOfBits];
  226|   130M|}
block.cpp:_ZL12FDKread2BitsP13FDK_BITSTREAM:
  248|  4.53M|FDK_INLINE UINT FDKread2Bits(HANDLE_FDK_BITSTREAM hBitStream) {
  249|       |  /*
  250|       |  ** Version corresponds to optimized FDKreadBits implementation
  251|       |  ** calling FDK_get32, that keeps read pointer aligned.
  252|       |  */
  253|  4.53M|  UINT bits = 0;
  254|  4.53M|  INT missingBits = 2 - (INT)hBitStream->BitsInCache;
  255|  4.53M|  if (missingBits > 0) {
  ------------------
  |  Branch (255:7): [True: 269k, False: 4.26M]
  ------------------
  256|   269k|    bits = hBitStream->CacheWord << missingBits;
  257|   269k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  258|   269k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   269k|#define CACHE_BITS 32
  ------------------
  259|   269k|  }
  260|       |
  261|  4.53M|  hBitStream->BitsInCache -= 2;
  262|       |
  263|  4.53M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) & 0x3;
  264|  4.53M|}
block.cpp:_ZL16FDKpushBackCacheP13FDK_BITSTREAMj:
  533|  2.15M|                                 const UINT numberOfBits) {
  534|  2.15M|  FDK_ASSERT((hBitStream->BitsInCache + numberOfBits) <= CACHE_BITS);
  ------------------
  |  |  221|  2.15M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (534:3): [True: 2.15M, False: 0]
  ------------------
  535|  2.15M|  hBitStream->BitsInCache += numberOfBits;
  536|  2.15M|}
block.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  8.45k|                           const UINT numberOfBits) {
  552|  8.45k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 8.45k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|  8.45k|  } else {
  556|  8.45k|    FDKsyncCache(hBitStream);
  557|  8.45k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  8.45k|                    hBitStream->ConfigCache);
  559|  8.45k|  }
  560|  8.45k|}
block.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  8.45k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  8.45k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 8.45k, False: 0]
  ------------------
  454|  8.45k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  8.45k|                 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|  8.45k|  hBitStream->BitsInCache = 0;
  461|  8.45k|  hBitStream->CacheWord = 0;
  462|  8.45k|}
channel.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  1.04M|                            const UINT numberOfBits) {
  212|  1.04M|  UINT bits = 0;
  213|  1.04M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  1.04M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  1.04M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 1.04M, False: 0]
  ------------------
  216|  1.04M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 390k, False: 654k]
  ------------------
  217|   390k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 390k, False: 0]
  ------------------
  218|   390k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   390k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   390k|#define CACHE_BITS 32
  ------------------
  220|   390k|  }
  221|       |
  222|  1.04M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  1.04M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  1.04M|         BitMask[numberOfBits];
  226|  1.04M|}
channel.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   357k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   357k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 245k, False: 111k]
  ------------------
  230|   245k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|   245k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|   245k|#define CACHE_BITS 32
  ------------------
  232|   245k|    return hBitStream->CacheWord >> 31;
  233|   245k|  }
  234|   111k|  hBitStream->BitsInCache--;
  235|       |
  236|   111k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   357k|}
channelinfo.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  1.10M|                            const UINT numberOfBits) {
  212|  1.10M|  UINT bits = 0;
  213|  1.10M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  1.10M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  1.10M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 1.10M, False: 0]
  ------------------
  216|  1.10M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 105k, False: 997k]
  ------------------
  217|   105k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 105k, False: 0]
  ------------------
  218|   105k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   105k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   105k|#define CACHE_BITS 32
  ------------------
  220|   105k|  }
  221|       |
  222|  1.10M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  1.10M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  1.10M|         BitMask[numberOfBits];
  226|  1.10M|}
drcDec_reader.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  36.5M|                            const UINT numberOfBits) {
  212|  36.5M|  UINT bits = 0;
  213|  36.5M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  36.5M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  36.5M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 36.5M, False: 0]
  ------------------
  216|  36.5M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 7.32M, False: 29.2M]
  ------------------
  217|  7.32M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 7.32M, False: 0]
  ------------------
  218|  7.32M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  7.32M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  7.32M|#define CACHE_BITS 32
  ------------------
  220|  7.32M|  }
  221|       |
  222|  36.5M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  36.5M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  36.5M|         BitMask[numberOfBits];
  226|  36.5M|}
drcDec_reader.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  27.8M|                           const UINT numberOfBits) {
  552|  27.8M|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 14.8M, False: 12.9M]
  ------------------
  553|  14.8M|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 14.8M, False: 0]
  ------------------
  554|  14.8M|    hBitStream->BitsInCache -= numberOfBits;
  555|  14.8M|  } else {
  556|  12.9M|    FDKsyncCache(hBitStream);
  557|  12.9M|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  12.9M|                    hBitStream->ConfigCache);
  559|  12.9M|  }
  560|  27.8M|}
drcDec_reader.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  13.1M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  13.1M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 13.1M, False: 0]
  ------------------
  454|  13.1M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  13.1M|                 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|  13.1M|  hBitStream->BitsInCache = 0;
  461|  13.1M|  hBitStream->CacheWord = 0;
  462|  13.1M|}
drcDec_reader.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   245k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   245k|  FDKsyncCache(hBitStream);
  579|   245k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   245k|}
env_extr.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  6.68M|                            const UINT numberOfBits) {
  212|  6.68M|  UINT bits = 0;
  213|  6.68M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  6.68M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  6.68M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 6.68M, False: 0]
  ------------------
  216|  6.68M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 551k, False: 6.13M]
  ------------------
  217|   551k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 550k, False: 111]
  ------------------
  218|   551k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   551k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   551k|#define CACHE_BITS 32
  ------------------
  220|   551k|  }
  221|       |
  222|  6.68M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  6.68M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  6.68M|         BitMask[numberOfBits];
  226|  6.68M|}
env_extr.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   624k|                           const UINT numberOfBits) {
  552|   624k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 444k, False: 180k]
  ------------------
  553|   444k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 444k, False: 0]
  ------------------
  554|   444k|    hBitStream->BitsInCache -= numberOfBits;
  555|   444k|  } else {
  556|   180k|    FDKsyncCache(hBitStream);
  557|   180k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   180k|                    hBitStream->ConfigCache);
  559|   180k|  }
  560|   624k|}
env_extr.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   203k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   203k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 203k, False: 0]
  ------------------
  454|   203k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   203k|                 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|   203k|  hBitStream->BitsInCache = 0;
  461|   203k|  hBitStream->CacheWord = 0;
  462|   203k|}
env_extr.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  1.16M|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  1.16M|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 187k, False: 977k]
  ------------------
  230|   187k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|   187k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|   187k|#define CACHE_BITS 32
  ------------------
  232|   187k|    return hBitStream->CacheWord >> 31;
  233|   187k|  }
  234|   977k|  hBitStream->BitsInCache--;
  235|       |
  236|   977k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  1.16M|}
env_extr.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  23.4k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  23.4k|  FDKsyncCache(hBitStream);
  579|  23.4k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  23.4k|}
env_extr.cpp:_ZL12FDKread2BitsP13FDK_BITSTREAM:
  248|  27.9k|FDK_INLINE UINT FDKread2Bits(HANDLE_FDK_BITSTREAM hBitStream) {
  249|       |  /*
  250|       |  ** Version corresponds to optimized FDKreadBits implementation
  251|       |  ** calling FDK_get32, that keeps read pointer aligned.
  252|       |  */
  253|  27.9k|  UINT bits = 0;
  254|  27.9k|  INT missingBits = 2 - (INT)hBitStream->BitsInCache;
  255|  27.9k|  if (missingBits > 0) {
  ------------------
  |  Branch (255:7): [True: 924, False: 26.9k]
  ------------------
  256|    924|    bits = hBitStream->CacheWord << missingBits;
  257|    924|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  258|    924|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|    924|#define CACHE_BITS 32
  ------------------
  259|    924|  }
  260|       |
  261|  27.9k|  hBitStream->BitsInCache -= 2;
  262|       |
  263|  27.9k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) & 0x3;
  264|  27.9k|}
huff_dec.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  6.92M|                            const UINT numberOfBits) {
  212|  6.92M|  UINT bits = 0;
  213|  6.92M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  6.92M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  6.92M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 6.92M, False: 0]
  ------------------
  216|  6.92M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 214k, False: 6.70M]
  ------------------
  217|   214k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 214k, False: 0]
  ------------------
  218|   214k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   214k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   214k|#define CACHE_BITS 32
  ------------------
  220|   214k|  }
  221|       |
  222|  6.92M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  6.92M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  6.92M|         BitMask[numberOfBits];
  226|  6.92M|}
nlc_dec.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   937k|                            const UINT numberOfBits) {
  212|   937k|  UINT bits = 0;
  213|   937k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   937k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   937k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 937k, False: 0]
  ------------------
  216|   937k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 128k, False: 809k]
  ------------------
  217|   128k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 128k, False: 0]
  ------------------
  218|   128k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   128k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   128k|#define CACHE_BITS 32
  ------------------
  220|   128k|  }
  221|       |
  222|   937k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   937k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   937k|         BitMask[numberOfBits];
  226|   937k|}
nlc_dec.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  95.9k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  95.9k|  FDKsyncCache(hBitStream);
  579|  95.9k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  95.9k|}
nlc_dec.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  95.9k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  95.9k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 95.9k, False: 0]
  ------------------
  454|  95.9k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  95.9k|                 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|  95.9k|  hBitStream->BitsInCache = 0;
  461|  95.9k|  hBitStream->CacheWord = 0;
  462|  95.9k|}
pcmdmx_lib.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  19.5k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  19.5k|  FDKsyncCache(hBitStream);
  579|  19.5k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  19.5k|}
pcmdmx_lib.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  27.9k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  27.9k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 27.9k, False: 0]
  ------------------
  454|  27.9k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  27.9k|                 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|  27.9k|  hBitStream->BitsInCache = 0;
  461|  27.9k|  hBitStream->CacheWord = 0;
  462|  27.9k|}
pcmdmx_lib.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  46.5k|                           const UINT numberOfBits) {
  552|  46.5k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 38.0k, False: 8.49k]
  ------------------
  553|  38.0k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 38.0k, False: 0]
  ------------------
  554|  38.0k|    hBitStream->BitsInCache -= numberOfBits;
  555|  38.0k|  } else {
  556|  8.49k|    FDKsyncCache(hBitStream);
  557|  8.49k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  8.49k|                    hBitStream->ConfigCache);
  559|  8.49k|  }
  560|  46.5k|}
pcmdmx_lib.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  46.1k|                            const UINT numberOfBits) {
  212|  46.1k|  UINT bits = 0;
  213|  46.1k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  46.1k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  46.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 46.1k, False: 0]
  ------------------
  216|  46.1k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 11.0k, False: 35.0k]
  ------------------
  217|  11.0k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 11.0k, False: 0]
  ------------------
  218|  11.0k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  11.0k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  11.0k|#define CACHE_BITS 32
  ------------------
  220|  11.0k|  }
  221|       |
  222|  46.1k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  46.1k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  46.1k|         BitMask[numberOfBits];
  226|  46.1k|}
pcmdmx_lib.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   111k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   111k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 7.98k, False: 103k]
  ------------------
  230|  7.98k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  7.98k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  7.98k|#define CACHE_BITS 32
  ------------------
  232|  7.98k|    return hBitStream->CacheWord >> 31;
  233|  7.98k|  }
  234|   103k|  hBitStream->BitsInCache--;
  235|       |
  236|   103k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   111k|}
psbitdec.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  18.5k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  18.5k|  FDKsyncCache(hBitStream);
  579|  18.5k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  18.5k|}
psbitdec.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  18.5k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  18.5k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 18.5k, False: 0]
  ------------------
  454|  18.5k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  18.5k|                 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|  18.5k|  hBitStream->BitsInCache = 0;
  461|  18.5k|  hBitStream->CacheWord = 0;
  462|  18.5k|}
psbitdec.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  1.02M|                            const UINT numberOfBits) {
  212|  1.02M|  UINT bits = 0;
  213|  1.02M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  1.02M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  1.02M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 1.02M, False: 0]
  ------------------
  216|  1.02M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 70.9k, False: 950k]
  ------------------
  217|  70.9k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 70.9k, False: 0]
  ------------------
  218|  70.9k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  70.9k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  70.9k|#define CACHE_BITS 32
  ------------------
  220|  70.9k|  }
  221|       |
  222|  1.02M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  1.02M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  1.02M|         BitMask[numberOfBits];
  226|  1.02M|}
pulsedata.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  26.6k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  26.6k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 341, False: 26.3k]
  ------------------
  230|    341|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|    341|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|    341|#define CACHE_BITS 32
  ------------------
  232|    341|    return hBitStream->CacheWord >> 31;
  233|    341|  }
  234|  26.3k|  hBitStream->BitsInCache--;
  235|       |
  236|  26.3k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  26.6k|}
pulsedata.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  7.10k|                            const UINT numberOfBits) {
  212|  7.10k|  UINT bits = 0;
  213|  7.10k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  7.10k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  7.10k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 7.10k, False: 0]
  ------------------
  216|  7.10k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 939, False: 6.16k]
  ------------------
  217|    939|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 939, False: 0]
  ------------------
  218|    939|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|    939|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|    939|#define CACHE_BITS 32
  ------------------
  220|    939|  }
  221|       |
  222|  7.10k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  7.10k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  7.10k|         BitMask[numberOfBits];
  226|  7.10k|}
rvlc.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   610k|                            const UINT numberOfBits) {
  212|   610k|  UINT bits = 0;
  213|   610k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   610k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   610k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 610k, False: 0]
  ------------------
  216|   610k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 100k, False: 510k]
  ------------------
  217|   100k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 100k, False: 0]
  ------------------
  218|   100k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   100k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   100k|#define CACHE_BITS 32
  ------------------
  220|   100k|  }
  221|       |
  222|   610k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   610k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   610k|         BitMask[numberOfBits];
  226|   610k|}
rvlc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   839k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   839k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 839k, False: 0]
  ------------------
  454|   839k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   839k|                 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|   839k|  hBitStream->BitsInCache = 0;
  461|   839k|  hBitStream->CacheWord = 0;
  462|   839k|}
rvlc.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   225k|                           const UINT numberOfBits) {
  552|   225k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 225k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|   225k|  } else {
  556|   225k|    FDKsyncCache(hBitStream);
  557|   225k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   225k|                    hBitStream->ConfigCache);
  559|   225k|  }
  560|   225k|}
rvlc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   440k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   440k|  FDKsyncCache(hBitStream);
  579|   440k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   440k|}
rvlc.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|  62.9k|                                     const INT numberOfBits) {
  564|  62.9k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 57.1k, False: 5.85k]
  ------------------
  565|  57.1k|    FDKpushFor(hBitStream, numberOfBits);
  566|  5.85k|  else
  567|  5.85k|    FDKpushBack(hBitStream, -numberOfBits);
  568|  62.9k|}
rvlc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  5.85k|                            const UINT numberOfBits) {
  540|  5.85k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  11.7k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 5.85k, False: 0]
  ------------------
  541|  5.85k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 5.85k, False: 0]
  ------------------
  542|  5.85k|    hBitStream->BitsInCache += numberOfBits;
  543|  5.85k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  5.85k|  } else {
  545|      0|    FDKsyncCache(hBitStream);
  546|      0|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|      0|  }
  548|  5.85k|}
rvlcbit.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  4.26M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  4.26M|  FDKsyncCache(hBitStream);
  579|  4.26M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  4.26M|}
rvlcbit.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  4.89M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  4.89M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 4.89M, False: 0]
  ------------------
  454|  4.89M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  4.89M|                 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|  4.89M|  hBitStream->BitsInCache = 0;
  461|  4.89M|  hBitStream->CacheWord = 0;
  462|  4.89M|}
rvlcbit.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|   136k|                                     const INT numberOfBits) {
  564|   136k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 43.6k, False: 92.5k]
  ------------------
  565|  43.6k|    FDKpushFor(hBitStream, numberOfBits);
  566|  92.5k|  else
  567|  92.5k|    FDKpushBack(hBitStream, -numberOfBits);
  568|   136k|}
rvlcbit.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  43.6k|                           const UINT numberOfBits) {
  552|  43.6k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 43.6k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|  43.6k|  } else {
  556|  43.6k|    FDKsyncCache(hBitStream);
  557|  43.6k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  43.6k|                    hBitStream->ConfigCache);
  559|  43.6k|  }
  560|  43.6k|}
rvlcbit.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  4.26M|                            const UINT numberOfBits) {
  212|  4.26M|  UINT bits = 0;
  213|  4.26M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  4.26M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  4.26M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 4.26M, False: 0]
  ------------------
  216|  4.26M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 4.26M, False: 0]
  ------------------
  217|  4.26M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 4.26M, False: 0]
  ------------------
  218|  4.26M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  4.26M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  4.26M|#define CACHE_BITS 32
  ------------------
  220|  4.26M|  }
  221|       |
  222|  4.26M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  4.26M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  4.26M|         BitMask[numberOfBits];
  226|  4.26M|}
rvlcbit.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|   578k|                            const UINT numberOfBits) {
  540|   578k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  1.15M|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 28.4k, False: 549k]
  ------------------
  541|  28.4k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 28.4k, False: 0]
  ------------------
  542|  28.4k|    hBitStream->BitsInCache += numberOfBits;
  543|  28.4k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|   549k|  } else {
  545|   549k|    FDKsyncCache(hBitStream);
  546|   549k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|   549k|  }
  548|   578k|}
sac_bitdec.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  2.78M|                            const UINT numberOfBits) {
  212|  2.78M|  UINT bits = 0;
  213|  2.78M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  2.78M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  2.78M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 2.78M, False: 0]
  ------------------
  216|  2.78M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 386k, False: 2.39M]
  ------------------
  217|   386k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 386k, False: 0]
  ------------------
  218|   386k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   386k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   386k|#define CACHE_BITS 32
  ------------------
  220|   386k|  }
  221|       |
  222|  2.78M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  2.78M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  2.78M|         BitMask[numberOfBits];
  226|  2.78M|}
sac_bitdec.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   679k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   679k|  FDKsyncCache(hBitStream);
  579|   679k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   679k|}
sac_bitdec.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  1.01M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  1.01M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 1.01M, False: 0]
  ------------------
  454|  1.01M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  1.01M|                 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|  1.01M|  hBitStream->BitsInCache = 0;
  461|  1.01M|  hBitStream->CacheWord = 0;
  462|  1.01M|}
sac_bitdec.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|  84.6k|                                     const INT numberOfBits) {
  564|  84.6k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 78.2k, False: 6.42k]
  ------------------
  565|  78.2k|    FDKpushFor(hBitStream, numberOfBits);
  566|  6.42k|  else
  567|  6.42k|    FDKpushBack(hBitStream, -numberOfBits);
  568|  84.6k|}
sac_bitdec.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  6.42k|                            const UINT numberOfBits) {
  540|  6.42k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  12.8k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 5.88k, False: 539]
  ------------------
  541|  5.88k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 5.88k, False: 0]
  ------------------
  542|  5.88k|    hBitStream->BitsInCache += numberOfBits;
  543|  5.88k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  5.88k|  } else {
  545|    539|    FDKsyncCache(hBitStream);
  546|    539|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|    539|  }
  548|  6.42k|}
sac_bitdec.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   215k|                           const UINT numberOfBits) {
  552|   215k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 215k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|   215k|  } else {
  556|   215k|    FDKsyncCache(hBitStream);
  557|   215k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   215k|                    hBitStream->ConfigCache);
  559|   215k|  }
  560|   215k|}
sac_bitdec.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|   111k|                             UINT alignmentAnchor) {
  497|   111k|  FDKsyncCache(hBitStream);
  498|   111k|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 111k, False: 0]
  ------------------
  499|   111k|    FDK_pushForward(
  500|   111k|        &hBitStream->hBitBuf,
  501|   111k|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|   111k|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|   111k|                         0x07)) &
  504|   111k|            0x07,
  505|   111k|        hBitStream->ConfigCache);
  506|   111k|  } 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|   111k|}
sac_dec_lib.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   288k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   288k|  FDKsyncCache(hBitStream);
  579|   288k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   288k|}
sac_dec_lib.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   288k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   288k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 288k, False: 0]
  ------------------
  454|   288k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   288k|                 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|   288k|  hBitStream->BitsInCache = 0;
  461|   288k|  hBitStream->CacheWord = 0;
  462|   288k|}
sac_dec_lib.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  93.4k|                            const UINT numberOfBits) {
  212|  93.4k|  UINT bits = 0;
  213|  93.4k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  93.4k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  93.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 93.4k, False: 0]
  ------------------
  216|  93.4k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 38.4k, False: 55.0k]
  ------------------
  217|  38.4k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 38.4k, False: 0]
  ------------------
  218|  38.4k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  38.4k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  38.4k|#define CACHE_BITS 32
  ------------------
  220|  38.4k|  }
  221|       |
  222|  93.4k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  93.4k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  93.4k|         BitMask[numberOfBits];
  226|  93.4k|}
sac_dec_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  5.64k|                      FDK_BS_CFG config = BS_READER) {
  167|  5.64k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  5.64k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  5.64k|  hBitStream->ConfigCache = config;
  172|  5.64k|}
sac_tsd.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  7.45k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  7.45k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 47, False: 7.40k]
  ------------------
  230|     47|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|     47|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|     47|#define CACHE_BITS 32
  ------------------
  232|     47|    return hBitStream->CacheWord >> 31;
  233|     47|  }
  234|  7.40k|  hBitStream->BitsInCache--;
  235|       |
  236|  7.40k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  7.45k|}
sac_tsd.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  9.48k|                            const UINT numberOfBits) {
  212|  9.48k|  UINT bits = 0;
  213|  9.48k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  9.48k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  9.48k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 9.48k, False: 0]
  ------------------
  216|  9.48k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.21k, False: 8.26k]
  ------------------
  217|  1.21k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.21k, False: 0]
  ------------------
  218|  1.21k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.21k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.21k|#define CACHE_BITS 32
  ------------------
  220|  1.21k|  }
  221|       |
  222|  9.48k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  9.48k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  9.48k|         BitMask[numberOfBits];
  226|  9.48k|}
sbrdecoder.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  1.30M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  1.30M|  FDKsyncCache(hBitStream);
  579|  1.30M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  1.30M|}
sbrdecoder.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  1.33M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  1.33M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 1.33M, False: 0]
  ------------------
  454|  1.33M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  1.33M|                 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|  1.33M|  hBitStream->BitsInCache = 0;
  461|  1.33M|  hBitStream->CacheWord = 0;
  462|  1.33M|}
sbrdecoder.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   277k|                            const UINT numberOfBits) {
  212|   277k|  UINT bits = 0;
  213|   277k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   277k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   277k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 277k, False: 0]
  ------------------
  216|   277k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 28.7k, False: 249k]
  ------------------
  217|  28.7k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 28.7k, False: 0]
  ------------------
  218|  28.7k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  28.7k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  28.7k|#define CACHE_BITS 32
  ------------------
  220|  28.7k|  }
  221|       |
  222|   277k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   277k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   277k|         BitMask[numberOfBits];
  226|   277k|}
sbrdecoder.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  14.2k|                            const UINT numberOfBits) {
  540|  14.2k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  28.5k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 14.2k, False: 0]
  ------------------
  541|  14.2k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 14.2k, False: 0]
  ------------------
  542|  14.2k|    hBitStream->BitsInCache += numberOfBits;
  543|  14.2k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  14.2k|  } else {
  545|      0|    FDKsyncCache(hBitStream);
  546|      0|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|      0|  }
  548|  14.2k|}
sbrdecoder.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   571k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   571k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 261k, False: 310k]
  ------------------
  230|   261k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|   261k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|   261k|#define CACHE_BITS 32
  ------------------
  232|   261k|    return hBitStream->CacheWord >> 31;
  233|   261k|  }
  234|   310k|  hBitStream->BitsInCache--;
  235|       |
  236|   310k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   571k|}
sbrdecoder.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  14.2k|                           const UINT numberOfBits) {
  552|  14.2k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 14.2k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|  14.2k|  } else {
  556|  14.2k|    FDKsyncCache(hBitStream);
  557|  14.2k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  14.2k|                    hBitStream->ConfigCache);
  559|  14.2k|  }
  560|  14.2k|}
stereo.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   373k|                            const UINT numberOfBits) {
  212|   373k|  UINT bits = 0;
  213|   373k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   373k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   373k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 373k, False: 0]
  ------------------
  216|   373k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.77k, False: 371k]
  ------------------
  217|  1.77k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.77k, False: 0]
  ------------------
  218|  1.77k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.77k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.77k|#define CACHE_BITS 32
  ------------------
  220|  1.77k|  }
  221|       |
  222|   373k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   373k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   373k|         BitMask[numberOfBits];
  226|   373k|}
tpdec_asc.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   162M|                            const UINT numberOfBits) {
  212|   162M|  UINT bits = 0;
  213|   162M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   162M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   162M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 162M, False: 0]
  ------------------
  216|   162M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 40.3M, False: 122M]
  ------------------
  217|  40.3M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 39.4M, False: 892k]
  ------------------
  218|  40.3M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  40.3M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  40.3M|#define CACHE_BITS 32
  ------------------
  220|  40.3M|  }
  221|       |
  222|   162M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   162M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   162M|         BitMask[numberOfBits];
  226|   162M|}
tpdec_asc.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|   261k|                             UINT alignmentAnchor) {
  497|   261k|  FDKsyncCache(hBitStream);
  498|   261k|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 261k, False: 0]
  ------------------
  499|   261k|    FDK_pushForward(
  500|   261k|        &hBitStream->hBitBuf,
  501|   261k|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|   261k|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|   261k|                         0x07)) &
  504|   261k|            0x07,
  505|   261k|        hBitStream->ConfigCache);
  506|   261k|  } 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|   261k|}
tpdec_asc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  6.89M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  6.89M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 6.53M, False: 362k]
  ------------------
  454|  6.53M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  6.53M|                 hBitStream->ConfigCache);
  456|   362k|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 359k, False: 2.46k]
  ------------------
  457|   359k|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|   359k|            hBitStream->BitsInCache);
  459|       |
  460|  6.89M|  hBitStream->BitsInCache = 0;
  461|  6.89M|  hBitStream->CacheWord = 0;
  462|  6.89M|}
tpdec_asc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|   832k|                            const UINT numberOfBits) {
  540|   832k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  1.66M|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 264k, False: 567k]
  ------------------
  541|   264k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 264k, False: 0]
  ------------------
  542|   264k|    hBitStream->BitsInCache += numberOfBits;
  543|   264k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|   567k|  } else {
  545|   567k|    FDKsyncCache(hBitStream);
  546|   567k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|   567k|  }
  548|   832k|}
tpdec_asc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  4.47M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  4.47M|  FDKsyncCache(hBitStream);
  579|  4.47M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  4.47M|}
tpdec_asc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  2.33M|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  2.33M|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 296k, False: 2.03M]
  ------------------
  230|   296k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|   296k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|   296k|#define CACHE_BITS 32
  ------------------
  232|   296k|    return hBitStream->CacheWord >> 31;
  233|   296k|  }
  234|  2.03M|  hBitStream->BitsInCache--;
  235|       |
  236|  2.03M|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  2.33M|}
tpdec_asc.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  1.80M|                           const UINT numberOfBits) {
  552|  1.80M|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 852k, False: 957k]
  ------------------
  553|   852k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 852k, False: 0]
  ------------------
  554|   852k|    hBitStream->BitsInCache -= numberOfBits;
  555|   957k|  } else {
  556|   957k|    FDKsyncCache(hBitStream);
  557|   957k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   957k|                    hBitStream->ConfigCache);
  559|   957k|  }
  560|  1.80M|}
tpdec_asc.cpp:_ZL12escapedValueP13FDK_BITSTREAMiii:
  306|  1.15M|                             int nBits2, int nBits3) {
  307|  1.15M|  UINT value = FDKreadBits(hBitStream, nBits1);
  308|       |
  309|  1.15M|  if (value == (UINT)(1 << nBits1) - 1) {
  ------------------
  |  Branch (309:7): [True: 180k, False: 979k]
  ------------------
  310|   180k|    UINT valueAdd = FDKreadBits(hBitStream, nBits2);
  311|   180k|    value += valueAdd;
  312|   180k|    if (valueAdd == (UINT)(1 << nBits2) - 1) {
  ------------------
  |  Branch (312:9): [True: 144k, False: 35.3k]
  ------------------
  313|   144k|      value += FDKreadBits(hBitStream, nBits3);
  314|   144k|    }
  315|   180k|  }
  316|       |
  317|  1.15M|  return value;
  318|  1.15M|}
tpdec_asc.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|   362k|                      FDK_BS_CFG config = BS_READER) {
  167|   362k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|   362k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|   362k|  hBitStream->ConfigCache = config;
  172|   362k|}
tpdec_asc.cpp:_ZL12FDKwriteBitsP13FDK_BITSTREAMjj:
  343|  1.25M|                              const UINT numberOfBits) {
  344|  1.25M|  const UINT validMask = BitMask[numberOfBits];
  345|       |
  346|  1.25M|  if (hBitStream == NULL) {
  ------------------
  |  Branch (346:7): [True: 0, False: 1.25M]
  ------------------
  347|      0|    return numberOfBits;
  348|      0|  }
  349|       |
  350|  1.25M|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS) {
  ------------------
  |  |  111|  1.25M|#define CACHE_BITS 32
  ------------------
  |  Branch (350:7): [True: 359k, False: 892k]
  ------------------
  351|   359k|    hBitStream->BitsInCache += numberOfBits;
  352|   359k|    hBitStream->CacheWord =
  353|   359k|        (hBitStream->CacheWord << numberOfBits) | (value & validMask);
  354|   892k|  } 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|   892k|    int missing_bits = CACHE_BITS - hBitStream->BitsInCache;
  ------------------
  |  |  111|   892k|#define CACHE_BITS 32
  ------------------
  363|   892k|    int remaining_bits = numberOfBits - missing_bits;
  364|   892k|    value = value & validMask;
  365|       |    /* Avoid shift left by 32 positions */
  366|   892k|    UINT CacheWord =
  367|   892k|        (missing_bits == 32) ? 0 : (hBitStream->CacheWord << missing_bits);
  ------------------
  |  Branch (367:9): [True: 892k, False: 0]
  ------------------
  368|   892k|    CacheWord |= (value >> (remaining_bits));
  369|   892k|    FDK_put(&hBitStream->hBitBuf, CacheWord, 32);
  370|       |
  371|   892k|    hBitStream->CacheWord = value;
  372|   892k|    hBitStream->BitsInCache = remaining_bits;
  373|   892k|  }
  374|       |
  375|  1.25M|  return numberOfBits;
  376|  1.25M|}
tpdec_latm.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  1.18M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  1.18M|  FDKsyncCache(hBitStream);
  579|  1.18M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  1.18M|}
tpdec_latm.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  12.8M|                            const UINT numberOfBits) {
  212|  12.8M|  UINT bits = 0;
  213|  12.8M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  12.8M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  12.8M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 12.8M, False: 0]
  ------------------
  216|  12.8M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 2.10M, False: 10.7M]
  ------------------
  217|  2.10M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 2.10M, False: 0]
  ------------------
  218|  2.10M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  2.10M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  2.10M|#define CACHE_BITS 32
  ------------------
  220|  2.10M|  }
  221|       |
  222|  12.8M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  12.8M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  12.8M|         BitMask[numberOfBits];
  226|  12.8M|}
tpdec_latm.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  1.20M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  1.20M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 1.20M, False: 0]
  ------------------
  454|  1.20M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  1.20M|                 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|  1.20M|  hBitStream->BitsInCache = 0;
  461|  1.20M|  hBitStream->CacheWord = 0;
  462|  1.20M|}
tpdec_latm.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  5.62k|                           const UINT numberOfBits) {
  552|  5.62k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 5.62k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|  5.62k|  } else {
  556|  5.62k|    FDKsyncCache(hBitStream);
  557|  5.62k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  5.62k|                    hBitStream->ConfigCache);
  559|  5.62k|  }
  560|  5.62k|}
tpdec_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  21.9k|                      FDK_BS_CFG config = BS_READER) {
  167|  21.9k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  21.9k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  21.9k|  hBitStream->ConfigCache = config;
  172|  21.9k|}
tpdec_lib.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|   693k|                            const UINT numberOfBits) {
  540|   693k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  1.38M|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 72.2k, False: 621k]
  ------------------
  541|  72.2k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 72.2k, False: 0]
  ------------------
  542|  72.2k|    hBitStream->BitsInCache += numberOfBits;
  543|  72.2k|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|   621k|  } else {
  545|   621k|    FDKsyncCache(hBitStream);
  546|   621k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|   621k|  }
  548|   693k|}
tpdec_lib.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  7.51M|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  7.51M|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 7.51M, False: 0]
  ------------------
  454|  7.51M|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  7.51M|                 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|  7.51M|  hBitStream->BitsInCache = 0;
  461|  7.51M|  hBitStream->CacheWord = 0;
  462|  7.51M|}
tpdec_lib.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  6.69M|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  6.69M|  FDKsyncCache(hBitStream);
  579|  6.69M|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  6.69M|}
tpdec_lib.cpp:_ZL13FDKfeedBufferP13FDK_BITSTREAMPKhjPj:
  605|  22.8k|                              UINT *bytesValid) {
  606|  22.8k|  FDKsyncCache(hBitStream);
  607|  22.8k|  FDK_Feed(&hBitStream->hBitBuf, inputBuffer, bufferSize, bytesValid);
  608|  22.8k|}
tpdec_lib.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  23.0M|                            const UINT numberOfBits) {
  212|  23.0M|  UINT bits = 0;
  213|  23.0M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  23.0M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  23.0M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 23.0M, False: 0]
  ------------------
  216|  23.0M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 6.80M, False: 16.2M]
  ------------------
  217|  6.80M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 6.80M, False: 0]
  ------------------
  218|  6.80M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  6.80M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  6.80M|#define CACHE_BITS 32
  ------------------
  220|  6.80M|  }
  221|       |
  222|  23.0M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  23.0M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  23.0M|         BitMask[numberOfBits];
  226|  23.0M|}
tpdec_lib.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|   689k|                                     const INT numberOfBits) {
  564|   689k|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 2.77k, False: 686k]
  ------------------
  565|  2.77k|    FDKpushFor(hBitStream, numberOfBits);
  566|   686k|  else
  567|   686k|    FDKpushBack(hBitStream, -numberOfBits);
  568|   689k|}
tpdec_lib.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  5.95k|                           const UINT numberOfBits) {
  552|  5.95k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 5.95k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|  5.95k|  } else {
  556|  5.95k|    FDKsyncCache(hBitStream);
  557|  5.95k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  5.95k|                    hBitStream->ConfigCache);
  559|  5.95k|  }
  560|  5.95k|}
tpdec_lib.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|  91.1k|                             UINT alignmentAnchor) {
  497|  91.1k|  FDKsyncCache(hBitStream);
  498|  91.1k|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 91.1k, False: 0]
  ------------------
  499|  91.1k|    FDK_pushForward(
  500|  91.1k|        &hBitStream->hBitBuf,
  501|  91.1k|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|  91.1k|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|  91.1k|                         0x07)) &
  504|  91.1k|            0x07,
  505|  91.1k|        hBitStream->ConfigCache);
  506|  91.1k|  } 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|  91.1k|}
usacdec_acelp.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  2.64M|                            const UINT numberOfBits) {
  212|  2.64M|  UINT bits = 0;
  213|  2.64M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  2.64M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  2.64M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 2.64M, False: 0]
  ------------------
  216|  2.64M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 442k, False: 2.20M]
  ------------------
  217|   442k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 442k, False: 0]
  ------------------
  218|   442k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   442k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   442k|#define CACHE_BITS 32
  ------------------
  220|   442k|  }
  221|       |
  222|  2.64M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  2.64M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  2.64M|         BitMask[numberOfBits];
  226|  2.64M|}
usacdec_fac.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  37.1k|                            const UINT numberOfBits) {
  212|  37.1k|  UINT bits = 0;
  213|  37.1k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  37.1k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  37.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 37.1k, False: 0]
  ------------------
  216|  37.1k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 849, False: 36.2k]
  ------------------
  217|    849|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 849, False: 0]
  ------------------
  218|    849|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|    849|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|    849|#define CACHE_BITS 32
  ------------------
  220|    849|  }
  221|       |
  222|  37.1k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  37.1k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  37.1k|         BitMask[numberOfBits];
  226|  37.1k|}
usacdec_lpc.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  4.32M|                            const UINT numberOfBits) {
  212|  4.32M|  UINT bits = 0;
  213|  4.32M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  4.32M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  4.32M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 4.32M, False: 0]
  ------------------
  216|  4.32M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 305k, False: 4.01M]
  ------------------
  217|   305k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 305k, False: 0]
  ------------------
  218|   305k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   305k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   305k|#define CACHE_BITS 32
  ------------------
  220|   305k|  }
  221|       |
  222|  4.32M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  4.32M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  4.32M|         BitMask[numberOfBits];
  226|  4.32M|}
usacdec_lpc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  58.9k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  58.9k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 5.19k, False: 53.7k]
  ------------------
  230|  5.19k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  5.19k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  5.19k|#define CACHE_BITS 32
  ------------------
  232|  5.19k|    return hBitStream->CacheWord >> 31;
  233|  5.19k|  }
  234|  53.7k|  hBitStream->BitsInCache--;
  235|       |
  236|  53.7k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  58.9k|}
usacdec_lpd.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|   198k|                            const UINT numberOfBits) {
  212|   198k|  UINT bits = 0;
  213|   198k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|   198k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|   198k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 198k, False: 0]
  ------------------
  216|   198k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 22.6k, False: 176k]
  ------------------
  217|  22.6k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 22.6k, False: 0]
  ------------------
  218|  22.6k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  22.6k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  22.6k|#define CACHE_BITS 32
  ------------------
  220|  22.6k|  }
  221|       |
  222|   198k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|   198k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|   198k|         BitMask[numberOfBits];
  226|   198k|}
usacdec_lpd.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   130k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   130k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 3.01k, False: 127k]
  ------------------
  230|  3.01k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  3.01k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  3.01k|#define CACHE_BITS 32
  ------------------
  232|  3.01k|    return hBitStream->CacheWord >> 31;
  233|  3.01k|  }
  234|   127k|  hBitStream->BitsInCache--;
  235|       |
  236|   127k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   130k|}

FDK_trigFcts.cpp:_ZL28fixp_sin_cos_residual_inlineiiPiS_:
  157|  3.88M|                                                    FIXP_DBL *cosine) {
  158|  3.88M|  FIXP_DBL residual;
  159|  3.88M|  int s;
  160|  3.88M|  int shift = (31 - scale - LD - 1);
  ------------------
  |  |  145|  3.88M|#define LD 9
  ------------------
  161|  3.88M|  int ssign = 1;
  162|  3.88M|  int csign = 1;
  163|       |
  164|  3.88M|  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
  ------------------
  |  |  192|  3.88M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.88M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.88M, Folded]
  |  |  ------------------
  |  |  194|  3.88M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.88M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.88M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.88M]
  |  |  ------------------
  |  |  195|  3.88M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.88M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.88M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.88M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.88M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.88M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.88M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  3.88M|  s = ((LONG)residual) >> shift;
  166|       |
  167|  3.88M|  residual &= ((1 << shift) - 1);
  168|  3.88M|  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
  ------------------
  |  |  192|  3.88M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.88M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.88M, Folded]
  |  |  ------------------
  |  |  194|  3.88M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.88M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.88M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.88M]
  |  |  ------------------
  |  |  195|  3.88M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.88M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.88M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.88M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.88M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.88M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.88M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  3.88M|  residual <<= scale;
  170|       |
  171|       |  /* Sine sign symmetry */
  172|  3.88M|  if (s & ((1 << LD) << 1)) {
  ------------------
  |  |  145|  3.88M|#define LD 9
  ------------------
  |  Branch (172:7): [True: 0, False: 3.88M]
  ------------------
  173|      0|    ssign = -ssign;
  174|      0|  }
  175|       |  /* Cosine sign symmetry */
  176|  3.88M|  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
  ------------------
  |  |  145|  3.88M|#define LD 9
  ------------------
                if ((s + (1 << LD)) & ((1 << LD) << 1)) {
  ------------------
  |  |  145|  3.88M|#define LD 9
  ------------------
  |  Branch (176:7): [True: 1.84M, False: 2.03M]
  ------------------
  177|  1.84M|    csign = -csign;
  178|  1.84M|  }
  179|       |
  180|  3.88M|  s = fAbs(s);
  181|       |
  182|  3.88M|  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
  ------------------
  |  |  145|  3.88M|#define LD 9
  ------------------
  183|       |
  184|  3.88M|  if (s > (1 << LD)) {
  ------------------
  |  |  145|  3.88M|#define LD 9
  ------------------
  |  Branch (184:7): [True: 1.84M, False: 2.03M]
  ------------------
  185|  1.84M|    s = ((1 << LD) << 1) - s;
  ------------------
  |  |  145|  1.84M|#define LD 9
  ------------------
  186|  1.84M|  }
  187|       |
  188|  3.88M|  {
  189|  3.88M|    LONG sl, cl;
  ------------------
  |  |  181|  3.88M|#define LONG INT
  ------------------
  190|       |    /* Because of packed table */
  191|  3.88M|    if (s > (1 << (LD - 1))) {
  ------------------
  |  |  145|  3.88M|#define LD 9
  ------------------
  |  Branch (191:9): [True: 2.01M, False: 1.86M]
  ------------------
  192|  2.01M|      FIXP_STP tmp;
  ------------------
  |  |  236|  2.01M|#define FIXP_STP FIXP_SPK
  ------------------
  193|       |      /* Cosine/Sine simetry for angles greater than PI/4 */
  194|  2.01M|      s = (1 << LD) - s;
  ------------------
  |  |  145|  2.01M|#define LD 9
  ------------------
  195|  2.01M|      tmp = SINETAB[s];
  ------------------
  |  |  144|  2.01M|#define SINETAB SineTable512
  ------------------
  196|  2.01M|      sl = (LONG)tmp.v.re;
  197|  2.01M|      cl = (LONG)tmp.v.im;
  198|  2.01M|    } else {
  199|  1.86M|      FIXP_STP tmp;
  ------------------
  |  |  236|  1.86M|#define FIXP_STP FIXP_SPK
  ------------------
  200|  1.86M|      tmp = SINETAB[s];
  ------------------
  |  |  144|  1.86M|#define SINETAB SineTable512
  ------------------
  201|  1.86M|      sl = (LONG)tmp.v.im;
  202|  1.86M|      cl = (LONG)tmp.v.re;
  203|  1.86M|    }
  204|       |
  205|  3.88M|#ifdef SINETABLE_16BIT
  206|  3.88M|    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  113|  3.88M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  112|  3.88M|#define FRACT_BITS 16  /* single precision */
  ------------------
  207|  3.88M|    *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  113|  3.88M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  112|  3.88M|#define FRACT_BITS 16  /* single precision */
  ------------------
  208|       |#else
  209|       |    /* scale down by 1 for overflow prevention. This is undone at the calling
  210|       |     * function. */
  211|       |    *sine = (FIXP_DBL)(sl * ssign) >> 1;
  212|       |    *cosine = (FIXP_DBL)(cl * csign) >> 1;
  213|       |#endif
  214|  3.88M|  }
  215|       |
  216|  3.88M|  return residual;
  217|  3.88M|}
psdec.cpp:_ZL19inline_fixp_cos_siniiiPi:
  229|   188k|                                       const int scale, FIXP_DBL *out) {
  230|   188k|  FIXP_DBL residual, error0, error1, sine, cosine;
  231|   188k|  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
  232|   188k|  error0 = fMultDiv2(sine, residual);
  233|   188k|  error1 = fMultDiv2(cosine, residual);
  234|       |
  235|   188k|#ifdef SINETABLE_16BIT
  236|   188k|  *out++ = cosine - (error0 << 1);
  237|   188k|  *out++ = sine + (error1 << 1);
  238|       |#else
  239|       |  /* Undo downscaling by 1 which was done at fixp_sin_cos_residual_inline */
  240|       |  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
  241|       |  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
  242|       |#endif
  243|       |
  244|   188k|  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
  245|   188k|  error0 = fMultDiv2(sine, residual);
  246|   188k|  error1 = fMultDiv2(cosine, residual);
  247|       |
  248|   188k|#ifdef SINETABLE_16BIT
  249|   188k|  *out++ = cosine - (error0 << 1);
  250|   188k|  *out++ = sine + (error1 << 1);
  251|       |#else
  252|       |  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
  253|       |  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
  254|       |#endif
  255|   188k|}
psdec.cpp:_ZL28fixp_sin_cos_residual_inlineiiPiS_:
  157|   376k|                                                    FIXP_DBL *cosine) {
  158|   376k|  FIXP_DBL residual;
  159|   376k|  int s;
  160|   376k|  int shift = (31 - scale - LD - 1);
  ------------------
  |  |  145|   376k|#define LD 9
  ------------------
  161|   376k|  int ssign = 1;
  162|   376k|  int csign = 1;
  163|       |
  164|   376k|  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
  ------------------
  |  |  192|   376k|  (FIXP_DBL)(                                                                \
  |  |  193|   376k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 376k, Folded]
  |  |  ------------------
  |  |  194|   376k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   376k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   376k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 376k]
  |  |  ------------------
  |  |  195|   376k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   376k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   376k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   376k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   376k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   376k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   376k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|   376k|  s = ((LONG)residual) >> shift;
  166|       |
  167|   376k|  residual &= ((1 << shift) - 1);
  168|   376k|  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
  ------------------
  |  |  192|   376k|  (FIXP_DBL)(                                                                \
  |  |  193|   376k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 376k, Folded]
  |  |  ------------------
  |  |  194|   376k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   376k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   376k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 376k]
  |  |  ------------------
  |  |  195|   376k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   376k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   376k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   376k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   376k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   376k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   376k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|   376k|  residual <<= scale;
  170|       |
  171|       |  /* Sine sign symmetry */
  172|   376k|  if (s & ((1 << LD) << 1)) {
  ------------------
  |  |  145|   376k|#define LD 9
  ------------------
  |  Branch (172:7): [True: 12.2k, False: 364k]
  ------------------
  173|  12.2k|    ssign = -ssign;
  174|  12.2k|  }
  175|       |  /* Cosine sign symmetry */
  176|   376k|  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
  ------------------
  |  |  145|   376k|#define LD 9
  ------------------
                if ((s + (1 << LD)) & ((1 << LD) << 1)) {
  ------------------
  |  |  145|   376k|#define LD 9
  ------------------
  |  Branch (176:7): [True: 2.82k, False: 373k]
  ------------------
  177|  2.82k|    csign = -csign;
  178|  2.82k|  }
  179|       |
  180|   376k|  s = fAbs(s);
  181|       |
  182|   376k|  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
  ------------------
  |  |  145|   376k|#define LD 9
  ------------------
  183|       |
  184|   376k|  if (s > (1 << LD)) {
  ------------------
  |  |  145|   376k|#define LD 9
  ------------------
  |  Branch (184:7): [True: 2.58k, False: 374k]
  ------------------
  185|  2.58k|    s = ((1 << LD) << 1) - s;
  ------------------
  |  |  145|  2.58k|#define LD 9
  ------------------
  186|  2.58k|  }
  187|       |
  188|   376k|  {
  189|   376k|    LONG sl, cl;
  ------------------
  |  |  181|   376k|#define LONG INT
  ------------------
  190|       |    /* Because of packed table */
  191|   376k|    if (s > (1 << (LD - 1))) {
  ------------------
  |  |  145|   376k|#define LD 9
  ------------------
  |  Branch (191:9): [True: 4.49k, False: 372k]
  ------------------
  192|  4.49k|      FIXP_STP tmp;
  ------------------
  |  |  236|  4.49k|#define FIXP_STP FIXP_SPK
  ------------------
  193|       |      /* Cosine/Sine simetry for angles greater than PI/4 */
  194|  4.49k|      s = (1 << LD) - s;
  ------------------
  |  |  145|  4.49k|#define LD 9
  ------------------
  195|  4.49k|      tmp = SINETAB[s];
  ------------------
  |  |  144|  4.49k|#define SINETAB SineTable512
  ------------------
  196|  4.49k|      sl = (LONG)tmp.v.re;
  197|  4.49k|      cl = (LONG)tmp.v.im;
  198|   372k|    } else {
  199|   372k|      FIXP_STP tmp;
  ------------------
  |  |  236|   372k|#define FIXP_STP FIXP_SPK
  ------------------
  200|   372k|      tmp = SINETAB[s];
  ------------------
  |  |  144|   372k|#define SINETAB SineTable512
  ------------------
  201|   372k|      sl = (LONG)tmp.v.im;
  202|   372k|      cl = (LONG)tmp.v.re;
  203|   372k|    }
  204|       |
  205|   376k|#ifdef SINETABLE_16BIT
  206|   376k|    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  113|   376k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  112|   376k|#define FRACT_BITS 16  /* single precision */
  ------------------
  207|   376k|    *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  113|   376k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  112|   376k|#define FRACT_BITS 16  /* single precision */
  ------------------
  208|       |#else
  209|       |    /* scale down by 1 for overflow prevention. This is undone at the calling
  210|       |     * function. */
  211|       |    *sine = (FIXP_DBL)(sl * ssign) >> 1;
  212|       |    *cosine = (FIXP_DBL)(cl * csign) >> 1;
  213|       |#endif
  214|   376k|  }
  215|       |
  216|   376k|  return residual;
  217|   376k|}
sac_process.cpp:_ZL19inline_fixp_cos_siniiiPi:
  229|  3.45M|                                       const int scale, FIXP_DBL *out) {
  230|  3.45M|  FIXP_DBL residual, error0, error1, sine, cosine;
  231|  3.45M|  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
  232|  3.45M|  error0 = fMultDiv2(sine, residual);
  233|  3.45M|  error1 = fMultDiv2(cosine, residual);
  234|       |
  235|  3.45M|#ifdef SINETABLE_16BIT
  236|  3.45M|  *out++ = cosine - (error0 << 1);
  237|  3.45M|  *out++ = sine + (error1 << 1);
  238|       |#else
  239|       |  /* Undo downscaling by 1 which was done at fixp_sin_cos_residual_inline */
  240|       |  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
  241|       |  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
  242|       |#endif
  243|       |
  244|  3.45M|  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
  245|  3.45M|  error0 = fMultDiv2(sine, residual);
  246|  3.45M|  error1 = fMultDiv2(cosine, residual);
  247|       |
  248|  3.45M|#ifdef SINETABLE_16BIT
  249|  3.45M|  *out++ = cosine - (error0 << 1);
  250|  3.45M|  *out++ = sine + (error1 << 1);
  251|       |#else
  252|       |  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
  253|       |  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
  254|       |#endif
  255|  3.45M|}
sac_process.cpp:_ZL28fixp_sin_cos_residual_inlineiiPiS_:
  157|  6.91M|                                                    FIXP_DBL *cosine) {
  158|  6.91M|  FIXP_DBL residual;
  159|  6.91M|  int s;
  160|  6.91M|  int shift = (31 - scale - LD - 1);
  ------------------
  |  |  145|  6.91M|#define LD 9
  ------------------
  161|  6.91M|  int ssign = 1;
  162|  6.91M|  int csign = 1;
  163|       |
  164|  6.91M|  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
  ------------------
  |  |  192|  6.91M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.91M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.91M, Folded]
  |  |  ------------------
  |  |  194|  6.91M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.91M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.91M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.91M]
  |  |  ------------------
  |  |  195|  6.91M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.91M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.91M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.91M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.91M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.91M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.91M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  6.91M|  s = ((LONG)residual) >> shift;
  166|       |
  167|  6.91M|  residual &= ((1 << shift) - 1);
  168|  6.91M|  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
  ------------------
  |  |  192|  6.91M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.91M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.91M, Folded]
  |  |  ------------------
  |  |  194|  6.91M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.91M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.91M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.91M]
  |  |  ------------------
  |  |  195|  6.91M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.91M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.91M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.91M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.91M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.91M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.91M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  6.91M|  residual <<= scale;
  170|       |
  171|       |  /* Sine sign symmetry */
  172|  6.91M|  if (s & ((1 << LD) << 1)) {
  ------------------
  |  |  145|  6.91M|#define LD 9
  ------------------
  |  Branch (172:7): [True: 446k, False: 6.46M]
  ------------------
  173|   446k|    ssign = -ssign;
  174|   446k|  }
  175|       |  /* Cosine sign symmetry */
  176|  6.91M|  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
  ------------------
  |  |  145|  6.91M|#define LD 9
  ------------------
                if ((s + (1 << LD)) & ((1 << LD) << 1)) {
  ------------------
  |  |  145|  6.91M|#define LD 9
  ------------------
  |  Branch (176:7): [True: 96.1k, False: 6.81M]
  ------------------
  177|  96.1k|    csign = -csign;
  178|  96.1k|  }
  179|       |
  180|  6.91M|  s = fAbs(s);
  181|       |
  182|  6.91M|  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
  ------------------
  |  |  145|  6.91M|#define LD 9
  ------------------
  183|       |
  184|  6.91M|  if (s > (1 << LD)) {
  ------------------
  |  |  145|  6.91M|#define LD 9
  ------------------
  |  Branch (184:7): [True: 351k, False: 6.56M]
  ------------------
  185|   351k|    s = ((1 << LD) << 1) - s;
  ------------------
  |  |  145|   351k|#define LD 9
  ------------------
  186|   351k|  }
  187|       |
  188|  6.91M|  {
  189|  6.91M|    LONG sl, cl;
  ------------------
  |  |  181|  6.91M|#define LONG INT
  ------------------
  190|       |    /* Because of packed table */
  191|  6.91M|    if (s > (1 << (LD - 1))) {
  ------------------
  |  |  145|  6.91M|#define LD 9
  ------------------
  |  Branch (191:9): [True: 182k, False: 6.73M]
  ------------------
  192|   182k|      FIXP_STP tmp;
  ------------------
  |  |  236|   182k|#define FIXP_STP FIXP_SPK
  ------------------
  193|       |      /* Cosine/Sine simetry for angles greater than PI/4 */
  194|   182k|      s = (1 << LD) - s;
  ------------------
  |  |  145|   182k|#define LD 9
  ------------------
  195|   182k|      tmp = SINETAB[s];
  ------------------
  |  |  144|   182k|#define SINETAB SineTable512
  ------------------
  196|   182k|      sl = (LONG)tmp.v.re;
  197|   182k|      cl = (LONG)tmp.v.im;
  198|  6.73M|    } else {
  199|  6.73M|      FIXP_STP tmp;
  ------------------
  |  |  236|  6.73M|#define FIXP_STP FIXP_SPK
  ------------------
  200|  6.73M|      tmp = SINETAB[s];
  ------------------
  |  |  144|  6.73M|#define SINETAB SineTable512
  ------------------
  201|  6.73M|      sl = (LONG)tmp.v.im;
  202|  6.73M|      cl = (LONG)tmp.v.re;
  203|  6.73M|    }
  204|       |
  205|  6.91M|#ifdef SINETABLE_16BIT
  206|  6.91M|    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  113|  6.91M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  112|  6.91M|#define FRACT_BITS 16  /* single precision */
  ------------------
  207|  6.91M|    *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  113|  6.91M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
  ------------------
  |  |  112|  6.91M|#define FRACT_BITS 16  /* single precision */
  ------------------
  208|       |#else
  209|       |    /* scale down by 1 for overflow prevention. This is undone at the calling
  210|       |     * function. */
  211|       |    *sine = (FIXP_DBL)(sl * ssign) >> 1;
  212|       |    *cosine = (FIXP_DBL)(cl * csign) >> 1;
  213|       |#endif
  214|  6.91M|  }
  215|       |
  216|  6.91M|  return residual;
  217|  6.91M|}

_Z10fixnormz_Ss:
  128|  83.0k|inline INT fixnormz_S(SHORT a) {
  129|  83.0k|  if (a < 0) {
  ------------------
  |  Branch (129:7): [True: 0, False: 83.0k]
  ------------------
  130|      0|    return 0;
  131|      0|  }
  132|  83.0k|  return fixnormz_D((INT)(a)) - 16;
  133|  83.0k|}

_Z4fMinjj:
  416|   127k|inline UINT fMin(UINT a, UINT b) { return fixmin_UI(a, b); }
  ------------------
  |  |  129|   127k|#define fixmin_UI(a, b) fixmin(a, b)
  ------------------
FDK_bitbuffer.cpp:_ZL4fMaxii:
  401|  22.8k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  22.8k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
_Z8fMultAddisi:
  338|  2.01M|inline FIXP_DBL fMultAdd(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  339|  2.01M|  return fixmadd_SD(x, a, b);
  340|  2.01M|}
_Z12fMultSubDiv2iii:
  352|  3.34M|inline FIXP_DBL fMultSubDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  353|  3.34M|  return fixmsubdiv2_DD(x, a, b);
  354|  3.34M|}
_Z4fMaxjj:
  415|  8.89M|inline UINT fMax(UINT a, UINT b) { return fixmax_UI(a, b); }
  ------------------
  |  |  128|  8.89M|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
_Z4fMaxhh:
  418|   718k|inline UCHAR fMax(UCHAR a, UCHAR b) {
  419|   718k|  return (UCHAR)fixmax_UI((UINT)a, (UINT)b);
  ------------------
  |  |  128|   718k|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
  420|   718k|}
_Z4fMinhh:
  421|  22.5M|inline UCHAR fMin(UCHAR a, UCHAR b) {
  422|  22.5M|  return (UCHAR)fixmin_UI((UINT)a, (UINT)b);
  ------------------
  |  |  129|  22.5M|#define fixmin_UI(a, b) fixmin(a, b)
  ------------------
  423|  22.5M|}
FDK_decorrelate.cpp:_ZL4fMinii:
  400|   156M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   156M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
FDK_decorrelate.cpp:_ZL9fPow2Div2i:
  249|  3.34G|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
FDK_decorrelate.cpp:_ZL4fMaxii:
  401|  67.6M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  67.6M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
FDK_decorrelate.cpp:_ZL9fMultDiv2is:
  247|  8.42G|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
FDK_decorrelate.cpp:_ZL5fMultis:
  240|   444M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
FDK_decorrelate.cpp:_ZL5fMultsi:
  239|  4.35M|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
FDK_decorrelate.cpp:_ZL4fAbsi:
  275|   248M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
FDK_decorrelate.cpp:_ZL5fMultii:
  241|  15.1M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
FDK_decorrelate.cpp:_ZL9fMultDiv2si:
  246|  59.0k|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
FDK_decorrelate.cpp:_ZL12fMultAddDiv2iis:
  320|   244M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_SGL b) {
  321|   244M|  return fixmadddiv2_DS(x, a, b);
  322|   244M|}
FDK_decorrelate.cpp:_ZL9fMultDiv2ii:
  248|   292M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
FDK_hybrid.cpp:_ZL9fMultDiv2si:
  246|   123M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
FDK_hybrid.cpp:_ZL9fMultDiv2is:
  247|   268M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
FDK_lpc.cpp:_ZL12fMultAddDiv2iii:
  314|  3.00M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|  3.00M|  return fixmadddiv2_DD(x, a, b);
  316|  3.00M|}
FDK_lpc.cpp:_ZL9fMultDiv2ii:
  248|  6.35M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
FDK_qmf_domain.cpp:_ZL4fMinii:
  400|   174M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   174M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
FDK_qmf_domain.cpp:_ZL4fMaxii:
  401|   280M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   280M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
FDK_tools_rom.cpp:_ZL6fNormzi:
  292|   782k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
FDK_trigFcts.cpp:_ZL5fMultii:
  241|  11.6M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
FDK_trigFcts.cpp:_ZL4fAbsi:
  275|  3.88M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
HFgen_preFlat.cpp:_ZL4fMinii:
  400|  1.54M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  1.54M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
HFgen_preFlat.cpp:_ZL4fMaxii:
  401|  2.29M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  2.29M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
HFgen_preFlat.cpp:_ZL9fPow2Div2i:
  249|  46.3M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
HFgen_preFlat.cpp:_ZL5fMultii:
  241|  2.99M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
HFgen_preFlat.cpp:_ZL5fMultsi:
  239|   438k|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
HFgen_preFlat.cpp:_ZL5fMultis:
  240|   618k|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
aac_ram.cpp:_ZL4fMaxii:
  401|   299k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   299k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
aacdec_drc.cpp:_ZL5fMultii:
  241|  14.8M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
aacdec_drc.cpp:_ZL4fMaxii:
  401|  1.21M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.21M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
aacdec_drc.cpp:_ZL4fMinii:
  400|  21.5M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  21.5M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
aacdec_drc.cpp:_ZL5fMultis:
  240|  21.1M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
aacdec_drc.cpp:_ZL9fMultDiv2is:
  247|  42.3M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
aacdec_hcr.cpp:_ZL4fAbsi:
  275|  2.14M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
aacdec_hcr.cpp:_ZL4fMaxii:
  401|   686k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   686k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
aacdec_hcr.cpp:_ZL6fNormzi:
  292|  39.7k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
aacdec_hcr.cpp:_ZL9fMultDiv2ii:
  248|  39.7k|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
aacdec_hcr.cpp:_ZL4fMinii:
  400|   132k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   132k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
aacdec_hcrs.cpp:_ZL4fAbsi:
  275|  16.7k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
aacdec_pns.cpp:_ZL12fPow2AddDiv2ii:
  327|   287k|FDK_INLINE FIXP_DBL fPow2AddDiv2(FIXP_DBL x, FIXP_DBL a) {
  328|   287k|  return fixpadddiv2_D(x, a);
  329|   287k|}
aacdec_pns.cpp:_ZL9fPow2Div2i:
  249|   287k|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
aacdec_pns.cpp:_ZL5fMultii:
  241|   287k|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
aacdec_pns.cpp:_ZL4fMinii:
  400|  64.7k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  64.7k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
aacdec_pns.cpp:_ZL9fMultDiv2ii:
  248|   287k|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
aacdecoder.cpp:_ZL4fMinii:
  400|   293k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   293k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
aacdecoder.cpp:_ZL5fMultis:
  240|  22.5M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
aacdecoder.cpp:_ZL4fMaxii:
  401|   141k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   141k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
aacdecoder_lib.cpp:_ZL4fMaxii:
  401|   353k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   353k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
autocorr2nd.cpp:_ZL4fMaxii:
  401|  4.36M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  4.36M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
autocorr2nd.cpp:_ZL6fNormzi:
  292|  4.36M|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
autocorr2nd.cpp:_ZL9fMultDiv2ii:
  248|  1.34G|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
autocorr2nd.cpp:_ZL9fPow2Div2i:
  249|   363M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
autocorr2nd.cpp:_ZL4fAbsi:
  275|  28.4M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
block.cpp:_ZL4fAbsi:
  275|  28.2M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
block.cpp:_ZL4fMaxii:
  401|  26.7M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  26.7M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
block.cpp:_ZL4fMinii:
  400|  3.63M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  3.63M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
block.cpp:_ZL9fMultDiv2si:
  246|  8.47k|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
block.cpp:_ZL6fNormzi:
  292|  1.60M|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
block.cpp:_ZL9fMultDiv2ii:
  248|  20.3M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
block.cpp:_ZL9fPow2Div2i:
  249|  14.8M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
block.cpp:_ZL5fMultss:
  238|   263k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
channel.cpp:_ZL4fMaxii:
  401|   288k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   288k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
conceal.cpp:_ZL5fMultss:
  238|   677k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
conceal.cpp:_ZL4fMaxii:
  401|  9.20M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  9.20M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
conceal.cpp:_ZL5fMultis:
  240|  17.3M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
conceal.cpp:_ZL5fMultii:
  241|  11.5M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
dct.cpp:_ZL6fNormzi:
  292|  65.8M|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
dct.cpp:_ZL9fMultDiv2is:
  247|  6.21G|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
dct.cpp:_ZL5fMultis:
  240|  5.89G|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
drcDec_gainDecoder.cpp:_ZL5fMultss:
  238|  29.9k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
drcDec_gainDecoder.cpp:_ZL4fMinii:
  400|  7.89k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  7.89k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
drcDec_gainDecoder.cpp:_ZL9fMultDiv2ii:
  248|  6.48M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
drcDec_reader.cpp:_ZL4fMinii:
  400|   179k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   179k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMaxii:
  401|  73.9k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  73.9k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMinii:
  400|   454k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   454k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
drcDec_tools.cpp:_ZL5fMultii:
  241|   119k|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
drcGainDec_preprocess.cpp:_ZL4fMinii:
  400|  1.55M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  1.55M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
drcGainDec_preprocess.cpp:_ZL9fMultDiv2is:
  247|   196k|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
drcGainDec_preprocess.cpp:_ZL9fMultDiv2si:
  246|   102k|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
drcGainDec_preprocess.cpp:_ZL4fMaxii:
  401|   102k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   102k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
drcGainDec_preprocess.cpp:_ZL5fNormi:
  294|  3.05M|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
drcGainDec_process.cpp:_ZL9fMultDiv2ii:
  248|  26.5M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
drcGainDec_process.cpp:_ZL4fMaxii:
  401|  84.6k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  84.6k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
drcGainDec_process.cpp:_ZL4fMinss:
  403|  84.6k|FDK_INLINE FIXP_SGL fMin(FIXP_SGL a, FIXP_SGL b) { return fixmin_S(a, b); }
  ------------------
  |  |  125|  84.6k|#define fixmin_S(a, b) fixmin(a, b)
  ------------------
drcGainDec_process.cpp:_ZL4fMinii:
  400|   166k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   166k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
env_calc.cpp:_ZL5fMultii:
  241|   160M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
env_calc.cpp:_ZL9fMultDiv2si:
  246|  98.8M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
env_calc.cpp:_ZL4fMaxii:
  401|   560M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   560M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
env_calc.cpp:_ZL5fMultis:
  240|  29.7M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
env_calc.cpp:_ZL9fMultDiv2ii:
  248|   553M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
env_calc.cpp:_ZL4fMinii:
  400|   788M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   788M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
env_calc.cpp:_ZL6fNormzi:
  292|  2.34M|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
env_calc.cpp:_ZL9fPow2Div2i:
  249|   273M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
env_calc.cpp:_ZL5fPow2i:
  242|   195k|FDK_INLINE LONG fPow2(LONG a) { return fixpow2_D(a); }
env_calc.cpp:_ZL5fNormi:
  294|  26.5M|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
env_calc.cpp:_ZL4fAbsi:
  275|  26.2M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
env_calc.cpp:_ZL12fPow2AddDiv2ii:
  327|   228M|FDK_INLINE FIXP_DBL fPow2AddDiv2(FIXP_DBL x, FIXP_DBL a) {
  328|   228M|  return fixpadddiv2_D(x, a);
  329|   228M|}
env_calc.cpp:_ZL5fMultsi:
  239|   562M|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
env_calc.cpp:_ZL12fMultAddDiv2iii:
  314|  4.85M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|  4.85M|  return fixmadddiv2_DD(x, a, b);
  316|  4.85M|}
env_calc.cpp:_ZL9fMultDiv2is:
  247|  6.86M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
env_calc.cpp:_ZL12fMultAddDiv2isi:
  317|  16.1M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|  16.1M|  return fixmadddiv2_SD(x, a, b);
  319|  16.1M|}
env_dec.cpp:_ZL9fMultDiv2ss:
  245|   225k|FDK_INLINE LONG fMultDiv2(SHORT a, SHORT b) { return fixmuldiv2_SS(a, b); }
env_dec.cpp:_ZL5fMultss:
  238|   271k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
env_dec.cpp:_ZL4fMaxii:
  401|   145k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   145k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
env_dec.cpp:_ZL4fMaxss:
  404|  2.15M|FDK_INLINE FIXP_SGL fMax(FIXP_SGL a, FIXP_SGL b) { return fixmax_S(a, b); }
  ------------------
  |  |  124|  2.15M|#define fixmax_S(a, b) fixmax(a, b)
  ------------------
env_dec.cpp:_ZL4fMinss:
  403|  2.15M|FDK_INLINE FIXP_SGL fMin(FIXP_SGL a, FIXP_SGL b) { return fixmin_S(a, b); }
  ------------------
  |  |  125|  2.15M|#define fixmin_S(a, b) fixmin(a, b)
  ------------------
env_extr.cpp:_ZL4fMinii:
  400|  73.1k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  73.1k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
fft.cpp:_ZL9fMultDiv2is:
  247|  4.62G|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
fft.cpp:_ZL5fMultis:
  240|   113M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
fft_rad2.cpp:_ZL9fMultDiv2is:
  247|  1.19G|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
fixpoint_math.cpp:_ZL5fMultii:
  241|   102M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
fixpoint_math.cpp:_ZL4fAbsi:
  275|  1.47M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2isi:
  317|  91.6M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|  91.6M|  return fixmadddiv2_SD(x, a, b);
  319|  91.6M|}
fixpoint_math.cpp:_ZL9fMultDiv2ii:
  248|  95.5M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
fixpoint_math.cpp:_ZL6fNormzi:
  292|  3.96M|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2iii:
  314|  3.96M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|  3.96M|  return fixmadddiv2_DD(x, a, b);
  316|  3.96M|}
fixpoint_math.cpp:_ZL5fNormi:
  294|  3.96M|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
hbe.cpp:_ZL4fMinii:
  400|   606M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   606M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
hbe.cpp:_ZL4fMaxii:
  401|   934M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   934M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
hbe.cpp:_ZL9fMultDiv2ii:
  248|  2.96G|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
hbe.cpp:_ZL6fNormzi:
  292|   372M|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
hbe.cpp:_ZL12fMultAddDiv2iii:
  314|   152M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|   152M|  return fixmadddiv2_DD(x, a, b);
  316|   152M|}
hbe.cpp:_ZL9fMultDiv2ss:
  245|   152M|FDK_INLINE LONG fMultDiv2(SHORT a, SHORT b) { return fixmuldiv2_SS(a, b); }
hbe.cpp:_ZL4fAbsi:
  275|   152M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
hbe.cpp:_ZL5fMultii:
  241|  1.71G|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
hbe.cpp:_ZL12fPow2AddDiv2ii:
  327|   328M|FDK_INLINE FIXP_DBL fPow2AddDiv2(FIXP_DBL x, FIXP_DBL a) {
  328|   328M|  return fixpadddiv2_D(x, a);
  329|   328M|}
hbe.cpp:_ZL9fPow2Div2i:
  249|   920M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
ldfiltbank.cpp:_ZL5fMultii:
  241|  75.8M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
ldfiltbank.cpp:_ZL4fMaxii:
  401|   106M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   106M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
ldfiltbank.cpp:_ZL4fMinii:
  400|   106M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   106M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
ldfiltbank.cpp:_ZL9fMultDiv2is:
  247|   292M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
limiter.cpp:_ZL4fAbsi:
  275|   977M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
limiter.cpp:_ZL4fMaxii:
  401|  3.25G|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  3.25G|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
limiter.cpp:_ZL5fMultii:
  241|   588M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
limiter.cpp:_ZL4fMinii:
  400|  62.9M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  62.9M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
limiter.cpp:_ZL9fMultDiv2is:
  247|  62.9M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
limiter.cpp:_ZL9fMultDiv2si:
  246|  62.9M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
limiter.cpp:_ZL9fMultDiv2ii:
  248|   547M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
lpp_tran.cpp:_ZL4fMinii:
  400|  26.0M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  26.0M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
lpp_tran.cpp:_ZL4fMaxii:
  401|  92.1M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  92.1M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
lpp_tran.cpp:_ZL4fAbsi:
  275|  19.1M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
lpp_tran.cpp:_ZL9fMultDiv2ii:
  248|  85.3M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
lpp_tran.cpp:_ZL9fMultDiv2si:
  246|   971M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
lpp_tran.cpp:_ZL9fMultDiv2ss:
  245|  14.6M|FDK_INLINE LONG fMultDiv2(SHORT a, SHORT b) { return fixmuldiv2_SS(a, b); }
lpp_tran.cpp:_ZL5fPow2i:
  242|   574k|FDK_INLINE LONG fPow2(LONG a) { return fixpow2_D(a); }
lpp_tran.cpp:_ZL5fMultss:
  238|  24.0M|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
lpp_tran.cpp:_ZL5fPow2s:
  243|  6.29M|FDK_INLINE LONG fPow2(SHORT a) { return fixpow2_S(a); }
mdct.cpp:_ZL6fNormzi:
  292|   661k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
mdct.cpp:_ZL5fMultii:
  241|   135M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
mdct.cpp:_ZL4fMinii:
  400|   638k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   638k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
mdct.cpp:_ZL4fMaxii:
  401|   553k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   553k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
mdct.cpp:_ZL9fMultDiv2is:
  247|   498M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
pcmdmx_lib.cpp:_ZL4fMaxii:
  401|   508k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   508k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
pcmdmx_lib.cpp:_ZL4fAbsi:
  275|      2|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
pcmdmx_lib.cpp:_ZL5fMultss:
  238|   100k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
pcmdmx_lib.cpp:_ZL4fMinii:
  400|  18.6k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  18.6k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
pcmdmx_lib.cpp:_ZL5fMultis:
  240|   685M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
psdec.cpp:_ZL5fMultii:
  241|  1.88M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
psdec.cpp:_ZL4fAbsi:
  275|   376k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
psdec.cpp:_ZL9fMultDiv2ii:
  248|  60.3M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
psdec.cpp:_ZL4fMinii:
  400|   188k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   188k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
psdec.cpp:_ZL4fMaxii:
  401|   188k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   188k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
psdec.cpp:_ZL5fMultis:
  240|   753k|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
psdec.cpp:_ZL8fMultAddiii:
  335|  29.7M|FDK_INLINE FIXP_DBL fMultAdd(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  336|  29.7M|  return fixmadd_DD(x, a, b);
  337|  29.7M|}
pvc_dec.cpp:_ZL9fPow2Div2i:
  249|  64.9M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
pvc_dec.cpp:_ZL5fMultis:
  240|  11.4M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
pvc_dec.cpp:_ZL4fMaxii:
  401|  2.90M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  2.90M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
pvc_dec.cpp:_ZL12fMultAddDiv2iis:
  320|  18.3M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_SGL b) {
  321|  18.3M|  return fixmadddiv2_DS(x, a, b);
  322|  18.3M|}
pvc_dec.cpp:_ZL9fMultDiv2ii:
  248|  18.3M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
pvc_dec.cpp:_ZL9fMultDiv2is:
  247|  25.4M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
pvc_dec.cpp:_ZL4fMinii:
  400|  9.85M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  9.85M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
qmf.cpp:_ZL4fMinii:
  400|  10.4M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  10.4M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
qmf.cpp:_ZL4fMaxii:
  401|  21.9M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  21.9M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
qmf.cpp:_ZL12fMultAddDiv2isi:
  317|  8.69G|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|  8.69G|  return fixmadddiv2_SD(x, a, b);
  319|  8.69G|}
qmf.cpp:_ZL9fMultDiv2ii:
  248|  8.69G|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
qmf.cpp:_ZL5fMultis:
  240|  1.20G|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
qmf.cpp:_ZL9fMultDiv2si:
  246|  6.54G|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
qmf.cpp:_ZL9fMultDiv2is:
  247|  2.84M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
rvlc.cpp:_ZL4fMaxii:
  401|   113k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   113k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
rvlc.cpp:_ZL4fMinss:
  403|  2.26k|FDK_INLINE FIXP_SGL fMin(FIXP_SGL a, FIXP_SGL b) { return fixmin_S(a, b); }
  ------------------
  |  |  125|  2.26k|#define fixmin_S(a, b) fixmin(a, b)
  ------------------
rvlc.cpp:_ZL4fMaxss:
  404|  2.26k|FDK_INLINE FIXP_SGL fMax(FIXP_SGL a, FIXP_SGL b) { return fixmax_S(a, b); }
  ------------------
  |  |  124|  2.26k|#define fixmax_S(a, b) fixmax(a, b)
  ------------------
rvlcconceal.cpp:_ZL4fMinss:
  403|  99.3k|FDK_INLINE FIXP_SGL fMin(FIXP_SGL a, FIXP_SGL b) { return fixmin_S(a, b); }
  ------------------
  |  |  125|  99.3k|#define fixmin_S(a, b) fixmin(a, b)
  ------------------
sac_bitdec.cpp:_ZL4fMaxii:
  401|  44.3k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  44.3k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_bitdec.cpp:_ZL6fNormzi:
  292|  5.22k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
sac_bitdec.cpp:_ZL4fMinii:
  400|  56.8k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  56.8k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_calcM1andM2.cpp:_ZL5fMultii:
  241|  1.45M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
sac_calcM1andM2.cpp:_ZL5fNormi:
  294|   191k|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
sac_dec.cpp:_ZL4fMinii:
  400|   971M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   971M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_dec.cpp:_ZL4fMaxii:
  401|  1.00G|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.00G|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_dec.cpp:_ZL5fMultii:
  241|  40.9M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
sac_dec_conceal.cpp:_ZL4fMaxii:
  401|  85.9k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  85.9k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_dec_lib.cpp:_ZL4fMinii:
  400|  5.33k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  5.33k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_process.cpp:_ZL5fMultii:
  241|   529M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
sac_process.cpp:_ZL4fMaxii:
  401|  61.5M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  61.5M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_process.cpp:_ZL4fMinii:
  400|  3.08M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  3.08M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_process.cpp:_ZL5fMultsi:
  239|   394M|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
sac_process.cpp:_ZL9fMultDiv2ii:
  248|   405M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sac_process.cpp:_ZL12fMultAddDiv2iii:
  314|  91.5M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|  91.5M|  return fixmadddiv2_DD(x, a, b);
  316|  91.5M|}
sac_process.cpp:_ZL4fAbsi:
  275|  11.6M|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
sac_process.cpp:_ZL12fMultAddDiv2iis:
  320|  8.49M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_SGL b) {
  321|  8.49M|  return fixmadddiv2_DS(x, a, b);
  322|  8.49M|}
sac_process.cpp:_ZL5fMultis:
  240|  2.06G|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
sac_process.cpp:_ZL9fMultDiv2is:
  247|  85.2M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
sac_reshapeBBEnv.cpp:_ZL5fPow2i:
  242|  80.3M|FDK_INLINE LONG fPow2(LONG a) { return fixpow2_D(a); }
sac_reshapeBBEnv.cpp:_ZL4fMinii:
  400|   271M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   271M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_reshapeBBEnv.cpp:_ZL9fMultDiv2ii:
  248|   250M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sac_reshapeBBEnv.cpp:_ZL5fMultii:
  241|  93.9M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
sac_reshapeBBEnv.cpp:_ZL9fPow2Div2i:
  249|   617M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
sac_reshapeBBEnv.cpp:_ZL4fMaxii:
  401|   354M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   354M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_smoothing.cpp:_ZL9fMultDiv2ii:
  248|  1.30M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sac_smoothing.cpp:_ZL5fMultii:
  241|   831k|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
sac_smoothing.cpp:_ZL4fAbsi:
  275|   166k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
sac_stp.cpp:_ZL6fNormzi:
  292|   240k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
sac_stp.cpp:_ZL12fMultAddDiv2isi:
  317|  2.40M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|  2.40M|  return fixmadddiv2_SD(x, a, b);
  319|  2.40M|}
sac_stp.cpp:_ZL12fMultAddDiv2iii:
  314|   240k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|   240k|  return fixmadddiv2_DD(x, a, b);
  316|   240k|}
sac_stp.cpp:_ZL5fNormi:
  294|   184k|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
sac_stp.cpp:_ZL4fMinii:
  400|  66.8M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  66.8M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_stp.cpp:_ZL9fMultDiv2ii:
  248|  74.0M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sac_stp.cpp:_ZL9fPow2Div2i:
  249|  71.4M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
sac_stp.cpp:_ZL4fMaxii:
  401|  64.0M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  64.0M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_stp.cpp:_ZL5fMultii:
  241|  12.1M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
sac_stp.cpp:_ZL9fMultDiv2is:
  247|  53.7k|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
sac_tsd.cpp:_ZL9fMultDiv2ii:
  248|  1.33M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sbr_dec.cpp:_ZL4fMaxii:
  401|  1.72M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.72M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sbr_dec.cpp:_ZL4fMinii:
  400|  1.11M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  1.11M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_drc.cpp:_ZL4fMaxii:
  401|   786k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   786k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sbrdec_drc.cpp:_ZL5fMultii:
  241|  61.0M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
sbrdec_freq_sca.cpp:_ZL4fMinii:
  400|   284k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   284k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_freq_sca.cpp:_ZL5fMultss:
  238|  5.65M|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
sbrdec_freq_sca.cpp:_ZL9fMultDiv2ii:
  248|   238M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sbrdecoder.cpp:_ZL4fMaxii:
  401|   103k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   103k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sbrdecoder.cpp:_ZL4fMinii:
  400|   635k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   635k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
scale.cpp:_ZL4fMaxii:
  401|  1.00G|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.00G|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
scale.cpp:_ZL4fMinii:
  400|   142M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   142M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
stereo.cpp:_ZL4fMaxii:
  401|   144k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|   144k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
stereo.cpp:_ZL4fMinii:
  400|  1.45M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  1.45M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
stereo.cpp:_ZL5fMultsi:
  239|   193k|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
stereo.cpp:_ZL12fMultAddDiv2iii:
  314|   757k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|   757k|  return fixmadddiv2_DD(x, a, b);
  316|   757k|}
stereo.cpp:_ZL9fMultDiv2ii:
  248|  20.4M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
stereo.cpp:_ZL5fMultii:
  241|   340k|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
tpdec_asc.cpp:_ZL4fAbsi:
  275|   733k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
usacdec_ace_ltp.cpp:_ZL9fMultDiv2is:
  247|  44.6M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
usacdec_ace_ltp.cpp:_ZL12fMultAddDiv2iis:
  320|   669M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_SGL b) {
  321|   669M|  return fixmadddiv2_DS(x, a, b);
  322|   669M|}
usacdec_ace_ltp.cpp:_ZL9fMultDiv2ii:
  248|   669M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
usacdec_ace_ltp.cpp:_ZL4fMaxii:
  401|  22.3M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  22.3M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
usacdec_ace_ltp.cpp:_ZL4fMinii:
  400|  22.3M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  22.3M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
usacdec_ace_ltp.cpp:_ZL9fMultDiv2si:
  246|  15.0M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
usacdec_ace_ltp.cpp:_ZL5fMultsi:
  239|  14.5M|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
usacdec_acelp.cpp:_ZL4fMaxii:
  401|  65.5M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  65.5M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
usacdec_acelp.cpp:_ZL4fMinii:
  400|  65.2M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  65.2M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
usacdec_acelp.cpp:_ZL5fMultsi:
  239|  21.2M|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
usacdec_acelp.cpp:_ZL9fMultDiv2is:
  247|  22.1M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
usacdec_acelp.cpp:_ZL9fMultDiv2si:
  246|   753M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
usacdec_acelp.cpp:_ZL9fMultDiv2ii:
  248|  48.3M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
usacdec_acelp.cpp:_ZL9fMultDiv2ss:
  245|  32.7M|FDK_INLINE LONG fMultDiv2(SHORT a, SHORT b) { return fixmuldiv2_SS(a, b); }
usacdec_acelp.cpp:_ZL12fMultAddDiv2isi:
  317|  26.0M|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|  26.0M|  return fixmadddiv2_SD(x, a, b);
  319|  26.0M|}
usacdec_acelp.cpp:_ZL5fMultss:
  238|  2.13M|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
usacdec_acelp.cpp:_ZL9fPow2Div2s:
  250|  21.9M|FDK_INLINE LONG fPow2Div2(SHORT a) { return fixpow2div2_S(a); }
usacdec_acelp.cpp:_ZL5fNormi:
  294|  1.02M|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
usacdec_acelp.cpp:_ZL5fMultis:
  240|   194k|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
usacdec_acelp.cpp:_ZL9fPow2Div2i:
  249|  21.9M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
usacdec_acelp.cpp:_ZL5fPow2s:
  243|   343k|FDK_INLINE LONG fPow2(SHORT a) { return fixpow2_S(a); }
usacdec_acelp.cpp:_ZL5fPow2i:
  242|   343k|FDK_INLINE LONG fPow2(LONG a) { return fixpow2_D(a); }
usacdec_acelp.cpp:_ZL4fMinss:
  403|  1.48k|FDK_INLINE FIXP_SGL fMin(FIXP_SGL a, FIXP_SGL b) { return fixmin_S(a, b); }
  ------------------
  |  |  125|  1.48k|#define fixmin_S(a, b) fixmin(a, b)
  ------------------
usacdec_acelp.cpp:_ZL5fMultii:
  241|  1.71M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
usacdec_fac.cpp:_ZL5fMultii:
  241|  24.9M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
usacdec_fac.cpp:_ZL4fMinii:
  400|   263M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|   263M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
usacdec_fac.cpp:_ZL9fMultDiv2si:
  246|   219M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
usacdec_fac.cpp:_ZL5fMultis:
  240|  8.46M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
usacdec_fac.cpp:_ZL4fMaxii:
  401|  29.6M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  29.6M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
usacdec_fac.cpp:_ZL9fMultDiv2is:
  247|  27.2M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
usacdec_lpc.cpp:_ZL9fPow2Div2i:
  249|  1.47M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
usacdec_lpc.cpp:_ZL9fMultDiv2si:
  246|  2.58M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
usacdec_lpc.cpp:_ZL4fMaxii:
  401|  5.17M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  5.17M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
usacdec_lpc.cpp:_ZL4fMinii:
  400|  5.17M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  5.17M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
usacdec_lpc.cpp:_ZL5fMultss:
  238|  7.98M|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
usacdec_lpc.cpp:_ZL9fPow2Div2s:
  250|  2.39M|FDK_INLINE LONG fPow2Div2(SHORT a) { return fixpow2div2_S(a); }
usacdec_lpc.cpp:_ZL5fMultii:
  241|  1.38M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
usacdec_lpc.cpp:_ZL5fMultsi:
  239|  1.23M|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
usacdec_lpc.cpp:_ZL9fMultDiv2ii:
  248|  79.9M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
usacdec_lpd.cpp:_ZL9fMultDiv2is:
  247|  51.9M|FDK_INLINE LONG fMultDiv2(LONG a, SHORT b) { return fixmuldiv2_DS(a, b); }
usacdec_lpd.cpp:_ZL5fMultis:
  240|   626M|FDK_INLINE LONG fMult(LONG a, SHORT b) { return fixmul_DS(a, b); }
usacdec_lpd.cpp:_ZL9fPow2Div2i:
  249|  93.3M|FDK_INLINE LONG fPow2Div2(LONG a) { return fixpow2div2_D(a); }
usacdec_lpd.cpp:_ZL9fMultDiv2ii:
  248|  45.7M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
usacdec_lpd.cpp:_ZL5fMultii:
  241|  25.1M|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
usacdec_lpd.cpp:_ZL4fMinii:
  400|  6.40M|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  6.40M|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
usacdec_lpd.cpp:_ZL4fMaxii:
  401|  21.3M|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  21.3M|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
usacdec_lpd.cpp:_ZL9fMultDiv2si:
  246|  10.4M|FDK_INLINE LONG fMultDiv2(SHORT a, LONG b) { return fixmuldiv2_SD(a, b); }
usacdec_lpd.cpp:_ZL5fMultsi:
  239|  1.64M|FDK_INLINE LONG fMult(SHORT a, LONG b) { return fixmul_SD(a, b); }
usacdec_lpd.cpp:_ZL5fNormi:
  294|  11.5M|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
usacdec_lpd.cpp:_ZL5fPow2i:
  242|  11.4M|FDK_INLINE LONG fPow2(LONG a) { return fixpow2_D(a); }
usacdec_lpd.cpp:_ZL6fNormzi:
  292|  51.3k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }

_Z12cplxMultDiv2PiS_iiss:
  126|  2.91G|                         const FIXP_SGL b_Im) {
  127|  2.91G|  *c_Re = fMultDiv2(a_Re, b_Re) - fMultDiv2(a_Im, b_Im);
  128|  2.91G|  *c_Im = fMultDiv2(a_Re, b_Im) + fMultDiv2(a_Im, b_Re);
  129|  2.91G|}
_Z12cplxMultDiv2PiS_ii8FIXP_SPK:
  154|  2.69G|                         const FIXP_DBL a_Im, const FIXP_SPK w) {
  155|  2.69G|  cplxMultDiv2(c_Re, c_Im, a_Re, a_Im, w.v.re, w.v.im);
  156|  2.69G|}
_Z12cplxMultDiv2PiS_iiii:
  189|   387M|                         const FIXP_DBL b_Im) {
  190|   387M|  *c_Re = fMultDiv2(a_Re, b_Re) - fMultDiv2(a_Im, b_Im);
  191|   387M|  *c_Im = fMultDiv2(a_Re, b_Im) + fMultDiv2(a_Im, b_Re);
  192|   387M|}
_Z12cplxMultDiv2PiS_ii8FIXP_DPK:
  199|   333k|                         const FIXP_DBL a_Im, const FIXP_DPK w) {
  200|   333k|  cplxMultDiv2(c_Re, c_Im, a_Re, a_Im, w.v.re, w.v.im);
  201|   333k|}
_Z8cplxMultPiS_iiss:
  223|  1.74G|                     const FIXP_SGL b_Im) {
  224|  1.74G|  *c_Re = fMult(a_Re, b_Re) - fMult(a_Im, b_Im);
  225|  1.74G|  *c_Im = fMult(a_Re, b_Im) + fMult(a_Im, b_Re);
  226|  1.74G|}
_Z8cplxMultPiS_ii8FIXP_SPK:
  239|  1.44G|                     const FIXP_DBL a_Im, const FIXP_SPK w) {
  240|  1.44G|  cplxMult(c_Re, c_Im, a_Re, a_Im, w.v.re, w.v.im);
  241|  1.44G|}

FDK_hybrid.cpp:_ZL5fft_8Pi:
  171|  5.15M|static void FDK_FORCEINLINE fft_8(FIXP_DBL *x) {
  172|  5.15M|  FIXP_SPK w_PiFOURTH = {{FIXP_SGL(0x5A82), FIXP_SGL(0x5A82)}};
  173|       |
  174|  5.15M|  FIXP_DBL a00, a10, a20, a30;
  175|  5.15M|  FIXP_DBL y[16];
  176|       |
  177|  5.15M|  a00 = (x[0] + x[8]) >> 1;
  178|  5.15M|  a10 = x[4] + x[12];
  179|  5.15M|  a20 = (x[1] + x[9]) >> 1;
  180|  5.15M|  a30 = x[5] + x[13];
  181|       |
  182|  5.15M|  y[0] = a00 + (a10 >> 1);
  183|  5.15M|  y[4] = a00 - (a10 >> 1);
  184|  5.15M|  y[1] = a20 + (a30 >> 1);
  185|  5.15M|  y[5] = a20 - (a30 >> 1);
  186|       |
  187|  5.15M|  a00 = a00 - x[8];
  188|  5.15M|  a10 = (a10 >> 1) - x[12];
  189|  5.15M|  a20 = a20 - x[9];
  190|  5.15M|  a30 = (a30 >> 1) - x[13];
  191|       |
  192|  5.15M|  y[2] = a00 + a30;
  193|  5.15M|  y[6] = a00 - a30;
  194|  5.15M|  y[3] = a20 - a10;
  195|  5.15M|  y[7] = a20 + a10;
  196|       |
  197|  5.15M|  a00 = (x[2] + x[10]) >> 1;
  198|  5.15M|  a10 = x[6] + x[14];
  199|  5.15M|  a20 = (x[3] + x[11]) >> 1;
  200|  5.15M|  a30 = x[7] + x[15];
  201|       |
  202|  5.15M|  y[8] = a00 + (a10 >> 1);
  203|  5.15M|  y[12] = a00 - (a10 >> 1);
  204|  5.15M|  y[9] = a20 + (a30 >> 1);
  205|  5.15M|  y[13] = a20 - (a30 >> 1);
  206|       |
  207|  5.15M|  a00 = a00 - x[10];
  208|  5.15M|  a10 = (a10 >> 1) - x[14];
  209|  5.15M|  a20 = a20 - x[11];
  210|  5.15M|  a30 = (a30 >> 1) - x[15];
  211|       |
  212|  5.15M|  y[10] = a00 + a30;
  213|  5.15M|  y[14] = a00 - a30;
  214|  5.15M|  y[11] = a20 - a10;
  215|  5.15M|  y[15] = a20 + a10;
  216|       |
  217|  5.15M|  FIXP_DBL vr, vi, ur, ui;
  218|       |
  219|  5.15M|  ur = y[0] >> 1;
  220|  5.15M|  ui = y[1] >> 1;
  221|  5.15M|  vr = y[8];
  222|  5.15M|  vi = y[9];
  223|  5.15M|  x[0] = ur + (vr >> 1);
  224|  5.15M|  x[1] = ui + (vi >> 1);
  225|  5.15M|  x[8] = ur - (vr >> 1);
  226|  5.15M|  x[9] = ui - (vi >> 1);
  227|       |
  228|  5.15M|  ur = y[4] >> 1;
  229|  5.15M|  ui = y[5] >> 1;
  230|  5.15M|  vi = y[12];
  231|  5.15M|  vr = y[13];
  232|  5.15M|  x[4] = ur + (vr >> 1);
  233|  5.15M|  x[5] = ui - (vi >> 1);
  234|  5.15M|  x[12] = ur - (vr >> 1);
  235|  5.15M|  x[13] = ui + (vi >> 1);
  236|       |
  237|  5.15M|  ur = y[10];
  238|  5.15M|  ui = y[11];
  239|       |
  240|  5.15M|  cplxMultDiv2(&vi, &vr, ui, ur, w_PiFOURTH);
  241|       |
  242|  5.15M|  ur = y[2];
  243|  5.15M|  ui = y[3];
  244|  5.15M|  x[2] = (ur >> 1) + vr;
  245|  5.15M|  x[3] = (ui >> 1) + vi;
  246|  5.15M|  x[10] = (ur >> 1) - vr;
  247|  5.15M|  x[11] = (ui >> 1) - vi;
  248|       |
  249|  5.15M|  ur = y[14];
  250|  5.15M|  ui = y[15];
  251|       |
  252|  5.15M|  cplxMultDiv2(&vr, &vi, ui, ur, w_PiFOURTH);
  253|       |
  254|  5.15M|  ur = y[6];
  255|  5.15M|  ui = y[7];
  256|  5.15M|  x[6] = (ur >> 1) + vr;
  257|  5.15M|  x[7] = (ui >> 1) - vi;
  258|  5.15M|  x[14] = (ur >> 1) - vr;
  259|  5.15M|  x[15] = (ui >> 1) + vi;
  260|  5.15M|}
fft.cpp:_ZL5fft_8Pi:
  171|  6.13M|static void FDK_FORCEINLINE fft_8(FIXP_DBL *x) {
  172|  6.13M|  FIXP_SPK w_PiFOURTH = {{FIXP_SGL(0x5A82), FIXP_SGL(0x5A82)}};
  173|       |
  174|  6.13M|  FIXP_DBL a00, a10, a20, a30;
  175|  6.13M|  FIXP_DBL y[16];
  176|       |
  177|  6.13M|  a00 = (x[0] + x[8]) >> 1;
  178|  6.13M|  a10 = x[4] + x[12];
  179|  6.13M|  a20 = (x[1] + x[9]) >> 1;
  180|  6.13M|  a30 = x[5] + x[13];
  181|       |
  182|  6.13M|  y[0] = a00 + (a10 >> 1);
  183|  6.13M|  y[4] = a00 - (a10 >> 1);
  184|  6.13M|  y[1] = a20 + (a30 >> 1);
  185|  6.13M|  y[5] = a20 - (a30 >> 1);
  186|       |
  187|  6.13M|  a00 = a00 - x[8];
  188|  6.13M|  a10 = (a10 >> 1) - x[12];
  189|  6.13M|  a20 = a20 - x[9];
  190|  6.13M|  a30 = (a30 >> 1) - x[13];
  191|       |
  192|  6.13M|  y[2] = a00 + a30;
  193|  6.13M|  y[6] = a00 - a30;
  194|  6.13M|  y[3] = a20 - a10;
  195|  6.13M|  y[7] = a20 + a10;
  196|       |
  197|  6.13M|  a00 = (x[2] + x[10]) >> 1;
  198|  6.13M|  a10 = x[6] + x[14];
  199|  6.13M|  a20 = (x[3] + x[11]) >> 1;
  200|  6.13M|  a30 = x[7] + x[15];
  201|       |
  202|  6.13M|  y[8] = a00 + (a10 >> 1);
  203|  6.13M|  y[12] = a00 - (a10 >> 1);
  204|  6.13M|  y[9] = a20 + (a30 >> 1);
  205|  6.13M|  y[13] = a20 - (a30 >> 1);
  206|       |
  207|  6.13M|  a00 = a00 - x[10];
  208|  6.13M|  a10 = (a10 >> 1) - x[14];
  209|  6.13M|  a20 = a20 - x[11];
  210|  6.13M|  a30 = (a30 >> 1) - x[15];
  211|       |
  212|  6.13M|  y[10] = a00 + a30;
  213|  6.13M|  y[14] = a00 - a30;
  214|  6.13M|  y[11] = a20 - a10;
  215|  6.13M|  y[15] = a20 + a10;
  216|       |
  217|  6.13M|  FIXP_DBL vr, vi, ur, ui;
  218|       |
  219|  6.13M|  ur = y[0] >> 1;
  220|  6.13M|  ui = y[1] >> 1;
  221|  6.13M|  vr = y[8];
  222|  6.13M|  vi = y[9];
  223|  6.13M|  x[0] = ur + (vr >> 1);
  224|  6.13M|  x[1] = ui + (vi >> 1);
  225|  6.13M|  x[8] = ur - (vr >> 1);
  226|  6.13M|  x[9] = ui - (vi >> 1);
  227|       |
  228|  6.13M|  ur = y[4] >> 1;
  229|  6.13M|  ui = y[5] >> 1;
  230|  6.13M|  vi = y[12];
  231|  6.13M|  vr = y[13];
  232|  6.13M|  x[4] = ur + (vr >> 1);
  233|  6.13M|  x[5] = ui - (vi >> 1);
  234|  6.13M|  x[12] = ur - (vr >> 1);
  235|  6.13M|  x[13] = ui + (vi >> 1);
  236|       |
  237|  6.13M|  ur = y[10];
  238|  6.13M|  ui = y[11];
  239|       |
  240|  6.13M|  cplxMultDiv2(&vi, &vr, ui, ur, w_PiFOURTH);
  241|       |
  242|  6.13M|  ur = y[2];
  243|  6.13M|  ui = y[3];
  244|  6.13M|  x[2] = (ur >> 1) + vr;
  245|  6.13M|  x[3] = (ui >> 1) + vi;
  246|  6.13M|  x[10] = (ur >> 1) - vr;
  247|  6.13M|  x[11] = (ui >> 1) - vi;
  248|       |
  249|  6.13M|  ur = y[14];
  250|  6.13M|  ui = y[15];
  251|       |
  252|  6.13M|  cplxMultDiv2(&vr, &vi, ui, ur, w_PiFOURTH);
  253|       |
  254|  6.13M|  ur = y[6];
  255|  6.13M|  ui = y[7];
  256|  6.13M|  x[6] = (ur >> 1) + vr;
  257|  6.13M|  x[7] = (ui >> 1) - vi;
  258|  6.13M|  x[14] = (ur >> 1) - vr;
  259|  6.13M|  x[15] = (ui >> 1) + vi;
  260|  6.13M|}
fft.cpp:_ZL5fft_4Pi:
  142|  8.89M|static void FDK_FORCEINLINE fft_4(FIXP_DBL *x) {
  143|  8.89M|  FIXP_DBL a00, a10, a20, a30, tmp0, tmp1;
  144|       |
  145|  8.89M|  a00 = (x[0] + x[4]) >> 1; /* Re A + Re B */
  146|  8.89M|  a10 = (x[2] + x[6]) >> 1; /* Re C + Re D */
  147|  8.89M|  a20 = (x[1] + x[5]) >> 1; /* Im A + Im B */
  148|  8.89M|  a30 = (x[3] + x[7]) >> 1; /* Im C + Im D */
  149|       |
  150|  8.89M|  x[0] = a00 + a10; /* Re A' = Re A + Re B + Re C + Re D */
  151|  8.89M|  x[1] = a20 + a30; /* Im A' = Im A + Im B + Im C + Im D */
  152|       |
  153|  8.89M|  tmp0 = a00 - x[4]; /* Re A - Re B */
  154|  8.89M|  tmp1 = a20 - x[5]; /* Im A - Im B */
  155|       |
  156|  8.89M|  x[4] = a00 - a10; /* Re C' = Re A + Re B - Re C - Re D */
  157|  8.89M|  x[5] = a20 - a30; /* Im C' = Im A + Im B - Im C - Im D */
  158|       |
  159|  8.89M|  a10 = a10 - x[6]; /* Re C - Re D */
  160|  8.89M|  a30 = a30 - x[7]; /* Im C - Im D */
  161|       |
  162|  8.89M|  x[2] = tmp0 + a30; /* Re B' = Re A - Re B + Im C - Im D */
  163|  8.89M|  x[6] = tmp0 - a30; /* Re D' = Re A - Re B - Im C + Im D */
  164|  8.89M|  x[3] = tmp1 - a10; /* Im B' = Im A - Im B - Re C + Re D */
  165|  8.89M|  x[7] = tmp1 + a10; /* Im D' = Im A - Im B + Re C - Re D */
  166|  8.89M|}

_Z14fixmadddiv2_DDiii:
  124|  10.0G|inline FIXP_DBL fixmadddiv2_DD(FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) {
  125|  10.0G|  return (x + fMultDiv2(a, b));
  126|  10.0G|}
_Z14fixmadddiv2_SDisi:
  130|  8.83G|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|  8.83G|  return fixmadddiv2_DD(x, FX_SGL2FX_DBL(a), b);
  ------------------
  |  |  219|  8.83G|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  8.83G|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  8.83G|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  135|  8.83G|#endif
  136|  8.83G|}
_Z14fixmadddiv2_DSiis:
  140|   940M|inline FIXP_DBL fixmadddiv2_DS(FIXP_DBL x, const FIXP_DBL a, const FIXP_SGL b) {
  141|       |#ifdef FUNCTION_fixmadddiv2_SD
  142|       |  return fixmadddiv2_SD(x, b, a);
  143|       |#else
  144|   940M|  return fixmadddiv2_DD(x, a, FX_SGL2FX_DBL(b));
  ------------------
  |  |  219|   940M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   940M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   940M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  145|   940M|#endif
  146|   940M|}
_Z14fixmsubdiv2_DDiii:
  156|  3.34M|inline FIXP_DBL fixmsubdiv2_DD(FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) {
  157|  3.34M|  return (x - fMultDiv2(a, b));
  158|  3.34M|}
_Z10fixmadd_DDiii:
  250|  31.7M|inline FIXP_DBL fixmadd_DD(FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) {
  251|  31.7M|  return fixmadddiv2_DD(x, a, b) << 1;
  252|  31.7M|}
_Z10fixmadd_SDisi:
  255|  2.01M|inline FIXP_DBL fixmadd_SD(FIXP_DBL x, const FIXP_SGL a, const FIXP_DBL b) {
  256|       |#ifdef FUNCTION_fixmadd_DS
  257|       |  return fixmadd_DS(x, b, a);
  258|       |#else
  259|  2.01M|  return fixmadd_DD(x, FX_SGL2FX_DBL(a), b);
  ------------------
  |  |  219|  2.01M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  2.01M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  2.01M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  260|  2.01M|#endif
  261|  2.01M|}
_Z13fixpadddiv2_Dii:
  311|   556M|inline INT fixpadddiv2_D(FIXP_DBL x, const FIXP_DBL a) {
  312|   556M|  return (x + fPow2Div2(a));
  313|   556M|}

_Z6fixminIjET_S0_S0_:
  113|  22.7M|inline T fixmin(T a, T b) {
  114|  22.7M|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 12.5M, False: 10.2M]
  ------------------
  115|  22.7M|}
_Z6fixmaxIiET_S0_S0_:
  118|  8.10G|inline T fixmax(T a, T b) {
  119|  8.10G|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 5.89G, False: 2.21G]
  ------------------
  120|  8.10G|}
_Z6fixminIiET_S0_S0_:
  113|  3.88G|inline T fixmin(T a, T b) {
  114|  3.88G|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 3.16G, False: 727M]
  ------------------
  115|  3.88G|}
_Z6fixminIsET_S0_S0_:
  113|  2.34M|inline T fixmin(T a, T b) {
  114|  2.34M|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 2.16M, False: 174k]
  ------------------
  115|  2.34M|}
_Z6fixmaxIsET_S0_S0_:
  118|  2.15M|inline T fixmax(T a, T b) {
  119|  2.15M|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 1.47M, False: 682k]
  ------------------
  120|  2.15M|}
_Z6fixmaxIjET_S0_S0_:
  118|  9.61M|inline T fixmax(T a, T b) {
  119|  9.61M|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 8.24M, False: 1.37M]
  ------------------
  120|  9.61M|}

_Z13fixmuldiv2_SSss:
  156|   230M|inline LONG fixmuldiv2_SS(const SHORT a, const SHORT b) {
  157|   230M|  return ((LONG)a * b);
  158|   230M|}
_Z9fixmul_SSss:
  163|  41.1M|inline LONG fixmul_SS(const SHORT a, const SHORT b) { return (a * b) << 1; }
_Z13fixmuldiv2_SDsi:
  174|  42.8G|{
  175|  42.8G|  return fixmuldiv2_DD(FX_SGL2FX_DBL(a), b);
  ------------------
  |  |  219|  42.8G|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  42.8G|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  42.8G|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  176|  42.8G|}
_Z13fixmuldiv2_DSis:
  184|  21.8G|{
  185|  21.8G|  return fixmuldiv2_SD(b, a);
  186|  21.8G|}
_Z9fixmul_SDsi:
  224|  12.1G|inline LONG fixmul_SD(const SHORT a, const LONG b) {
  225|       |#ifdef FUNCTION_fixmul_DS
  226|       |  return fixmul_DS(b, a);
  227|       |#else
  228|  12.1G|  return fixmuldiv2_SD(a, b) << 1;
  229|  12.1G|#endif
  230|  12.1G|}
_Z9fixmul_DSis:
  235|  11.1G|inline LONG fixmul_DS(const LONG a, const SHORT b) {
  236|  11.1G|#ifdef FUNCTION_fixmul_SD
  237|  11.1G|  return fixmul_SD(b, a);
  238|       |#else
  239|       |  return fixmuldiv2_DS(a, b) << 1;
  240|       |#endif
  241|  11.1G|}
_Z13fixpow2div2_Di:
  274|  5.92G|inline LONG fixpow2div2_D(const LONG a) { return fixmuldiv2_DD(a, a); }
_Z9fixpow2_Di:
  279|  92.9M|inline LONG fixpow2_D(const LONG a) { return fixpow2div2_D(a) << 1; }
_Z13fixpow2div2_Ss:
  284|  31.0M|inline LONG fixpow2div2_S(const SHORT a) { return fixmuldiv2_SS(a, a); }
_Z9fixpow2_Ss:
  289|  6.64M|inline LONG fixpow2_S(const SHORT a) {
  290|  6.64M|  LONG result = fixpow2div2_S(a) << 1;
  ------------------
  |  |  181|  6.64M|#define LONG INT
  ------------------
  291|  6.64M|  return result ^ (result >> 31);
  292|  6.64M|}

_Z15sqrtFixp_lookupiPi:
  275|   109M|inline FIXP_DBL sqrtFixp_lookup(FIXP_DBL x, INT *x_e) {
  276|   109M|  UINT y = (INT)x;
  277|   109M|  INT e;
  278|       |
  279|   109M|  if (x == (FIXP_DBL)0) {
  ------------------
  |  Branch (279:7): [True: 36.6M, False: 73.1M]
  ------------------
  280|  36.6M|    return x;
  281|  36.6M|  }
  282|       |
  283|       |  /* Normalize */
  284|  73.1M|  e = fixnormz_D(y);
  285|  73.1M|  y <<= e;
  286|  73.1M|  e = *x_e - e + 2;
  287|       |
  288|       |  /* Correct odd exponent. */
  289|  73.1M|  if (e & 1) {
  ------------------
  |  Branch (289:7): [True: 39.4M, False: 33.7M]
  ------------------
  290|  39.4M|    y >>= 1;
  291|  39.4M|    e++;
  292|  39.4M|  }
  293|       |  /* Get square root */
  294|  73.1M|  UINT idx = (y >> 26) - 16;
  295|  73.1M|  USHORT frac = (y >> 10) & 0xffff;
  296|  73.1M|  USHORT nfrac = 0xffff ^ frac;
  297|  73.1M|  UINT t = (UINT)nfrac * sqrt_tab[idx] + (UINT)frac * sqrt_tab[idx + 1];
  298|       |
  299|       |  /* Write back exponent */
  300|  73.1M|  *x_e = e >> 1;
  301|  73.1M|  return (FIXP_DBL)(LONG)(t >> 1);
  302|   109M|}
_Z9fMultNormiiiii:
  487|   353k|                          INT result_e) {
  488|   353k|  FIXP_DBL m;
  489|   353k|  INT e;
  490|       |
  491|   353k|  m = fMultNorm(f1_m, f2_m, &e);
  492|       |
  493|   353k|  m = scaleValueSaturate(m, e + f1_e + f2_e - result_e);
  494|       |
  495|   353k|  return m;
  496|   353k|}
_Z6fMultIii:
  507|  89.4k|inline INT fMultI(FIXP_DBL a, INT b) {
  508|  89.4k|  FIXP_DBL m, mi;
  509|  89.4k|  INT m_e;
  510|       |
  511|  89.4k|  m = fMultNorm(a, (FIXP_DBL)b, &m_e);
  512|       |
  513|  89.4k|  if (m_e < (INT)0) {
  ------------------
  |  Branch (513:7): [True: 3.54k, False: 85.9k]
  ------------------
  514|  3.54k|    if (m_e > (INT)-DFRACT_BITS) {
  ------------------
  |  |  113|  3.54k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (514:9): [True: 2.26k, False: 1.27k]
  ------------------
  515|  2.26k|      m = m >> ((-m_e) - 1);
  516|  2.26k|      mi = (m + (FIXP_DBL)1) >> 1;
  517|  2.26k|    } else {
  518|  1.27k|      mi = (FIXP_DBL)0;
  519|  1.27k|    }
  520|  85.9k|  } else {
  521|  85.9k|    mi = scaleValueSaturate(m, m_e);
  522|  85.9k|  }
  523|       |
  524|  89.4k|  return ((INT)mi);
  525|  89.4k|}
_Z11fMultIfloorii:
  536|  4.26M|inline INT fMultIfloor(FIXP_DBL a, INT b) {
  537|  4.26M|  FIXP_DBL m, mi;
  538|  4.26M|  INT m_e;
  539|       |
  540|  4.26M|  m = fMultNorm(a, (FIXP_DBL)b, &m_e);
  541|       |
  542|  4.26M|  if (m_e < (INT)0) {
  ------------------
  |  Branch (542:7): [True: 3.48M, False: 786k]
  ------------------
  543|  3.48M|    if (m_e > (INT)-DFRACT_BITS) {
  ------------------
  |  |  113|  3.48M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (543:9): [True: 3.30M, False: 171k]
  ------------------
  544|  3.30M|      mi = m >> (-m_e);
  545|  3.30M|    } else {
  546|   171k|      mi = (FIXP_DBL)0;
  547|   171k|      if (m < (FIXP_DBL)0) {
  ------------------
  |  Branch (547:11): [True: 0, False: 171k]
  ------------------
  548|      0|        mi = (FIXP_DBL)-1;
  549|      0|      }
  550|   171k|    }
  551|  3.48M|  } else {
  552|   786k|    mi = scaleValueSaturate(m, m_e);
  553|   786k|  }
  554|       |
  555|  4.26M|  return ((INT)mi);
  556|  4.26M|}
_Z10fMultIceilii:
  567|   962k|inline INT fMultIceil(FIXP_DBL a, INT b) {
  568|   962k|  FIXP_DBL m, mi;
  569|   962k|  INT m_e;
  570|       |
  571|   962k|  m = fMultNorm(a, (FIXP_DBL)b, &m_e);
  572|       |
  573|   962k|  if (m_e < (INT)0) {
  ------------------
  |  Branch (573:7): [True: 962k, False: 0]
  ------------------
  574|   962k|    if (m_e > (INT) - (DFRACT_BITS - 1)) {
  ------------------
  |  |  113|   962k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (574:9): [True: 697k, False: 264k]
  ------------------
  575|   697k|      mi = (m >> (-m_e));
  576|   697k|      if ((LONG)m & ((1 << (-m_e)) - 1)) {
  ------------------
  |  Branch (576:11): [True: 621k, False: 75.6k]
  ------------------
  577|   621k|        mi = mi + (FIXP_DBL)1;
  578|   621k|      }
  579|   697k|    } else {
  580|   264k|      if (m > (FIXP_DBL)0) {
  ------------------
  |  Branch (580:11): [True: 264k, False: 0]
  ------------------
  581|   264k|        mi = (FIXP_DBL)1;
  582|   264k|      } else {
  583|      0|        if ((m_e == -(DFRACT_BITS - 1)) && (m == (FIXP_DBL)MINVAL_DBL)) {
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
                      if ((m_e == -(DFRACT_BITS - 1)) && (m == (FIXP_DBL)MINVAL_DBL)) {
  ------------------
  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (583:13): [True: 0, False: 0]
  |  Branch (583:44): [True: 0, False: 0]
  ------------------
  584|      0|          mi = (FIXP_DBL)-1;
  585|      0|        } else {
  586|      0|          mi = (FIXP_DBL)0;
  587|      0|        }
  588|      0|      }
  589|   264k|    }
  590|   962k|  } else {
  591|      0|    mi = scaleValueSaturate(m, m_e);
  592|      0|  }
  593|       |
  594|   962k|  return ((INT)mi);
  595|   962k|}
_Z7fAdjustiPi:
  642|  3.05M|inline FIXP_DBL fAdjust(FIXP_DBL a_m, INT *pA_e) {
  643|  3.05M|  INT shift;
  644|       |
  645|  3.05M|  shift = fNorm(a_m) - 1;
  646|  3.05M|  *pA_e -= shift;
  647|       |
  648|  3.05M|  return scaleValue(a_m, shift);
  649|  3.05M|}
_Z8fAddNormiiiiPi:
  663|  1.54M|                         INT *pResult_e) {
  664|  1.54M|  INT result_e;
  665|  1.54M|  FIXP_DBL result_m;
  666|       |
  667|       |  /* If one of the summands is zero, return the other.
  668|       |     This is necessary for the summation of a very small number to zero */
  669|  1.54M|  if (a_m == (FIXP_DBL)0) {
  ------------------
  |  Branch (669:7): [True: 16.5k, False: 1.52M]
  ------------------
  670|  16.5k|    *pResult_e = b_e;
  671|  16.5k|    return b_m;
  672|  16.5k|  }
  673|  1.52M|  if (b_m == (FIXP_DBL)0) {
  ------------------
  |  Branch (673:7): [True: 710, False: 1.52M]
  ------------------
  674|    710|    *pResult_e = a_e;
  675|    710|    return a_m;
  676|    710|  }
  677|       |
  678|  1.52M|  a_m = fAdjust(a_m, &a_e);
  679|  1.52M|  b_m = fAdjust(b_m, &b_e);
  680|       |
  681|  1.52M|  if (a_e > b_e) {
  ------------------
  |  Branch (681:7): [True: 1.10M, False: 418k]
  ------------------
  682|  1.10M|    result_m = a_m + (b_m >> fMin(a_e - b_e, DFRACT_BITS - 1));
  ------------------
  |  |  113|  1.10M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  683|  1.10M|    result_e = a_e;
  684|  1.10M|  } else {
  685|   418k|    result_m = (a_m >> fMin(b_e - a_e, DFRACT_BITS - 1)) + b_m;
  ------------------
  |  |  113|   418k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  686|   418k|    result_e = b_e;
  687|   418k|  }
  688|       |
  689|  1.52M|  *pResult_e = result_e;
  690|  1.52M|  return result_m;
  691|  1.52M|}
_Z12fAddSaturatess:
  896|  5.17M|inline FIXP_SGL fAddSaturate(const FIXP_SGL a, const FIXP_SGL b) {
  897|  5.17M|  LONG sum;
  ------------------
  |  |  181|  5.17M|#define LONG INT
  ------------------
  898|       |
  899|  5.17M|  sum = (LONG)(SHORT)a + (LONG)(SHORT)b;
  900|  5.17M|  sum = fMax(fMin((INT)sum, (INT)MAXVAL_SGL), (INT)MINVAL_SGL);
  ------------------
  |  |  152|  5.17M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
                sum = fMax(fMin((INT)sum, (INT)MAXVAL_SGL), (INT)MINVAL_SGL);
  ------------------
  |  |  154|  5.17M|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  ------------------
  901|  5.17M|  return (FIXP_SGL)(SHORT)sum;
  902|  5.17M|}
_Z12fAddSaturateii:
  910|  1.39G|inline FIXP_DBL fAddSaturate(const FIXP_DBL a, const FIXP_DBL b) {
  911|  1.39G|  LONG sum;
  ------------------
  |  |  181|  1.39G|#define LONG INT
  ------------------
  912|       |
  913|  1.39G|  sum = (LONG)(a >> 1) + (LONG)(b >> 1);
  914|  1.39G|  sum = fMax(fMin((INT)sum, (INT)(MAXVAL_DBL >> 1)), (INT)(MINVAL_DBL >> 1));
  ------------------
  |  |  156|  1.39G|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
                sum = fMax(fMin((INT)sum, (INT)(MAXVAL_DBL >> 1)), (INT)(MINVAL_DBL >> 1));
  ------------------
  |  |  158|  1.39G|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  915|  1.39G|  return (FIXP_DBL)(LONG)(sum << 1);
  916|  1.39G|}
_Z9GetInvInti:
  948|  1.96M|inline FIXP_DBL GetInvInt(int intValue) {
  949|  1.96M|  return invCount[fMin(fMax(intValue, 0), 80 - 1)];
  950|  1.96M|}
env_calc.cpp:_ZL11fIsLessThaniiii:
  173|   439k|FDK_INLINE INT fIsLessThan(FIXP_DBL a_m, INT a_e, FIXP_DBL b_m, INT b_e) {
  174|   439k|  INT n;
  175|       |
  176|   439k|  n = fixnorm_D(a_m);
  177|   439k|  a_m <<= n;
  178|   439k|  a_e -= n;
  179|       |
  180|   439k|  n = fixnorm_D(b_m);
  181|   439k|  b_m <<= n;
  182|   439k|  b_e -= n;
  183|       |
  184|   439k|  if (a_m == (FIXP_DBL)0) a_e = b_e;
  ------------------
  |  Branch (184:7): [True: 19.2k, False: 419k]
  ------------------
  185|   439k|  if (b_m == (FIXP_DBL)0) b_e = a_e;
  ------------------
  |  Branch (185:7): [True: 0, False: 439k]
  ------------------
  186|       |
  187|   439k|  if (a_e > b_e) {
  ------------------
  |  Branch (187:7): [True: 394k, False: 44.4k]
  ------------------
  188|   394k|    return ((b_m >> fMin(a_e - b_e, DFRACT_BITS - 1)) > a_m);
  ------------------
  |  |  113|   394k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  189|   394k|  } else {
  190|  44.4k|    return ((a_m >> fMin(b_e - a_e, DFRACT_BITS - 1)) < b_m);
  ------------------
  |  |  113|  44.4k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  191|  44.4k|  }
  192|   439k|}
env_calc.cpp:_ZL5fLog2iiPi:
  807|  1.61M|FDK_INLINE FIXP_DBL fLog2(FIXP_DBL x_m, INT x_e, INT *result_e) {
  808|  1.61M|  FIXP_DBL result_m;
  809|       |
  810|       |  /* Short cut for zero and negative numbers. */
  811|  1.61M|  if (x_m <= FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  1.61M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.61M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.61M, Folded]
  |  |  ------------------
  |  |  194|  1.61M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.61M]
  |  |  ------------------
  |  |  195|  1.61M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.61M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.61M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.61M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.61M|          : ((((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: 1.61M]
  ------------------
  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|  1.61M|  {
  818|  1.61M|    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|  1.61M|    {
  823|  1.61M|      INT b_norm;
  824|       |
  825|  1.61M|      b_norm = fNormz(x_m) - 1;
  826|  1.61M|      x2_m = x_m << b_norm;
  827|  1.61M|      x_e = x_e - b_norm;
  828|  1.61M|    }
  829|       |
  830|       |    /* map x from log(x) domain to log(1-x) domain. */
  831|  1.61M|    x2_m = -(x2_m + FL2FXCONST_DBL(-1.0));
  ------------------
  |  |  192|  1.61M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.61M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 1.61M]
  |  |  ------------------
  |  |  194|  1.61M|          ? ((((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|  1.61M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 1.61M, Folded]
  |  |  ------------------
  |  |  199|  1.61M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  1.61M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  1.61M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  1.61M|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  1.61M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  1.61M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  1.61M|                 : (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|  1.61M|    {
  835|  1.61M|      FIXP_DBL px2_m;
  836|  1.61M|      result_m = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|  1.61M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.61M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.61M, Folded]
  |  |  ------------------
  |  |  194|  1.61M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.61M]
  |  |  ------------------
  |  |  195|  1.61M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.61M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.61M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.61M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.61M|          : ((((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|  1.61M|      px2_m = x2_m;
  838|  17.7M|      for (int i = 0; i < LD_PRECISION; i++) {
  ------------------
  |  |  117|  17.7M|#define LD_PRECISION 10
  ------------------
  |  Branch (838:23): [True: 16.1M, False: 1.61M]
  ------------------
  839|  16.1M|        result_m = fMultAddDiv2(result_m, ldCoeff[i], px2_m);
  840|  16.1M|        px2_m = fMult(px2_m, x2_m);
  841|  16.1M|      }
  842|  1.61M|    }
  843|       |    /* Multiply result with 1/ln(2) = 1.0 + 0.442695040888 (get log2(x) from
  844|       |     * ln(x) result). */
  845|  1.61M|    result_m =
  846|  1.61M|        fMultAddDiv2(result_m, result_m,
  847|  1.61M|                     FL2FXCONST_DBL(2.0 * 0.4426950408889634073599246810019));
  ------------------
  |  |  192|  1.61M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.61M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.61M, Folded]
  |  |  ------------------
  |  |  194|  1.61M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.61M]
  |  |  ------------------
  |  |  195|  1.61M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.61M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.61M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.61M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.61M|          : ((((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|  1.61M|    if (x_e != 0) {
  ------------------
  |  Branch (850:9): [True: 1.61M, False: 0]
  ------------------
  851|  1.61M|      int enorm;
  852|       |
  853|  1.61M|      enorm = DFRACT_BITS - fNorm((FIXP_DBL)x_e);
  ------------------
  |  |  113|  1.61M|#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|  1.61M|      result_m = (result_m >> (enorm - 1)) +
  857|  1.61M|                 ((FIXP_DBL)x_e << (DFRACT_BITS - 1 - enorm));
  ------------------
  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  858|       |
  859|  1.61M|      *result_e = enorm;
  860|  1.61M|    } else {
  861|       |      /* 1 compensates the fMultDiv2() above in the taylor polynomial evaluation
  862|       |       * loop.*/
  863|      0|      *result_e = 1;
  864|      0|    }
  865|  1.61M|  }
  866|       |
  867|  1.61M|  return result_m;
  868|  1.61M|}
fixpoint_math.cpp:_ZL5fLog2iiPi:
  807|  3.96M|FDK_INLINE FIXP_DBL fLog2(FIXP_DBL x_m, INT x_e, INT *result_e) {
  808|  3.96M|  FIXP_DBL result_m;
  809|       |
  810|       |  /* Short cut for zero and negative numbers. */
  811|  3.96M|  if (x_m <= FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  3.96M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.96M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.96M, Folded]
  |  |  ------------------
  |  |  194|  3.96M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.96M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.96M]
  |  |  ------------------
  |  |  195|  3.96M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.96M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.96M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.96M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.96M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.96M|          : ((((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: 3.96M]
  ------------------
  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|  3.96M|  {
  818|  3.96M|    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|  3.96M|    {
  823|  3.96M|      INT b_norm;
  824|       |
  825|  3.96M|      b_norm = fNormz(x_m) - 1;
  826|  3.96M|      x2_m = x_m << b_norm;
  827|  3.96M|      x_e = x_e - b_norm;
  828|  3.96M|    }
  829|       |
  830|       |    /* map x from log(x) domain to log(1-x) domain. */
  831|  3.96M|    x2_m = -(x2_m + FL2FXCONST_DBL(-1.0));
  ------------------
  |  |  192|  3.96M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.96M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 3.96M]
  |  |  ------------------
  |  |  194|  3.96M|          ? ((((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.96M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  3.96M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 3.96M, Folded]
  |  |  ------------------
  |  |  199|  3.96M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  3.96M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  3.96M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  3.96M|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  3.96M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  3.96M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  3.96M|                 : (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|  3.96M|    {
  835|  3.96M|      FIXP_DBL px2_m;
  836|  3.96M|      result_m = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|  3.96M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.96M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.96M, Folded]
  |  |  ------------------
  |  |  194|  3.96M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.96M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.96M]
  |  |  ------------------
  |  |  195|  3.96M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.96M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.96M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.96M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.96M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.96M|          : ((((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|  3.96M|      px2_m = x2_m;
  838|  43.6M|      for (int i = 0; i < LD_PRECISION; i++) {
  ------------------
  |  |  117|  43.6M|#define LD_PRECISION 10
  ------------------
  |  Branch (838:23): [True: 39.6M, False: 3.96M]
  ------------------
  839|  39.6M|        result_m = fMultAddDiv2(result_m, ldCoeff[i], px2_m);
  840|  39.6M|        px2_m = fMult(px2_m, x2_m);
  841|  39.6M|      }
  842|  3.96M|    }
  843|       |    /* Multiply result with 1/ln(2) = 1.0 + 0.442695040888 (get log2(x) from
  844|       |     * ln(x) result). */
  845|  3.96M|    result_m =
  846|  3.96M|        fMultAddDiv2(result_m, result_m,
  847|  3.96M|                     FL2FXCONST_DBL(2.0 * 0.4426950408889634073599246810019));
  ------------------
  |  |  192|  3.96M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.96M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.96M, Folded]
  |  |  ------------------
  |  |  194|  3.96M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.96M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.96M]
  |  |  ------------------
  |  |  195|  3.96M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.96M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.96M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.96M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.96M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.96M|          : ((((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|  3.96M|    if (x_e != 0) {
  ------------------
  |  Branch (850:9): [True: 3.96M, False: 1.40k]
  ------------------
  851|  3.96M|      int enorm;
  852|       |
  853|  3.96M|      enorm = DFRACT_BITS - fNorm((FIXP_DBL)x_e);
  ------------------
  |  |  113|  3.96M|#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|  3.96M|      result_m = (result_m >> (enorm - 1)) +
  857|  3.96M|                 ((FIXP_DBL)x_e << (DFRACT_BITS - 1 - enorm));
  ------------------
  |  |  113|  3.96M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  858|       |
  859|  3.96M|      *result_e = enorm;
  860|  3.96M|    } else {
  861|       |      /* 1 compensates the fMultDiv2() above in the taylor polynomial evaluation
  862|       |       * loop.*/
  863|  1.40k|      *result_e = 1;
  864|  1.40k|    }
  865|  3.96M|  }
  866|       |
  867|  3.96M|  return result_m;
  868|  3.96M|}
sac_stp.cpp:_ZL5fLog2ii:
  876|   240k|FDK_INLINE FIXP_DBL fLog2(FIXP_DBL x_m, INT x_e) {
  877|   240k|  if (x_m <= FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   240k|  (FIXP_DBL)(                                                                \
  |  |  193|   240k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 240k, Folded]
  |  |  ------------------
  |  |  194|   240k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 240k]
  |  |  ------------------
  |  |  195|   240k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   240k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   240k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   240k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   240k|          : ((((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 (877:7): [True: 0, False: 240k]
  ------------------
  878|      0|    x_m = 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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  879|   240k|  } else {
  880|   240k|    INT result_e;
  881|   240k|    x_m = fLog2(x_m, x_e, &result_e);
  882|   240k|    x_m = scaleValue(x_m, result_e - LD_DATA_SHIFT);
  ------------------
  |  |  114|   240k|#define LD_DATA_SHIFT 6 /* pow(2, LD_DATA_SHIFT) = LD_DATA_SCALING */
  ------------------
  883|   240k|  }
  884|   240k|  return x_m;
  885|   240k|}
sac_stp.cpp:_ZL5fLog2iiPi:
  807|   240k|FDK_INLINE FIXP_DBL fLog2(FIXP_DBL x_m, INT x_e, INT *result_e) {
  808|   240k|  FIXP_DBL result_m;
  809|       |
  810|       |  /* Short cut for zero and negative numbers. */
  811|   240k|  if (x_m <= FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   240k|  (FIXP_DBL)(                                                                \
  |  |  193|   240k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 240k, Folded]
  |  |  ------------------
  |  |  194|   240k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 240k]
  |  |  ------------------
  |  |  195|   240k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   240k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   240k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   240k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   240k|          : ((((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: 240k]
  ------------------
  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|   240k|  {
  818|   240k|    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|   240k|    {
  823|   240k|      INT b_norm;
  824|       |
  825|   240k|      b_norm = fNormz(x_m) - 1;
  826|   240k|      x2_m = x_m << b_norm;
  827|   240k|      x_e = x_e - b_norm;
  828|   240k|    }
  829|       |
  830|       |    /* map x from log(x) domain to log(1-x) domain. */
  831|   240k|    x2_m = -(x2_m + FL2FXCONST_DBL(-1.0));
  ------------------
  |  |  192|   240k|  (FIXP_DBL)(                                                                \
  |  |  193|   240k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 240k]
  |  |  ------------------
  |  |  194|   240k|          ? ((((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|   240k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 240k, Folded]
  |  |  ------------------
  |  |  199|   240k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   240k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   240k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   240k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|   240k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   240k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|   240k|                 : (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|   240k|    {
  835|   240k|      FIXP_DBL px2_m;
  836|   240k|      result_m = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|   240k|  (FIXP_DBL)(                                                                \
  |  |  193|   240k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 240k, Folded]
  |  |  ------------------
  |  |  194|   240k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 240k]
  |  |  ------------------
  |  |  195|   240k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   240k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   240k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   240k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   240k|          : ((((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|   240k|      px2_m = x2_m;
  838|  2.64M|      for (int i = 0; i < LD_PRECISION; i++) {
  ------------------
  |  |  117|  2.64M|#define LD_PRECISION 10
  ------------------
  |  Branch (838:23): [True: 2.40M, False: 240k]
  ------------------
  839|  2.40M|        result_m = fMultAddDiv2(result_m, ldCoeff[i], px2_m);
  840|  2.40M|        px2_m = fMult(px2_m, x2_m);
  841|  2.40M|      }
  842|   240k|    }
  843|       |    /* Multiply result with 1/ln(2) = 1.0 + 0.442695040888 (get log2(x) from
  844|       |     * ln(x) result). */
  845|   240k|    result_m =
  846|   240k|        fMultAddDiv2(result_m, result_m,
  847|   240k|                     FL2FXCONST_DBL(2.0 * 0.4426950408889634073599246810019));
  ------------------
  |  |  192|   240k|  (FIXP_DBL)(                                                                \
  |  |  193|   240k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 240k, Folded]
  |  |  ------------------
  |  |  194|   240k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 240k]
  |  |  ------------------
  |  |  195|   240k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   240k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   240k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   240k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   240k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   240k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   240k|          : ((((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|   240k|    if (x_e != 0) {
  ------------------
  |  Branch (850:9): [True: 184k, False: 55.3k]
  ------------------
  851|   184k|      int enorm;
  852|       |
  853|   184k|      enorm = DFRACT_BITS - fNorm((FIXP_DBL)x_e);
  ------------------
  |  |  113|   184k|#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|   184k|      result_m = (result_m >> (enorm - 1)) +
  857|   184k|                 ((FIXP_DBL)x_e << (DFRACT_BITS - 1 - enorm));
  ------------------
  |  |  113|   184k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  858|       |
  859|   184k|      *result_e = enorm;
  860|   184k|    } else {
  861|       |      /* 1 compensates the fMultDiv2() above in the taylor polynomial evaluation
  862|       |       * loop.*/
  863|  55.3k|      *result_e = 1;
  864|  55.3k|    }
  865|   240k|  }
  866|       |
  867|   240k|  return result_m;
  868|   240k|}
sac_stp.cpp:_ZL13CalcInvLdDatai:
  228|  53.7k|FDK_INLINE FIXP_DBL CalcInvLdData(const FIXP_DBL x) {
  229|  53.7k|  int set_zero = (x < FL2FXCONST_DBL(-31.0 / 64.0)) ? 0 : 1;
  ------------------
  |  |  192|  53.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  53.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 53.7k]
  |  |  ------------------
  |  |  194|  53.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  53.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 53.7k]
  |  |  ------------------
  |  |  199|  53.7k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  53.7k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  53.7k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  53.7k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  53.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (229:18): [True: 0, False: 53.7k]
  ------------------
  230|  53.7k|  int set_max = (x >= FL2FXCONST_DBL(31.0 / 64.0)) | (x == FL2FXCONST_DBL(0.0));
  ------------------
  |  |  192|  53.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  53.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 53.7k, Folded]
  |  |  ------------------
  |  |  194|  53.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 53.7k]
  |  |  ------------------
  |  |  195|  53.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  53.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  53.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  53.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  53.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                int set_max = (x >= FL2FXCONST_DBL(31.0 / 64.0)) | (x == FL2FXCONST_DBL(0.0));
  ------------------
  |  |  192|  53.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  53.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 53.7k, Folded]
  |  |  ------------------
  |  |  194|  53.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 53.7k]
  |  |  ------------------
  |  |  195|  53.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  53.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  53.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  53.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  53.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  231|       |
  232|  53.7k|  FIXP_SGL frac = (FIXP_SGL)((LONG)x & 0x3FF);
  233|  53.7k|  UINT index3 = (UINT)(LONG)(x >> 10) & 0x1F;
  234|  53.7k|  UINT index2 = (UINT)(LONG)(x >> 15) & 0x1F;
  235|  53.7k|  UINT index1 = (UINT)(LONG)(x >> 20) & 0x1F;
  236|  53.7k|  int exp = fMin(31, ((x > FL2FXCONST_DBL(0.0f)) ? (31 - (int)(x >> 25))
  ------------------
  |  |  192|  53.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  53.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 53.7k, Folded]
  |  |  ------------------
  |  |  194|  53.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 53.7k]
  |  |  ------------------
  |  |  195|  53.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  53.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  53.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  53.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  53.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  53.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (236:23): [True: 0, False: 53.7k]
  ------------------
  237|  53.7k|                                                 : (int)(-(x >> 25))));
  238|       |
  239|  53.7k|  UINT lookup1 = exp2_tab_long[index1] * set_zero;
  240|  53.7k|  UINT lookup2 = exp2w_tab_long[index2];
  241|  53.7k|  UINT lookup3 = exp2x_tab_long[index3];
  242|  53.7k|  UINT lookup3f =
  243|  53.7k|      lookup3 + (UINT)(LONG)fMultDiv2((FIXP_DBL)(0x0016302F), (FIXP_SGL)frac);
  244|       |
  245|  53.7k|  UINT lookup12 = (UINT)(LONG)fMult((FIXP_DBL)lookup1, (FIXP_DBL)lookup2);
  246|  53.7k|  UINT lookup = (UINT)(LONG)fMult((FIXP_DBL)lookup12, (FIXP_DBL)lookup3f);
  247|       |
  248|  53.7k|  FIXP_DBL retVal = (lookup << 3) >> exp;
  249|       |
  250|  53.7k|  if (set_max) {
  ------------------
  |  Branch (250:7): [True: 0, False: 53.7k]
  ------------------
  251|      0|    retVal = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  252|      0|  }
  253|       |
  254|  53.7k|  return retVal;
  255|  53.7k|}

_Z22qmfSynPrototypeFirSlotP15QMF_FILTER_BANKPiS1_S1_i:
  137|  18.7M|    int stride) {
  138|  18.7M|  FIXP_QSS *FilterStates = (FIXP_QSS *)qmf->FilterStates;
  ------------------
  |  |  121|  18.7M|#define FIXP_QSS FIXP_DBL
  ------------------
  139|  18.7M|  int no_channels = qmf->no_channels;
  140|  18.7M|  const FIXP_PFT *p_Filter = qmf->p_filter;
  141|  18.7M|  int p_stride = qmf->p_stride;
  142|  18.7M|  int j;
  143|  18.7M|  FIXP_QSS *RESTRICT sta = FilterStates;
  ------------------
  |  |  121|  18.7M|#define FIXP_QSS FIXP_DBL
  ------------------
  144|  18.7M|  const FIXP_PFT *RESTRICT p_flt, *RESTRICT p_fltm;
  145|  18.7M|  int scale = (DFRACT_BITS - SAMPLE_BITS_QMFOUT) - 1 - qmf->outScalefactor -
  ------------------
  |  |  113|  18.7M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                int scale = (DFRACT_BITS - SAMPLE_BITS_QMFOUT) - 1 - qmf->outScalefactor -
  ------------------
  |  |  828|  18.7M|#define SAMPLE_BITS_QMFOUT 32
  ------------------
  146|  18.7M|              qmf->outGain_e;
  147|       |
  148|  18.7M|  p_flt =
  149|  18.7M|      p_Filter + p_stride * QMF_NO_POLY; /*                     5th of 330 */
  ------------------
  |  |  213|  18.7M|#define QMF_NO_POLY 5
  ------------------
  150|  18.7M|  p_fltm = p_Filter + (qmf->FilterSize / 2) -
  151|  18.7M|           p_stride * QMF_NO_POLY; /* 5 + (320 - 2*5) = 315th of 330 */
  ------------------
  |  |  213|  18.7M|#define QMF_NO_POLY 5
  ------------------
  152|       |
  153|  18.7M|  FIXP_SGL gain = FX_DBL2FX_SGL(qmf->outGain_m);
  ------------------
  |  |  220|  18.7M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  18.7M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  18.7M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  154|       |
  155|  18.7M|  FIXP_DBL rnd_val = 0;
  156|       |
  157|  18.7M|  if (scale > 0) {
  ------------------
  |  Branch (157:7): [True: 0, False: 18.7M]
  ------------------
  158|      0|    if (scale < (DFRACT_BITS - 1))
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (158:9): [True: 0, False: 0]
  ------------------
  159|      0|      rnd_val = FIXP_DBL(1 << (scale - 1));
  160|      0|    else
  161|      0|      scale = (DFRACT_BITS - 1);
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  162|  18.7M|  } else {
  163|  18.7M|    scale = fMax(scale, -(DFRACT_BITS - 1));
  ------------------
  |  |  113|  18.7M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  164|  18.7M|  }
  165|       |
  166|   985M|  for (j = no_channels - 1; j >= 0; j--) {
  ------------------
  |  Branch (166:29): [True: 966M, False: 18.7M]
  ------------------
  167|   966M|    FIXP_DBL imag = imagSlot[j]; /* no_channels-1 .. 0 */
  168|   966M|    FIXP_DBL real = realSlot[j]; /* no_channels-1 .. 0 */
  169|   966M|    {
  170|   966M|      INT_PCM_QMFOUT tmp;
  ------------------
  |  |  827|   966M|#define INT_PCM_QMFOUT LONG
  |  |  ------------------
  |  |  |  |  181|   966M|#define LONG INT
  |  |  ------------------
  ------------------
  171|   966M|      FIXP_DBL Are = fMultAddDiv2(FX_QSS2FX_DBL(sta[0]), p_fltm[0], real);
  ------------------
  |  |  119|   966M|#define FX_QSS2FX_DBL(x) (x)
  ------------------
  172|       |
  173|       |      /* This PCM formatting performs:
  174|       |         - multiplication with 16-bit gain, if not -1.0f
  175|       |         - rounding, if shift right is applied
  176|       |         - apply shift left (or right) with saturation to 32 (or 16) bits
  177|       |         - store output with --stride in 32 (or 16) bit format
  178|       |      */
  179|   966M|      if (gain != (FIXP_SGL)(-32768)) /* -1.0f */
  ------------------
  |  Branch (179:11): [True: 0, False: 966M]
  ------------------
  180|      0|      {
  181|      0|        Are = fMult(Are, gain);
  182|      0|      }
  183|   966M|      if (scale >= 0) {
  ------------------
  |  Branch (183:11): [True: 273k, False: 966M]
  ------------------
  184|   273k|        FDK_ASSERT(
  ------------------
  |  |  221|   273k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (184:9): [True: 273k, False: 0]
  ------------------
  185|   273k|            Are <=
  186|   273k|            (Are + rnd_val)); /* Round-addition must not overflow, might be
  187|       |                                 equal for rnd_val=0 */
  188|   273k|        tmp = (INT_PCM_QMFOUT)(
  189|   273k|            SATURATE_RIGHT_SHIFT(Are + rnd_val, scale, SAMPLE_BITS_QMFOUT));
  ------------------
  |  |  242|   273k|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  ------------------
  |  |  |  Branch (242:4): [True: 0, False: 273k]
  |  |  ------------------
  |  |  243|   273k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  244|   273k|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  ------------------
  |  |  |  Branch (244:10): [True: 0, False: 273k]
  |  |  ------------------
  |  |  245|   273k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  246|   273k|             : ((LONG)(src) >> (scale)))
  ------------------
  190|   966M|      } else {
  191|   966M|        tmp = (INT_PCM_QMFOUT)(
  192|   966M|            SATURATE_LEFT_SHIFT(Are, -scale, SAMPLE_BITS_QMFOUT));
  ------------------
  |  |  251|   966M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 521k, False: 965M]
  |  |  ------------------
  |  |  252|   966M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|   966M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 532k, False: 965M]
  |  |  ------------------
  |  |  254|   965M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|   965M|             : ((LONG)(src) << (scale)))
  ------------------
  193|   966M|      }
  194|       |
  195|   966M|      { timeOut[(j)*stride] = tmp; }
  196|   966M|    }
  197|       |
  198|   966M|    sta[0] = FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[1]), p_flt[4], imag));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  199|   966M|    sta[1] =
  200|   966M|        FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[2]), p_fltm[1], real));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  201|   966M|    sta[2] = FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[3]), p_flt[3], imag));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  202|   966M|    sta[3] =
  203|   966M|        FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[4]), p_fltm[2], real));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  204|   966M|    sta[4] = FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[5]), p_flt[2], imag));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  205|   966M|    sta[5] =
  206|   966M|        FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[6]), p_fltm[3], real));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  207|   966M|    sta[6] = FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[7]), p_flt[1], imag));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  208|   966M|    sta[7] =
  209|   966M|        FX_DBL2FX_QSS(fMultAddDiv2(FX_QSS2FX_DBL(sta[8]), p_fltm[4], real));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  210|   966M|    sta[8] = FX_DBL2FX_QSS(fMultDiv2(p_flt[0], imag));
  ------------------
  |  |  118|   966M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  211|   966M|    p_flt += (p_stride * QMF_NO_POLY);
  ------------------
  |  |  213|   966M|#define QMF_NO_POLY 5
  ------------------
  212|   966M|    p_fltm -= (p_stride * QMF_NO_POLY);
  ------------------
  |  |  213|   966M|#define QMF_NO_POLY 5
  ------------------
  213|   966M|    sta += 9;  // = (2*QMF_NO_POLY-1);
  214|   966M|  }
  215|  18.7M|}
_Z25qmfSynthesisFilteringSlotP15QMF_FILTER_BANKPKiS2_iiPiiS3_:
  311|  21.9M|                               FIXP_DBL *pWorkBuffer) {
  312|  21.9M|  if (!(synQmf->flags & QMF_FLAG_LP))
  ------------------
  |  |  126|  21.9M|#define QMF_FLAG_LP 1
  ------------------
  |  Branch (312:7): [True: 14.3M, False: 7.58M]
  ------------------
  313|  14.3M|    qmfInverseModulationHQ(synQmf, realSlot, imagSlot, scaleFactorLowBand,
  314|  14.3M|                           scaleFactorHighBand, pWorkBuffer);
  315|  7.58M|  else {
  316|  7.58M|    if (synQmf->flags & QMF_FLAG_CLDFB) {
  ------------------
  |  |  133|  7.58M|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (316:9): [True: 1.99M, False: 5.58M]
  ------------------
  317|  1.99M|      qmfInverseModulationLP_odd(synQmf, realSlot, scaleFactorLowBand,
  318|  1.99M|                                 scaleFactorHighBand, pWorkBuffer);
  319|  5.58M|    } else {
  320|  5.58M|      qmfInverseModulationLP_even(synQmf, realSlot, scaleFactorLowBand,
  321|  5.58M|                                  scaleFactorHighBand, pWorkBuffer);
  322|  5.58M|    }
  323|  7.58M|  }
  324|       |
  325|  21.9M|  if (synQmf->flags & QMF_FLAG_NONSYMMETRIC) {
  ------------------
  |  |  131|  21.9M|#define QMF_FLAG_NONSYMMETRIC 2
  ------------------
  |  Branch (325:7): [True: 3.18M, False: 18.7M]
  ------------------
  326|  3.18M|    qmfSynPrototypeFirSlot_NonSymmetric(synQmf, pWorkBuffer,
  327|  3.18M|                                        pWorkBuffer + synQmf->no_channels,
  328|  3.18M|                                        timeOut, stride);
  329|  18.7M|  } else {
  330|  18.7M|    qmfSynPrototypeFirSlot(synQmf, pWorkBuffer,
  331|  18.7M|                           pWorkBuffer + synQmf->no_channels, timeOut, stride);
  332|  18.7M|  }
  333|  21.9M|}
_Z21qmfSynthesisFilteringP15QMF_FILTER_BANKPPiS2_PK16QMF_SCALE_FACTORiS1_iS1_:
  374|   318k|) {
  375|   318k|  int i;
  376|   318k|  int L = synQmf->no_channels;
  377|   318k|  int scaleFactorHighBand;
  378|   318k|  int scaleFactorLowBand_ov, scaleFactorLowBand_no_ov;
  379|       |
  380|   318k|  FDK_ASSERT(synQmf->no_channels >= synQmf->lsb);
  ------------------
  |  |  221|   318k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (380:3): [True: 318k, False: 0]
  ------------------
  381|   318k|  FDK_ASSERT(synQmf->no_channels >= synQmf->usb);
  ------------------
  |  |  221|   318k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 318k, False: 0]
  ------------------
  382|       |
  383|       |  /* adapt scaling */
  384|   318k|  scaleFactorHighBand = -ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK -
  ------------------
  |  |  156|   318k|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  385|   318k|                        scaleFactor->hb_scale - synQmf->filterScale;
  386|   318k|  scaleFactorLowBand_ov = -ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK -
  ------------------
  |  |  156|   318k|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  387|   318k|                          scaleFactor->ov_lb_scale - synQmf->filterScale;
  388|   318k|  scaleFactorLowBand_no_ov = -ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK -
  ------------------
  |  |  156|   318k|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  389|   318k|                             scaleFactor->lb_scale - synQmf->filterScale;
  390|       |
  391|  9.27M|  for (i = 0; i < synQmf->no_col; i++) /* ----- no_col loop ----- */
  ------------------
  |  Branch (391:15): [True: 8.95M, False: 318k]
  ------------------
  392|  8.95M|  {
  393|  8.95M|    const FIXP_DBL *QmfBufferImagSlot = NULL;
  394|       |
  395|  8.95M|    int scaleFactorLowBand =
  396|  8.95M|        (i < ov_len) ? scaleFactorLowBand_ov : scaleFactorLowBand_no_ov;
  ------------------
  |  Branch (396:9): [True: 1.30M, False: 7.64M]
  ------------------
  397|       |
  398|  8.95M|    if (!(synQmf->flags & QMF_FLAG_LP)) QmfBufferImagSlot = QmfBufferImag[i];
  ------------------
  |  |  126|  8.95M|#define QMF_FLAG_LP 1
  ------------------
  |  Branch (398:9): [True: 5.91M, False: 3.04M]
  ------------------
  399|       |
  400|  8.95M|    qmfSynthesisFilteringSlot(synQmf, QmfBufferReal[i], QmfBufferImagSlot,
  401|  8.95M|                              scaleFactorLowBand, scaleFactorHighBand,
  402|  8.95M|                              timeOut + (i * L * stride), stride, pWorkBuffer);
  403|  8.95M|  } /* no_col loop  i  */
  404|   318k|}
_Z25qmfInitAnalysisFilterBankP15QMF_FILTER_BANKPiiiiii:
  422|   120k|{
  423|   120k|  int err = qmfInitFilterBank(h_Qmf, pFilterStates, noCols, lsb, usb,
  424|   120k|                              no_channels, flags, 0);
  425|   120k|  if (!(flags & QMF_FLAG_KEEP_STATES) && (h_Qmf->FilterStates != NULL)) {
  ------------------
  |  |  135|   120k|#define QMF_FLAG_KEEP_STATES 8
  ------------------
  |  Branch (425:7): [True: 82.7k, False: 37.4k]
  |  Branch (425:42): [True: 82.7k, False: 6]
  ------------------
  426|  82.7k|    FDKmemclear(h_Qmf->FilterStates,
  427|  82.7k|                (2 * QMF_NO_POLY - 1) * h_Qmf->no_channels * sizeof(FIXP_QAS));
  ------------------
  |  |  213|  82.7k|#define QMF_NO_POLY 5
  ------------------
  428|  82.7k|  }
  429|       |
  430|   120k|  FDK_ASSERT(h_Qmf->no_channels >= h_Qmf->lsb);
  ------------------
  |  |  221|   120k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (430:3): [True: 120k, False: 0]
  ------------------
  431|       |
  432|   120k|  return err;
  433|   120k|}
_Z24qmfAnalysisFilteringSlotP15QMF_FILTER_BANKPiS1_PKiiS1_:
  532|  15.5M|) {
  533|  15.5M|  int offset = anaQmf->no_channels * (QMF_NO_POLY * 2 - 1);
  ------------------
  |  |  213|  15.5M|#define QMF_NO_POLY 5
  ------------------
  534|       |  /*
  535|       |    Feed time signal into oldest anaQmf->no_channels states
  536|       |  */
  537|  15.5M|  {
  538|  15.5M|    FIXP_QAS *FilterStatesAnaTmp = ((FIXP_QAS *)anaQmf->FilterStates) + offset;
  ------------------
  |  |  829|  15.5M|#define FIXP_QAS FIXP_DBL
  ------------------
  539|       |
  540|       |    /* Feed and scale actual time in slot */
  541|   223M|    for (int i = anaQmf->no_channels >> 1; i != 0; i--) {
  ------------------
  |  Branch (541:44): [True: 207M, False: 15.5M]
  ------------------
  542|       |      /* Place INT_PCM value left aligned in scaledTimeIn */
  543|   207M|      *FilterStatesAnaTmp++ = (FIXP_QAS)*timeIn;
  544|   207M|      timeIn += stride;
  545|   207M|      *FilterStatesAnaTmp++ = (FIXP_QAS)*timeIn;
  546|   207M|      timeIn += stride;
  547|   207M|    }
  548|  15.5M|  }
  549|       |
  550|  15.5M|  if (anaQmf->flags & QMF_FLAG_NONSYMMETRIC) {
  ------------------
  |  |  131|  15.5M|#define QMF_FLAG_NONSYMMETRIC 2
  ------------------
  |  Branch (550:7): [True: 2.60M, False: 12.9M]
  ------------------
  551|  2.60M|    qmfAnaPrototypeFirSlot_NonSymmetric(pWorkBuffer, anaQmf->no_channels,
  552|  2.60M|                                        anaQmf->p_filter, anaQmf->p_stride,
  553|  2.60M|                                        (FIXP_QAS *)anaQmf->FilterStates);
  554|  12.9M|  } else {
  555|  12.9M|    qmfAnaPrototypeFirSlot(pWorkBuffer, anaQmf->no_channels, anaQmf->p_filter,
  556|  12.9M|                           anaQmf->p_stride, (FIXP_QAS *)anaQmf->FilterStates);
  557|  12.9M|  }
  558|       |
  559|  15.5M|  if (anaQmf->flags & QMF_FLAG_LP) {
  ------------------
  |  |  126|  15.5M|#define QMF_FLAG_LP 1
  ------------------
  |  Branch (559:7): [True: 3.04M, False: 12.5M]
  ------------------
  560|  3.04M|    if (anaQmf->flags & QMF_FLAG_CLDFB)
  ------------------
  |  |  133|  3.04M|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (560:9): [True: 1.99M, False: 1.04M]
  ------------------
  561|  1.99M|      qmfForwardModulationLP_odd(anaQmf, pWorkBuffer, qmfReal);
  562|  1.04M|    else
  563|  1.04M|      qmfForwardModulationLP_even(anaQmf, pWorkBuffer, qmfReal);
  564|       |
  565|  12.5M|  } else {
  566|  12.5M|    qmfForwardModulationHQ(anaQmf, pWorkBuffer, qmfReal, qmfImag);
  567|  12.5M|  }
  568|       |  /*
  569|       |    Shift filter states
  570|       |
  571|       |    Should be realized with modulo addressing on a DSP instead of a true buffer
  572|       |    shift
  573|       |  */
  574|  15.5M|  FDKmemmove(anaQmf->FilterStates,
  575|  15.5M|             (FIXP_QAS *)anaQmf->FilterStates + anaQmf->no_channels,
  576|  15.5M|             offset * sizeof(FIXP_QAS));
  577|  15.5M|}
_Z20qmfAnalysisFilteringP15QMF_FILTER_BANKPPiS2_P16QMF_SCALE_FACTORPKiiiS1_:
  599|   407k|) {
  600|   407k|  int i;
  601|   407k|  int no_channels = anaQmf->no_channels;
  602|       |
  603|   407k|  scaleFactor->lb_scale =
  604|   407k|      -ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK - timeIn_e;
  ------------------
  |  |  156|   407k|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  605|   407k|  scaleFactor->lb_scale -= anaQmf->filterScale;
  606|       |
  607|  11.6M|  for (i = 0; i < anaQmf->no_col; i++) {
  ------------------
  |  Branch (607:15): [True: 11.2M, False: 407k]
  ------------------
  608|  11.2M|    FIXP_DBL *qmfImagSlot = NULL;
  609|       |
  610|  11.2M|    if (!(anaQmf->flags & QMF_FLAG_LP)) {
  ------------------
  |  |  126|  11.2M|#define QMF_FLAG_LP 1
  ------------------
  |  Branch (610:9): [True: 8.17M, False: 3.04M]
  ------------------
  611|  8.17M|      qmfImagSlot = qmfImag[i];
  612|  8.17M|    }
  613|       |
  614|  11.2M|    qmfAnalysisFilteringSlot(anaQmf, qmfReal[i], qmfImagSlot, timeIn, stride,
  615|  11.2M|                             pWorkBuffer);
  616|       |
  617|  11.2M|    timeIn += no_channels * stride;
  618|       |
  619|  11.2M|  } /* no_col loop  i  */
  620|   407k|}
qmf.cpp:_ZL35qmfSynPrototypeFirSlot_NonSymmetricP15QMF_FILTER_BANKPiS1_S1_i:
  229|  3.18M|    int stride) {
  230|  3.18M|  FIXP_QSS *FilterStates = (FIXP_QSS *)qmf->FilterStates;
  ------------------
  |  |  121|  3.18M|#define FIXP_QSS FIXP_DBL
  ------------------
  231|  3.18M|  int no_channels = qmf->no_channels;
  232|  3.18M|  const FIXP_PFT *p_Filter = qmf->p_filter;
  233|  3.18M|  int p_stride = qmf->p_stride;
  234|  3.18M|  int j;
  235|  3.18M|  FIXP_QSS *RESTRICT sta = FilterStates;
  ------------------
  |  |  121|  3.18M|#define FIXP_QSS FIXP_DBL
  ------------------
  236|  3.18M|  const FIXP_PFT *RESTRICT p_flt, *RESTRICT p_fltm;
  237|  3.18M|  int scale = (DFRACT_BITS - SAMPLE_BITS_QMFOUT) - 1 - qmf->outScalefactor -
  ------------------
  |  |  113|  3.18M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                int scale = (DFRACT_BITS - SAMPLE_BITS_QMFOUT) - 1 - qmf->outScalefactor -
  ------------------
  |  |  828|  3.18M|#define SAMPLE_BITS_QMFOUT 32
  ------------------
  238|  3.18M|              qmf->outGain_e;
  239|       |
  240|  3.18M|  p_flt = p_Filter; /*!< Pointer to first half of filter coefficients */
  241|  3.18M|  p_fltm =
  242|  3.18M|      &p_flt[qmf->FilterSize / 2]; /* at index 320, overall 640 coefficients */
  243|       |
  244|  3.18M|  FIXP_SGL gain = FX_DBL2FX_SGL(qmf->outGain_m);
  ------------------
  |  |  220|  3.18M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  3.18M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  3.18M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  245|       |
  246|  3.18M|  FIXP_DBL rnd_val = (FIXP_DBL)0;
  247|       |
  248|  3.18M|  if (scale > 0) {
  ------------------
  |  Branch (248:7): [True: 0, False: 3.18M]
  ------------------
  249|      0|    if (scale < (DFRACT_BITS - 1))
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (249:9): [True: 0, False: 0]
  ------------------
  250|      0|      rnd_val = FIXP_DBL(1 << (scale - 1));
  251|      0|    else
  252|      0|      scale = (DFRACT_BITS - 1);
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  253|  3.18M|  } else {
  254|  3.18M|    scale = fMax(scale, -(DFRACT_BITS - 1));
  ------------------
  |  |  113|  3.18M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  255|  3.18M|  }
  256|       |
  257|   145M|  for (j = no_channels - 1; j >= 0; j--) {
  ------------------
  |  Branch (257:29): [True: 142M, False: 3.18M]
  ------------------
  258|   142M|    FIXP_DBL imag = imagSlot[j]; /* no_channels-1 .. 0 */
  259|   142M|    FIXP_DBL real = realSlot[j]; /* no_channels-1 .. 0 */
  260|   142M|    {
  261|   142M|      INT_PCM_QMFOUT tmp;
  ------------------
  |  |  827|   142M|#define INT_PCM_QMFOUT LONG
  |  |  ------------------
  |  |  |  |  181|   142M|#define LONG INT
  |  |  ------------------
  ------------------
  262|   142M|      FIXP_DBL Are = sta[0] + FX_DBL2FX_QSS(fMultDiv2(p_fltm[4], real));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  263|       |
  264|       |      /* This PCM formatting performs:
  265|       |         - multiplication with 16-bit gain, if not -1.0f
  266|       |         - rounding, if shift right is applied
  267|       |         - apply shift left (or right) with saturation to 32 (or 16) bits
  268|       |         - store output with --stride in 32 (or 16) bit format
  269|       |      */
  270|   142M|      if (gain != (FIXP_SGL)(-32768)) /* -1.0f */
  ------------------
  |  Branch (270:11): [True: 0, False: 142M]
  ------------------
  271|      0|      {
  272|      0|        Are = fMult(Are, gain);
  273|      0|      }
  274|   142M|      if (scale > 0) {
  ------------------
  |  Branch (274:11): [True: 0, False: 142M]
  ------------------
  275|      0|        FDK_ASSERT(Are <
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (275:9): [True: 0, False: 0]
  ------------------
  276|      0|                   (Are + rnd_val)); /* Round-addition must not overflow */
  277|      0|        tmp = (INT_PCM_QMFOUT)(
  278|      0|            SATURATE_RIGHT_SHIFT(Are + rnd_val, scale, SAMPLE_BITS_QMFOUT));
  ------------------
  |  |  242|      0|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  ------------------
  |  |  |  Branch (242:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  243|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  244|      0|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  ------------------
  |  |  |  Branch (244:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  245|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  246|      0|             : ((LONG)(src) >> (scale)))
  ------------------
  279|   142M|      } else {
  280|   142M|        tmp = (INT_PCM_QMFOUT)(
  281|   142M|            SATURATE_LEFT_SHIFT(Are, -scale, SAMPLE_BITS_QMFOUT));
  ------------------
  |  |  251|   142M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 60, False: 142M]
  |  |  ------------------
  |  |  252|   142M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|   142M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 59, False: 142M]
  |  |  ------------------
  |  |  254|   142M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|   142M|             : ((LONG)(src) << (scale)))
  ------------------
  282|   142M|      }
  283|   142M|      timeOut[j * stride] = tmp;
  284|   142M|    }
  285|       |
  286|   142M|    sta[0] = sta[1] + FX_DBL2FX_QSS(fMultDiv2(p_flt[4], imag));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  287|   142M|    sta[1] = sta[2] + FX_DBL2FX_QSS(fMultDiv2(p_fltm[3], real));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  288|   142M|    sta[2] = sta[3] + FX_DBL2FX_QSS(fMultDiv2(p_flt[3], imag));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  289|       |
  290|   142M|    sta[3] = sta[4] + FX_DBL2FX_QSS(fMultDiv2(p_fltm[2], real));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  291|   142M|    sta[4] = sta[5] + FX_DBL2FX_QSS(fMultDiv2(p_flt[2], imag));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  292|   142M|    sta[5] = sta[6] + FX_DBL2FX_QSS(fMultDiv2(p_fltm[1], real));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  293|   142M|    sta[6] = sta[7] + FX_DBL2FX_QSS(fMultDiv2(p_flt[1], imag));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  294|       |
  295|   142M|    sta[7] = sta[8] + FX_DBL2FX_QSS(fMultDiv2(p_fltm[0], real));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  296|   142M|    sta[8] = FX_DBL2FX_QSS(fMultDiv2(p_flt[0], imag));
  ------------------
  |  |  118|   142M|#define FX_DBL2FX_QSS(x) (x)
  ------------------
  297|       |
  298|   142M|    p_flt += (p_stride * QMF_NO_POLY);
  ------------------
  |  |  213|   142M|#define QMF_NO_POLY 5
  ------------------
  299|   142M|    p_fltm += (p_stride * QMF_NO_POLY);
  ------------------
  |  |  213|   142M|#define QMF_NO_POLY 5
  ------------------
  300|   142M|    sta += 9;  // = (2*QMF_NO_POLY-1);
  301|   142M|  }
  302|  3.18M|}
qmf.cpp:_ZL35qmfAnaPrototypeFirSlot_NonSymmetricPiiPKsiS_:
  496|  2.60M|    FIXP_QAS *RESTRICT pFilterStates) {
  497|  2.60M|  const FIXP_PFT *RESTRICT p_flt = p_filter;
  498|  2.60M|  int p, k;
  499|       |
  500|   165M|  for (k = 0; k < 2 * no_channels; k++) {
  ------------------
  |  Branch (500:15): [True: 162M, False: 2.60M]
  ------------------
  501|   162M|    FIXP_DBL accu = (FIXP_DBL)0;
  502|       |
  503|   162M|    p_flt += QMF_NO_POLY * (p_stride - 1);
  ------------------
  |  |  213|   162M|#define QMF_NO_POLY 5
  ------------------
  504|       |
  505|       |    /*
  506|       |      Perform FIR-Filter
  507|       |    */
  508|   975M|    for (p = 0; p < QMF_NO_POLY; p++) {
  ------------------
  |  |  213|   975M|#define QMF_NO_POLY 5
  ------------------
  |  Branch (508:17): [True: 812M, False: 162M]
  ------------------
  509|   812M|      accu += fMultDiv2(*p_flt++, pFilterStates[2 * no_channels * p]);
  510|   812M|    }
  511|   162M|    analysisBuffer[2 * no_channels - 1 - k] = (accu << 1);
  512|   162M|    pFilterStates++;
  513|   162M|  }
  514|  2.60M|}
qmf.cpp:_ZL22qmfAnaPrototypeFirSlotPiiPKsiS_:
  443|  12.9M|    FIXP_QAS *RESTRICT pFilterStates) {
  444|  12.9M|  INT k;
  445|       |
  446|  12.9M|  FIXP_DBL accu;
  447|  12.9M|  const FIXP_PFT *RESTRICT p_flt = p_filter;
  448|  12.9M|  FIXP_DBL *RESTRICT pData_0 = analysisBuffer + 2 * no_channels - 1;
  449|  12.9M|  FIXP_DBL *RESTRICT pData_1 = analysisBuffer;
  450|       |
  451|  12.9M|  FIXP_QAS *RESTRICT sta_0 = (FIXP_QAS *)pFilterStates;
  ------------------
  |  |  829|  12.9M|#define FIXP_QAS FIXP_DBL
  ------------------
  452|  12.9M|  FIXP_QAS *RESTRICT sta_1 =
  ------------------
  |  |  829|  12.9M|#define FIXP_QAS FIXP_DBL
  ------------------
  453|  12.9M|      (FIXP_QAS *)pFilterStates + (2 * QMF_NO_POLY * no_channels) - 1;
  ------------------
  |  |  213|  12.9M|#define QMF_NO_POLY 5
  ------------------
  454|  12.9M|  INT pfltStep = QMF_NO_POLY * (p_stride);
  ------------------
  |  |  213|  12.9M|#define QMF_NO_POLY 5
  ------------------
  455|  12.9M|  INT staStep1 = no_channels << 1;
  456|  12.9M|  INT staStep2 = (no_channels << 3) - 1; /* Rewind one less */
  457|       |
  458|       |  /* FIR filters 127..64 0..63 */
  459|   347M|  for (k = 0; k < no_channels; k++) {
  ------------------
  |  Branch (459:15): [True: 334M, False: 12.9M]
  ------------------
  460|   334M|    accu = fMultDiv2(p_flt[0], *sta_1);
  461|   334M|    sta_1 -= staStep1;
  462|   334M|    accu += fMultDiv2(p_flt[1], *sta_1);
  463|   334M|    sta_1 -= staStep1;
  464|   334M|    accu += fMultDiv2(p_flt[2], *sta_1);
  465|   334M|    sta_1 -= staStep1;
  466|   334M|    accu += fMultDiv2(p_flt[3], *sta_1);
  467|   334M|    sta_1 -= staStep1;
  468|   334M|    accu += fMultDiv2(p_flt[4], *sta_1);
  469|   334M|    *pData_1++ = (accu << 1);
  470|   334M|    sta_1 += staStep2;
  471|       |
  472|   334M|    p_flt += pfltStep;
  473|   334M|    accu = fMultDiv2(p_flt[0], *sta_0);
  474|   334M|    sta_0 += staStep1;
  475|   334M|    accu += fMultDiv2(p_flt[1], *sta_0);
  476|   334M|    sta_0 += staStep1;
  477|   334M|    accu += fMultDiv2(p_flt[2], *sta_0);
  478|   334M|    sta_0 += staStep1;
  479|   334M|    accu += fMultDiv2(p_flt[3], *sta_0);
  480|   334M|    sta_0 += staStep1;
  481|   334M|    accu += fMultDiv2(p_flt[4], *sta_0);
  482|   334M|    *pData_0-- = (accu << 1);
  483|   334M|    sta_0 -= staStep2;
  484|   334M|  }
  485|  12.9M|}

_Z10scaleValueii:
  155|   701M|) {
  156|   701M|  if (scalefactor > 0)
  ------------------
  |  Branch (156:7): [True: 246M, False: 455M]
  ------------------
  157|   246M|    return (value << scalefactor);
  158|   455M|  else
  159|   455M|    return (value >> (-scalefactor));
  160|   701M|}
_Z18scaleValueSaturateii:
  183|  2.25G|) {
  184|  2.25G|  int headroom = fixnormz_D(
  185|  2.25G|      (INT)value ^ (INT)((value >> 31))); /* headroom in range 1...32 */
  186|  2.25G|  if (scalefactor >= 0) {
  ------------------
  |  Branch (186:7): [True: 759M, False: 1.49G]
  ------------------
  187|       |    /* shift left: saturate in case of headroom less/equal scalefactor */
  188|   759M|    if (headroom <= scalefactor) {
  ------------------
  |  Branch (188:9): [True: 87.9M, False: 671M]
  ------------------
  189|  87.9M|      if (value > (FIXP_DBL)0)
  ------------------
  |  Branch (189:11): [True: 39.3M, False: 48.6M]
  ------------------
  190|  39.3M|        return (FIXP_DBL)MAXVAL_DBL; /* 0x7FFF.FFFF */
  ------------------
  |  |  156|  39.3M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  191|  48.6M|      else
  192|  48.6M|        return (FIXP_DBL)MINVAL_DBL + (FIXP_DBL)1; /* 0x8000.0001 */
  ------------------
  |  |  158|  48.6M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  193|   671M|    } else {
  194|   671M|      return fMax((value << scalefactor), (FIXP_DBL)MINVAL_DBL + (FIXP_DBL)1);
  ------------------
  |  |  158|   671M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  195|   671M|    }
  196|  1.49G|  } else {
  197|  1.49G|    scalefactor = -scalefactor;
  198|       |    /* shift right: clear in case of 32-headroom greater/equal -scalefactor */
  199|  1.49G|    if ((DFRACT_BITS - headroom) <= scalefactor) {
  ------------------
  |  |  113|  1.49G|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (199:9): [True: 845M, False: 651M]
  ------------------
  200|   845M|      return (FIXP_DBL)0;
  201|   845M|    } else {
  202|   651M|      return fMax((value >> scalefactor), (FIXP_DBL)MINVAL_DBL + (FIXP_DBL)1);
  ------------------
  |  |  158|   651M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  203|   651M|    }
  204|  1.49G|  }
  205|  2.25G|}
_Z17scaleValueInPlacePii:
  219|  4.12M|) {
  220|  4.12M|  INT newscale;
  221|       |  /* Note: The assignment inside the if conditional allows combining a load with
  222|       |   * the compare to zero (on ARM and maybe others) */
  223|  4.12M|  if ((newscale = (scalefactor)) >= 0) {
  ------------------
  |  Branch (223:7): [True: 3.17M, False: 958k]
  ------------------
  224|  3.17M|    *(value) <<= newscale;
  225|  3.17M|  } else {
  226|   958k|    *(value) >>= -newscale;
  227|   958k|  }
  228|  4.12M|}

_Z8scramblePii:
  128|   630k|inline void scramble(FIXP_DBL *x, INT length) {
  129|   630k|  INT m, k, j;
  130|   630k|  FDK_ASSERT(!(((INT)(INT64)x) & (ALIGNMENT_DEFAULT - 1)));
  ------------------
  |  |  221|   630k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (130:3): [True: 630k, False: 0]
  ------------------
  131|   630k|  C_ALLOC_ALIGNED_CHECK(x);
  132|       |
  133|   115M|  for (m = 1, j = 0; m < length - 1; m++) {
  ------------------
  |  Branch (133:22): [True: 115M, False: 630k]
  ------------------
  134|   115M|    {
  135|   226M|      for (k = length >> 1; (!((j ^= k) & k)); k >>= 1)
  ------------------
  |  Branch (135:29): [True: 111M, False: 115M]
  ------------------
  136|   111M|        ;
  137|   115M|    }
  138|       |
  139|   115M|    if (j > m) {
  ------------------
  |  Branch (139:9): [True: 53.5M, False: 61.5M]
  ------------------
  140|  53.5M|      FIXP_DBL tmp;
  141|  53.5M|      tmp = x[2 * m];
  142|  53.5M|      x[2 * m] = x[2 * j];
  143|  53.5M|      x[2 * j] = tmp;
  144|       |
  145|  53.5M|      tmp = x[2 * m + 1];
  146|  53.5M|      x[2 * m + 1] = x[2 * j + 1];
  147|  53.5M|      x[2 * j + 1] = tmp;
  148|  53.5M|    }
  149|   115M|  }
  150|   630k|}

_Z8fixabs_Di:
  110|  1.50G|inline INT fixabs_D(INT x) { return ((x) > (INT)(0)) ? (x) : -(x); }
  ------------------
  |  Branch (110:37): [True: 656M, False: 844M]
  ------------------

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

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

_Z12invSqrtNorm2iPi:
  132|   152M|inline FIXP_DBL invSqrtNorm2(FIXP_DBL op_m, INT *result_e) {
  133|   152M|  float result;
  134|   152M|  if (op_m == (FIXP_DBL)0) {
  ------------------
  |  Branch (134:7): [True: 378k, False: 152M]
  ------------------
  135|   378k|    *result_e = 16;
  136|   378k|    return ((LONG)0x7fffffff);
  137|   378k|  }
  138|   152M|  result = (float)(1.0 / sqrt(0.5f * (float)(INT)op_m));
  139|   152M|  result = (float)ldexp(frexpf(result, result_e), DFRACT_BITS - 1);
  ------------------
  |  |  113|   152M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  140|   152M|  *result_e += 15;
  141|       |
  142|   152M|  FDK_ASSERT(result >= 0);
  ------------------
  |  |  221|   152M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (142:3): [True: 152M, False: 0]
  ------------------
  143|   152M|  return (FIXP_DBL)(INT)result;
  144|   152M|}
_Z7invFixpi:
  154|   624k|inline FIXP_DBL invFixp(FIXP_DBL op) {
  155|   624k|  float result;
  156|   624k|  INT result_e;
  157|   624k|  if ((op == (FIXP_DBL)0) || (op == (FIXP_DBL)1)) {
  ------------------
  |  Branch (157:7): [True: 0, False: 624k]
  |  Branch (157:30): [True: 400, False: 624k]
  ------------------
  158|    400|    return ((LONG)0x7fffffff);
  159|    400|  }
  160|   624k|  result = (float)(1.0 / (float)(INT)op);
  161|   624k|  result = frexpf(result, &result_e);
  162|   624k|  result = ldexpf(result, 31 + result_e);
  163|       |
  164|   624k|  return (FIXP_DBL)(INT)result;
  165|   624k|}
_Z7invFixpiPi:
  174|   191k|inline FIXP_DBL invFixp(FIXP_DBL op_m, int *op_e) {
  175|   191k|  float result;
  176|   191k|  INT result_e;
  177|   191k|  if ((op_m == (FIXP_DBL)0x00000000) || (op_m == (FIXP_DBL)0x00000001)) {
  ------------------
  |  Branch (177:7): [True: 0, False: 191k]
  |  Branch (177:41): [True: 0, False: 191k]
  ------------------
  178|      0|    *op_e = 31 - *op_e;
  179|      0|    return ((LONG)0x7fffffff);
  180|      0|  }
  181|   191k|  result = (float)(1.0 / (float)(INT)op_m);
  182|   191k|  result = ldexpf(frexpf(result, &result_e), DFRACT_BITS - 1);
  ------------------
  |  |  113|   191k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  183|   191k|  *op_e = result_e - *op_e + 31;
  184|   191k|  return (FIXP_DBL)(INT)result;
  185|   191k|}
_Z9schur_diviii:
  197|   246M|inline FIXP_DBL schur_div(FIXP_DBL num, FIXP_DBL denum, INT count) {
  198|   246M|  (void)count;
  199|       |  /* same asserts than for fallback implementation */
  200|   246M|  FDK_ASSERT(num >= (FIXP_DBL)0);
  ------------------
  |  |  221|   246M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (200:3): [True: 246M, False: 0]
  ------------------
  201|   246M|  FDK_ASSERT(denum > (FIXP_DBL)0);
  ------------------
  |  |  221|   246M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (201:3): [True: 246M, False: 0]
  ------------------
  202|   246M|  FDK_ASSERT(num <= denum);
  ------------------
  |  |  221|   246M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (202:3): [True: 246M, False: 0]
  ------------------
  203|       |
  204|   246M|  return (num == denum) ? (FIXP_DBL)MAXVAL_DBL
  ------------------
  |  |  156|  13.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (204:10): [True: 13.1k, False: 246M]
  ------------------
  205|   246M|                        : (FIXP_DBL)(INT)(((INT64)(INT)num << 31) / (INT)denum);
  206|   246M|}
FDK_decorrelate.cpp:_ZL8sqrtFixpi:
  111|  61.8M|static inline FIXP_DBL sqrtFixp(const FIXP_DBL op) {
  112|  61.8M|  FIXP_DBL result;
  113|       |  /* result =
  114|       |   * (FIXP_DBL)(INT)(sqrt((double)(INT)op)*46340.950011841578559133736114903);
  115|       |   */
  116|  61.8M|  result = (FIXP_DBL)(INT)(sqrt((float)(INT)op) * 46340.9492f);
  117|  61.8M|  FDK_ASSERT(result >= (FIXP_DBL)0);
  ------------------
  |  |  221|  61.8M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (117:3): [True: 61.8M, False: 0]
  ------------------
  118|  61.8M|  return result;
  119|  61.8M|}
sac_calcM1andM2.cpp:_ZL8sqrtFixpi:
  111|   191k|static inline FIXP_DBL sqrtFixp(const FIXP_DBL op) {
  112|   191k|  FIXP_DBL result;
  113|       |  /* result =
  114|       |   * (FIXP_DBL)(INT)(sqrt((double)(INT)op)*46340.950011841578559133736114903);
  115|       |   */
  116|   191k|  result = (FIXP_DBL)(INT)(sqrt((float)(INT)op) * 46340.9492f);
  117|   191k|  FDK_ASSERT(result >= (FIXP_DBL)0);
  ------------------
  |  |  221|   191k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (117:3): [True: 191k, False: 0]
  ------------------
  118|   191k|  return result;
  119|   191k|}
sac_reshapeBBEnv.cpp:_ZL8sqrtFixpi:
  111|  3.43M|static inline FIXP_DBL sqrtFixp(const FIXP_DBL op) {
  112|  3.43M|  FIXP_DBL result;
  113|       |  /* result =
  114|       |   * (FIXP_DBL)(INT)(sqrt((double)(INT)op)*46340.950011841578559133736114903);
  115|       |   */
  116|  3.43M|  result = (FIXP_DBL)(INT)(sqrt((float)(INT)op) * 46340.9492f);
  117|  3.43M|  FDK_ASSERT(result >= (FIXP_DBL)0);
  ------------------
  |  |  221|  3.43M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (117:3): [True: 3.43M, False: 0]
  ------------------
  118|  3.43M|  return result;
  119|  3.43M|}
usacdec_lpc.cpp:_ZL8sqrtFixpi:
  111|  2.58M|static inline FIXP_DBL sqrtFixp(const FIXP_DBL op) {
  112|  2.58M|  FIXP_DBL result;
  113|       |  /* result =
  114|       |   * (FIXP_DBL)(INT)(sqrt((double)(INT)op)*46340.950011841578559133736114903);
  115|       |   */
  116|  2.58M|  result = (FIXP_DBL)(INT)(sqrt((float)(INT)op) * 46340.9492f);
  117|  2.58M|  FDK_ASSERT(result >= (FIXP_DBL)0);
  ------------------
  |  |  221|  2.58M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (117:3): [True: 2.58M, False: 0]
  ------------------
  118|  2.58M|  return result;
  119|  2.58M|}
usacdec_lpd.cpp:_ZL8sqrtFixpi:
  111|   162k|static inline FIXP_DBL sqrtFixp(const FIXP_DBL op) {
  112|   162k|  FIXP_DBL result;
  113|       |  /* result =
  114|       |   * (FIXP_DBL)(INT)(sqrt((double)(INT)op)*46340.950011841578559133736114903);
  115|       |   */
  116|   162k|  result = (FIXP_DBL)(INT)(sqrt((float)(INT)op) * 46340.9492f);
  117|   162k|  FDK_ASSERT(result >= (FIXP_DBL)0);
  ------------------
  |  |  221|   162k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (117:3): [True: 162k, False: 0]
  ------------------
  118|   162k|  return result;
  119|   162k|}

FDK_InitBitBuffer:
  127|   761k|                       UINT validBits) {
  128|   761k|  hBitBuf->ValidBits = validBits;
  129|   761k|  hBitBuf->ReadOffset = 0;
  130|   761k|  hBitBuf->WriteOffset = 0;
  131|   761k|  hBitBuf->BitNdx = 0;
  132|       |
  133|   761k|  hBitBuf->Buffer = pBuffer;
  134|   761k|  hBitBuf->bufSize = bufSize;
  135|   761k|  hBitBuf->bufBits = (bufSize << 3);
  136|       |  /*assure bufsize (2^n) */
  137|   761k|  FDK_ASSERT(hBitBuf->ValidBits <= hBitBuf->bufBits);
  ------------------
  |  |  221|   761k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 761k, False: 0]
  ------------------
  138|   761k|  FDK_ASSERT((bufSize > 0) && (bufSize <= MAX_BUFSIZE_BYTES));
  ------------------
  |  |  221|   761k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 761k, False: 0]
  |  Branch (138:3): [True: 761k, False: 0]
  |  Branch (138:3): [True: 761k, False: 0]
  ------------------
  139|   761k|  {
  140|   761k|    UINT x = 0, n = bufSize;
  141|  6.01M|    for (x = 0; n > 0; x++, n >>= 1) {
  ------------------
  |  Branch (141:17): [True: 5.25M, False: 761k]
  ------------------
  142|  5.25M|    }
  143|   761k|    if (bufSize != ((UINT)1 << (x - 1))) {
  ------------------
  |  Branch (143:9): [True: 0, False: 761k]
  ------------------
  144|       |      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (144:7): [Folded, False: 0]
  ------------------
  145|      0|    }
  146|   761k|  }
  147|   761k|}
FDK_get32:
  181|  85.7M|INT FDK_get32(HANDLE_FDK_BITBUF hBitBuf) {
  182|  85.7M|  UINT BitNdx = hBitBuf->BitNdx + 32;
  183|  85.7M|  hBitBuf->BitNdx = BitNdx & (hBitBuf->bufBits - 1);
  184|  85.7M|  hBitBuf->ValidBits = (UINT)((INT)hBitBuf->ValidBits - (INT)32);
  185|       |
  186|  85.7M|  UINT byteOffset = (BitNdx - 1) >> 3;
  187|  85.7M|  if (BitNdx <= hBitBuf->bufBits) {
  ------------------
  |  Branch (187:7): [True: 85.7M, False: 7.67k]
  ------------------
  188|  85.7M|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3)] << 24) |
  189|  85.7M|                 (hBitBuf->Buffer[(byteOffset - 2)] << 16) |
  190|  85.7M|                 (hBitBuf->Buffer[(byteOffset - 1)] << 8) |
  191|  85.7M|                 hBitBuf->Buffer[(byteOffset - 0)];
  192|       |
  193|  85.7M|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (193:9): [True: 69.0M, False: 16.7M]
  ------------------
  194|  69.0M|      cache = (cache >> (8 - BitNdx)) |
  195|  69.0M|              ((UINT)hBitBuf->Buffer[byteOffset - 4] << (24 + BitNdx));
  196|  69.0M|    }
  197|  85.7M|    return (cache);
  198|  85.7M|  } else {
  199|  7.67k|    UINT byte_mask = hBitBuf->bufSize - 1;
  200|  7.67k|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3) & byte_mask] << 24) |
  201|  7.67k|                 (hBitBuf->Buffer[(byteOffset - 2) & byte_mask] << 16) |
  202|  7.67k|                 (hBitBuf->Buffer[(byteOffset - 1) & byte_mask] << 8) |
  203|  7.67k|                 hBitBuf->Buffer[(byteOffset - 0) & byte_mask];
  204|       |
  205|  7.67k|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (205:9): [True: 6.40k, False: 1.27k]
  ------------------
  206|  6.40k|      cache = (cache >> (8 - BitNdx)) |
  207|  6.40k|              ((UINT)hBitBuf->Buffer[(byteOffset - 4) & byte_mask]
  208|  6.40k|               << (24 + BitNdx));
  209|  6.40k|    }
  210|  7.67k|    return (cache);
  211|  7.67k|  }
  212|  85.7M|}
FDK_put:
  248|  1.25M|void FDK_put(HANDLE_FDK_BITBUF hBitBuf, UINT value, const UINT numberOfBits) {
  249|  1.25M|  if (numberOfBits != 0) {
  ------------------
  |  Branch (249:7): [True: 1.25M, False: 0]
  ------------------
  250|  1.25M|    UINT byteOffset0 = hBitBuf->BitNdx >> 3;
  251|  1.25M|    UINT bitOffset = hBitBuf->BitNdx & 0x7;
  252|       |
  253|  1.25M|    hBitBuf->BitNdx = (hBitBuf->BitNdx + numberOfBits) & (hBitBuf->bufBits - 1);
  254|  1.25M|    hBitBuf->ValidBits += numberOfBits;
  255|       |
  256|  1.25M|    UINT byteMask = hBitBuf->bufSize - 1;
  257|       |
  258|  1.25M|    UINT byteOffset1 = (byteOffset0 + 1) & byteMask;
  259|  1.25M|    UINT byteOffset2 = (byteOffset0 + 2) & byteMask;
  260|  1.25M|    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|  1.25M|    UINT tmp = (value << (32 - numberOfBits)) >> bitOffset;
  266|  1.25M|    UINT mask = ~((BitMask[numberOfBits] << (32 - numberOfBits)) >> bitOffset);
  267|       |
  268|       |    // read all 4 bytes from buffer and create a 32-bit cache
  269|  1.25M|    UINT cache = (((UINT)hBitBuf->Buffer[byteOffset0]) << 24) |
  270|  1.25M|                 (((UINT)hBitBuf->Buffer[byteOffset1]) << 16) |
  271|  1.25M|                 (((UINT)hBitBuf->Buffer[byteOffset2]) << 8) |
  272|  1.25M|                 (((UINT)hBitBuf->Buffer[byteOffset3]) << 0);
  273|       |
  274|  1.25M|    cache = (cache & mask) | tmp;
  275|  1.25M|    hBitBuf->Buffer[byteOffset0] = (UCHAR)(cache >> 24);
  276|  1.25M|    hBitBuf->Buffer[byteOffset1] = (UCHAR)(cache >> 16);
  277|  1.25M|    hBitBuf->Buffer[byteOffset2] = (UCHAR)(cache >> 8);
  278|  1.25M|    hBitBuf->Buffer[byteOffset3] = (UCHAR)(cache >> 0);
  279|       |
  280|  1.25M|    if ((bitOffset + numberOfBits) > 32) {
  ------------------
  |  Branch (280:9): [True: 0, False: 1.25M]
  ------------------
  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|  1.25M|  }
  291|  1.25M|}
FDK_pushBack:
  339|  48.7M|                  UCHAR config) {
  340|  48.7M|  hBitBuf->ValidBits =
  341|  48.7M|      (config == 0) ? (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits)
  ------------------
  |  Branch (341:7): [True: 48.7M, False: 0]
  ------------------
  342|  48.7M|                    : ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits));
  343|  48.7M|  hBitBuf->BitNdx = ((UINT)((INT)hBitBuf->BitNdx - (INT)numberOfBits)) &
  344|  48.7M|                    (hBitBuf->bufBits - 1);
  345|  48.7M|}
FDK_pushForward:
  349|  16.1M|                     UCHAR config) {
  350|  16.1M|  hBitBuf->ValidBits =
  351|  16.1M|      (config == 0) ? ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits))
  ------------------
  |  Branch (351:7): [True: 16.1M, False: 0]
  ------------------
  352|  16.1M|                    : (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits);
  353|  16.1M|  hBitBuf->BitNdx =
  354|  16.1M|      (UINT)((INT)hBitBuf->BitNdx + (INT)numberOfBits) & (hBitBuf->bufBits - 1);
  355|  16.1M|}
FDK_getValidBits:
  358|  26.9M|UINT FDK_getValidBits(HANDLE_FDK_BITBUF hBitBuf) { return hBitBuf->ValidBits; }
FDK_Feed:
  366|  22.8k|              const UINT bufferSize, UINT *bytesValid) {
  367|  22.8k|  inputBuffer = &inputBuffer[bufferSize - *bytesValid];
  368|       |
  369|  22.8k|  UINT bTotal = 0;
  370|       |
  371|  22.8k|  UINT bToRead =
  372|  22.8k|      fMin(hBitBuf->bufBits,
  373|  22.8k|           (UINT)fMax(0, ((INT)hBitBuf->bufBits - (INT)hBitBuf->ValidBits))) >>
  374|  22.8k|      3;
  375|  22.8k|  UINT noOfBytes =
  376|  22.8k|      fMin(bToRead,
  377|  22.8k|           *bytesValid);  //(bToRead < *bytesValid) ? bToRead : *bytesValid ;
  378|       |
  379|  46.1k|  while (noOfBytes > 0) {
  ------------------
  |  Branch (379:10): [True: 23.3k, False: 22.8k]
  ------------------
  380|       |    /* split read to buffer size */
  381|  23.3k|    bToRead = hBitBuf->bufSize - hBitBuf->ReadOffset;
  382|  23.3k|    bToRead = fMin(bToRead,
  383|  23.3k|                   noOfBytes);  //(bToRead < noOfBytes) ? bToRead : noOfBytes ;
  384|       |
  385|       |    /* copy 'bToRead' bytes from 'ptr' to inputbuffer */
  386|  23.3k|    FDKmemcpy(&hBitBuf->Buffer[hBitBuf->ReadOffset], inputBuffer,
  387|  23.3k|              bToRead * sizeof(UCHAR));
  388|       |
  389|       |    /* add noOfBits to number of valid bits in buffer */
  390|  23.3k|    hBitBuf->ValidBits = (UINT)((INT)hBitBuf->ValidBits + (INT)(bToRead << 3));
  391|  23.3k|    bTotal += bToRead;
  392|  23.3k|    inputBuffer += bToRead;
  393|       |
  394|  23.3k|    hBitBuf->ReadOffset =
  395|  23.3k|        (hBitBuf->ReadOffset + bToRead) & (hBitBuf->bufSize - 1);
  396|  23.3k|    noOfBytes -= bToRead;
  397|  23.3k|  }
  398|       |
  399|  22.8k|  *bytesValid -= bTotal;
  400|  22.8k|}

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

_Z18FDKdecorrelateOpenP10DECORR_DECPii:
 1426|  24.6k|                       const INT bufLen) {
 1427|  24.6k|  HANDLE_DECORR_DEC self = hDecorrDec;
 1428|       |
 1429|  24.6k|  if (bufLen < (2 * ((825) + (373)))) return 1;
  ------------------
  |  Branch (1429:7): [True: 0, False: 24.6k]
  ------------------
 1430|       |
 1431|       |  /* assign all memory to stateBufferCplx. It is reassigned during
 1432|       |   * FDKdecorrelateInit() */
 1433|  24.6k|  self->stateBufferCplx = bufferCplx;
 1434|  24.6k|  self->L_stateBufferCplx = 0;
 1435|       |
 1436|  24.6k|  self->delayBufferCplx = NULL;
 1437|  24.6k|  self->L_delayBufferCplx = 0;
 1438|       |
 1439|  24.6k|  return 0;
 1440|  24.6k|}
_Z18FDKdecorrelateInitP10DECORR_DECi15FDK_DECORR_TYPE15FDK_DUCKER_TYPEiiiiii:
 1460|  53.9k|                       const INT initStatesFlag) {
 1461|  53.9k|  INT errorCode = 0;
 1462|  53.9k|  int i, rb, i_start;
 1463|  53.9k|  int nParamBands = 28;
 1464|       |
 1465|  53.9k|  INT offsetStateBuffer = 0;
 1466|  53.9k|  INT offsetDelayBuffer = 0;
 1467|       |
 1468|  53.9k|  const UCHAR *REV_bandOffset;
 1469|       |
 1470|  53.9k|  const SCHAR *REV_filterOrder;
 1471|       |
 1472|  53.9k|  hDecorrDec->partiallyComplex = partiallyComplex;
 1473|  53.9k|  hDecorrDec->numbins = nrHybBands;
 1474|       |
 1475|  53.9k|  switch (decorrType) {
 1476|  3.44k|    case DECORR_PS:
  ------------------
  |  Branch (1476:5): [True: 3.44k, False: 50.5k]
  ------------------
 1477|       |      /* ignore decorrConfig, seed */
 1478|  3.44k|      if (partiallyComplex) {
  ------------------
  |  Branch (1478:11): [True: 0, False: 3.44k]
  ------------------
 1479|      0|        hDecorrDec->REV_bandOffset = REV_bandOffset_PS_LP;
 1480|      0|        hDecorrDec->REV_delay = REV_delay_PS_LP;
 1481|      0|        errorCode = distributeBuffer(hDecorrDec, (168), (533));
 1482|  3.44k|      } else {
 1483|  3.44k|        hDecorrDec->REV_bandOffset = REV_bandOffset_PS_HQ;
 1484|  3.44k|        hDecorrDec->REV_delay = REV_delay_PS_HQ;
 1485|  3.44k|        errorCode = distributeBuffer(hDecorrDec, (360), (257));
 1486|  3.44k|      }
 1487|  3.44k|      hDecorrDec->REV_filterOrder = REV_filterOrder_PS;
 1488|  3.44k|      hDecorrDec->REV_filtType = REV_filtType_PS;
 1489|       |
 1490|       |      /* Initialize ring buffer offsets for PS specific filter implementation.
 1491|       |       */
 1492|  13.7k|      for (i = 0; i < (3); i++)
  ------------------
  |  Branch (1492:19): [True: 10.3k, False: 3.44k]
  ------------------
 1493|  10.3k|        hDecorrDec->stateBufferOffset[i] = stateBufferOffsetInit[i];
 1494|       |
 1495|  3.44k|      break;
 1496|  23.2k|    case DECORR_USAC:
  ------------------
  |  Branch (1496:5): [True: 23.2k, False: 30.6k]
  ------------------
 1497|  23.2k|      if (partiallyComplex) return 1;
  ------------------
  |  Branch (1497:11): [True: 0, False: 23.2k]
  ------------------
 1498|  23.2k|      if (seed != 0) return 1;
  ------------------
  |  Branch (1498:11): [True: 0, False: 23.2k]
  ------------------
 1499|  23.2k|      hDecorrDec->REV_bandOffset =
 1500|  23.2k|          REV_bandOffset_MPS_HQ[decorrConfig]; /* reverb band layout is
 1501|       |                                                  inherited from MPS standard */
 1502|  23.2k|      hDecorrDec->REV_filterOrder = REV_filterOrder_USAC;
 1503|  23.2k|      hDecorrDec->REV_delay = REV_delay_USAC;
 1504|  23.2k|      if (useFractDelay) {
  ------------------
  |  Branch (1504:11): [True: 0, False: 23.2k]
  ------------------
 1505|      0|        return 1; /* not yet supported */
 1506|  23.2k|      } else {
 1507|  23.2k|        hDecorrDec->REV_filtType = REV_filtType_MPS; /* the filter types are
 1508|       |                                                        inherited from MPS
 1509|       |                                                        standard */
 1510|  23.2k|      }
 1511|       |      /* bsDecorrConfig == 1 is worst case */
 1512|  23.2k|      errorCode = distributeBuffer(hDecorrDec, (509), (643));
 1513|  23.2k|      break;
 1514|  27.2k|    case DECORR_LD:
  ------------------
  |  Branch (1514:5): [True: 27.2k, False: 26.7k]
  ------------------
 1515|  27.2k|      if (partiallyComplex) return 1;
  ------------------
  |  Branch (1515:11): [True: 0, False: 27.2k]
  ------------------
 1516|  27.2k|      if (useFractDelay) return 1;
  ------------------
  |  Branch (1516:11): [True: 0, False: 27.2k]
  ------------------
 1517|  27.2k|      if (decorrConfig > 2) return 1;
  ------------------
  |  Branch (1517:11): [True: 0, False: 27.2k]
  ------------------
 1518|  27.2k|      if (seed > (MAX_DECORR_SEED_LD - 1)) return 1;
  ------------------
  |  |  134|  27.2k|#define MAX_DECORR_SEED_LD (4)
  ------------------
  |  Branch (1518:11): [True: 0, False: 27.2k]
  ------------------
 1519|  27.2k|      if (!(nrHybBands == 64 || nrHybBands == 32))
  ------------------
  |  Branch (1519:13): [True: 1.34k, False: 25.8k]
  |  Branch (1519:33): [True: 25.8k, False: 0]
  ------------------
 1520|      0|        return 1; /* actually just qmf bands and no hybrid bands */
 1521|  27.2k|      hDecorrDec->REV_bandOffset = REV_bandOffset_LD[decorrConfig];
 1522|  27.2k|      hDecorrDec->REV_filterOrder = REV_filterOrder_MPS; /* the filter orders
 1523|       |                                                            are inherited from
 1524|       |                                                            MPS standard */
 1525|  27.2k|      hDecorrDec->REV_delay =
 1526|  27.2k|          REV_delay_MPS; /* the delays in each reverb band are inherited from
 1527|       |                            MPS standard */
 1528|  27.2k|      hDecorrDec->REV_filtType = REV_filtType_LD;
 1529|  27.2k|      errorCode = distributeBuffer(hDecorrDec, (825), (373));
 1530|  27.2k|      break;
 1531|      0|    default:
  ------------------
  |  Branch (1531:5): [True: 0, False: 53.9k]
  ------------------
 1532|      0|      return 1;
 1533|  53.9k|  }
 1534|       |
 1535|  53.9k|  if (errorCode) {
  ------------------
  |  Branch (1535:7): [True: 0, False: 53.9k]
  ------------------
 1536|      0|    return errorCode;
 1537|      0|  }
 1538|       |
 1539|  53.9k|  if (initStatesFlag) {
  ------------------
  |  Branch (1539:7): [True: 13.1k, False: 40.7k]
  ------------------
 1540|  13.1k|    FDKmemclear(
 1541|  13.1k|        hDecorrDec->stateBufferCplx,
 1542|  13.1k|        hDecorrDec->L_stateBufferCplx * sizeof(*hDecorrDec->stateBufferCplx));
 1543|  13.1k|    FDKmemclear(
 1544|  13.1k|        hDecorrDec->delayBufferCplx,
 1545|  13.1k|        hDecorrDec->L_delayBufferCplx * sizeof(*hDecorrDec->delayBufferCplx));
 1546|  13.1k|    FDKmemclear(hDecorrDec->reverbBandDelayBufferIndex,
 1547|  13.1k|                sizeof(hDecorrDec->reverbBandDelayBufferIndex));
 1548|  13.1k|  }
 1549|       |
 1550|  53.9k|  REV_bandOffset = hDecorrDec->REV_bandOffset;
 1551|       |
 1552|  53.9k|  REV_filterOrder = hDecorrDec->REV_filterOrder;
 1553|       |
 1554|  53.9k|  i_start = 0;
 1555|   269k|  for (rb = 0; rb < (4); rb++) {
  ------------------
  |  Branch (1555:16): [True: 215k, False: 53.9k]
  ------------------
 1556|   215k|    int i_stop;
 1557|       |
 1558|   215k|    i_stop = REV_bandOffset[rb];
 1559|       |
 1560|   215k|    if (i_stop <= i_start) {
  ------------------
  |  Branch (1560:9): [True: 53.9k, False: 161k]
  ------------------
 1561|  53.9k|      continue;
 1562|  53.9k|    }
 1563|       |
 1564|  3.80M|    for (i = i_start; i < i_stop; i++) {
  ------------------
  |  Branch (1564:23): [True: 3.64M, False: 161k]
  ------------------
 1565|  3.64M|      switch (decorrType) {
 1566|   244k|        case DECORR_PS:
  ------------------
  |  Branch (1566:9): [True: 244k, False: 3.39M]
  ------------------
 1567|   244k|          errorCode = DecorrFilterInitPS(
 1568|   244k|              &hDecorrDec->Filter[i], hDecorrDec->stateBufferCplx,
 1569|   244k|              hDecorrDec->delayBufferCplx, &offsetStateBuffer,
 1570|   244k|              &offsetDelayBuffer, i, rb, hDecorrDec->REV_delay[rb]);
 1571|   244k|          break;
 1572|  3.39M|        default:
  ------------------
  |  Branch (1572:9): [True: 3.39M, False: 244k]
  ------------------
 1573|  3.39M|          errorCode = DecorrFilterInit(
 1574|  3.39M|              &hDecorrDec->Filter[i], hDecorrDec->stateBufferCplx,
 1575|  3.39M|              hDecorrDec->delayBufferCplx, &offsetStateBuffer,
 1576|  3.39M|              &offsetDelayBuffer, seed, rb, useFractDelay,
 1577|  3.39M|              hDecorrDec->REV_delay[rb], REV_filterOrder[rb], decorrType);
 1578|  3.39M|          break;
 1579|  3.64M|      }
 1580|  3.64M|    }
 1581|       |
 1582|   161k|    i_start = i_stop;
 1583|   161k|  } /* loop over reverbBands */
 1584|       |
 1585|  53.9k|  if (!(offsetStateBuffer <= hDecorrDec->L_stateBufferCplx) ||
  ------------------
  |  Branch (1585:7): [True: 0, False: 53.9k]
  ------------------
 1586|  53.9k|      !(offsetDelayBuffer <= hDecorrDec->L_delayBufferCplx)) {
  ------------------
  |  Branch (1586:7): [True: 0, False: 53.9k]
  ------------------
 1587|      0|    return errorCode = 1;
 1588|      0|  }
 1589|       |
 1590|  53.9k|  if (duckerType == DUCKER_AUTOMATIC) {
  ------------------
  |  Branch (1590:7): [True: 53.9k, False: 0]
  ------------------
 1591|       |    /* Choose correct ducker type according to standards: */
 1592|  53.9k|    switch (decorrType) {
 1593|  3.44k|      case DECORR_PS:
  ------------------
  |  Branch (1593:7): [True: 3.44k, False: 50.5k]
  ------------------
 1594|  3.44k|        hDecorrDec->ducker.duckerType = DUCKER_PS;
 1595|  3.44k|        if (isLegacyPS) {
  ------------------
  |  Branch (1595:13): [True: 3.44k, False: 0]
  ------------------
 1596|  3.44k|          nParamBands = (20);
 1597|  3.44k|        } else {
 1598|      0|          nParamBands = (28);
 1599|      0|        }
 1600|  3.44k|        break;
 1601|  23.2k|      case DECORR_USAC:
  ------------------
  |  Branch (1601:7): [True: 23.2k, False: 30.6k]
  ------------------
 1602|  23.2k|        hDecorrDec->ducker.duckerType = DUCKER_MPS;
 1603|  23.2k|        nParamBands = (28);
 1604|  23.2k|        break;
 1605|  27.2k|      case DECORR_LD:
  ------------------
  |  Branch (1605:7): [True: 27.2k, False: 26.7k]
  ------------------
 1606|  27.2k|        hDecorrDec->ducker.duckerType = DUCKER_MPS;
 1607|  27.2k|        nParamBands = (23);
 1608|  27.2k|        break;
 1609|      0|      default:
  ------------------
  |  Branch (1609:7): [True: 0, False: 53.9k]
  ------------------
 1610|      0|        return 1;
 1611|  53.9k|    }
 1612|  53.9k|  }
 1613|       |
 1614|  53.9k|  errorCode = DuckerInit(
 1615|  53.9k|      &hDecorrDec->ducker, hDecorrDec->numbins, hDecorrDec->partiallyComplex,
 1616|  53.9k|      hDecorrDec->ducker.duckerType, nParamBands, initStatesFlag);
 1617|       |
 1618|  53.9k|  return errorCode;
 1619|  53.9k|}
_Z19FDKdecorrelateCloseP10DECORR_DEC:
 1621|  22.9k|INT FDKdecorrelateClose(HANDLE_DECORR_DEC hDecorrDec) {
 1622|  22.9k|  INT err = 0;
 1623|       |
 1624|  22.9k|  if (hDecorrDec == NULL) {
  ------------------
  |  Branch (1624:7): [True: 0, False: 22.9k]
  ------------------
 1625|      0|    return 1;
 1626|      0|  }
 1627|       |
 1628|  22.9k|  hDecorrDec->stateBufferCplx = NULL;
 1629|  22.9k|  hDecorrDec->L_stateBufferCplx = 0;
 1630|  22.9k|  hDecorrDec->delayBufferCplx = NULL;
 1631|  22.9k|  hDecorrDec->L_delayBufferCplx = 0;
 1632|       |
 1633|  22.9k|  return err;
 1634|  22.9k|}
_Z19FDKdecorrelateApplyP10DECORR_DECPiS1_S1_S1_i:
 1639|  4.91M|                        FIXP_DBL *dataImagOut, const INT startHybBand) {
 1640|  4.91M|  HANDLE_DECORR_DEC self = hDecorrDec;
 1641|  4.91M|  INT err = 0;
 1642|  4.91M|  INT rb, stop, start;
 1643|       |
 1644|  4.91M|  if (self != NULL) {
  ------------------
  |  Branch (1644:7): [True: 4.91M, False: 0]
  ------------------
 1645|  4.91M|    int nHybBands = 0;
 1646|       |    /* copy new samples */
 1647|  4.91M|    nHybBands = self->numbins;
 1648|       |
 1649|  4.91M|    FIXP_DBL directNrg[(28)];
 1650|       |
 1651|  4.91M|    DuckerCalcEnergy(
 1652|  4.91M|        &self->ducker, dataRealIn, dataImagIn, directNrg,
 1653|  4.91M|        self->ducker.maxValDirectData, &(self->ducker.scaleDirectNrg),
 1654|  4.91M|        (self->ducker.duckerType == DUCKER_PS) ? 1 : 0, startHybBand);
  ------------------
  |  Branch (1654:9): [True: 104k, False: 4.81M]
  ------------------
 1655|       |
 1656|       |    /* complex-valued hybrid bands */
 1657|  24.5M|    for (stop = 0, rb = 0; rb < (4); rb++) {
  ------------------
  |  Branch (1657:28): [True: 19.6M, False: 4.91M]
  ------------------
 1658|  19.6M|      start = fMax(stop, startHybBand);
 1659|  19.6M|      stop = fMin(self->REV_bandOffset[rb], (UCHAR)nHybBands);
 1660|       |
 1661|  19.6M|      if (start < stop) {
  ------------------
  |  Branch (1661:11): [True: 14.1M, False: 5.55M]
  ------------------
 1662|  14.1M|        switch (hDecorrDec->REV_filtType[rb]) {
 1663|   209k|          case DELAY:
  ------------------
  |  Branch (1663:11): [True: 209k, False: 13.9M]
  ------------------
 1664|   209k|            err = DecorrFilterApplyPASS(&self->Filter[0], dataRealIn,
 1665|   209k|                                        dataImagIn, dataRealOut, dataImagOut,
 1666|   209k|                                        start, stop, self->REV_delay[rb],
 1667|   209k|                                        self->reverbBandDelayBufferIndex[rb]);
 1668|   209k|            break;
 1669|   104k|          case INDEP_CPLX_PS:
  ------------------
  |  Branch (1669:11): [True: 104k, False: 14.0M]
  ------------------
 1670|   104k|            err = DecorrFilterApplyCPLX_PS(
 1671|   104k|                &self->Filter[0], dataRealIn, dataImagIn, dataRealOut,
 1672|   104k|                dataImagOut, start, stop, self->REV_filterOrder[rb],
 1673|   104k|                self->REV_delay[rb], self->reverbBandDelayBufferIndex[rb],
 1674|   104k|                self->stateBufferOffset);
 1675|   104k|            break;
 1676|  13.8M|          case COMMON_REAL:
  ------------------
  |  Branch (1676:11): [True: 13.8M, False: 314k]
  ------------------
 1677|  13.8M|            err = DecorrFilterApplyREAL(
 1678|  13.8M|                &self->Filter[0], dataRealIn, dataImagIn, dataRealOut,
 1679|  13.8M|                dataImagOut, start, stop, self->REV_filterOrder[rb],
 1680|  13.8M|                self->REV_delay[rb], self->reverbBandDelayBufferIndex[rb]);
 1681|  13.8M|            break;
 1682|      0|          default:
  ------------------
  |  Branch (1682:11): [True: 0, False: 14.1M]
  ------------------
 1683|      0|            err = 1;
 1684|      0|            break;
 1685|  14.1M|        }
 1686|  14.1M|        if (err != 0) {
  ------------------
  |  Branch (1686:13): [True: 0, False: 14.1M]
  ------------------
 1687|      0|          goto bail;
 1688|      0|        }
 1689|  14.1M|      } /* if start < stop */
 1690|  19.6M|    }   /* loop over reverb bands */
 1691|       |
 1692|  24.5M|    for (rb = 0; rb < (4); rb++) {
  ------------------
  |  Branch (1692:18): [True: 19.6M, False: 4.91M]
  ------------------
 1693|  19.6M|      self->reverbBandDelayBufferIndex[rb] += 2;
 1694|  19.6M|      if (self->reverbBandDelayBufferIndex[rb] >= 2 * self->REV_delay[rb])
  ------------------
  |  Branch (1694:11): [True: 5.05M, False: 14.6M]
  ------------------
 1695|  5.05M|        self->reverbBandDelayBufferIndex[rb] = 0;
 1696|  19.6M|    }
 1697|       |
 1698|  4.91M|    switch (self->ducker.duckerType) {
 1699|   104k|      case DUCKER_PS:
  ------------------
  |  Branch (1699:7): [True: 104k, False: 4.81M]
  ------------------
 1700|   104k|        err = DuckerApplyPS(&self->ducker, directNrg, dataRealOut, dataImagOut,
 1701|   104k|                            startHybBand);
 1702|   104k|        if (err != 0) goto bail;
  ------------------
  |  Branch (1702:13): [True: 0, False: 104k]
  ------------------
 1703|   104k|        break;
 1704|  4.81M|      default:
  ------------------
  |  Branch (1704:7): [True: 4.81M, False: 104k]
  ------------------
 1705|  4.81M|        err = DuckerApply(&self->ducker, directNrg, dataRealOut, dataImagOut,
 1706|  4.81M|                          startHybBand);
 1707|  4.81M|        if (err != 0) goto bail;
  ------------------
  |  Branch (1707:13): [True: 0, False: 4.81M]
  ------------------
 1708|  4.81M|        break;
 1709|  4.91M|    }
 1710|  4.91M|  }
 1711|       |
 1712|  4.91M|bail:
 1713|  4.91M|  return err;
 1714|  4.91M|}
FDK_decorrelate.cpp:_ZL16distributeBufferP10DECORR_DECii:
 1443|  53.9k|                            const int L_delayBuf) {
 1444|       |  /* factor 2 because of complex values */
 1445|  53.9k|  if ((2 * ((825) + (373))) < 2 * (L_stateBuf + L_delayBuf)) {
  ------------------
  |  Branch (1445:7): [True: 0, False: 53.9k]
  ------------------
 1446|      0|    return 1;
 1447|      0|  }
 1448|       |
 1449|  53.9k|  self->L_stateBufferCplx = 2 * L_stateBuf;
 1450|  53.9k|  self->delayBufferCplx = self->stateBufferCplx + 2 * L_stateBuf;
 1451|  53.9k|  self->L_delayBufferCplx = 2 * L_delayBuf;
 1452|       |
 1453|  53.9k|  return 0;
 1454|  53.9k|}
FDK_decorrelate.cpp:_ZL18DecorrFilterInitPSP22DECORR_FILTER_INSTANCEPiS1_S1_S1_iii:
  561|   244k|                              INT const noSampleDelay) {
  562|   244k|  INT errorCode = 0;
  563|       |
  564|   244k|  if (reverbBand == 0) {
  ------------------
  |  Branch (564:7): [True: 103k, False: 141k]
  ------------------
  565|   103k|    self->coeffsPacked = DecorrPsCoeffsCplx[hybridBand];
  566|       |
  567|   103k|    self->stateCplx = pStateBufferCplx + (*offsetStateBuffer);
  568|   103k|    *offsetStateBuffer += 2 * DECORR_FILTER_ORDER_PS;
  ------------------
  |  |  136|   103k|#define DECORR_FILTER_ORDER_PS (12)
  ------------------
  569|   103k|  }
  570|       |
  571|   244k|  self->DelayBufferCplx = pDelayBufferCplx + (*offsetDelayBuffer);
  572|   244k|  *offsetDelayBuffer += 2 * noSampleDelay;
  573|       |
  574|   244k|  return errorCode;
  575|   244k|}
FDK_decorrelate.cpp:_ZL16DecorrFilterInitP22DECORR_FILTER_INSTANCEPiS1_S1_S1_iiiii15FDK_DECORR_TYPE:
  500|  3.39M|                            FDK_DECORR_TYPE const decorrType) {
  501|  3.39M|  INT errorCode = 0;
  502|  3.39M|  switch (decorrType) {
  503|  1.65M|    case DECORR_USAC:
  ------------------
  |  Branch (503:5): [True: 1.65M, False: 1.74M]
  ------------------
  504|  1.65M|      if (useFractDelay) {
  ------------------
  |  Branch (504:11): [True: 0, False: 1.65M]
  ------------------
  505|      0|        return 1;
  506|  1.65M|      } else {
  507|  1.65M|        FDK_ASSERT(decorr_seed == 0);
  ------------------
  |  |  221|  1.65M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (507:9): [True: 1.65M, False: 0]
  ------------------
  508|       |
  509|  1.65M|        switch (reverb_band) {
  ------------------
  |  Branch (509:17): [True: 1.65M, False: 0]
  ------------------
  510|   172k|          case 0:
  ------------------
  |  Branch (510:11): [True: 172k, False: 1.48M]
  ------------------
  511|   172k|            self->numeratorReal = DecorrNumeratorReal0_USAC[decorr_seed];
  512|   172k|            break;
  513|   899k|          case 1:
  ------------------
  |  Branch (513:11): [True: 899k, False: 754k]
  ------------------
  514|   899k|            self->numeratorReal = DecorrNumeratorReal1_USAC[decorr_seed];
  515|   899k|            break;
  516|   378k|          case 2:
  ------------------
  |  Branch (516:11): [True: 378k, False: 1.27M]
  ------------------
  517|   378k|            self->numeratorReal = DecorrNumeratorReal2_USAC[decorr_seed];
  518|   378k|            break;
  519|   202k|          case 3:
  ------------------
  |  Branch (519:11): [True: 202k, False: 1.45M]
  ------------------
  520|   202k|            self->numeratorReal = DecorrNumeratorReal3_USAC[decorr_seed];
  521|   202k|            break;
  522|  1.65M|        }
  523|  1.65M|      }
  524|  1.65M|      break;
  525|  1.74M|    case DECORR_LD:
  ------------------
  |  Branch (525:5): [True: 1.74M, False: 1.65M]
  ------------------
  526|  1.74M|      FDK_ASSERT(decorr_seed < MAX_DECORR_SEED_LD);
  ------------------
  |  |  221|  1.74M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (526:7): [True: 1.74M, False: 0]
  ------------------
  527|  1.74M|      switch (reverb_band) {
  ------------------
  |  Branch (527:15): [True: 1.74M, False: 0]
  ------------------
  528|      0|        case 0:
  ------------------
  |  Branch (528:9): [True: 0, False: 1.74M]
  ------------------
  529|      0|          self->numeratorReal = NULL;
  530|      0|          break;
  531|   388k|        case 1:
  ------------------
  |  Branch (531:9): [True: 388k, False: 1.35M]
  ------------------
  532|   388k|          self->numeratorReal = DecorrNumeratorReal1_LD[decorr_seed];
  533|   388k|          break;
  534|   371k|        case 2:
  ------------------
  |  Branch (534:9): [True: 371k, False: 1.37M]
  ------------------
  535|   371k|          self->numeratorReal = DecorrNumeratorReal2_LD[decorr_seed];
  536|   371k|          break;
  537|   982k|        case 3:
  ------------------
  |  Branch (537:9): [True: 982k, False: 759k]
  ------------------
  538|   982k|          self->numeratorReal = DecorrNumeratorReal3_LD[decorr_seed];
  539|   982k|          break;
  540|  1.74M|      }
  541|  1.74M|      break;
  542|  1.74M|    default:
  ------------------
  |  Branch (542:5): [True: 0, False: 3.39M]
  ------------------
  543|      0|      return 1;
  544|  3.39M|  }
  545|       |
  546|  3.39M|  self->stateCplx = pStateBufferCplx + (*offsetStateBuffer);
  547|  3.39M|  *offsetStateBuffer += 2 * filterOrder;
  548|  3.39M|  self->DelayBufferCplx = pDelayBufferCplx + (*offsetDelayBuffer);
  549|  3.39M|  *offsetDelayBuffer += 2 * noSampleDelay;
  550|       |
  551|  3.39M|  return errorCode;
  552|  3.39M|}
FDK_decorrelate.cpp:_ZL10DuckerInitP15DUCKER_INSTANCEii15FDK_DUCKER_TYPEii:
  986|  53.9k|                      const int nParamBands, int initStatesFlag) {
  987|  53.9k|  INT errorCode = 0;
  988|       |
  989|  53.9k|  if (self) {
  ------------------
  |  Branch (989:7): [True: 53.9k, False: 0]
  ------------------
  990|  53.9k|    switch (nParamBands) {
  991|  3.44k|      case (20):
  ------------------
  |  Branch (991:7): [True: 3.44k, False: 50.5k]
  ------------------
  992|  3.44k|        FDK_ASSERT(hybridBands == 71);
  ------------------
  |  |  221|  3.44k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (992:9): [True: 3.44k, False: 0]
  ------------------
  993|  3.44k|        self->mapHybBands2ProcBands = kernels_20_to_71_PS;
  994|  3.44k|        self->mapProcBands2HybBands = kernels_20_to_71_offset_PS;
  995|  3.44k|        self->parameterBands = (20);
  996|  3.44k|        break;
  997|  23.2k|      case (28):
  ------------------
  |  Branch (997:7): [True: 23.2k, False: 30.6k]
  ------------------
  998|       |
  999|  23.2k|        self->mapHybBands2ProcBands = kernels_28_to_71;
 1000|  23.2k|        self->mapProcBands2HybBands = kernels_28_to_71_offset;
 1001|  23.2k|        self->parameterBands = (28);
 1002|  23.2k|        break;
 1003|  27.2k|      case (23):
  ------------------
  |  Branch (1003:7): [True: 27.2k, False: 26.7k]
  ------------------
 1004|  27.2k|        FDK_ASSERT(hybridBands == 64 || hybridBands == 32);
  ------------------
  |  |  221|  27.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1004:9): [True: 1.34k, False: 25.8k]
  |  Branch (1004:9): [True: 25.8k, False: 0]
  |  Branch (1004:9): [True: 27.2k, False: 0]
  ------------------
 1005|  27.2k|        self->mapHybBands2ProcBands = kernels_23_to_64;
 1006|  27.2k|        self->mapProcBands2HybBands = kernels_23_to_64_offset;
 1007|  27.2k|        self->parameterBands = (23);
 1008|  27.2k|        break;
 1009|      0|      default:
  ------------------
  |  Branch (1009:7): [True: 0, False: 53.9k]
  ------------------
 1010|      0|        return 1;
 1011|  53.9k|    }
 1012|  53.9k|    self->qs_next = &self->mapProcBands2HybBands[1];
 1013|       |
 1014|  53.9k|    self->maxValDirectData = FL2FXCONST_DBL(-1.0f);
  ------------------
  |  |  192|  53.9k|  (FIXP_DBL)(                                                                \
  |  |  193|  53.9k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 53.9k]
  |  |  ------------------
  |  |  194|  53.9k|          ? ((((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|  53.9k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  53.9k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 53.9k, Folded]
  |  |  ------------------
  |  |  199|  53.9k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  53.9k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  53.9k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  53.9k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  53.9k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  53.9k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  53.9k|                 : (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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1015|  53.9k|    self->maxValReverbData = FL2FXCONST_DBL(-1.0f);
  ------------------
  |  |  192|  53.9k|  (FIXP_DBL)(                                                                \
  |  |  193|  53.9k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 53.9k]
  |  |  ------------------
  |  |  194|  53.9k|          ? ((((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|  53.9k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  53.9k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  53.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 53.9k, Folded]
  |  |  ------------------
  |  |  199|  53.9k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  53.9k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  53.9k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  53.9k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  53.9k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  53.9k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  53.9k|                 : (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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1016|  53.9k|    self->scaleDirectNrg = 2 * DUCKER_MAX_NRG_SCALE;
  ------------------
  |  |  229|  53.9k|#define DUCKER_MAX_NRG_SCALE (24)
  ------------------
 1017|  53.9k|    self->scaleReverbNrg = 2 * DUCKER_MAX_NRG_SCALE;
  ------------------
  |  |  229|  53.9k|#define DUCKER_MAX_NRG_SCALE (24)
  ------------------
 1018|  53.9k|    self->scaleSmoothDirRevNrg = 2 * DUCKER_MAX_NRG_SCALE;
  ------------------
  |  |  229|  53.9k|#define DUCKER_MAX_NRG_SCALE (24)
  ------------------
 1019|  53.9k|    self->headroomSmoothDirRevNrg = 2 * DUCKER_MAX_NRG_SCALE;
  ------------------
  |  |  229|  53.9k|#define DUCKER_MAX_NRG_SCALE (24)
  ------------------
 1020|  53.9k|    self->hybridBands = hybridBands;
 1021|  53.9k|    self->partiallyComplex = partiallyComplex;
 1022|       |
 1023|  53.9k|    if (initStatesFlag && (duckerType == DUCKER_PS)) {
  ------------------
  |  Branch (1023:9): [True: 13.1k, False: 40.7k]
  |  Branch (1023:27): [True: 3.44k, False: 9.73k]
  ------------------
 1024|  3.44k|      int pb;
 1025|  72.3k|      for (pb = 0; pb < self->parameterBands; pb++) {
  ------------------
  |  Branch (1025:20): [True: 68.9k, False: 3.44k]
  ------------------
 1026|  68.9k|        self->SmoothDirRevNrg[pb] = (FIXP_MPS)0;
 1027|  68.9k|      }
 1028|  3.44k|    }
 1029|  53.9k|  } else
 1030|      0|    errorCode = 1;
 1031|       |
 1032|  53.9k|  return errorCode;
 1033|  53.9k|}
FDK_decorrelate.cpp:_ZL16DuckerCalcEnergyP15DUCKER_INSTANCEPKiS2_PiiPaii:
 1044|  9.72M|                            int startHybBand) {
 1045|  9.72M|  INT err = 0;
 1046|  9.72M|  int qs, maxHybBand;
 1047|  9.72M|  int maxHybridBand = self->hybridBands - 1;
 1048|       |
 1049|  9.72M|  maxHybBand = maxHybridBand;
 1050|       |
 1051|  9.72M|  FDKmemclear(energy, (28) * sizeof(FIXP_DBL));
 1052|       |
 1053|  9.72M|  if (mode == 1) {
  ------------------
  |  Branch (1053:7): [True: 104k, False: 9.62M]
  ------------------
 1054|   104k|    int pb;
 1055|   104k|    int clz;
 1056|   104k|    FIXP_DBL maxVal = FL2FXCONST_DBL(-1.0f);
  ------------------
  |  |  192|   104k|  (FIXP_DBL)(                                                                \
  |  |  193|   104k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 104k]
  |  |  ------------------
  |  |  194|   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 (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|   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 (198:14): [True: 104k, Folded]
  |  |  ------------------
  |  |  199|   104k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   104k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   104k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   104k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|   104k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   104k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|   104k|                 : (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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1057|       |
 1058|   104k|    if (maxVal == FL2FXCONST_DBL(-1.0f)) {
  ------------------
  |  |  192|   104k|  (FIXP_DBL)(                                                                \
  |  |  193|   104k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 104k]
  |  |  ------------------
  |  |  194|   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 (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|   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 (198:14): [True: 104k, Folded]
  |  |  ------------------
  |  |  199|   104k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   104k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   104k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   104k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|   104k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   104k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|   104k|                 : (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 (1058:9): [True: 104k, False: 0]
  ------------------
 1059|   104k|      clz = fMin(getScalefactor(&inputReal[startHybBand],
 1060|   104k|                                fMax(0, maxHybridBand - startHybBand + 1)),
 1061|   104k|                 getScalefactor(&inputImag[startHybBand],
 1062|   104k|                                fMax(0, maxHybBand - startHybBand + 1)));
 1063|   104k|    } else {
 1064|      0|      clz = CntLeadingZeros(maxVal) - 1;
  ------------------
  |  |  308|      0|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 1065|      0|    }
 1066|       |
 1067|   104k|    clz = fMin(fMax(0, clz - DUCKER_HEADROOM_BITS), DUCKER_MAX_NRG_SCALE);
  ------------------
  |  |  230|   104k|#define DUCKER_HEADROOM_BITS (2)
  ------------------
                  clz = fMin(fMax(0, clz - DUCKER_HEADROOM_BITS), DUCKER_MAX_NRG_SCALE);
  ------------------
  |  |  229|   104k|#define DUCKER_MAX_NRG_SCALE (24)
  ------------------
 1068|   104k|    *nrgScale = (SCHAR)clz << 1;
 1069|       |
 1070|       |    /* Initialize pb since it would stay uninitialized for the case startHybBand
 1071|       |     * > maxHybBand. */
 1072|   104k|    pb = SpatialDecGetProcessingBand(maxHybBand, self->mapHybBands2ProcBands);
 1073|  7.55M|    for (qs = startHybBand; qs <= maxHybBand; qs++) {
  ------------------
  |  Branch (1073:29): [True: 7.44M, False: 104k]
  ------------------
 1074|  7.44M|      pb = SpatialDecGetProcessingBand(qs, self->mapHybBands2ProcBands);
 1075|  7.44M|      energy[pb] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  7.44M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 108, False: 7.44M]
  |  |  ------------------
  |  |  252|  7.44M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  7.44M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 7.44M]
  |  |  ------------------
  |  |  254|  7.44M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  7.44M|             : ((LONG)(src) << (scale)))
  ------------------
 1076|  7.44M|          (energy[pb] >> 1) + (fPow2Div2(inputReal[qs] << clz) >> 1) +
 1077|  7.44M|              (fPow2Div2(inputImag[qs] << clz) >> 1),
 1078|  7.44M|          1, DFRACT_BITS);
 1079|  7.44M|    }
 1080|   104k|    pb++;
 1081|       |
 1082|   104k|    for (; pb <= SpatialDecGetProcessingBand(maxHybridBand,
  ------------------
  |  Branch (1082:12): [True: 0, False: 104k]
  ------------------
 1083|   104k|                                             self->mapHybBands2ProcBands);
 1084|   104k|         pb++) {
 1085|      0|      FDK_ASSERT(pb != SpatialDecGetProcessingBand(
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1085:7): [True: 0, False: 0]
  ------------------
 1086|      0|                           qs - 1, self->mapHybBands2ProcBands));
 1087|      0|      int qs_next;
 1088|      0|      FIXP_DBL nrg = 0;
 1089|      0|      qs_next = (int)self->qs_next[pb];
 1090|      0|      for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1090:14): [True: 0, False: 0]
  ------------------
 1091|      0|        nrg = fAddSaturate(nrg, fPow2Div2(inputReal[qs] << clz));
 1092|      0|      }
 1093|      0|      energy[pb] = nrg;
 1094|      0|    }
 1095|  9.62M|  } else {
 1096|  9.62M|    int clz;
 1097|  9.62M|    FIXP_DBL maxVal = FL2FXCONST_DBL(-1.0f);
  ------------------
  |  |  192|  9.62M|  (FIXP_DBL)(                                                                \
  |  |  193|  9.62M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 9.62M]
  |  |  ------------------
  |  |  194|  9.62M|          ? ((((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|  9.62M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  9.62M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.62M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 9.62M, Folded]
  |  |  ------------------
  |  |  199|  9.62M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  9.62M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  9.62M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  9.62M|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  9.62M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  9.62M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  9.62M|                 : (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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|       |
 1099|  9.62M|    maxVal = inputMaxVal;
 1100|       |
 1101|  9.62M|    if (maxVal == FL2FXCONST_DBL(-1.0f)) {
  ------------------
  |  |  192|  9.62M|  (FIXP_DBL)(                                                                \
  |  |  193|  9.62M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 9.62M]
  |  |  ------------------
  |  |  194|  9.62M|          ? ((((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|  9.62M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  9.62M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.62M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 9.62M, Folded]
  |  |  ------------------
  |  |  199|  9.62M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  9.62M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  9.62M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  9.62M|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  9.62M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  9.62M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  9.62M|                 : (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 (1101:9): [True: 9.62M, False: 0]
  ------------------
 1102|  9.62M|      clz = fMin(getScalefactor(&inputReal[startHybBand],
 1103|  9.62M|                                fMax(0, maxHybridBand - startHybBand + 1)),
 1104|  9.62M|                 getScalefactor(&inputImag[startHybBand],
 1105|  9.62M|                                fMax(0, maxHybBand - startHybBand + 1)));
 1106|  9.62M|    } else {
 1107|      0|      clz = CntLeadingZeros(maxVal) - 1;
  ------------------
  |  |  308|      0|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 1108|      0|    }
 1109|       |
 1110|  9.62M|    clz = fMin(fMax(0, clz - DUCKER_HEADROOM_BITS), DUCKER_MAX_NRG_SCALE);
  ------------------
  |  |  230|  9.62M|#define DUCKER_HEADROOM_BITS (2)
  ------------------
                  clz = fMin(fMax(0, clz - DUCKER_HEADROOM_BITS), DUCKER_MAX_NRG_SCALE);
  ------------------
  |  |  229|  9.62M|#define DUCKER_MAX_NRG_SCALE (24)
  ------------------
 1111|  9.62M|    *nrgScale = (SCHAR)clz << 1;
 1112|       |
 1113|   559M|    for (qs = startHybBand; qs <= maxHybBand; qs++) {
  ------------------
  |  Branch (1113:29): [True: 550M, False: 9.62M]
  ------------------
 1114|   550M|      int pb = SpatialDecGetProcessingBand(qs, self->mapHybBands2ProcBands);
 1115|   550M|      energy[pb] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|   550M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 57.5k, False: 550M]
  |  |  ------------------
  |  |  252|   550M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|   550M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 550M]
  |  |  ------------------
  |  |  254|   550M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|   550M|             : ((LONG)(src) << (scale)))
  ------------------
 1116|   550M|          (energy[pb] >> 1) + (fPow2Div2(inputReal[qs] << clz) >> 1) +
 1117|   550M|              (fPow2Div2(inputImag[qs] << clz) >> 1),
 1118|   550M|          1, DFRACT_BITS);
 1119|   550M|    }
 1120|       |
 1121|  9.62M|    for (; qs <= maxHybridBand; qs++) {
  ------------------
  |  Branch (1121:12): [True: 0, False: 9.62M]
  ------------------
 1122|      0|      int pb = SpatialDecGetProcessingBand(qs, self->mapHybBands2ProcBands);
 1123|      0|      energy[pb] = fAddSaturate(energy[pb], fPow2Div2(inputReal[qs] << clz));
 1124|      0|    }
 1125|  9.62M|  }
 1126|       |
 1127|  9.72M|  {
 1128|       |    /* Catch overflows which have been observed in erred bitstreams to avoid
 1129|       |     * assertion failures later. */
 1130|  9.72M|    int pb;
 1131|   282M|    for (pb = 0; pb < (28); pb++) {
  ------------------
  |  Branch (1131:18): [True: 272M, False: 9.72M]
  ------------------
 1132|   272M|      energy[pb] = (FIXP_DBL)((LONG)energy[pb] & (LONG)MAXVAL_DBL);
  ------------------
  |  |  156|   272M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1133|   272M|    }
 1134|  9.72M|  }
 1135|  9.72M|  return err;
 1136|  9.72M|}
FDK_decorrelate.cpp:_ZL27SpatialDecGetProcessingBandiPKh:
  220|   562M|                                              const UCHAR *tab) {
  221|   562M|  return tab[hybridBand];
  222|   562M|}
FDK_decorrelate.cpp:_ZL21DecorrFilterApplyPASSPK22DECORR_FILTER_INSTANCEPiS2_S2_S2_iiii:
  583|   209k|                                 INT reverbBandDelayBufferIndex) {
  584|   209k|  INT i;
  585|   209k|  INT offset = 2 * reverbBandNoSampleDelay;
  586|   209k|  FIXP_MPS *pDelayBuffer =
  ------------------
  |  |  108|   209k|#define FIXP_MPS FIXP_DBL
  ------------------
  587|   209k|      &filter[start].DelayBufferCplx[reverbBandDelayBufferIndex];
  588|       |
  589|       |  /* Memory for the delayline has been allocated in a consecutive order, so we
  590|       |     can address from filter to filter with a constant length.
  591|       |     Be aware that real and imaginary part of the delayline are stored in
  592|       |     interleaved order.
  593|       |  */
  594|   209k|  if (dataImagIn == NULL) {
  ------------------
  |  Branch (594:7): [True: 0, False: 209k]
  ------------------
  595|      0|    for (i = start; i < stop; i++) {
  ------------------
  |  Branch (595:21): [True: 0, False: 0]
  ------------------
  596|      0|      FIXP_DBL tmp;
  597|       |
  598|      0|      tmp = *pDelayBuffer;
  599|      0|      *pDelayBuffer = dataRealIn[i];
  600|      0|      dataRealOut[i] = tmp;
  601|      0|      pDelayBuffer += offset;
  602|      0|    }
  603|   209k|  } else {
  604|   209k|    if ((i = stop - start) != 0) {
  ------------------
  |  Branch (604:9): [True: 209k, False: 0]
  ------------------
  605|   209k|      dataRealIn += start;
  606|   209k|      dataImagIn += start;
  607|   209k|      dataRealOut += start;
  608|   209k|      dataImagOut += start;
  609|  4.29M|      do {
  610|  4.29M|        FIXP_DBL delay_re, delay_im, real, imag;
  611|       |
  612|  4.29M|        real = *dataRealIn++;
  613|  4.29M|        imag = *dataImagIn++;
  614|  4.29M|        delay_re = pDelayBuffer[0];
  615|  4.29M|        delay_im = pDelayBuffer[1];
  616|  4.29M|        pDelayBuffer[0] = real;
  617|  4.29M|        pDelayBuffer[1] = imag;
  618|  4.29M|        *dataRealOut++ = delay_re;
  619|  4.29M|        *dataImagOut++ = delay_im;
  620|  4.29M|        pDelayBuffer += offset;
  621|  4.29M|      } while (--i != 0);
  ------------------
  |  Branch (621:16): [True: 4.08M, False: 209k]
  ------------------
  622|   209k|    }
  623|   209k|  }
  624|       |
  625|   209k|  return (INT)0;
  626|   209k|}
FDK_decorrelate.cpp:_ZL24DecorrFilterApplyCPLX_PSPK22DECORR_FILTER_INSTANCEPiS2_S2_S2_iiiiiPh:
  815|   104k|    INT reverbBandDelayBufferIndex, UCHAR *stateBufferOffset) {
  816|       |  /* r = real, j = imaginary */
  817|   104k|  FIXP_DBL r_data_a, j_data_a, r_data_b, j_data_b, r_stage_mult, j_stage_mult;
  818|   104k|  FIXP_STP rj_coeff;
  ------------------
  |  |  236|   104k|#define FIXP_STP FIXP_SPK
  ------------------
  819|       |
  820|       |  /* get pointer to current position in input delay buffer of filter with
  821|       |   * starting-index */
  822|   104k|  FIXP_DBL *pDelayBuffer =
  823|   104k|      &filter[start].DelayBufferCplx[reverbBandDelayBufferIndex]; /* increases
  824|       |                                                                     by 2 every
  825|       |                                                                     other call
  826|       |                                                                     of this
  827|       |                                                                     function */
  828|       |  /* determine the increment for this pointer to get to the correct position in
  829|       |   * the delay buffer of the next filter */
  830|   104k|  INT offsetDelayBuffer = (2 * reverbBandNoSampleDelay) - 1;
  831|       |
  832|       |  /* pointer to current position in state buffer */
  833|   104k|  FIXP_DBL *pStates = filter[start].stateCplx;
  834|   104k|  INT pStatesIncrement = 2 * reverbFilterOrder;
  835|       |
  836|       |  /* stateBufferOffset-pointers */
  837|   104k|  FIXP_DBL *pStateBufferOffset0 = pStates + stateBufferOffset[0];
  838|   104k|  FIXP_DBL *pStateBufferOffset1 = pStates + stateBufferOffset[1];
  839|   104k|  FIXP_DBL *pStateBufferOffset2 = pStates + stateBufferOffset[2];
  840|       |
  841|       |  /* traverse all hybrid-bands inbetween start- and stop-index */
  842|  3.25M|  for (int i = start; i < stop; i++) {
  ------------------
  |  Branch (842:23): [True: 3.14M, False: 104k]
  ------------------
  843|       |    /* 1. input delay (real/imaginary values interleaved) */
  844|       |
  845|       |    /* load delayed real input value */
  846|  3.14M|    r_data_a = *pDelayBuffer;
  847|       |    /* store incoming real data value to delay buffer and increment pointer */
  848|  3.14M|    *pDelayBuffer++ = dataRealIn[i];
  849|       |
  850|       |    /* load delayed imaginary input value */
  851|  3.14M|    j_data_a = *pDelayBuffer;
  852|       |    /* store incoming imaginary data value to delay buffer */
  853|  3.14M|    *pDelayBuffer = dataImagIn[i];
  854|       |    /* increase delay buffer by offset */
  855|  3.14M|    pDelayBuffer += offsetDelayBuffer;
  856|       |
  857|       |    /* 2. Phi(k)-stage */
  858|       |
  859|       |    /* create pointer to coefficient table (real and imaginary coefficients
  860|       |     * interleaved) */
  861|  3.14M|    const FIXP_STP *pCoeffs = filter[i].coeffsPacked;
  862|       |
  863|       |    /* the first two entries of the coefficient table are the
  864|       |     * Phi(k)-multiplicants */
  865|  3.14M|    rj_coeff = *pCoeffs++;
  866|       |    /* multiply value from input delay buffer by looked-up values */
  867|  3.14M|    cplxMultDiv2(&r_data_b, &j_data_b, r_data_a, j_data_a, rj_coeff);
  868|       |
  869|       |    /* 3. process all three filter stages */
  870|       |
  871|       |    /* stage 0 */
  872|       |
  873|       |    /* get coefficients from lookup table */
  874|  3.14M|    rj_coeff = *pCoeffs++;
  875|       |
  876|       |    /* multiply output of last stage by coefficient */
  877|  3.14M|    cplxMultDiv2(&r_stage_mult, &j_stage_mult, r_data_b, j_data_b, rj_coeff);
  878|  3.14M|    r_stage_mult <<= 1;
  879|  3.14M|    j_stage_mult <<= 1;
  880|       |
  881|       |    /* read and add value from state buffer (this is the input for the next
  882|       |     * stage) */
  883|  3.14M|    r_data_a = r_stage_mult + pStateBufferOffset0[0];
  884|  3.14M|    j_data_a = j_stage_mult + pStateBufferOffset0[1];
  885|       |
  886|       |    /* negate r_data_a to perform multiplication with complex conjugate of
  887|       |     * rj_coeff */
  888|  3.14M|    cplxMultDiv2(&r_stage_mult, &j_stage_mult, -r_data_a, j_data_a, rj_coeff);
  889|       |
  890|       |    /* add stage input to shifted result */
  891|  3.14M|    r_stage_mult = r_data_b + (r_stage_mult << 1);
  892|  3.14M|    j_stage_mult = j_data_b - (j_stage_mult << 1);
  893|       |
  894|       |    /* store result to state buffer */
  895|  3.14M|    pStateBufferOffset0[0] = r_stage_mult;
  896|  3.14M|    pStateBufferOffset0[1] = j_stage_mult;
  897|  3.14M|    pStateBufferOffset0 += pStatesIncrement;
  898|       |
  899|       |    /* stage 1 */
  900|       |
  901|       |    /* get coefficients from lookup table */
  902|  3.14M|    rj_coeff = *pCoeffs++;
  903|       |
  904|       |    /* multiply output of last stage by coefficient */
  905|  3.14M|    cplxMultDiv2(&r_stage_mult, &j_stage_mult, r_data_a, j_data_a, rj_coeff);
  906|  3.14M|    r_stage_mult <<= 1;
  907|  3.14M|    j_stage_mult <<= 1;
  908|       |
  909|       |    /* read and add value from state buffer (this is the input for the next
  910|       |     * stage) */
  911|  3.14M|    r_data_b = r_stage_mult + pStateBufferOffset1[0];
  912|  3.14M|    j_data_b = j_stage_mult + pStateBufferOffset1[1];
  913|       |
  914|       |    /* negate r_data_b to perform multiplication with complex conjugate of
  915|       |     * rj_coeff */
  916|  3.14M|    cplxMultDiv2(&r_stage_mult, &j_stage_mult, -r_data_b, j_data_b, rj_coeff);
  917|       |
  918|       |    /* add stage input to shifted result */
  919|  3.14M|    r_stage_mult = r_data_a + (r_stage_mult << 1);
  920|  3.14M|    j_stage_mult = j_data_a - (j_stage_mult << 1);
  921|       |
  922|       |    /* store result to state buffer */
  923|  3.14M|    pStateBufferOffset1[0] = r_stage_mult;
  924|  3.14M|    pStateBufferOffset1[1] = j_stage_mult;
  925|  3.14M|    pStateBufferOffset1 += pStatesIncrement;
  926|       |
  927|       |    /* stage 2 */
  928|       |
  929|       |    /* get coefficients from lookup table */
  930|  3.14M|    rj_coeff = *pCoeffs++;
  931|       |
  932|       |    /* multiply output of last stage by coefficient */
  933|  3.14M|    cplxMultDiv2(&r_stage_mult, &j_stage_mult, r_data_b, j_data_b, rj_coeff);
  934|  3.14M|    r_stage_mult <<= 1;
  935|  3.14M|    j_stage_mult <<= 1;
  936|       |
  937|       |    /* read and add value from state buffer (this is the input for the next
  938|       |     * stage) */
  939|  3.14M|    r_data_a = r_stage_mult + pStateBufferOffset2[0];
  940|  3.14M|    j_data_a = j_stage_mult + pStateBufferOffset2[1];
  941|       |
  942|       |    /* negate r_data_a to perform multiplication with complex conjugate of
  943|       |     * rj_coeff */
  944|  3.14M|    cplxMultDiv2(&r_stage_mult, &j_stage_mult, -r_data_a, j_data_a, rj_coeff);
  945|       |
  946|       |    /* add stage input to shifted result */
  947|  3.14M|    r_stage_mult = r_data_b + (r_stage_mult << 1);
  948|  3.14M|    j_stage_mult = j_data_b - (j_stage_mult << 1);
  949|       |
  950|       |    /* store result to state buffer */
  951|  3.14M|    pStateBufferOffset2[0] = r_stage_mult;
  952|  3.14M|    pStateBufferOffset2[1] = j_stage_mult;
  953|  3.14M|    pStateBufferOffset2 += pStatesIncrement;
  954|       |
  955|       |    /* write filter output */
  956|  3.14M|    dataRealOut[i] = r_data_a << 1;
  957|  3.14M|    dataImagOut[i] = j_data_a << 1;
  958|       |
  959|  3.14M|  } /* end of band/filter loop (outer loop) */
  960|       |
  961|       |  /* update stateBufferOffset with respect to ring buffer boundaries */
  962|   104k|  if (stateBufferOffset[0] == 4)
  ------------------
  |  Branch (962:7): [True: 34.8k, False: 70.0k]
  ------------------
  963|  34.8k|    stateBufferOffset[0] = 0;
  964|  70.0k|  else
  965|  70.0k|    stateBufferOffset[0] += 2;
  966|       |
  967|   104k|  if (stateBufferOffset[1] == 12)
  ------------------
  |  Branch (967:7): [True: 26.1k, False: 78.6k]
  ------------------
  968|  26.1k|    stateBufferOffset[1] = 6;
  969|  78.6k|  else
  970|  78.6k|    stateBufferOffset[1] += 2;
  971|       |
  972|   104k|  if (stateBufferOffset[2] == 22)
  ------------------
  |  Branch (972:7): [True: 20.8k, False: 83.9k]
  ------------------
  973|  20.8k|    stateBufferOffset[2] = 14;
  974|  83.9k|  else
  975|  83.9k|    stateBufferOffset[2] += 2;
  976|       |
  977|   104k|  return (INT)0;
  978|   104k|}
FDK_decorrelate.cpp:_ZL21DecorrFilterApplyREALPK22DECORR_FILTER_INSTANCEPiS2_S2_S2_iiiii:
  635|  13.8M|                                 INT reverbBandDelayBufferIndex) {
  636|  13.8M|  INT i, j;
  637|  13.8M|  FIXP_DBL xReal, xImag, yReal, yImag;
  638|       |
  639|  13.8M|  const FIXP_DECORR *pFilter = filter[start].numeratorReal;
  640|       |
  641|  13.8M|  INT offsetDelayBuffer = (2 * reverbBandNoSampleDelay) - 1;
  642|  13.8M|  FIXP_MPS *pDelayBuffer =
  ------------------
  |  |  108|  13.8M|#define FIXP_MPS FIXP_DBL
  ------------------
  643|  13.8M|      &filter[start].DelayBufferCplx[reverbBandDelayBufferIndex];
  644|       |
  645|  13.8M|  INT offsetStates = 2 * reverbFilterOrder;
  646|  13.8M|  FIXP_DBL *pStates = filter[start].stateCplx;
  647|       |
  648|       |  /* Memory for the delayline has been allocated in a consecutive order, so we
  649|       |     can address from filter to filter with a constant length. The same is valid
  650|       |     for the states.
  651|       |     Be aware that real and imaginary part of the delayline and the states are
  652|       |     stored in interleaved order.
  653|       |     All filter in a reverb band have the same filter coefficients.
  654|       |     Exploit symmetry: numeratorReal[i] =
  655|       |     denominatorReal[reverbFilterLength-1-i] Do not accumulate the highest
  656|       |     states which are always zero.
  657|       |  */
  658|  13.8M|  if (reverbFilterOrder == 2) {
  ------------------
  |  Branch (658:7): [True: 376k, False: 13.4M]
  ------------------
  659|   376k|    FIXP_DECORR nFilt0L, nFilt0H;
  ------------------
  |  |  111|   376k|#define FIXP_DECORR FIXP_SGL
  ------------------
  660|       |
  661|   376k|    nFilt0L = pFilter[0];
  662|   376k|    nFilt0H = pFilter[1];
  663|       |
  664|  12.0M|    for (i = start; i < stop; i++) {
  ------------------
  |  Branch (664:21): [True: 11.7M, False: 376k]
  ------------------
  665|  11.7M|      xReal = *pDelayBuffer;
  666|  11.7M|      *pDelayBuffer = dataRealIn[i];
  667|  11.7M|      pDelayBuffer++;
  668|       |
  669|  11.7M|      xImag = *pDelayBuffer;
  670|  11.7M|      *pDelayBuffer = dataImagIn[i];
  671|  11.7M|      pDelayBuffer += offsetDelayBuffer;
  672|       |
  673|  11.7M|      yReal = (pStates[0] + fMultDiv2(xReal, nFilt0L)) << FILTER_SF;
  ------------------
  |  |  232|  11.7M|#define FILTER_SF (2)
  ------------------
  674|  11.7M|      yImag = (pStates[1] + fMultDiv2(xImag, nFilt0L)) << FILTER_SF;
  ------------------
  |  |  232|  11.7M|#define FILTER_SF (2)
  ------------------
  675|       |
  676|  11.7M|      dataRealOut[i] = yReal;
  677|  11.7M|      dataImagOut[i] = yImag;
  678|       |
  679|  11.7M|      pStates[0] =
  680|  11.7M|          pStates[2] + fMultDiv2(xReal, nFilt0H) - fMultDiv2(yReal, nFilt0H);
  681|  11.7M|      pStates[1] =
  682|  11.7M|          pStates[3] + fMultDiv2(xImag, nFilt0H) - fMultDiv2(yImag, nFilt0H);
  683|  11.7M|      pStates[2] = (xReal >> FILTER_SF) - fMultDiv2(yReal, nFilt0L);
  ------------------
  |  |  232|  11.7M|#define FILTER_SF (2)
  ------------------
  684|  11.7M|      pStates[3] = (xImag >> FILTER_SF) - fMultDiv2(yImag, nFilt0L);
  ------------------
  |  |  232|  11.7M|#define FILTER_SF (2)
  ------------------
  685|  11.7M|      pStates += offsetStates;
  686|  11.7M|    }
  687|  13.4M|  } else if (reverbFilterOrder == 3) {
  ------------------
  |  Branch (687:14): [True: 4.66M, False: 8.76M]
  ------------------
  688|  4.66M|    FIXP_DECORR nFilt0L, nFilt0H, nFilt1L;
  ------------------
  |  |  111|  4.66M|#define FIXP_DECORR FIXP_SGL
  ------------------
  689|       |
  690|  4.66M|    nFilt0L = pFilter[0];
  691|  4.66M|    nFilt0H = pFilter[1];
  692|  4.66M|    nFilt1L = pFilter[2];
  693|       |
  694|  65.1M|    for (i = start; i < stop; i++) {
  ------------------
  |  Branch (694:21): [True: 60.5M, False: 4.66M]
  ------------------
  695|  60.5M|      xReal = *pDelayBuffer;
  696|  60.5M|      *pDelayBuffer = dataRealIn[i];
  697|  60.5M|      pDelayBuffer++;
  698|       |
  699|  60.5M|      xImag = *pDelayBuffer;
  700|  60.5M|      *pDelayBuffer = dataImagIn[i];
  701|  60.5M|      pDelayBuffer += offsetDelayBuffer;
  702|       |
  703|  60.5M|      yReal = (pStates[0] + fMultDiv2(xReal, nFilt0L)) << FILTER_SF;
  ------------------
  |  |  232|  60.5M|#define FILTER_SF (2)
  ------------------
  704|  60.5M|      yImag = (pStates[1] + fMultDiv2(xImag, nFilt0L)) << FILTER_SF;
  ------------------
  |  |  232|  60.5M|#define FILTER_SF (2)
  ------------------
  705|       |
  706|  60.5M|      dataRealOut[i] = yReal;
  707|  60.5M|      dataImagOut[i] = yImag;
  708|       |
  709|  60.5M|      pStates[0] =
  710|  60.5M|          pStates[2] + fMultDiv2(xReal, nFilt0H) - fMultDiv2(yReal, nFilt1L);
  711|  60.5M|      pStates[1] =
  712|  60.5M|          pStates[3] + fMultDiv2(xImag, nFilt0H) - fMultDiv2(yImag, nFilt1L);
  713|  60.5M|      pStates[2] =
  714|  60.5M|          pStates[4] + fMultDiv2(xReal, nFilt1L) - fMultDiv2(yReal, nFilt0H);
  715|  60.5M|      pStates[3] =
  716|  60.5M|          pStates[5] + fMultDiv2(xImag, nFilt1L) - fMultDiv2(yImag, nFilt0H);
  717|  60.5M|      pStates[4] = (xReal >> FILTER_SF) - fMultDiv2(yReal, nFilt0L);
  ------------------
  |  |  232|  60.5M|#define FILTER_SF (2)
  ------------------
  718|  60.5M|      pStates[5] = (xImag >> FILTER_SF) - fMultDiv2(yImag, nFilt0L);
  ------------------
  |  |  232|  60.5M|#define FILTER_SF (2)
  ------------------
  719|  60.5M|      pStates += offsetStates;
  720|  60.5M|    }
  721|  8.76M|  } else if (reverbFilterOrder == 6) {
  ------------------
  |  Branch (721:14): [True: 579k, False: 8.18M]
  ------------------
  722|   579k|    FIXP_DECORR nFilt0L, nFilt0H, nFilt1L, nFilt1H, nFilt2L, nFilt2H;
  ------------------
  |  |  111|   579k|#define FIXP_DECORR FIXP_SGL
  ------------------
  723|       |
  724|   579k|    nFilt0L = pFilter[0];
  725|   579k|    nFilt0H = pFilter[1];
  726|   579k|    nFilt1L = pFilter[2];
  727|   579k|    nFilt1H = pFilter[3];
  728|   579k|    nFilt2L = pFilter[4];
  729|   579k|    nFilt2H = pFilter[5];
  730|       |
  731|  6.74M|    for (i = start; i < stop; i++) {
  ------------------
  |  Branch (731:21): [True: 6.16M, False: 579k]
  ------------------
  732|  6.16M|      xReal = *pDelayBuffer;
  733|  6.16M|      *pDelayBuffer = dataRealIn[i];
  734|  6.16M|      pDelayBuffer++;
  735|       |
  736|  6.16M|      xImag = *pDelayBuffer;
  737|  6.16M|      *pDelayBuffer = dataImagIn[i];
  738|  6.16M|      pDelayBuffer += offsetDelayBuffer;
  739|       |
  740|  6.16M|      yReal = (pStates[0] + fMultDiv2(xReal, nFilt0L)) << FILTER_SF;
  ------------------
  |  |  232|  6.16M|#define FILTER_SF (2)
  ------------------
  741|  6.16M|      yImag = (pStates[1] + fMultDiv2(xImag, nFilt0L)) << FILTER_SF;
  ------------------
  |  |  232|  6.16M|#define FILTER_SF (2)
  ------------------
  742|  6.16M|      dataRealOut[i] = yReal;
  743|  6.16M|      dataImagOut[i] = yImag;
  744|       |
  745|  6.16M|      pStates[0] =
  746|  6.16M|          pStates[2] + fMultDiv2(xReal, nFilt0H) - fMultDiv2(yReal, nFilt2H);
  747|  6.16M|      pStates[1] =
  748|  6.16M|          pStates[3] + fMultDiv2(xImag, nFilt0H) - fMultDiv2(yImag, nFilt2H);
  749|  6.16M|      pStates[2] =
  750|  6.16M|          pStates[4] + fMultDiv2(xReal, nFilt1L) - fMultDiv2(yReal, nFilt2L);
  751|  6.16M|      pStates[3] =
  752|  6.16M|          pStates[5] + fMultDiv2(xImag, nFilt1L) - fMultDiv2(yImag, nFilt2L);
  753|  6.16M|      pStates[4] =
  754|  6.16M|          pStates[6] + fMultDiv2(xReal, nFilt1H) - fMultDiv2(yReal, nFilt1H);
  755|  6.16M|      pStates[5] =
  756|  6.16M|          pStates[7] + fMultDiv2(xImag, nFilt1H) - fMultDiv2(yImag, nFilt1H);
  757|  6.16M|      pStates[6] =
  758|  6.16M|          pStates[8] + fMultDiv2(xReal, nFilt2L) - fMultDiv2(yReal, nFilt1L);
  759|  6.16M|      pStates[7] =
  760|  6.16M|          pStates[9] + fMultDiv2(xImag, nFilt2L) - fMultDiv2(yImag, nFilt1L);
  761|  6.16M|      pStates[8] =
  762|  6.16M|          pStates[10] + fMultDiv2(xReal, nFilt2H) - fMultDiv2(yReal, nFilt0H);
  763|  6.16M|      pStates[9] =
  764|  6.16M|          pStates[11] + fMultDiv2(xImag, nFilt2H) - fMultDiv2(yImag, nFilt0H);
  765|  6.16M|      pStates[10] = (xReal >> FILTER_SF) - fMultDiv2(yReal, nFilt0L);
  ------------------
  |  |  232|  6.16M|#define FILTER_SF (2)
  ------------------
  766|  6.16M|      pStates[11] = (xImag >> FILTER_SF) - fMultDiv2(yImag, nFilt0L);
  ------------------
  |  |  232|  6.16M|#define FILTER_SF (2)
  ------------------
  767|  6.16M|      pStates += offsetStates;
  768|  6.16M|    }
  769|  8.18M|  } else {
  770|  8.18M|    FIXP_DECORR nFilt0L, nFilt0H;
  ------------------
  |  |  111|  8.18M|#define FIXP_DECORR FIXP_SGL
  ------------------
  771|   204M|    for (i = start; i < stop; i++) {
  ------------------
  |  Branch (771:21): [True: 196M, False: 8.18M]
  ------------------
  772|   196M|      xReal = *pDelayBuffer;
  773|   196M|      *pDelayBuffer = dataRealIn[i];
  774|   196M|      pDelayBuffer++;
  775|       |
  776|   196M|      xImag = *pDelayBuffer;
  777|   196M|      *pDelayBuffer = dataImagIn[i];
  778|   196M|      pDelayBuffer += offsetDelayBuffer;
  779|       |
  780|   196M|      nFilt0L = pFilter[0];
  781|   196M|      yReal = (pStates[0] + fMultDiv2(xReal, nFilt0L)) << 2;
  782|   196M|      yImag = (pStates[1] + fMultDiv2(xImag, nFilt0L)) << 2;
  783|   196M|      dataRealOut[i] = yReal;
  784|   196M|      dataImagOut[i] = yImag;
  785|       |
  786|  1.68G|      for (j = 1; j < reverbFilterOrder; j++) {
  ------------------
  |  Branch (786:19): [True: 1.48G, False: 196M]
  ------------------
  787|  1.48G|        nFilt0L = pFilter[j];
  788|  1.48G|        nFilt0H = pFilter[reverbFilterOrder - j];
  789|  1.48G|        pStates[2 * j - 2] = pStates[2 * j] + fMultDiv2(xReal, nFilt0L) -
  790|  1.48G|                             fMultDiv2(yReal, nFilt0H);
  791|  1.48G|        pStates[2 * j - 1] = pStates[2 * j + 1] + fMultDiv2(xImag, nFilt0L) -
  792|  1.48G|                             fMultDiv2(yImag, nFilt0H);
  793|  1.48G|      }
  794|   196M|      nFilt0L = pFilter[j];
  795|   196M|      nFilt0H = pFilter[reverbFilterOrder - j];
  796|   196M|      pStates[2 * j - 2] =
  797|   196M|          fMultDiv2(xReal, nFilt0L) - fMultDiv2(yReal, nFilt0H);
  798|   196M|      pStates[2 * j - 1] =
  799|   196M|          fMultDiv2(xImag, nFilt0L) - fMultDiv2(yImag, nFilt0H);
  800|       |
  801|   196M|      pStates += offsetStates;
  802|   196M|    }
  803|  8.18M|  }
  804|       |
  805|  13.8M|  return (INT)0;
  806|  13.8M|}
FDK_decorrelate.cpp:_ZL13DuckerApplyPSP15DUCKER_INSTANCEPKiPiS3_i:
 1296|   104k|                         int startHybBand) {
 1297|   104k|  int qs = startHybBand;
 1298|   104k|  int pb = 0;
 1299|   104k|  int startParamBand =
 1300|   104k|      SpatialDecGetProcessingBand(startHybBand, self->mapHybBands2ProcBands);
 1301|   104k|  int hybBands;
 1302|       |
 1303|   104k|  int doScaleNrg = 0;
 1304|   104k|  int scaleDirectNrg = 0;
 1305|   104k|  int scaleSmoothDirRevNrg = 0;
 1306|   104k|  FIXP_DBL maxDirRevNrg = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1307|       |
 1308|   104k|  if ((self->scaleDirectNrg != self->scaleSmoothDirRevNrg) ||
  ------------------
  |  Branch (1308:7): [True: 32.5k, False: 72.2k]
  ------------------
 1309|  72.2k|      (self->headroomSmoothDirRevNrg == 0)) {
  ------------------
  |  Branch (1309:7): [True: 5, False: 72.2k]
  ------------------
 1310|  32.5k|    int scale;
 1311|       |
 1312|  32.5k|    scale = fixMin(self->scaleDirectNrg, self->scaleSmoothDirRevNrg +
  ------------------
  |  |  306|  32.5k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1313|  32.5k|                                             self->headroomSmoothDirRevNrg - 2);
 1314|       |
 1315|  32.5k|    scaleDirectNrg = fMax(fMin(self->scaleDirectNrg - scale, (DFRACT_BITS - 1)),
  ------------------
  |  |  113|  32.5k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1316|  32.5k|                          -(DFRACT_BITS - 1));
  ------------------
  |  |  113|  32.5k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1317|  32.5k|    scaleSmoothDirRevNrg =
 1318|  32.5k|        fMax(fMin(self->scaleSmoothDirRevNrg - scale, (DFRACT_BITS - 1)),
  ------------------
  |  |  113|  32.5k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1319|  32.5k|             -(DFRACT_BITS - 1));
  ------------------
  |  |  113|  32.5k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1320|       |
 1321|  32.5k|    self->scaleSmoothDirRevNrg = (SCHAR)scale;
 1322|       |
 1323|  32.5k|    doScaleNrg = 1;
 1324|  32.5k|  }
 1325|       |
 1326|   104k|  hybBands = self->hybridBands;
 1327|       |
 1328|   104k|  FDK_ASSERT((self->parameterBands == (28)) || (self->parameterBands == (20)));
  ------------------
  |  |  221|   104k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1328:3): [True: 0, False: 104k]
  |  Branch (1328:3): [True: 104k, False: 0]
  |  Branch (1328:3): [True: 104k, False: 0]
  ------------------
 1329|  2.20M|  for (pb = startParamBand; pb < self->parameterBands; pb++) {
  ------------------
  |  Branch (1329:29): [True: 2.09M, False: 104k]
  ------------------
 1330|  2.09M|    FIXP_DBL directNrg2 = directNrg[pb];
 1331|       |
 1332|  2.09M|    if (doScaleNrg) {
  ------------------
  |  Branch (1332:9): [True: 651k, False: 1.44M]
  ------------------
 1333|   651k|      directNrg2 = scaleValue(directNrg2, -scaleDirectNrg);
 1334|   651k|      self->peakDiff[pb] =
 1335|   651k|          scaleValue(self->peakDiff[pb], -scaleSmoothDirRevNrg);
 1336|   651k|      self->peakDecay[pb] =
 1337|   651k|          scaleValue(self->peakDecay[pb], -scaleSmoothDirRevNrg);
 1338|   651k|      self->SmoothDirRevNrg[pb] =
 1339|   651k|          scaleValue(self->SmoothDirRevNrg[pb], -scaleSmoothDirRevNrg);
 1340|   651k|    }
 1341|  2.09M|    self->peakDecay[pb] = fixMax(
  ------------------
  |  |  307|  8.38M|#define fixMax(a, b) fMax(a, b)
  |  |  ------------------
  |  |  |  Branch (307:30): [Folded, False: 2.09M]
  |  |  |  Branch (307:30): [Folded, False: 0]
  |  |  |  Branch (307:30): [True: 2.09M, Folded]
  |  |  ------------------
  ------------------
 1342|  2.09M|        directNrg2, fMult(self->peakDecay[pb], PS_DUCK_PEAK_DECAY_FACTOR_FDK));
 1343|  2.09M|    self->peakDiff[pb] =
 1344|  2.09M|        self->peakDiff[pb] +
 1345|  2.09M|        fMult(PS_DUCK_FILTER_COEFF_FDK,
  ------------------
  |  |  249|  2.09M|#define PS_DUCK_FILTER_COEFF_FDK FL2FXCONST_DUCK(PS_DUCK_FILTER_COEFF)
  |  |  ------------------
  |  |  |  |  241|  2.09M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  2.09M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|  2.09M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 2.09M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|  2.09M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  2.09M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  2.09M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 2.09M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|  2.09M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|  2.09M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|  2.09M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|  2.09M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  2.09M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  2.09M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|  2.09M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|  2.09M|              (self->peakDecay[pb] - directNrg2 - self->peakDiff[pb]));
 1347|  2.09M|    self->SmoothDirRevNrg[pb] =
 1348|  2.09M|        fixMax(self->SmoothDirRevNrg[pb] +
  ------------------
  |  |  307|  8.38M|#define fixMax(a, b) fMax(a, b)
  |  |  ------------------
  |  |  |  Branch (307:27): [Folded, False: 2.09M]
  |  |  |  Branch (307:27): [Folded, False: 0]
  |  |  |  Branch (307:27): [True: 2.09M, Folded]
  |  |  |  Branch (307:30): [Folded, False: 2.09M]
  |  |  |  Branch (307:30): [Folded, False: 0]
  |  |  |  Branch (307:30): [True: 2.09M, Folded]
  |  |  ------------------
  ------------------
 1349|  2.09M|                   fMult(PS_DUCK_FILTER_COEFF_FDK,
 1350|  2.09M|                         (directNrg2 - self->SmoothDirRevNrg[pb])),
 1351|  2.09M|               FL2FXCONST_DBL(0));
 1352|       |
 1353|  2.09M|    maxDirRevNrg |= fAbs(self->peakDiff[pb]);
 1354|  2.09M|    maxDirRevNrg |= fAbs(self->SmoothDirRevNrg[pb]);
 1355|       |
 1356|  2.09M|    if ((self->peakDiff[pb] == FL2FXCONST_DBL(0)) &&
  ------------------
  |  |  192|  2.09M|  (FIXP_DBL)(                                                                \
  |  |  193|  2.09M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.09M, Folded]
  |  |  ------------------
  |  |  194|  2.09M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.09M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.09M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.09M]
  |  |  ------------------
  |  |  195|  2.09M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.09M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.09M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.09M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.09M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.09M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.09M|          : ((((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 (1356:9): [True: 1.93M, False: 160k]
  ------------------
 1357|  1.93M|        (self->SmoothDirRevNrg[pb] == FL2FXCONST_DBL(0))) {
  ------------------
  |  |  192|  1.93M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.93M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.93M, Folded]
  |  |  ------------------
  |  |  194|  1.93M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.93M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.93M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.93M]
  |  |  ------------------
  |  |  195|  1.93M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.93M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.93M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.93M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.93M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.93M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.93M|          : ((((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 (1357:9): [True: 1.91M, False: 19.2k]
  ------------------
 1358|  1.91M|      int qs_next;
 1359|       |
 1360|  1.91M|      qs = fMax(qs, SpatialDecGetQmfBand(pb, self->mapProcBands2HybBands));
 1361|  1.91M|      qs_next = fMin((int)self->qs_next[pb], self->hybridBands);
 1362|       |
 1363|  1.91M|      FIXP_DBL *pOutputReal = &outputReal[qs];
 1364|  1.91M|      FIXP_DBL *pOutputImag = &outputImag[qs];
 1365|       |
 1366|  1.91M|      if (qs < hybBands) {
  ------------------
  |  Branch (1366:11): [True: 1.91M, False: 0]
  ------------------
 1367|  8.63M|        for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1367:16): [True: 6.71M, False: 1.91M]
  ------------------
 1368|  6.71M|          *pOutputReal++ = FL2FXCONST_DBL(0);
  ------------------
  |  |  192|  6.71M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.71M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.71M, Folded]
  |  |  ------------------
  |  |  194|  6.71M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.71M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.71M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.71M]
  |  |  ------------------
  |  |  195|  6.71M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.71M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.71M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.71M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.71M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.71M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.71M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1369|  6.71M|          *pOutputImag++ = FL2FXCONST_DBL(0);
  ------------------
  |  |  192|  6.71M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.71M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.71M, Folded]
  |  |  ------------------
  |  |  194|  6.71M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.71M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.71M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.71M]
  |  |  ------------------
  |  |  195|  6.71M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.71M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.71M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.71M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.71M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.71M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.71M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1370|  6.71M|        }
 1371|  1.91M|      } else {
 1372|      0|        for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1372:16): [True: 0, False: 0]
  ------------------
 1373|      0|          *pOutputReal++ = FL2FXCONST_DBL(0);
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1374|      0|        }
 1375|      0|      }
 1376|  1.91M|    } else if (self->peakDiff[pb] != FL2FXCONST_DBL(0)) {
  ------------------
  |  |  192|   179k|  (FIXP_DBL)(                                                                \
  |  |  193|   179k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 179k, Folded]
  |  |  ------------------
  |  |  194|   179k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   179k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   179k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 179k]
  |  |  ------------------
  |  |  195|   179k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   179k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   179k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   179k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   179k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   179k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   179k|          : ((((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 (1376:16): [True: 160k, False: 19.2k]
  ------------------
 1377|   160k|      FIXP_DBL multiplication =
 1378|   160k|          fMult(FL2FXCONST_DUCK(0.75f), self->peakDiff[pb]);
  ------------------
  |  |  241|   160k|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  ------------------
  |  |  |  |  180|   160k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   160k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 160k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   160k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   160k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   160k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 160k]
  |  |  |  |  ------------------
  |  |  |  |  183|   160k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   160k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   160k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   160k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   160k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   160k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   160k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1379|   160k|      if (multiplication > (self->SmoothDirRevNrg[pb] >> 1)) {
  ------------------
  |  Branch (1379:11): [True: 59.0k, False: 101k]
  ------------------
 1380|  59.0k|        FIXP_DBL num, denom, duckGain;
 1381|  59.0k|        int scale, qs_next;
 1382|       |
 1383|       |        /* implement x/y as (sqrt(x)*invSqrt(y))^2 */
 1384|  59.0k|        num = sqrtFixp(self->SmoothDirRevNrg[pb] >> 1);
 1385|  59.0k|        denom = self->peakDiff[pb] +
 1386|  59.0k|                FL2FXCONST_DBL(ABS_THR / (32768.0f * 32768.0f * 128.0f * 1.5f));
  ------------------
  |  |  192|  59.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  59.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 59.0k, Folded]
  |  |  ------------------
  |  |  194|  59.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  59.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  59.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 59.0k]
  |  |  ------------------
  |  |  195|  59.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  59.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  59.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  59.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  59.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  59.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  59.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1387|  59.0k|        denom = invSqrtNorm2(denom, &scale);
 1388|       |
 1389|       |        /* duck output whether duckGain != 1.f */
 1390|  59.0k|        qs = fMax(qs, SpatialDecGetQmfBand(pb, self->mapProcBands2HybBands));
 1391|  59.0k|        qs_next = fMin((int)self->qs_next[pb], self->hybridBands);
 1392|       |
 1393|  59.0k|        duckGain = fMult(num, denom);
 1394|  59.0k|        duckGain = fPow2Div2(duckGain << scale);
 1395|  59.0k|        duckGain = fMultDiv2(FL2FXCONST_DUCK(2.f / 3.f), duckGain) << 3;
  ------------------
  |  |  241|  59.0k|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  ------------------
  |  |  |  |  180|  59.0k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  59.0k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 59.0k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  59.0k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  59.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  59.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 59.0k]
  |  |  |  |  ------------------
  |  |  |  |  183|  59.0k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  59.0k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  59.0k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  59.0k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  59.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  59.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  59.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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1396|       |
 1397|  59.0k|        FIXP_DBL *pOutputReal = &outputReal[qs];
 1398|  59.0k|        FIXP_DBL *pOutputImag = &outputImag[qs];
 1399|       |
 1400|  59.0k|        if (qs < hybBands) {
  ------------------
  |  Branch (1400:13): [True: 59.0k, False: 0]
  ------------------
 1401|   353k|          for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1401:18): [True: 294k, False: 59.0k]
  ------------------
 1402|   294k|            *pOutputReal = fMult(*pOutputReal, duckGain);
 1403|   294k|            pOutputReal++; /* don't move in front of "=" above, because then the
 1404|       |                              fract class treats it differently and provides
 1405|       |                              wrong argument to fMult() (seen on win32/msvc8) */
 1406|   294k|            *pOutputImag = fMult(*pOutputImag, duckGain);
 1407|   294k|            pOutputImag++;
 1408|   294k|          }
 1409|  59.0k|        } else {
 1410|      0|          for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1410:18): [True: 0, False: 0]
  ------------------
 1411|      0|            *pOutputReal = fMult(*pOutputReal, duckGain);
 1412|      0|            pOutputReal++;
 1413|      0|          }
 1414|      0|        }
 1415|  59.0k|      }
 1416|   160k|    }
 1417|  2.09M|  } /* pb */
 1418|       |
 1419|   104k|  self->headroomSmoothDirRevNrg =
 1420|   104k|      (SCHAR)fixMax(0, CntLeadingZeros(maxDirRevNrg) - 1);
  ------------------
  |  |  307|   104k|#define fixMax(a, b) fMax(a, b)
  ------------------
 1421|       |
 1422|   104k|  return 0;
 1423|   104k|}
FDK_decorrelate.cpp:_ZL20SpatialDecGetQmfBandiPKh:
  225|  1.97M|static inline int SpatialDecGetQmfBand(int paramBand, const UCHAR *tab) {
  226|  1.97M|  return (int)tab[paramBand];
  227|  1.97M|}
FDK_decorrelate.cpp:_ZL11DuckerApplyP15DUCKER_INSTANCEPKiPiS3_i:
 1143|  4.81M|                       int startHybBand) {
 1144|  4.81M|  INT err = 0;
 1145|  4.81M|  int qs = startHybBand;
 1146|  4.81M|  int qs_next = 0;
 1147|  4.81M|  int pb = 0;
 1148|  4.81M|  int startParamBand = 0;
 1149|  4.81M|  int hybBands;
 1150|  4.81M|  int hybridBands = self->hybridBands;
 1151|       |
 1152|  4.81M|  C_ALLOC_SCRATCH_START(reverbNrg, FIXP_DBL, (28));
  ------------------
  |  |  324|  4.81M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1153|       |
 1154|  4.81M|  FIXP_DBL *smoothDirRevNrg = &self->SmoothDirRevNrg[0];
 1155|  4.81M|  FIXP_DUCK_GAIN duckGain = 0;
  ------------------
  |  |  239|  4.81M|#define FIXP_DUCK_GAIN FIXP_SGL
  ------------------
 1156|       |
 1157|  4.81M|  int doScaleNrg = 0;
 1158|  4.81M|  int scaleDirectNrg = 0;
 1159|  4.81M|  int scaleReverbNrg = 0;
 1160|  4.81M|  int scaleSmoothDirRevNrg = 0;
 1161|  4.81M|  FIXP_DBL maxDirRevNrg = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|  4.81M|  (FIXP_DBL)(                                                                \
  |  |  193|  4.81M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 4.81M, Folded]
  |  |  ------------------
  |  |  194|  4.81M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  4.81M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.81M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 4.81M]
  |  |  ------------------
  |  |  195|  4.81M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  4.81M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  4.81M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  4.81M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  4.81M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.81M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  4.81M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1162|       |
 1163|  4.81M|  hybBands = hybridBands;
 1164|       |
 1165|  4.81M|  startParamBand =
 1166|  4.81M|      SpatialDecGetProcessingBand(startHybBand, self->mapHybBands2ProcBands);
 1167|       |
 1168|  4.81M|  DuckerCalcEnergy(self, outputReal, outputImag, reverbNrg,
 1169|  4.81M|                   self->maxValReverbData, &(self->scaleReverbNrg), 0,
 1170|  4.81M|                   startHybBand);
 1171|       |
 1172|  4.81M|  if ((self->scaleDirectNrg != self->scaleReverbNrg) ||
  ------------------
  |  Branch (1172:7): [True: 2.34M, False: 2.46M]
  ------------------
 1173|  2.46M|      (self->scaleDirectNrg != self->scaleSmoothDirRevNrg) ||
  ------------------
  |  Branch (1173:7): [True: 185k, False: 2.28M]
  ------------------
 1174|  2.53M|      (self->headroomSmoothDirRevNrg == 0)) {
  ------------------
  |  Branch (1174:7): [True: 3.31k, False: 2.27M]
  ------------------
 1175|  2.53M|    int scale;
 1176|       |
 1177|  2.53M|    scale = fixMin(self->scaleDirectNrg, self->scaleSmoothDirRevNrg +
  ------------------
  |  |  306|  2.53M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1178|  2.53M|                                             self->headroomSmoothDirRevNrg - 1);
 1179|  2.53M|    scale = fixMin(scale, self->scaleReverbNrg);
  ------------------
  |  |  306|  2.53M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1180|       |
 1181|  2.53M|    scaleDirectNrg = fMax(fMin(self->scaleDirectNrg - scale, (DFRACT_BITS - 1)),
  ------------------
  |  |  113|  2.53M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1182|  2.53M|                          -(DFRACT_BITS - 1));
  ------------------
  |  |  113|  2.53M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1183|  2.53M|    scaleReverbNrg = fMax(fMin(self->scaleReverbNrg - scale, (DFRACT_BITS - 1)),
  ------------------
  |  |  113|  2.53M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1184|  2.53M|                          -(DFRACT_BITS - 1));
  ------------------
  |  |  113|  2.53M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1185|  2.53M|    scaleSmoothDirRevNrg =
 1186|  2.53M|        fMax(fMin(self->scaleSmoothDirRevNrg - scale, (DFRACT_BITS - 1)),
  ------------------
  |  |  113|  2.53M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1187|  2.53M|             -(DFRACT_BITS - 1));
  ------------------
  |  |  113|  2.53M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1188|       |
 1189|  2.53M|    self->scaleSmoothDirRevNrg = (SCHAR)scale;
 1190|       |
 1191|  2.53M|    doScaleNrg = 1;
 1192|  2.53M|  }
 1193|   127M|  for (pb = startParamBand; pb < self->parameterBands; pb++) {
  ------------------
  |  Branch (1193:29): [True: 122M, False: 4.81M]
  ------------------
 1194|   122M|    FIXP_DBL tmp1;
 1195|   122M|    FIXP_DBL tmp2;
 1196|   122M|    INT s;
 1197|       |
 1198|       |    /* smoothDirRevNrg[2*pb  ] = fMult(smoothDirRevNrg[2*pb  ],DUCK_ALPHA_FDK) +
 1199|       |       fMultDiv2(directNrg[pb],DUCK_ONE_MINUS_ALPHA_X4_FDK);
 1200|       |       smoothDirRevNrg[2*pb+1] = fMult(smoothDirRevNrg[2*pb+1],DUCK_ALPHA_FDK) +
 1201|       |       fMultDiv2(reverbNrg[pb],DUCK_ONE_MINUS_ALPHA_X4_FDK); tmp1 =
 1202|       |       fMult(smoothDirRevNrg[2*pb],DUCK_GAMMA_FDK); tmp2 =
 1203|       |       smoothDirRevNrg[2*pb+1] >> 1;
 1204|       |    */
 1205|   122M|    tmp1 = smoothDirRevNrg[2 * pb + 0];
 1206|   122M|    tmp2 = smoothDirRevNrg[2 * pb + 1];
 1207|   122M|    tmp1 = fMult(tmp1, DUCK_ALPHA_FDK);
  ------------------
  |  |  245|   122M|#define DUCK_ALPHA_FDK FL2FXCONST_DUCK(DUCK_ALPHA)
  |  |  ------------------
  |  |  |  |  241|   122M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|   122M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|   122M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 122M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|   122M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|   122M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   122M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 122M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|   122M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|   122M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|   122M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|   122M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|   122M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   122M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|   122M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1208|   122M|    tmp2 = fMult(tmp2, DUCK_ALPHA_FDK);
  ------------------
  |  |  245|   122M|#define DUCK_ALPHA_FDK FL2FXCONST_DUCK(DUCK_ALPHA)
  |  |  ------------------
  |  |  |  |  241|   122M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|   122M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|   122M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 122M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|   122M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|   122M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   122M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 122M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|   122M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|   122M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|   122M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|   122M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|   122M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   122M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|   122M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1209|       |
 1210|   122M|    if (doScaleNrg) {
  ------------------
  |  Branch (1210:9): [True: 60.7M, False: 61.6M]
  ------------------
 1211|  60.7M|      int scaleSmoothDirRevNrg_asExponent = -scaleSmoothDirRevNrg;
 1212|       |
 1213|  60.7M|      tmp1 = scaleValue(tmp1, scaleSmoothDirRevNrg_asExponent);
 1214|  60.7M|      tmp2 = scaleValue(tmp2, scaleSmoothDirRevNrg_asExponent);
 1215|  60.7M|      tmp1 = fMultAddDiv2(tmp1, scaleValue(directNrg[pb], -scaleDirectNrg),
 1216|  60.7M|                          DUCK_ONE_MINUS_ALPHA_X4_FDK);
  ------------------
  |  |  246|  60.7M|#define DUCK_ONE_MINUS_ALPHA_X4_FDK FL2FXCONST_DUCK(4.0f * (1.0f - DUCK_ALPHA))
  |  |  ------------------
  |  |  |  |  241|  60.7M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  60.7M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|  60.7M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 60.7M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|  60.7M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  60.7M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  60.7M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 60.7M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|  60.7M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|  60.7M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|  60.7M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|  60.7M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  60.7M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  60.7M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|  60.7M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1217|  60.7M|      tmp2 = fMultAddDiv2(tmp2, scaleValue(reverbNrg[pb], -scaleReverbNrg),
 1218|  60.7M|                          DUCK_ONE_MINUS_ALPHA_X4_FDK);
  ------------------
  |  |  246|  60.7M|#define DUCK_ONE_MINUS_ALPHA_X4_FDK FL2FXCONST_DUCK(4.0f * (1.0f - DUCK_ALPHA))
  |  |  ------------------
  |  |  |  |  241|  60.7M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  60.7M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|  60.7M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 60.7M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|  60.7M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  60.7M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  60.7M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 60.7M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|  60.7M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|  60.7M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|  60.7M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|  60.7M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  60.7M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  60.7M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|  60.7M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1219|  61.6M|    } else {
 1220|  61.6M|      tmp1 = fMultAddDiv2(tmp1, directNrg[pb], DUCK_ONE_MINUS_ALPHA_X4_FDK);
  ------------------
  |  |  246|  61.6M|#define DUCK_ONE_MINUS_ALPHA_X4_FDK FL2FXCONST_DUCK(4.0f * (1.0f - DUCK_ALPHA))
  |  |  ------------------
  |  |  |  |  241|  61.6M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  61.6M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|  61.6M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 61.6M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|  61.6M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  61.6M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  61.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 61.6M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|  61.6M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|  61.6M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|  61.6M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|  61.6M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  61.6M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  61.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|  61.6M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1221|  61.6M|      tmp2 = fMultAddDiv2(tmp2, reverbNrg[pb], DUCK_ONE_MINUS_ALPHA_X4_FDK);
  ------------------
  |  |  246|  61.6M|#define DUCK_ONE_MINUS_ALPHA_X4_FDK FL2FXCONST_DUCK(4.0f * (1.0f - DUCK_ALPHA))
  |  |  ------------------
  |  |  |  |  241|  61.6M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  61.6M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|  61.6M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 61.6M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|  61.6M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  61.6M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  61.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 61.6M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|  61.6M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|  61.6M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|  61.6M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|  61.6M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  61.6M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  61.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|  61.6M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1222|  61.6M|    }
 1223|       |
 1224|   122M|    smoothDirRevNrg[2 * pb] = tmp1;
 1225|   122M|    smoothDirRevNrg[2 * pb + 1] = tmp2;
 1226|       |
 1227|   122M|    maxDirRevNrg |= fAbs(tmp1);
 1228|   122M|    maxDirRevNrg |= fAbs(tmp2);
 1229|       |
 1230|   122M|    tmp1 = fMult(tmp1, DUCK_GAMMA_FDK);
  ------------------
  |  |  247|   122M|#define DUCK_GAMMA_FDK FL2FXCONST_DUCK(DUCK_GAMMA / 2)
  |  |  ------------------
  |  |  |  |  241|   122M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|   122M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|   122M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 122M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|   122M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|   122M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   122M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 122M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|   122M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|   122M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|   122M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|   122M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|   122M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   122M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|   122M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1231|   122M|    tmp2 = tmp2 >> 1;
 1232|       |
 1233|   122M|    qs_next = fMin((int)self->qs_next[pb], self->hybridBands);
 1234|       |
 1235|   122M|    if (tmp2 > tmp1) { /* true for about 20% */
  ------------------
  |  Branch (1235:9): [True: 47.3M, False: 74.9M]
  ------------------
 1236|       |      /* gain smaller than 1.0 */
 1237|  47.3M|      tmp1 = sqrtFixp(tmp1);
 1238|  47.3M|      tmp2 = invSqrtNorm2(tmp2, &s);
 1239|  47.3M|      duckGain = FX_DBL2FX_DUCK_GAIN(fMultDiv2(tmp1, tmp2) << s);
  ------------------
  |  |  240|  47.3M|#define FX_DBL2FX_DUCK_GAIN FX_DBL2FX_SGL
  |  |  ------------------
  |  |  |  |  220|  47.3M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  47.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  47.3M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1240|  74.9M|    } else { /* true for about 80 % */
 1241|  74.9M|      tmp2 = smoothDirRevNrg[2 * pb] >> 1;
 1242|  74.9M|      tmp1 = fMult(smoothDirRevNrg[2 * pb + 1], DUCK_GAMMA_FDK);
  ------------------
  |  |  247|  74.9M|#define DUCK_GAMMA_FDK FL2FXCONST_DUCK(DUCK_GAMMA / 2)
  |  |  ------------------
  |  |  |  |  241|  74.9M|#define FL2FXCONST_DUCK FL2FXCONST_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  180|  74.9M|  (FIXP_SGL)(                                                                \
  |  |  |  |  |  |  181|  74.9M|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (181:7): [True: 74.9M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  182|  74.9M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  74.9M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  74.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (182:14): [Folded, False: 74.9M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  183|  74.9M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|  74.9M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|  74.9M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  185|  74.9M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  146|  74.9M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  74.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  186|  74.9M|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1243|  74.9M|      if (tmp2 > tmp1) { /* true for about 20% */
  ------------------
  |  Branch (1243:11): [True: 28.1M, False: 46.8M]
  ------------------
 1244|  28.1M|        if (tmp1 <= (tmp2 >> 2)) {
  ------------------
  |  Branch (1244:13): [True: 13.6M, False: 14.4M]
  ------------------
 1245|       |          /* limit gain to 2.0 */
 1246|  13.6M|          if (qs < hybBands) {
  ------------------
  |  Branch (1246:15): [True: 13.6M, False: 74]
  ------------------
 1247|  41.2M|            for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1247:20): [True: 27.6M, False: 13.6M]
  ------------------
 1248|  27.6M|              outputReal[qs] = outputReal[qs] << 1;
 1249|  27.6M|              outputImag[qs] = outputImag[qs] << 1;
 1250|  27.6M|            }
 1251|  13.6M|          } else {
 1252|     74|            for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1252:20): [True: 0, False: 74]
  ------------------
 1253|      0|              outputReal[qs] = outputReal[qs] << 1;
 1254|      0|            }
 1255|     74|          }
 1256|       |          /* skip general gain*output section */
 1257|  13.6M|          continue;
 1258|  14.4M|        } else {
 1259|       |          /* gain from 1.0 to 2.0 */
 1260|  14.4M|          tmp2 = sqrtFixp(tmp2 >> 2);
 1261|  14.4M|          tmp1 = invSqrtNorm2(tmp1, &s);
 1262|  14.4M|          duckGain = FX_DBL2FX_DUCK_GAIN(fMult(tmp1, tmp2) << s);
  ------------------
  |  |  240|  14.4M|#define FX_DBL2FX_DUCK_GAIN FX_DBL2FX_SGL
  |  |  ------------------
  |  |  |  |  220|  14.4M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  14.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  14.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1263|  14.4M|        }
 1264|  46.8M|      } else { /* true for about 60% */
 1265|       |        /* gain = 1.0; output does not change; update qs index */
 1266|  46.8M|        qs = qs_next;
 1267|  46.8M|        continue;
 1268|  46.8M|      }
 1269|  74.9M|    }
 1270|       |
 1271|       |    /* general gain*output section */
 1272|  61.8M|    if (qs < hybBands) {           /* true for about 39% */
  ------------------
  |  Branch (1272:9): [True: 61.8M, False: 110]
  ------------------
 1273|   178M|      for (; qs < qs_next; qs++) { /* runs about 2 times */
  ------------------
  |  Branch (1273:14): [True: 116M, False: 61.8M]
  ------------------
 1274|   116M|        outputReal[qs] = fMultDiv2(outputReal[qs], duckGain) << 2;
 1275|   116M|        outputImag[qs] = fMultDiv2(outputImag[qs], duckGain) << 2;
 1276|   116M|      }
 1277|  61.8M|    } else {
 1278|    110|      for (; qs < qs_next; qs++) {
  ------------------
  |  Branch (1278:14): [True: 0, False: 110]
  ------------------
 1279|      0|        outputReal[qs] = fMultDiv2(outputReal[qs], duckGain) << 2;
 1280|      0|      }
 1281|    110|    }
 1282|  61.8M|  } /* pb */
 1283|       |
 1284|  4.81M|  self->headroomSmoothDirRevNrg =
 1285|  4.81M|      (SCHAR)fixMax(0, CntLeadingZeros(maxDirRevNrg) - 1);
  ------------------
  |  |  307|  4.81M|#define fixMax(a, b) fMax(a, b)
  ------------------
 1286|       |
 1287|  4.81M|  C_ALLOC_SCRATCH_END(reverbNrg, FIXP_DBL, (28));
 1288|       |
 1289|  4.81M|  return err;
 1290|  4.81M|}

_Z21FDKhybridAnalysisOpenP18FDK_ANA_HYB_FILTERPijS1_j:
  206|  45.9k|                          FIXP_DBL *const pHFmemory, const UINT HFmemorySize) {
  207|  45.9k|  INT err = 0;
  208|       |
  209|       |  /* Save pointer to extern memory. */
  210|  45.9k|  hAnalysisHybFilter->pLFmemory = pLFmemory;
  211|  45.9k|  hAnalysisHybFilter->LFmemorySize = LFmemorySize;
  212|       |
  213|  45.9k|  hAnalysisHybFilter->pHFmemory = pHFmemory;
  214|  45.9k|  hAnalysisHybFilter->HFmemorySize = HFmemorySize;
  215|       |
  216|  45.9k|  return err;
  217|  45.9k|}
_Z21FDKhybridAnalysisInitP18FDK_ANA_HYB_FILTER15FDK_HYBRID_MODEiii:
  221|   104k|                          const INT cplxBands, const INT initStatesFlag) {
  222|   104k|  int k;
  223|   104k|  INT err = 0;
  224|   104k|  FIXP_DBL *pMem = NULL;
  225|   104k|  HANDLE_FDK_HYBRID_SETUP setup = NULL;
  226|       |
  227|   104k|  switch (mode) {
  228|   104k|    case THREE_TO_TEN:
  ------------------
  |  Branch (228:5): [True: 104k, False: 0]
  ------------------
  229|   104k|      setup = &setup_3_10;
  230|   104k|      break;
  231|      0|    case THREE_TO_TWELVE:
  ------------------
  |  Branch (231:5): [True: 0, False: 104k]
  ------------------
  232|      0|      setup = &setup_3_12;
  233|      0|      break;
  234|      0|    case THREE_TO_SIXTEEN:
  ------------------
  |  Branch (234:5): [True: 0, False: 104k]
  ------------------
  235|      0|      setup = &setup_3_16;
  236|      0|      break;
  237|      0|    default:
  ------------------
  |  Branch (237:5): [True: 0, False: 104k]
  ------------------
  238|      0|      err = -1;
  239|      0|      goto bail;
  240|   104k|  }
  241|       |
  242|       |  /* Initialize handle. */
  243|   104k|  hAnalysisHybFilter->pSetup = setup;
  244|   104k|  if (initStatesFlag) {
  ------------------
  |  Branch (244:7): [True: 12.7k, False: 91.7k]
  ------------------
  245|  12.7k|    hAnalysisHybFilter->bufferLFpos = setup->protoLen - 1;
  246|  12.7k|    hAnalysisHybFilter->bufferHFpos = 0;
  247|  12.7k|  }
  248|   104k|  hAnalysisHybFilter->nrBands = qmfBands;
  249|   104k|  hAnalysisHybFilter->cplxBands = cplxBands;
  250|   104k|  hAnalysisHybFilter->hfMode = 0;
  251|       |
  252|       |  /* Check available memory. */
  253|   104k|  if (((2 * setup->nrQmfBands * setup->protoLen * sizeof(FIXP_DBL)) >
  ------------------
  |  Branch (253:7): [True: 0, False: 104k]
  ------------------
  254|   104k|       hAnalysisHybFilter->LFmemorySize)) {
  255|      0|    err = -2;
  256|      0|    goto bail;
  257|      0|  }
  258|   104k|  if (hAnalysisHybFilter->HFmemorySize != 0) {
  ------------------
  |  Branch (258:7): [True: 101k, False: 3.44k]
  ------------------
  259|   101k|    if (((setup->filterDelay *
  ------------------
  |  Branch (259:9): [True: 0, False: 101k]
  ------------------
  260|   101k|          ((qmfBands - setup->nrQmfBands) + (cplxBands - setup->nrQmfBands)) *
  261|   101k|          sizeof(FIXP_DBL)) > hAnalysisHybFilter->HFmemorySize)) {
  262|      0|      err = -3;
  263|      0|      goto bail;
  264|      0|    }
  265|   101k|  }
  266|       |
  267|       |  /* Distribute LF memory. */
  268|   104k|  pMem = hAnalysisHybFilter->pLFmemory;
  269|   417k|  for (k = 0; k < setup->nrQmfBands; k++) {
  ------------------
  |  Branch (269:15): [True: 313k, False: 104k]
  ------------------
  270|   313k|    hAnalysisHybFilter->bufferLFReal[k] = pMem;
  271|   313k|    pMem += setup->protoLen;
  272|   313k|    hAnalysisHybFilter->bufferLFImag[k] = pMem;
  273|   313k|    pMem += setup->protoLen;
  274|   313k|  }
  275|       |
  276|       |  /* Distribute HF memory. */
  277|   104k|  if (hAnalysisHybFilter->HFmemorySize != 0) {
  ------------------
  |  Branch (277:7): [True: 101k, False: 3.44k]
  ------------------
  278|   101k|    pMem = hAnalysisHybFilter->pHFmemory;
  279|   707k|    for (k = 0; k < setup->filterDelay; k++) {
  ------------------
  |  Branch (279:17): [True: 606k, False: 101k]
  ------------------
  280|   606k|      hAnalysisHybFilter->bufferHFReal[k] = pMem;
  281|   606k|      pMem += (qmfBands - setup->nrQmfBands);
  282|   606k|      hAnalysisHybFilter->bufferHFImag[k] = pMem;
  283|   606k|      pMem += (cplxBands - setup->nrQmfBands);
  284|   606k|    }
  285|   101k|  }
  286|       |
  287|   104k|  if (initStatesFlag) {
  ------------------
  |  Branch (287:7): [True: 12.7k, False: 91.7k]
  ------------------
  288|       |    /* Clear LF buffer */
  289|  50.8k|    for (k = 0; k < setup->nrQmfBands; k++) {
  ------------------
  |  Branch (289:17): [True: 38.1k, False: 12.7k]
  ------------------
  290|  38.1k|      FDKmemclear(hAnalysisHybFilter->bufferLFReal[k],
  291|  38.1k|                  setup->protoLen * sizeof(FIXP_DBL));
  292|  38.1k|      FDKmemclear(hAnalysisHybFilter->bufferLFImag[k],
  293|  38.1k|                  setup->protoLen * sizeof(FIXP_DBL));
  294|  38.1k|    }
  295|       |
  296|  12.7k|    if (hAnalysisHybFilter->HFmemorySize != 0) {
  ------------------
  |  Branch (296:9): [True: 9.27k, False: 3.44k]
  ------------------
  297|  9.27k|      if (qmfBands > setup->nrQmfBands) {
  ------------------
  |  Branch (297:11): [True: 9.27k, False: 0]
  ------------------
  298|       |        /* Clear HF buffer */
  299|  64.9k|        for (k = 0; k < setup->filterDelay; k++) {
  ------------------
  |  Branch (299:21): [True: 55.6k, False: 9.27k]
  ------------------
  300|  55.6k|          FDKmemclear(hAnalysisHybFilter->bufferHFReal[k],
  301|  55.6k|                      (qmfBands - setup->nrQmfBands) * sizeof(FIXP_DBL));
  302|  55.6k|          FDKmemclear(hAnalysisHybFilter->bufferHFImag[k],
  303|  55.6k|                      (cplxBands - setup->nrQmfBands) * sizeof(FIXP_DBL));
  304|  55.6k|        }
  305|  9.27k|      }
  306|  9.27k|    }
  307|  12.7k|  }
  308|       |
  309|   104k|bail:
  310|   104k|  return err;
  311|   104k|}
_Z22FDKhybridAnalysisApplyP18FDK_ANA_HYB_FILTERPKiS2_PiS3_:
  349|  5.15M|                           FIXP_DBL *const pHybridImag) {
  350|  5.15M|  int k, hybOffset = 0;
  351|  5.15M|  INT err = 0;
  352|  5.15M|  const int nrQmfBandsLF =
  353|  5.15M|      hAnalysisHybFilter->pSetup
  354|  5.15M|          ->nrQmfBands; /* number of QMF bands to be converted to hybrid */
  355|       |
  356|  5.15M|  const int writIndex = hAnalysisHybFilter->bufferLFpos;
  357|  5.15M|  int readIndex = hAnalysisHybFilter->bufferLFpos;
  358|       |
  359|  5.15M|  if (++readIndex >= hAnalysisHybFilter->pSetup->protoLen) readIndex = 0;
  ------------------
  |  Branch (359:7): [True: 397k, False: 4.76M]
  ------------------
  360|  5.15M|  const INT *pBufferLFreadIdx =
  361|  5.15M|      &hAnalysisHybFilter->pSetup->pReadIdxTable[readIndex];
  362|       |
  363|       |  /*
  364|       |   * LF buffer.
  365|       |   */
  366|  20.6M|  for (k = 0; k < nrQmfBandsLF; k++) {
  ------------------
  |  Branch (366:15): [True: 15.4M, False: 5.15M]
  ------------------
  367|       |    /* New input sample. */
  368|  15.4M|    hAnalysisHybFilter->bufferLFReal[k][writIndex] = pQmfReal[k];
  369|  15.4M|    hAnalysisHybFilter->bufferLFImag[k][writIndex] = pQmfImag[k];
  370|       |
  371|       |    /* Perform hybrid filtering. */
  372|  15.4M|    err |=
  373|  15.4M|        kChannelFiltering(hAnalysisHybFilter->bufferLFReal[k],
  374|  15.4M|                          hAnalysisHybFilter->bufferLFImag[k], pBufferLFreadIdx,
  375|  15.4M|                          pHybridReal + hybOffset, pHybridImag + hybOffset,
  376|  15.4M|                          hAnalysisHybFilter->pSetup->kHybrid[k]);
  377|       |
  378|  15.4M|    hybOffset += hAnalysisHybFilter->pSetup->nHybBands[k];
  379|  15.4M|  }
  380|       |
  381|  5.15M|  hAnalysisHybFilter->bufferLFpos =
  382|  5.15M|      readIndex; /* Index where to write next input sample. */
  383|       |
  384|  5.15M|  if (hAnalysisHybFilter->nrBands > nrQmfBandsLF) {
  ------------------
  |  Branch (384:7): [True: 5.05M, False: 107k]
  ------------------
  385|       |    /*
  386|       |     * HF buffer.
  387|       |     */
  388|  5.05M|    if (hAnalysisHybFilter->hfMode != 0) {
  ------------------
  |  Branch (388:9): [True: 3.53M, False: 1.51M]
  ------------------
  389|       |      /* HF delay compensation was applied outside. */
  390|  3.53M|      FDKmemcpy(
  391|  3.53M|          pHybridReal + hybOffset, &pQmfReal[nrQmfBandsLF],
  392|  3.53M|          (hAnalysisHybFilter->nrBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  393|  3.53M|      FDKmemcpy(
  394|  3.53M|          pHybridImag + hybOffset, &pQmfImag[nrQmfBandsLF],
  395|  3.53M|          (hAnalysisHybFilter->cplxBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  396|  3.53M|    } else {
  397|  1.51M|      FDK_ASSERT(hAnalysisHybFilter->HFmemorySize != 0);
  ------------------
  |  |  221|  1.51M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (397:7): [True: 1.51M, False: 0]
  ------------------
  398|       |      /* HF delay compensation, filterlength/2. */
  399|  1.51M|      FDKmemcpy(
  400|  1.51M|          pHybridReal + hybOffset,
  401|  1.51M|          hAnalysisHybFilter->bufferHFReal[hAnalysisHybFilter->bufferHFpos],
  402|  1.51M|          (hAnalysisHybFilter->nrBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  403|  1.51M|      FDKmemcpy(
  404|  1.51M|          pHybridImag + hybOffset,
  405|  1.51M|          hAnalysisHybFilter->bufferHFImag[hAnalysisHybFilter->bufferHFpos],
  406|  1.51M|          (hAnalysisHybFilter->cplxBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  407|       |
  408|  1.51M|      FDKmemcpy(
  409|  1.51M|          hAnalysisHybFilter->bufferHFReal[hAnalysisHybFilter->bufferHFpos],
  410|  1.51M|          &pQmfReal[nrQmfBandsLF],
  411|  1.51M|          (hAnalysisHybFilter->nrBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  412|  1.51M|      FDKmemcpy(
  413|  1.51M|          hAnalysisHybFilter->bufferHFImag[hAnalysisHybFilter->bufferHFpos],
  414|  1.51M|          &pQmfImag[nrQmfBandsLF],
  415|  1.51M|          (hAnalysisHybFilter->cplxBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  416|       |
  417|  1.51M|      if (++hAnalysisHybFilter->bufferHFpos >=
  ------------------
  |  Branch (417:11): [True: 251k, False: 1.26M]
  ------------------
  418|  1.51M|          hAnalysisHybFilter->pSetup->filterDelay)
  419|   251k|        hAnalysisHybFilter->bufferHFpos = 0;
  420|  1.51M|    }
  421|  5.05M|  } /* process HF part*/
  422|       |
  423|  5.15M|  return err;
  424|  5.15M|}
_Z22FDKhybridSynthesisInitP18FDK_SYN_HYB_FILTER15FDK_HYBRID_MODEii:
  441|   107k|                           const INT cplxBands) {
  442|   107k|  INT err = 0;
  443|   107k|  HANDLE_FDK_HYBRID_SETUP setup = NULL;
  444|       |
  445|   107k|  switch (mode) {
  446|   107k|    case THREE_TO_TEN:
  ------------------
  |  Branch (446:5): [True: 107k, False: 0]
  ------------------
  447|   107k|      setup = &setup_3_10;
  448|   107k|      break;
  449|      0|    case THREE_TO_TWELVE:
  ------------------
  |  Branch (449:5): [True: 0, False: 107k]
  ------------------
  450|      0|      setup = &setup_3_12;
  451|      0|      break;
  452|      0|    case THREE_TO_SIXTEEN:
  ------------------
  |  Branch (452:5): [True: 0, False: 107k]
  ------------------
  453|      0|      setup = &setup_3_16;
  454|      0|      break;
  455|      0|    default:
  ------------------
  |  Branch (455:5): [True: 0, False: 107k]
  ------------------
  456|      0|      err = -1;
  457|      0|      goto bail;
  458|   107k|  }
  459|       |
  460|   107k|  hSynthesisHybFilter->pSetup = setup;
  461|   107k|  hSynthesisHybFilter->nrBands = qmfBands;
  462|   107k|  hSynthesisHybFilter->cplxBands = cplxBands;
  463|       |
  464|   107k|bail:
  465|   107k|  return err;
  466|   107k|}
_Z23FDKhybridSynthesisApplyP18FDK_SYN_HYB_FILTERPKiS2_PiS3_:
  472|  8.66M|                             FIXP_DBL *const pQmfImag) {
  473|  8.66M|  int k, n, hybOffset = 0;
  474|  8.66M|  const INT nrQmfBandsLF = hSynthesisHybFilter->pSetup->nrQmfBands;
  475|       |
  476|       |  /*
  477|       |   * LF buffer.
  478|       |   */
  479|  34.6M|  for (k = 0; k < nrQmfBandsLF; k++) {
  ------------------
  |  Branch (479:15): [True: 25.9M, False: 8.66M]
  ------------------
  480|  25.9M|    const int nHybBands = hSynthesisHybFilter->pSetup->nHybBands[k];
  481|  25.9M|    const int scale = hSynthesisHybFilter->pSetup->synHybScale[k];
  482|       |
  483|  25.9M|    FIXP_DBL accu1 = FL2FXCONST_DBL(0.f);
  ------------------
  |  |  192|  25.9M|  (FIXP_DBL)(                                                                \
  |  |  193|  25.9M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 25.9M, Folded]
  |  |  ------------------
  |  |  194|  25.9M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  25.9M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  25.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 25.9M]
  |  |  ------------------
  |  |  195|  25.9M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  25.9M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  25.9M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  25.9M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  25.9M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  25.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  25.9M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  484|  25.9M|    FIXP_DBL accu2 = FL2FXCONST_DBL(0.f);
  ------------------
  |  |  192|  25.9M|  (FIXP_DBL)(                                                                \
  |  |  193|  25.9M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 25.9M, Folded]
  |  |  ------------------
  |  |  194|  25.9M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  25.9M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  25.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 25.9M]
  |  |  ------------------
  |  |  195|  25.9M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  25.9M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  25.9M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  25.9M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  25.9M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  25.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  25.9M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|       |
  486|       |    /* Perform hybrid filtering. */
  487|   112M|    for (n = 0; n < nHybBands; n++) {
  ------------------
  |  Branch (487:17): [True: 86.6M, False: 25.9M]
  ------------------
  488|  86.6M|      accu1 += pHybridReal[hybOffset + n] >> scale;
  489|  86.6M|      accu2 += pHybridImag[hybOffset + n] >> scale;
  490|  86.6M|    }
  491|  25.9M|    pQmfReal[k] = SATURATE_LEFT_SHIFT(accu1, scale, DFRACT_BITS);
  ------------------
  |  |  251|  25.9M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 2.66k, False: 25.9M]
  |  |  ------------------
  |  |  252|  25.9M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  25.9M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 2.69k, False: 25.9M]
  |  |  ------------------
  |  |  254|  25.9M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  25.9M|             : ((LONG)(src) << (scale)))
  ------------------
  492|  25.9M|    pQmfImag[k] = SATURATE_LEFT_SHIFT(accu2, scale, DFRACT_BITS);
  ------------------
  |  |  251|  25.9M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 4.47k, False: 25.9M]
  |  |  ------------------
  |  |  252|  25.9M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  25.9M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 4.37k, False: 25.9M]
  |  |  ------------------
  |  |  254|  25.9M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  25.9M|             : ((LONG)(src) << (scale)))
  ------------------
  493|       |
  494|  25.9M|    hybOffset += nHybBands;
  495|  25.9M|  }
  496|       |
  497|  8.66M|  if (hSynthesisHybFilter->nrBands > nrQmfBandsLF) {
  ------------------
  |  Branch (497:7): [True: 8.66M, False: 0]
  ------------------
  498|       |    /*
  499|       |     * HF buffer.
  500|       |     */
  501|  8.66M|    FDKmemcpy(&pQmfReal[nrQmfBandsLF], &pHybridReal[hybOffset],
  502|  8.66M|              (hSynthesisHybFilter->nrBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  503|  8.66M|    FDKmemcpy(
  504|  8.66M|        &pQmfImag[nrQmfBandsLF], &pHybridImag[hybOffset],
  505|  8.66M|        (hSynthesisHybFilter->cplxBands - nrQmfBandsLF) * sizeof(FIXP_DBL));
  506|  8.66M|  }
  507|       |
  508|  8.66M|  return;
  509|  8.66M|}
FDK_hybrid.cpp:_ZL17kChannelFilteringPKiS0_S0_PiS1_a:
  791|  15.4M|                             const SCHAR hybridConfig) {
  792|  15.4M|  INT err = 0;
  793|       |
  794|  15.4M|  switch (hybridConfig) {
  795|  5.15M|    case 2:
  ------------------
  |  Branch (795:5): [True: 5.15M, False: 10.3M]
  ------------------
  796|  10.3M|    case -2:
  ------------------
  |  Branch (796:5): [True: 5.15M, False: 10.3M]
  ------------------
  797|  10.3M|      dualChannelFiltering(pQmfReal, pQmfImag, pReadIdx, mHybridReal,
  798|  10.3M|                           mHybridImag, (hybridConfig < 0) ? 1 : 0);
  ------------------
  |  Branch (798:41): [True: 5.15M, False: 5.15M]
  ------------------
  799|  10.3M|      break;
  800|      0|    case 4:
  ------------------
  |  Branch (800:5): [True: 0, False: 15.4M]
  ------------------
  801|      0|    case -4:
  ------------------
  |  Branch (801:5): [True: 0, False: 15.4M]
  ------------------
  802|      0|      fourChannelFiltering(pQmfReal, pQmfImag, pReadIdx, mHybridReal,
  803|      0|                           mHybridImag, (hybridConfig < 0) ? 1 : 0);
  ------------------
  |  Branch (803:41): [True: 0, False: 0]
  ------------------
  804|      0|      break;
  805|      0|    case 8:
  ------------------
  |  Branch (805:5): [True: 0, False: 15.4M]
  ------------------
  806|  5.15M|    case -8:
  ------------------
  |  Branch (806:5): [True: 5.15M, False: 10.3M]
  ------------------
  807|  5.15M|      eightChannelFiltering(pQmfReal, pQmfImag, pReadIdx, mHybridReal,
  808|  5.15M|                            mHybridImag, (hybridConfig < 0) ? 1 : 0);
  ------------------
  |  Branch (808:42): [True: 5.15M, False: 0]
  ------------------
  809|  5.15M|      break;
  810|      0|    default:
  ------------------
  |  Branch (810:5): [True: 0, False: 15.4M]
  ------------------
  811|      0|      err = -1;
  812|  15.4M|  }
  813|       |
  814|  15.4M|  return err;
  815|  15.4M|}
FDK_hybrid.cpp:_ZL20dualChannelFilteringPKiS0_S0_PiS1_i:
  516|  10.3M|                                 const INT invert) {
  517|  10.3M|  FIXP_DBL r1, r6;
  518|  10.3M|  FIXP_DBL i1, i6;
  519|       |
  520|  10.3M|  const FIXP_HTB f0 = HybFilterCoef2[0]; /* corresponds to p1 and p11 */
  521|  10.3M|  const FIXP_HTB f1 = HybFilterCoef2[1]; /* corresponds to p3 and p9  */
  522|  10.3M|  const FIXP_HTB f2 = HybFilterCoef2[2]; /* corresponds to p5 and p7  */
  523|       |
  524|       |  /* symmetric filter coefficients */
  525|  10.3M|  r1 = fMultDiv2(f0, pQmfReal[pReadIdx[1]]) +
  526|  10.3M|       fMultDiv2(f0, pQmfReal[pReadIdx[11]]);
  527|  10.3M|  i1 = fMultDiv2(f0, pQmfImag[pReadIdx[1]]) +
  528|  10.3M|       fMultDiv2(f0, pQmfImag[pReadIdx[11]]);
  529|  10.3M|  r1 += fMultDiv2(f1, pQmfReal[pReadIdx[3]]) +
  530|  10.3M|        fMultDiv2(f1, pQmfReal[pReadIdx[9]]);
  531|  10.3M|  i1 += fMultDiv2(f1, pQmfImag[pReadIdx[3]]) +
  532|  10.3M|        fMultDiv2(f1, pQmfImag[pReadIdx[9]]);
  533|  10.3M|  r1 += fMultDiv2(f2, pQmfReal[pReadIdx[5]]) +
  534|  10.3M|        fMultDiv2(f2, pQmfReal[pReadIdx[7]]);
  535|  10.3M|  i1 += fMultDiv2(f2, pQmfImag[pReadIdx[5]]) +
  536|  10.3M|        fMultDiv2(f2, pQmfImag[pReadIdx[7]]);
  537|       |
  538|  10.3M|  r6 = pQmfReal[pReadIdx[6]] >> 2;
  539|  10.3M|  i6 = pQmfImag[pReadIdx[6]] >> 2;
  540|       |
  541|  10.3M|  FDK_ASSERT((invert == 0) || (invert == 1));
  ------------------
  |  |  221|  10.3M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (541:3): [True: 5.15M, False: 5.15M]
  |  Branch (541:3): [True: 5.15M, False: 0]
  |  Branch (541:3): [True: 10.3M, False: 0]
  ------------------
  542|  10.3M|  mHybridReal[0 + invert] = SATURATE_LEFT_SHIFT((r6 + r1), 1, DFRACT_BITS);
  ------------------
  |  |  251|  10.3M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 230, False: 10.3M]
  |  |  ------------------
  |  |  252|  10.3M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  10.3M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 233, False: 10.3M]
  |  |  ------------------
  |  |  254|  10.3M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  10.3M|             : ((LONG)(src) << (scale)))
  ------------------
  543|  10.3M|  mHybridImag[0 + invert] = SATURATE_LEFT_SHIFT((i6 + i1), 1, DFRACT_BITS);
  ------------------
  |  |  251|  10.3M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 240, False: 10.3M]
  |  |  ------------------
  |  |  252|  10.3M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  10.3M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 187, False: 10.3M]
  |  |  ------------------
  |  |  254|  10.3M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  10.3M|             : ((LONG)(src) << (scale)))
  ------------------
  544|       |
  545|  10.3M|  mHybridReal[1 - invert] = SATURATE_LEFT_SHIFT((r6 - r1), 1, DFRACT_BITS);
  ------------------
  |  |  251|  10.3M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 525, False: 10.3M]
  |  |  ------------------
  |  |  252|  10.3M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  10.3M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 626, False: 10.3M]
  |  |  ------------------
  |  |  254|  10.3M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  10.3M|             : ((LONG)(src) << (scale)))
  ------------------
  546|  10.3M|  mHybridImag[1 - invert] = SATURATE_LEFT_SHIFT((i6 - i1), 1, DFRACT_BITS);
  ------------------
  |  |  251|  10.3M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 995, False: 10.3M]
  |  |  ------------------
  |  |  252|  10.3M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  10.3M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 970, False: 10.3M]
  |  |  ------------------
  |  |  254|  10.3M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  10.3M|             : ((LONG)(src) << (scale)))
  ------------------
  547|  10.3M|}
FDK_hybrid.cpp:_ZL21eightChannelFilteringPKiS0_S0_PiS1_i:
  694|  5.15M|                                  const INT invert) {
  695|  5.15M|  const FIXP_HTP *p = HybFilterCoef8;
  696|  5.15M|  INT k, sc;
  697|       |
  698|  5.15M|  FIXP_DBL mfft[16 + ALIGNMENT_DEFAULT];
  699|  5.15M|  FIXP_DBL *pfft = (FIXP_DBL *)ALIGN_PTR(mfft);
  ------------------
  |  |  312|  5.15M|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|  5.15M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|  5.15M|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|  5.15M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|  5.15M|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|  5.15M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|  5.15M|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  700|       |
  701|  5.15M|  FIXP_DBL accu1, accu2, accu3, accu4;
  702|       |
  703|       |  /* pre twiddeling */
  704|  5.15M|  pfft[FFT_IDX_R(0)] =
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  705|  5.15M|      pQmfReal[pReadIdx[6]] >>
  706|  5.15M|      (3 + 1); /* fMultDiv2(p[0].v.re, pQmfReal[pReadIdx[6]]); */
  707|  5.15M|  pfft[FFT_IDX_I(0)] =
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  708|  5.15M|      pQmfImag[pReadIdx[6]] >>
  709|  5.15M|      (3 + 1); /* fMultDiv2(p[0].v.re, pQmfImag[pReadIdx[6]]); */
  710|       |
  711|  5.15M|  cplxMultDiv2(&accu1, &accu2, pQmfReal[pReadIdx[7]], pQmfImag[pReadIdx[7]],
  712|  5.15M|               p[1]);
  713|  5.15M|  pfft[FFT_IDX_R(1)] = accu1;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  714|  5.15M|  pfft[FFT_IDX_I(1)] = accu2;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  715|       |
  716|  5.15M|  cplxMultDiv2(&accu1, &accu2, pQmfReal[pReadIdx[0]], pQmfImag[pReadIdx[0]],
  717|  5.15M|               p[2]);
  718|  5.15M|  cplxMultDiv2(&accu3, &accu4, pQmfReal[pReadIdx[8]], pQmfImag[pReadIdx[8]],
  719|  5.15M|               p[3]);
  720|  5.15M|  pfft[FFT_IDX_R(2)] = accu1 + accu3;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  721|  5.15M|  pfft[FFT_IDX_I(2)] = accu2 + accu4;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  722|       |
  723|  5.15M|  cplxMultDiv2(&accu1, &accu2, pQmfReal[pReadIdx[1]], pQmfImag[pReadIdx[1]],
  724|  5.15M|               p[4]);
  725|  5.15M|  cplxMultDiv2(&accu3, &accu4, pQmfReal[pReadIdx[9]], pQmfImag[pReadIdx[9]],
  726|  5.15M|               p[5]);
  727|  5.15M|  pfft[FFT_IDX_R(3)] = accu1 + accu3;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  728|  5.15M|  pfft[FFT_IDX_I(3)] = accu2 + accu4;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  729|       |
  730|  5.15M|  pfft[FFT_IDX_R(4)] = fMultDiv2(pQmfImag[pReadIdx[10]], p[7].v.im) -
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  731|  5.15M|                       fMultDiv2(pQmfImag[pReadIdx[2]], p[6].v.im);
  732|  5.15M|  pfft[FFT_IDX_I(4)] = fMultDiv2(pQmfReal[pReadIdx[2]], p[6].v.im) -
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  733|  5.15M|                       fMultDiv2(pQmfReal[pReadIdx[10]], p[7].v.im);
  734|       |
  735|  5.15M|  cplxMultDiv2(&accu1, &accu2, pQmfReal[pReadIdx[3]], pQmfImag[pReadIdx[3]],
  736|  5.15M|               p[8]);
  737|  5.15M|  cplxMultDiv2(&accu3, &accu4, pQmfReal[pReadIdx[11]], pQmfImag[pReadIdx[11]],
  738|  5.15M|               p[9]);
  739|  5.15M|  pfft[FFT_IDX_R(5)] = accu1 + accu3;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  740|  5.15M|  pfft[FFT_IDX_I(5)] = accu2 + accu4;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  741|       |
  742|  5.15M|  cplxMultDiv2(&accu1, &accu2, pQmfReal[pReadIdx[4]], pQmfImag[pReadIdx[4]],
  743|  5.15M|               p[10]);
  744|  5.15M|  cplxMultDiv2(&accu3, &accu4, pQmfReal[pReadIdx[12]], pQmfImag[pReadIdx[12]],
  745|  5.15M|               p[11]);
  746|  5.15M|  pfft[FFT_IDX_R(6)] = accu1 + accu3;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  747|  5.15M|  pfft[FFT_IDX_I(6)] = accu2 + accu4;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  748|       |
  749|  5.15M|  cplxMultDiv2(&accu1, &accu2, pQmfReal[pReadIdx[5]], pQmfImag[pReadIdx[5]],
  750|  5.15M|               p[12]);
  751|  5.15M|  pfft[FFT_IDX_R(7)] = accu1;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  752|  5.15M|  pfft[FFT_IDX_I(7)] = accu2;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  753|       |
  754|       |  /* fft modulation */
  755|  5.15M|  fft_8(pfft);
  756|  5.15M|  sc = 1 + 2;
  757|       |
  758|  5.15M|  if (invert) {
  ------------------
  |  Branch (758:7): [True: 5.15M, False: 0]
  ------------------
  759|  5.15M|    mHybridReal[0] = pfft[FFT_IDX_R(7)] << sc;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  760|  5.15M|    mHybridImag[0] = pfft[FFT_IDX_I(7)] << sc;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  761|  5.15M|    mHybridReal[1] = pfft[FFT_IDX_R(0)] << sc;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  762|  5.15M|    mHybridImag[1] = pfft[FFT_IDX_I(0)] << sc;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  763|       |
  764|  5.15M|    mHybridReal[2] = pfft[FFT_IDX_R(6)] << sc;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  765|  5.15M|    mHybridImag[2] = pfft[FFT_IDX_I(6)] << sc;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  766|  5.15M|    mHybridReal[3] = pfft[FFT_IDX_R(1)] << sc;
  ------------------
  |  |  108|  5.15M|#define FFT_IDX_R(a) (2 * a)
  ------------------
  767|  5.15M|    mHybridImag[3] = pfft[FFT_IDX_I(1)] << sc;
  ------------------
  |  |  109|  5.15M|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  768|       |
  769|  5.15M|    mHybridReal[4] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  5.15M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 5.15M]
  |  |  ------------------
  |  |  252|  5.15M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.15M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 5.15M]
  |  |  ------------------
  |  |  254|  5.15M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.15M|             : ((LONG)(src) << (scale)))
  ------------------
  770|  5.15M|        (pfft[FFT_IDX_R(2)] + pfft[FFT_IDX_R(5)]), sc, DFRACT_BITS);
  771|  5.15M|    mHybridImag[4] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  5.15M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 16, False: 5.15M]
  |  |  ------------------
  |  |  252|  5.15M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.15M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 22, False: 5.15M]
  |  |  ------------------
  |  |  254|  5.15M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.15M|             : ((LONG)(src) << (scale)))
  ------------------
  772|  5.15M|        (pfft[FFT_IDX_I(2)] + pfft[FFT_IDX_I(5)]), sc, DFRACT_BITS);
  773|       |
  774|  5.15M|    mHybridReal[5] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  5.15M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 143, False: 5.15M]
  |  |  ------------------
  |  |  252|  5.15M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.15M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 190, False: 5.15M]
  |  |  ------------------
  |  |  254|  5.15M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.15M|             : ((LONG)(src) << (scale)))
  ------------------
  775|  5.15M|        (pfft[FFT_IDX_R(3)] + pfft[FFT_IDX_R(4)]), sc, DFRACT_BITS);
  776|  5.15M|    mHybridImag[5] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  5.15M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 137, False: 5.15M]
  |  |  ------------------
  |  |  252|  5.15M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.15M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 153, False: 5.15M]
  |  |  ------------------
  |  |  254|  5.15M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.15M|             : ((LONG)(src) << (scale)))
  ------------------
  777|  5.15M|        (pfft[FFT_IDX_I(3)] + pfft[FFT_IDX_I(4)]), sc, DFRACT_BITS);
  778|  5.15M|  } else {
  779|      0|    for (k = 0; k < 8; k++) {
  ------------------
  |  Branch (779:17): [True: 0, False: 0]
  ------------------
  780|      0|      mHybridReal[k] = pfft[FFT_IDX_R(k)] << sc;
  ------------------
  |  |  108|      0|#define FFT_IDX_R(a) (2 * a)
  ------------------
  781|      0|      mHybridImag[k] = pfft[FFT_IDX_I(k)] << sc;
  ------------------
  |  |  109|      0|#define FFT_IDX_I(a) (2 * a + 1)
  ------------------
  782|      0|    }
  783|      0|  }
  784|  5.15M|}

_Z21CLpc_SynthesisLatticePiiiiiPKiiS_:
  171|  7.02k|                           const int order, FIXP_DBL *state) {
  172|  7.02k|  int i, j;
  173|  7.02k|  FIXP_DBL *pSignal;
  174|       |
  175|  7.02k|  FDK_ASSERT(order <= LPC_MAX_ORDER);
  ------------------
  |  |  221|  7.02k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (175:3): [True: 7.02k, False: 0]
  ------------------
  176|  7.02k|  FDK_ASSERT(order > 0);
  ------------------
  |  |  221|  7.02k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (176:3): [True: 7.02k, False: 0]
  ------------------
  177|       |
  178|  7.02k|  if (inc == -1)
  ------------------
  |  Branch (178:7): [True: 3.43k, False: 3.58k]
  ------------------
  179|  3.43k|    pSignal = &signal[signal_size - 1];
  180|  3.58k|  else
  181|  3.58k|    pSignal = &signal[0];
  182|       |
  183|  7.02k|  FDK_ASSERT(signal_size > 0);
  ------------------
  |  |  221|  7.02k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (183:3): [True: 7.02k, False: 0]
  ------------------
  184|   343k|  for (i = signal_size; i != 0; i--) {
  ------------------
  |  Branch (184:25): [True: 336k, False: 7.02k]
  ------------------
  185|   336k|    FIXP_DBL *pState = state + order - 1;
  186|   336k|    const FIXP_DBL *pCoeff = coeff + order - 1;
  187|   336k|    FIXP_DBL tmp, accu;
  188|       |
  189|   336k|    accu =
  190|   336k|        fMultSubDiv2(scaleValue(*pSignal, signal_e - 1), *pCoeff--, *pState--);
  191|   336k|    tmp = SATURATE_LEFT_SHIFT_ALT(accu, 1, DFRACT_BITS);
  ------------------
  |  |  270|   336k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  ------------------
  |  |  |  Branch (270:4): [True: 1.53k, False: 335k]
  |  |  ------------------
  |  |  271|   336k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  272|   336k|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (272:10): [True: 1.18k, False: 333k]
  |  |  ------------------
  |  |  273|   335k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  274|   335k|             : ((LONG)(src) << (scale)))
  ------------------
  192|       |
  193|  3.34M|    for (j = order - 1; j != 0; j--) {
  ------------------
  |  Branch (193:25): [True: 3.00M, False: 336k]
  ------------------
  194|  3.00M|      accu = fMultSubDiv2(tmp >> 1, pCoeff[0], pState[0]);
  195|  3.00M|      tmp = SATURATE_LEFT_SHIFT_ALT(accu, 1, DFRACT_BITS);
  ------------------
  |  |  270|  3.00M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  ------------------
  |  |  |  Branch (270:4): [True: 10.3k, False: 2.99M]
  |  |  ------------------
  |  |  271|  3.00M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  272|  3.00M|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (272:10): [True: 16.8k, False: 2.98M]
  |  |  ------------------
  |  |  273|  2.99M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  274|  2.99M|             : ((LONG)(src) << (scale)))
  ------------------
  196|       |
  197|  3.00M|      accu = fMultAddDiv2(pState[0] >> 1, *pCoeff--, tmp);
  198|  3.00M|      pState[1] = SATURATE_LEFT_SHIFT_ALT(accu, 1, DFRACT_BITS);
  ------------------
  |  |  270|  3.00M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  ------------------
  |  |  |  Branch (270:4): [True: 2.63k, False: 3.00M]
  |  |  ------------------
  |  |  271|  3.00M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  272|  3.00M|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (272:10): [True: 3.83k, False: 3.00M]
  |  |  ------------------
  |  |  273|  3.00M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  274|  3.00M|             : ((LONG)(src) << (scale)))
  ------------------
  199|       |
  200|  3.00M|      pState--;
  201|  3.00M|    }
  202|       |
  203|   336k|    *pSignal = scaleValue(tmp, -signal_e_out);
  204|       |
  205|       |    /* exponent of state[] is 0 */
  206|   336k|    pState[1] = tmp;
  207|   336k|    pSignal += inc;
  208|   336k|  }
  209|  7.02k|}

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

_Z28FDK_QmfDomain_InitFilterBankP14FDK_QMF_DOMAINj:
  486|  41.9k|int FDK_QmfDomain_InitFilterBank(HANDLE_FDK_QMF_DOMAIN qd, UINT extra_flags) {
  487|  41.9k|  FDK_ASSERT(qd != NULL);
  ------------------
  |  |  221|  41.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (487:3): [True: 41.9k, False: 0]
  ------------------
  488|  41.9k|  int err = 0;
  489|  41.9k|  int ch, ts;
  490|  41.9k|  HANDLE_FDK_QMF_DOMAIN_GC gc = &qd->globalConf;
  491|  41.9k|  int noCols = gc->nQmfTimeSlots;
  492|  41.9k|  int lsb = gc->nBandsAnalysis;
  493|  41.9k|  int usb = fMin((INT)gc->nBandsSynthesis, 64);
  494|  41.9k|  int nProcBands = gc->nQmfProcBands;
  495|  41.9k|  FDK_ASSERT(nProcBands % ALIGNMENT_DEFAULT == 0);
  ------------------
  |  |  221|  41.9k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (495:3): [True: 41.9k, False: 0]
  ------------------
  496|       |
  497|  41.9k|  if (extra_flags & QMF_FLAG_MPSLDFB) {
  ------------------
  |  |  137|  41.9k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  |  Branch (497:7): [True: 0, False: 41.9k]
  ------------------
  498|      0|    gc->flags &= ~QMF_FLAG_CLDFB;
  ------------------
  |  |  133|      0|#define QMF_FLAG_CLDFB 4
  ------------------
  499|      0|    gc->flags |= QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|      0|#define QMF_FLAG_MPSLDFB 16
  ------------------
  500|      0|  }
  501|   131k|  for (ch = 0; ch < gc->nInputChannels; ch++) {
  ------------------
  |  Branch (501:16): [True: 89.5k, False: 41.9k]
  ------------------
  502|       |    /* distribute memory to slots array */
  503|  89.5k|    FIXP_DBL *ptrOv =
  504|  89.5k|        qd->QmfDomainIn[ch].pOverlapBuffer; /* persistent memory for overlap */
  505|  89.5k|    if ((ptrOv == NULL) && (gc->nQmfOvTimeSlots != 0)) {
  ------------------
  |  Branch (505:9): [True: 51.7k, False: 37.7k]
  |  Branch (505:28): [True: 0, False: 51.7k]
  ------------------
  506|      0|      err = 1;
  507|      0|      return err;
  508|      0|    }
  509|       |    /* This assumes the workbuffer defined for ch0 is the big one being used to
  510|       |     * hold one full frame of QMF data. */
  511|  89.5k|    FIXP_DBL **ptr =
  512|  89.5k|        qd->QmfDomainIn[fMin(ch, fMax((INT)gc->nQmfProcChannels - 1, 0))]
  513|  89.5k|            .pWorkBuffer; /* non-persistent workbuffer */
  514|  89.5k|    USHORT workBufferOffset =
  515|  89.5k|        qd->QmfDomainIn[fMin(ch, fMax((INT)gc->nQmfProcChannels - 1, 0))]
  516|  89.5k|            .workBufferOffset;
  517|  89.5k|    USHORT workBufferSectSize =
  518|  89.5k|        qd->QmfDomainIn[fMin(ch, fMax((INT)gc->nQmfProcChannels - 1, 0))]
  519|  89.5k|            .workBufferSectSize;
  520|       |
  521|  89.5k|    if ((ptr == NULL) && (gc->nQmfTimeSlots != 0)) {
  ------------------
  |  Branch (521:9): [True: 6, False: 89.5k]
  |  Branch (521:26): [True: 0, False: 6]
  ------------------
  522|      0|      err = 1;
  523|      0|      return err;
  524|      0|    }
  525|       |
  526|  89.5k|    qd->QmfDomainIn[ch].pGlobalConf = gc;
  527|   343k|    for (ts = 0; ts < gc->nQmfOvTimeSlots; ts++) {
  ------------------
  |  Branch (527:18): [True: 253k, False: 89.5k]
  ------------------
  528|   253k|      qd->QmfDomainIn[ch].hQmfSlotsReal[ts] = ptrOv;
  529|   253k|      ptrOv += nProcBands;
  530|   253k|      qd->QmfDomainIn[ch].hQmfSlotsImag[ts] = ptrOv;
  531|   253k|      ptrOv += nProcBands;
  532|   253k|    }
  533|  2.16M|    for (; ts < (gc->nQmfOvTimeSlots + gc->nQmfTimeSlots); ts++) {
  ------------------
  |  Branch (533:12): [True: 2.07M, False: 89.5k]
  ------------------
  534|  2.07M|      qd->QmfDomainIn[ch].hQmfSlotsReal[ts] = FDK_getWorkBuffer(
  535|  2.07M|          ptr, workBufferOffset, workBufferSectSize, nProcBands);
  536|  2.07M|      workBufferOffset += nProcBands;
  537|  2.07M|      qd->QmfDomainIn[ch].hQmfSlotsImag[ts] = FDK_getWorkBuffer(
  538|  2.07M|          ptr, workBufferOffset, workBufferSectSize, nProcBands);
  539|  2.07M|      workBufferOffset += nProcBands;
  540|  2.07M|    }
  541|  89.5k|    err |= qmfInitAnalysisFilterBank(
  542|  89.5k|        &qd->QmfDomainIn[ch].fb, qd->QmfDomainIn[ch].pAnaQmfStates, noCols,
  543|  89.5k|        (qd->QmfDomainIn[ch].fb.lsb == 0) ? lsb : qd->QmfDomainIn[ch].fb.lsb,
  ------------------
  |  Branch (543:9): [True: 51.5k, False: 37.9k]
  ------------------
  544|  89.5k|        (qd->QmfDomainIn[ch].fb.usb == 0) ? usb : qd->QmfDomainIn[ch].fb.usb,
  ------------------
  |  Branch (544:9): [True: 51.5k, False: 37.9k]
  ------------------
  545|  89.5k|        gc->nBandsAnalysis, gc->flags | extra_flags);
  546|  89.5k|  }
  547|       |
  548|   140k|  for (ch = 0; ch < gc->nOutputChannels; ch++) {
  ------------------
  |  Branch (548:16): [True: 98.8k, False: 41.9k]
  ------------------
  549|  98.8k|    FIXP_DBL outGain_m = qd->QmfDomainOut[ch].fb.outGain_m;
  550|  98.8k|    int outGain_e = qd->QmfDomainOut[ch].fb.outGain_e;
  551|  98.8k|    int outScale = qmfGetOutScalefactor(&qd->QmfDomainOut[ch].fb);
  552|  98.8k|    err |= qmfInitSynthesisFilterBank(
  553|  98.8k|        &qd->QmfDomainOut[ch].fb, qd->QmfDomainOut[ch].pSynQmfStates, noCols,
  554|  98.8k|        (qd->QmfDomainOut[ch].fb.lsb == 0) ? lsb : qd->QmfDomainOut[ch].fb.lsb,
  ------------------
  |  Branch (554:9): [True: 8, False: 98.8k]
  ------------------
  555|  98.8k|        (qd->QmfDomainOut[ch].fb.usb == 0) ? usb : qd->QmfDomainOut[ch].fb.usb,
  ------------------
  |  Branch (555:9): [True: 8, False: 98.8k]
  ------------------
  556|  98.8k|        gc->nBandsSynthesis, gc->flags | extra_flags);
  557|  98.8k|    if (outGain_m != (FIXP_DBL)0) {
  ------------------
  |  Branch (557:9): [True: 40.5k, False: 58.3k]
  ------------------
  558|  40.5k|      qmfChangeOutGain(&qd->QmfDomainOut[ch].fb, outGain_m, outGain_e);
  559|  40.5k|    }
  560|  98.8k|    if (outScale) {
  ------------------
  |  Branch (560:9): [True: 8.42k, False: 90.4k]
  ------------------
  561|  8.42k|      qmfChangeOutScalefactor(&qd->QmfDomainOut[ch].fb, outScale);
  562|  8.42k|    }
  563|  98.8k|  }
  564|       |
  565|  41.9k|  return err;
  566|  41.9k|}
_Z25FDK_QmfDomain_SaveOverlapP17FDK_QMF_DOMAIN_INi:
  568|   432k|void FDK_QmfDomain_SaveOverlap(HANDLE_FDK_QMF_DOMAIN_IN qd_ch, int offset) {
  569|   432k|  FDK_ASSERT(qd_ch != NULL);
  ------------------
  |  |  221|   432k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (569:3): [True: 432k, False: 0]
  ------------------
  570|   432k|  int ts;
  571|   432k|  HANDLE_FDK_QMF_DOMAIN_GC gc = qd_ch->pGlobalConf;
  572|   432k|  int ovSlots = gc->nQmfOvTimeSlots;
  573|   432k|  int nCols = gc->nQmfTimeSlots;
  574|   432k|  int nProcBands = gc->nQmfProcBands;
  575|   432k|  FIXP_DBL **qmfReal = qd_ch->hQmfSlotsReal;
  576|   432k|  FIXP_DBL **qmfImag = qd_ch->hQmfSlotsImag;
  577|   432k|  QMF_SCALE_FACTOR *pScaling = &qd_ch->scaling;
  578|       |
  579|       |  /* for high part it would be enough to save only used part of overlap area */
  580|   432k|  if (qmfImag != NULL) {
  ------------------
  |  Branch (580:7): [True: 432k, False: 0]
  ------------------
  581|  2.41M|    for (ts = offset; ts < ovSlots; ts++) {
  ------------------
  |  Branch (581:23): [True: 1.98M, False: 432k]
  ------------------
  582|  1.98M|      FDKmemcpy(qmfReal[ts], qmfReal[nCols + ts],
  583|  1.98M|                sizeof(FIXP_DBL) * nProcBands);
  584|  1.98M|      FDKmemcpy(qmfImag[ts], qmfImag[nCols + ts],
  585|  1.98M|                sizeof(FIXP_DBL) * nProcBands);
  586|  1.98M|    }
  587|   432k|  } else {
  588|      0|    for (ts = 0; ts < ovSlots; ts++) {
  ------------------
  |  Branch (588:18): [True: 0, False: 0]
  ------------------
  589|      0|      FDKmemcpy(qmfReal[ts], qmfReal[nCols + ts],
  590|      0|                sizeof(FIXP_DBL) * nProcBands);
  591|      0|    }
  592|      0|  }
  593|   432k|  pScaling->ov_lb_scale = pScaling->lb_scale;
  594|   432k|}
_Z21FDK_QmfDomain_GetSlotP17FDK_QMF_DOMAIN_INiiiPiS1_i:
  603|  7.07M|                           const int exp_out) {
  604|  7.07M|  FDK_ASSERT(qd_ch != NULL);
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 7.07M, False: 0]
  ------------------
  605|  7.07M|  FDK_ASSERT(pQmfOutReal != NULL);
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (605:3): [True: 7.07M, False: 0]
  ------------------
  606|  7.07M|  HANDLE_FDK_QMF_DOMAIN_GC gc = qd_ch->pGlobalConf;
  607|  7.07M|  const FIXP_DBL *real = qd_ch->hQmfSlotsReal[ts];
  608|  7.07M|  const FIXP_DBL *imag = qd_ch->hQmfSlotsImag[ts];
  609|  7.07M|  const int ovSlots = gc->nQmfOvTimeSlots;
  610|  7.07M|  const int exp_lb = SCALE2EXP((ts < ovSlots) ? qd_ch->scaling.ov_lb_scale
  ------------------
  |  |  597|  14.1M|#define SCALE2EXP(s) (15 - (s))
  |  |  ------------------
  |  |  |  Branch (597:29): [True: 669k, False: 6.41M]
  |  |  ------------------
  ------------------
  611|  7.07M|                                              : qd_ch->scaling.lb_scale);
  612|  7.07M|  const int exp_hb = SCALE2EXP(qd_ch->scaling.hb_scale);
  ------------------
  |  |  597|  7.07M|#define SCALE2EXP(s) (15 - (s))
  ------------------
  613|  7.07M|  const int lsb = qd_ch->fb.lsb;
  614|  7.07M|  const int usb = qd_ch->fb.usb;
  615|  7.07M|  int b = start_band;
  616|  7.07M|  int lb_sf, hb_sf;
  617|       |
  618|  7.07M|  int target_exp =
  619|  7.07M|      ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK + qd_ch->fb.filterScale;
  ------------------
  |  |  156|  7.07M|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  620|       |
  621|  7.07M|  FDK_ASSERT(ts < (gc->nQmfTimeSlots + gc->nQmfOvTimeSlots));
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (621:3): [True: 7.07M, False: 0]
  ------------------
  622|  7.07M|  FDK_ASSERT(start_band >= 0);
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (622:3): [True: 7.07M, False: 0]
  ------------------
  623|  7.07M|  FDK_ASSERT(stop_band <= gc->nQmfProcBands);
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (623:3): [True: 7.07M, False: 0]
  ------------------
  624|       |
  625|  7.07M|  if (qd_ch->fb.no_channels == 24) {
  ------------------
  |  Branch (625:7): [True: 1.01M, False: 6.06M]
  ------------------
  626|  1.01M|    target_exp -= 1;
  627|  1.01M|  }
  628|       |
  629|       |  /* Limit scaling factors to maximum negative value to avoid faulty behaviour
  630|       |     due to right-shifts. Corresponding asserts were observed during robustness
  631|       |     testing.
  632|       |   */
  633|  7.07M|  lb_sf = fMax(exp_lb - target_exp - exp_out, -31);
  634|  7.07M|  FDK_ASSERT(lb_sf < 32);
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (634:3): [True: 7.07M, False: 0]
  ------------------
  635|  7.07M|  hb_sf = fMax(exp_hb - target_exp - exp_out, -31);
  636|  7.07M|  FDK_ASSERT(hb_sf < 32);
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (636:3): [True: 7.07M, False: 0]
  ------------------
  637|       |
  638|  7.07M|  if (pQmfOutImag == NULL) {
  ------------------
  |  Branch (638:7): [True: 0, False: 7.07M]
  ------------------
  639|      0|    for (; b < fMin(lsb, stop_band); b++) {
  ------------------
  |  Branch (639:12): [True: 0, False: 0]
  ------------------
  640|      0|      pQmfOutReal[b] = scaleValueSaturate(real[b], lb_sf);
  641|      0|    }
  642|      0|    for (; b < fMin(usb, stop_band); b++) {
  ------------------
  |  Branch (642:12): [True: 0, False: 0]
  ------------------
  643|      0|      pQmfOutReal[b] = scaleValueSaturate(real[b], hb_sf);
  644|      0|    }
  645|      0|    for (; b < stop_band; b++) {
  ------------------
  |  Branch (645:12): [True: 0, False: 0]
  ------------------
  646|      0|      pQmfOutReal[b] = (FIXP_DBL)0;
  647|      0|    }
  648|  7.07M|  } else {
  649|  7.07M|    FDK_ASSERT(imag != NULL);
  ------------------
  |  |  221|  7.07M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (649:5): [True: 7.07M, False: 0]
  ------------------
  650|  99.8M|    for (; b < fMin(lsb, stop_band); b++) {
  ------------------
  |  Branch (650:12): [True: 92.8M, False: 7.07M]
  ------------------
  651|  92.8M|      pQmfOutReal[b] = scaleValueSaturate(real[b], lb_sf);
  652|  92.8M|      pQmfOutImag[b] = scaleValueSaturate(imag[b], lb_sf);
  653|  92.8M|    }
  654|  74.1M|    for (; b < fMin(usb, stop_band); b++) {
  ------------------
  |  Branch (654:12): [True: 67.0M, False: 7.07M]
  ------------------
  655|  67.0M|      pQmfOutReal[b] = scaleValueSaturate(real[b], hb_sf);
  656|  67.0M|      pQmfOutImag[b] = scaleValueSaturate(imag[b], hb_sf);
  657|  67.0M|    }
  658|  74.0M|    for (; b < stop_band; b++) {
  ------------------
  |  Branch (658:12): [True: 66.9M, False: 7.07M]
  ------------------
  659|  66.9M|      pQmfOutReal[b] = (FIXP_DBL)0;
  660|  66.9M|      pQmfOutImag[b] = (FIXP_DBL)0;
  661|  66.9M|    }
  662|  7.07M|  }
  663|  7.07M|}
_Z27FDK_QmfDomain_GetWorkBufferP17FDK_QMF_DOMAIN_INiPPiS2_:
  667|  1.39M|                                 FIXP_DBL **ppQmfImag) {
  668|  1.39M|  FDK_ASSERT(qd_ch != NULL);
  ------------------
  |  |  221|  1.39M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (668:3): [True: 1.39M, False: 0]
  ------------------
  669|  1.39M|  FDK_ASSERT(ppQmfReal != NULL);
  ------------------
  |  |  221|  1.39M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (669:3): [True: 1.39M, False: 0]
  ------------------
  670|  1.39M|  FDK_ASSERT(ppQmfImag != NULL);
  ------------------
  |  |  221|  1.39M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (670:3): [True: 1.39M, False: 0]
  ------------------
  671|  1.39M|  const int bands = qd_ch->workBuf_nBands;
  672|  1.39M|  FIXP_DBL **pWorkBuf = qd_ch->pWorkBuffer;
  673|  1.39M|  USHORT workBufferOffset = qd_ch->workBufferOffset;
  674|  1.39M|  USHORT workBufferSectSize = qd_ch->workBufferSectSize;
  675|       |
  676|  1.39M|  FDK_ASSERT(bands > 0);
  ------------------
  |  |  221|  1.39M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (676:3): [True: 1.39M, False: 0]
  ------------------
  677|  1.39M|  FDK_ASSERT(ts < qd_ch->workBuf_nTimeSlots);
  ------------------
  |  |  221|  1.39M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (677:3): [True: 1.39M, False: 0]
  ------------------
  678|       |
  679|  1.39M|  *ppQmfReal = FDK_getWorkBuffer(
  680|  1.39M|      pWorkBuf, workBufferOffset + (ts * CMPLX_MOD + 0) * bands,
  ------------------
  |  |  120|  1.39M|#define CMPLX_MOD (2)
  ------------------
  681|  1.39M|      workBufferSectSize, bands);
  682|  1.39M|  *ppQmfImag = FDK_getWorkBuffer(
  683|  1.39M|      pWorkBuf, workBufferOffset + (ts * CMPLX_MOD + 1) * bands,
  ------------------
  |  |  120|  1.39M|#define CMPLX_MOD (2)
  ------------------
  684|  1.39M|      workBufferSectSize, bands);
  685|  1.39M|}
_Z36FDK_QmfDomain_WorkBuffer2ProcChannelP17FDK_QMF_DOMAIN_IN:
  688|  1.01k|    const HANDLE_FDK_QMF_DOMAIN_IN qd_ch) {
  689|  1.01k|  FDK_ASSERT(qd_ch != NULL);
  ------------------
  |  |  221|  1.01k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (689:3): [True: 1.01k, False: 0]
  ------------------
  690|  1.01k|  HANDLE_FDK_QMF_DOMAIN_GC gc = qd_ch->pGlobalConf;
  691|  1.01k|  FIXP_DBL **pWorkBuf = qd_ch->pWorkBuffer;
  692|  1.01k|  USHORT workBufferOffset = qd_ch->workBufferOffset;
  693|  1.01k|  USHORT workBufferSectSize = qd_ch->workBufferSectSize;
  694|       |
  695|  1.01k|  if (FDK_getWorkBuffer(pWorkBuf, workBufferOffset, workBufferSectSize,
  ------------------
  |  Branch (695:7): [True: 506, False: 506]
  ------------------
  696|  1.01k|                        qd_ch->workBuf_nBands) ==
  697|  1.01k|      qd_ch->hQmfSlotsReal[gc->nQmfOvTimeSlots]) {
  698|       |    /* work buffer is part of processing channel => nothing to do */
  699|    506|    return;
  700|    506|  } else {
  701|       |    /* copy parked new QMF data to processing channel */
  702|    506|    const int bands = qd_ch->workBuf_nBands;
  703|    506|    const int slots = qd_ch->workBuf_nTimeSlots;
  704|    506|    int ts;
  705|  19.3k|    for (ts = 0; ts < slots; ts++) {
  ------------------
  |  Branch (705:18): [True: 18.8k, False: 506]
  ------------------
  706|  18.8k|      FDKmemcpy(qd_ch->hQmfSlotsReal[gc->nQmfOvTimeSlots + ts],
  707|  18.8k|                FDK_getWorkBuffer(pWorkBuf, workBufferOffset,
  708|  18.8k|                                  workBufferSectSize, bands),
  709|  18.8k|                sizeof(FIXP_DBL) * bands);  // parkBuf_to_anaMatrix
  710|  18.8k|      workBufferOffset += bands;
  711|  18.8k|      FDKmemcpy(qd_ch->hQmfSlotsImag[gc->nQmfOvTimeSlots + ts],
  712|  18.8k|                FDK_getWorkBuffer(pWorkBuf, workBufferOffset,
  713|  18.8k|                                  workBufferSectSize, bands),
  714|  18.8k|                sizeof(FIXP_DBL) * bands);
  715|  18.8k|      workBufferOffset += bands;
  716|  18.8k|    }
  717|    506|  }
  718|  1.01k|}
_Z25FDK_QmfDomain_QmfData2HBEP17FDK_QMF_DOMAIN_INPPiS2_:
  721|  23.5k|                               FIXP_DBL **ppQmfReal, FIXP_DBL **ppQmfImag) {
  722|  23.5k|  FDK_ASSERT(qd_ch != NULL);
  ------------------
  |  |  221|  23.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (722:3): [True: 23.5k, False: 0]
  ------------------
  723|  23.5k|  FDK_ASSERT(ppQmfReal != NULL);
  ------------------
  |  |  221|  23.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (723:3): [True: 23.5k, False: 0]
  ------------------
  724|  23.5k|  FDK_ASSERT(ppQmfImag != NULL);
  ------------------
  |  |  221|  23.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (724:3): [True: 23.5k, False: 0]
  ------------------
  725|  23.5k|  HANDLE_FDK_QMF_DOMAIN_GC gc = qd_ch->pGlobalConf;
  726|  23.5k|  FIXP_DBL **pWorkBuf = qd_ch->pWorkBuffer;
  727|  23.5k|  USHORT workBufferOffset = qd_ch->workBufferOffset;
  728|  23.5k|  USHORT workBufferSectSize = qd_ch->workBufferSectSize;
  729|       |
  730|  23.5k|  if (FDK_getWorkBuffer(pWorkBuf, workBufferOffset, workBufferSectSize,
  ------------------
  |  Branch (730:7): [True: 11.7k, False: 11.7k]
  ------------------
  731|  23.5k|                        qd_ch->workBuf_nBands) ==
  732|  23.5k|      qd_ch->hQmfSlotsReal[gc->nQmfOvTimeSlots]) {  // left channel (anaMatrix)
  733|  11.7k|    int ts;
  734|  11.7k|    const int bands = gc->nBandsAnalysis;
  735|  11.7k|    const int slots = qd_ch->workBuf_nTimeSlots;
  736|  11.7k|    FDK_ASSERT(bands <= 64);
  ------------------
  |  |  221|  11.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (736:5): [True: 11.7k, False: 0]
  ------------------
  737|   688k|    for (ts = 0; ts < slots; ts++) {
  ------------------
  |  Branch (737:18): [True: 676k, False: 11.7k]
  ------------------
  738|       |      /* copy current data of processing channel */
  739|   676k|      FIXP_DBL tmp[64];  // one slot
  740|       |      /* real */
  741|   676k|      FDKmemcpy(tmp, qd_ch->hQmfSlotsReal[gc->nQmfOvTimeSlots + ts],
  742|   676k|                sizeof(FIXP_DBL) * bands);  // anaMatrix_to_tmp
  743|   676k|      FDKmemcpy(qd_ch->hQmfSlotsReal[gc->nQmfOvTimeSlots + ts], ppQmfReal[ts],
  744|   676k|                sizeof(FIXP_DBL) * bands);  // HBE_to_anaMatrix
  745|   676k|      FDKmemcpy(ppQmfReal[ts], tmp, sizeof(FIXP_DBL) * bands);  // tmp_to_HBE
  746|       |      /* imag */
  747|   676k|      FDKmemcpy(tmp, qd_ch->hQmfSlotsImag[gc->nQmfOvTimeSlots + ts],
  748|   676k|                sizeof(FIXP_DBL) * bands);
  749|   676k|      FDKmemcpy(qd_ch->hQmfSlotsImag[gc->nQmfOvTimeSlots + ts], ppQmfImag[ts],
  750|   676k|                sizeof(FIXP_DBL) * bands);
  751|   676k|      FDKmemcpy(ppQmfImag[ts], tmp, sizeof(FIXP_DBL) * bands);
  752|   676k|    }
  753|  11.7k|  } else {  // right channel (parkBuf)
  754|  11.7k|    const int bands = qd_ch->workBuf_nBands;
  755|  11.7k|    const int slots = qd_ch->workBuf_nTimeSlots;
  756|  11.7k|    int ts;
  757|  11.7k|    FDK_ASSERT(qd_ch->workBuf_nBands == gc->nBandsAnalysis);
  ------------------
  |  |  221|  11.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (757:5): [True: 11.7k, False: 0]
  ------------------
  758|   688k|    for (ts = 0; ts < slots; ts++) {
  ------------------
  |  Branch (758:18): [True: 676k, False: 11.7k]
  ------------------
  759|       |      /* copy HBE QMF data buffer to processing channel */
  760|   676k|      FDKmemcpy(qd_ch->hQmfSlotsReal[gc->nQmfOvTimeSlots + ts], ppQmfReal[ts],
  761|   676k|                sizeof(FIXP_DBL) * bands);  // HBE_to_anaMatrix
  762|   676k|      FDKmemcpy(qd_ch->hQmfSlotsImag[gc->nQmfOvTimeSlots + ts], ppQmfImag[ts],
  763|   676k|                sizeof(FIXP_DBL) * bands);
  764|       |      /* copy parked new QMF data to HBE QMF data buffer */
  765|   676k|      FDKmemcpy(ppQmfReal[ts],
  766|   676k|                FDK_getWorkBuffer(pWorkBuf, workBufferOffset,
  767|   676k|                                  workBufferSectSize, bands),
  768|   676k|                sizeof(FIXP_DBL) * bands);  // parkBuf_to_HBE
  769|   676k|      workBufferOffset += bands;
  770|   676k|      FDKmemcpy(ppQmfImag[ts],
  771|   676k|                FDK_getWorkBuffer(pWorkBuf, workBufferOffset,
  772|   676k|                                  workBufferSectSize, bands),
  773|   676k|                sizeof(FIXP_DBL) * bands);
  774|   676k|      workBufferOffset += bands;
  775|   676k|    }
  776|  11.7k|  }
  777|  23.5k|}
_Z28FDK_QmfDomain_ClearRequestedP17FDK_QMF_DOMAIN_GC:
  779|   333k|void FDK_QmfDomain_ClearRequested(HANDLE_FDK_QMF_DOMAIN_GC hgc) {
  780|   333k|  hgc->qmfDomainExplicitConfig = 0;
  781|   333k|  hgc->flags_requested = 0;
  782|   333k|  hgc->nInputChannels_requested = 0;
  783|   333k|  hgc->nOutputChannels_requested = 0;
  784|   333k|  hgc->parkChannel_requested = 0;
  785|   333k|  hgc->nBandsAnalysis_requested = 0;
  786|   333k|  hgc->nBandsSynthesis_requested = 0;
  787|   333k|  hgc->nQmfTimeSlots_requested = 0;
  788|   333k|  hgc->nQmfOvTimeSlots_requested = 0;
  789|   333k|  hgc->nQmfProcBands_requested = 0;
  790|   333k|  hgc->nQmfProcChannels_requested = 0;
  791|   333k|}
_Z23FDK_QmfDomain_ConfigureP14FDK_QMF_DOMAIN:
  818|   398k|QMF_DOMAIN_ERROR FDK_QmfDomain_Configure(HANDLE_FDK_QMF_DOMAIN hqd) {
  819|   398k|  FDK_ASSERT(hqd != NULL);
  ------------------
  |  |  221|   398k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (819:3): [True: 398k, False: 0]
  ------------------
  820|   398k|  QMF_DOMAIN_ERROR err = QMF_DOMAIN_OK;
  821|   398k|  int i, size_main, size, size_temp = 0;
  822|       |
  823|   398k|  HANDLE_FDK_QMF_DOMAIN_GC hgc = &hqd->globalConf;
  824|   398k|  FIXP_DBL **pWorkBuffer = hgc->pWorkBuffer;
  825|       |
  826|   398k|  int hasChanged = 0;
  827|       |
  828|   398k|  if ((hgc->nQmfProcChannels_requested > 0) &&
  ------------------
  |  Branch (828:7): [True: 341k, False: 56.2k]
  ------------------
  829|   341k|      (hgc->nQmfProcBands_requested != 64)) {
  ------------------
  |  Branch (829:7): [True: 0, False: 341k]
  ------------------
  830|      0|    return QMF_DOMAIN_INIT_ERROR;
  831|      0|  }
  832|   398k|  if (hgc->nBandsAnalysis_requested > hgc->nQmfProcBands_requested) {
  ------------------
  |  Branch (832:7): [True: 0, False: 398k]
  ------------------
  833|       |    /* In general the output of the qmf analysis is written to QMF memory slots
  834|       |       which size is defined by nQmfProcBands. nBandsSynthesis may be larger
  835|       |       than nQmfProcBands. This is e.g. the case if the QMF based resampler is
  836|       |       used.
  837|       |    */
  838|      0|    return QMF_DOMAIN_INIT_ERROR;
  839|      0|  }
  840|       |
  841|       |  /* 1. adjust change of processing channels by comparison of current and
  842|       |   * requested parameters */
  843|   398k|  if ((hgc->nQmfProcChannels != hgc->nQmfProcChannels_requested) ||
  ------------------
  |  Branch (843:7): [True: 27.9k, False: 370k]
  ------------------
  844|   370k|      (hgc->nQmfProcBands != hgc->nQmfProcBands_requested) ||
  ------------------
  |  Branch (844:7): [True: 0, False: 370k]
  ------------------
  845|   370k|      (hgc->nQmfTimeSlots != hgc->nQmfTimeSlots_requested)) {
  ------------------
  |  Branch (845:7): [True: 0, False: 370k]
  ------------------
  846|  55.9k|    for (i = 0; i < hgc->nQmfProcChannels_requested; i++) {
  ------------------
  |  Branch (846:17): [True: 27.9k, False: 27.9k]
  ------------------
  847|  27.9k|      hqd->QmfDomainIn[i].workBuf_nBands = hgc->nQmfProcBands_requested;
  848|  27.9k|      hgc->nQmfProcBands = hgc->nQmfProcBands_requested;
  849|       |
  850|  27.9k|      hqd->QmfDomainIn[i].workBuf_nTimeSlots = hgc->nQmfTimeSlots_requested;
  851|  27.9k|    }
  852|       |
  853|  27.9k|    hgc->nQmfProcChannels =
  854|  27.9k|        hgc->nQmfProcChannels_requested; /* keep highest value encountered so
  855|       |                                            far as allocated */
  856|       |
  857|  27.9k|    hasChanged = 1;
  858|  27.9k|  }
  859|       |
  860|       |  /* 2. reallocate persistent memory if necessary (analysis state-buffers,
  861|       |   * timeslot-pointer-array, overlap-buffers, synthesis state-buffers) */
  862|   398k|  if ((hgc->nInputChannels != hgc->nInputChannels_requested) ||
  ------------------
  |  Branch (862:7): [True: 28.1k, False: 370k]
  ------------------
  863|   370k|      (hgc->nBandsAnalysis != hgc->nBandsAnalysis_requested) ||
  ------------------
  |  Branch (863:7): [True: 0, False: 370k]
  ------------------
  864|   370k|      (hgc->nQmfTimeSlots != hgc->nQmfTimeSlots_requested) ||
  ------------------
  |  Branch (864:7): [True: 0, False: 370k]
  ------------------
  865|   370k|      (hgc->nQmfOvTimeSlots != hgc->nQmfOvTimeSlots_requested) ||
  ------------------
  |  Branch (865:7): [True: 0, False: 370k]
  ------------------
  866|   370k|      (hgc->nOutputChannels != hgc->nOutputChannels_requested) ||
  ------------------
  |  Branch (866:7): [True: 0, False: 370k]
  ------------------
  867|   370k|      (hgc->nBandsSynthesis != hgc->nBandsSynthesis_requested) ||
  ------------------
  |  Branch (867:7): [True: 0, False: 370k]
  ------------------
  868|   370k|      (hgc->parkChannel != hgc->parkChannel_requested)) {
  ------------------
  |  Branch (868:7): [True: 0, False: 370k]
  ------------------
  869|  28.1k|    hgc->nInputChannels = hgc->nInputChannels_requested;
  870|  28.1k|    hgc->nBandsAnalysis = hgc->nBandsAnalysis_requested;
  871|  28.1k|    hgc->nQmfTimeSlots = hgc->nQmfTimeSlots_requested;
  872|  28.1k|    hgc->nQmfOvTimeSlots = hgc->nQmfOvTimeSlots_requested;
  873|  28.1k|    hgc->nOutputChannels = hgc->nOutputChannels_requested;
  874|  28.1k|    hgc->nBandsSynthesis = hgc->nBandsSynthesis_requested;
  875|  28.1k|    hgc->parkChannel = hgc->parkChannel_requested;
  876|       |
  877|  28.1k|    if (FDK_QmfDomain_AllocatePersistentMemory(hqd)) {
  ------------------
  |  Branch (877:9): [True: 0, False: 28.1k]
  ------------------
  878|      0|      err = QMF_DOMAIN_OUT_OF_MEMORY;
  879|      0|      goto bail;
  880|      0|    }
  881|       |
  882|       |    /* 3. set request-flag for downsampled SBR */
  883|  28.1k|    if ((hgc->nBandsAnalysis == 32) && (hgc->nBandsSynthesis == 32) &&
  ------------------
  |  Branch (883:9): [True: 11.7k, False: 16.3k]
  |  Branch (883:40): [True: 4.25k, False: 7.54k]
  ------------------
  884|  4.25k|        !(hgc->flags & (QMF_FLAG_CLDFB | QMF_FLAG_MPSLDFB))) {
  ------------------
  |  |  133|  4.25k|#define QMF_FLAG_CLDFB 4
  ------------------
                      !(hgc->flags & (QMF_FLAG_CLDFB | QMF_FLAG_MPSLDFB))) {
  ------------------
  |  |  137|  4.25k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  |  Branch (884:9): [True: 4.25k, False: 0]
  ------------------
  885|  4.25k|      hgc->flags_requested |= QMF_FLAG_DOWNSAMPLED;
  ------------------
  |  |  143|  4.25k|#define QMF_FLAG_DOWNSAMPLED 64
  ------------------
  886|  4.25k|    }
  887|       |
  888|  28.1k|    hasChanged = 1;
  889|  28.1k|  }
  890|       |
  891|       |  /* 4. initialize tables and buffer for QMF-resampler */
  892|       |
  893|       |  /* 5. set requested flags */
  894|   398k|  if (hgc->flags != hgc->flags_requested) {
  ------------------
  |  Branch (894:7): [True: 13.8k, False: 384k]
  ------------------
  895|  13.8k|    if ((hgc->flags_requested & QMF_FLAG_MPSLDFB) &&
  ------------------
  |  |  137|  13.8k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  |  Branch (895:9): [True: 4.20k, False: 9.62k]
  ------------------
  896|  4.20k|        (hgc->flags_requested & QMF_FLAG_CLDFB)) {
  ------------------
  |  |  133|  4.20k|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (896:9): [True: 0, False: 4.20k]
  ------------------
  897|      0|      hgc->flags_requested &= ~QMF_FLAG_CLDFB;
  ------------------
  |  |  133|      0|#define QMF_FLAG_CLDFB 4
  ------------------
  898|      0|    }
  899|  13.8k|    hgc->flags = hgc->flags_requested;
  900|  13.8k|    hasChanged = 1;
  901|  13.8k|  }
  902|       |
  903|   398k|  if (hasChanged) {
  ------------------
  |  Branch (903:7): [True: 31.4k, False: 366k]
  ------------------
  904|       |    /* 6. recalculate and check size of required workbuffer-space */
  905|       |
  906|  31.4k|    if (hgc->parkChannel && (hqd->globalConf.nQmfProcChannels == 1)) {
  ------------------
  |  Branch (906:9): [True: 2.54k, False: 28.9k]
  |  Branch (906:29): [True: 2.54k, False: 0]
  ------------------
  907|       |      /* configure temp QMF buffer for parking right channel MPS212 output,
  908|       |       * (USAC stereoConfigIndex 3 only) */
  909|  2.54k|      hqd->QmfDomainIn[1].workBuf_nBands = hqd->globalConf.nBandsAnalysis;
  910|  2.54k|      hqd->QmfDomainIn[1].workBuf_nTimeSlots = hqd->globalConf.nQmfTimeSlots;
  911|  2.54k|      size_temp = hqd->QmfDomainIn[1].workBuf_nBands *
  912|  2.54k|                  hqd->QmfDomainIn[1].workBuf_nTimeSlots * CMPLX_MOD;
  ------------------
  |  |  120|  2.54k|#define CMPLX_MOD (2)
  ------------------
  913|  2.54k|    }
  914|       |
  915|  31.4k|    size_main = hqd->QmfDomainIn[0].workBuf_nBands *
  916|  31.4k|                hqd->QmfDomainIn[0].workBuf_nTimeSlots * CMPLX_MOD;
  ------------------
  |  |  120|  31.4k|#define CMPLX_MOD (2)
  ------------------
  917|       |
  918|  31.4k|    size = size_main * hgc->nQmfProcChannels + size_temp;
  919|       |
  920|  31.4k|    if (size > (QMF_MAX_WB_SECTIONS * QMF_WB_SECTION_SIZE)) {
  ------------------
  |  |  122|  31.4k|#define QMF_MAX_WB_SECTIONS (5) /* maximum number of workbuffer sections */
  ------------------
                  if (size > (QMF_MAX_WB_SECTIONS * QMF_WB_SECTION_SIZE)) {
  ------------------
  |  |  123|  31.4k|#define QMF_WB_SECTION_SIZE (1024 * 2)
  ------------------
  |  Branch (920:9): [True: 0, False: 31.4k]
  ------------------
  921|      0|      err = QMF_DOMAIN_OUT_OF_MEMORY;
  922|      0|      goto bail;
  923|      0|    }
  924|       |
  925|       |    /* 7. allocate additional workbuffer if necessary */
  926|  31.4k|    if ((size > 0 /* *QMF_WB_SECTION_SIZE */) && (pWorkBuffer[0] == NULL)) {
  ------------------
  |  Branch (926:9): [True: 28.3k, False: 3.09k]
  |  Branch (926:50): [True: 25.8k, False: 2.45k]
  ------------------
  927|       |      /* get work buffer of size QMF_WB_SECTION_SIZE */
  928|  25.8k|      pWorkBuffer[0] = GetQmfWorkBufferCore6();
  929|  25.8k|    }
  930|       |
  931|  31.4k|    if ((size > 1 * QMF_WB_SECTION_SIZE) && (pWorkBuffer[1] == NULL)) {
  ------------------
  |  |  123|  31.4k|#define QMF_WB_SECTION_SIZE (1024 * 2)
  ------------------
  |  Branch (931:9): [True: 19.8k, False: 11.5k]
  |  Branch (931:45): [True: 17.4k, False: 2.42k]
  ------------------
  932|       |      /* get work buffer of size QMF_WB_SECTION_SIZE */
  933|  17.4k|      pWorkBuffer[1] = GetQmfWorkBufferCore1();
  934|  17.4k|    }
  935|       |
  936|  31.4k|    if ((size > 2 * QMF_WB_SECTION_SIZE) && (pWorkBuffer[2] == NULL)) {
  ------------------
  |  |  123|  31.4k|#define QMF_WB_SECTION_SIZE (1024 * 2)
  ------------------
  |  Branch (936:9): [True: 5.77k, False: 25.6k]
  |  Branch (936:45): [True: 5.05k, False: 723]
  ------------------
  937|       |      /* get work buffer of size QMF_WB_SECTION_SIZE */
  938|  5.05k|      pWorkBuffer[2] = GetQmfWorkBufferCore3();
  939|  5.05k|    }
  940|       |
  941|  31.4k|    if ((size > 3 * QMF_WB_SECTION_SIZE) && (pWorkBuffer[3] == NULL)) {
  ------------------
  |  |  123|  31.4k|#define QMF_WB_SECTION_SIZE (1024 * 2)
  ------------------
  |  Branch (941:9): [True: 3.80k, False: 27.6k]
  |  Branch (941:45): [True: 3.60k, False: 195]
  ------------------
  942|       |      /* get work buffer of size QMF_WB_SECTION_SIZE */
  943|  3.60k|      pWorkBuffer[3] = GetQmfWorkBufferCore4();
  944|  3.60k|    }
  945|       |
  946|  31.4k|    if ((size > 4 * QMF_WB_SECTION_SIZE) && (pWorkBuffer[4] == NULL)) {
  ------------------
  |  |  123|  31.4k|#define QMF_WB_SECTION_SIZE (1024 * 2)
  ------------------
  |  Branch (946:9): [True: 573, False: 30.8k]
  |  Branch (946:45): [True: 398, False: 175]
  ------------------
  947|       |      /* get work buffer of size QMF_WB_SECTION_SIZE */
  948|    398|      pWorkBuffer[4] = GetQmfWorkBufferCore7();
  949|    398|    }
  950|       |
  951|       |    /* 8. distribute workbuffer over processing channels */
  952|  62.8k|    for (i = 0; i < hgc->nQmfProcChannels; i++) {
  ------------------
  |  Branch (952:17): [True: 31.4k, False: 31.4k]
  ------------------
  953|  31.4k|      FDK_QmfDomain_FeedWorkBuffer(hqd, i, pWorkBuffer, size_main * i,
  954|  31.4k|                                   QMF_WB_SECTION_SIZE, size_main);
  ------------------
  |  |  123|  31.4k|#define QMF_WB_SECTION_SIZE (1024 * 2)
  ------------------
  955|  31.4k|    }
  956|  31.4k|    if (hgc->parkChannel) {
  ------------------
  |  Branch (956:9): [True: 2.54k, False: 28.9k]
  ------------------
  957|  5.09k|      for (; i < hgc->nInputChannels; i++) {
  ------------------
  |  Branch (957:14): [True: 2.54k, False: 2.54k]
  ------------------
  958|  2.54k|        FDK_QmfDomain_FeedWorkBuffer(hqd, 1, pWorkBuffer,
  959|  2.54k|                                     size_main * hgc->nQmfProcChannels,
  960|  2.54k|                                     QMF_WB_SECTION_SIZE, size_temp);
  ------------------
  |  |  123|  2.54k|#define QMF_WB_SECTION_SIZE (1024 * 2)
  ------------------
  961|  2.54k|      }
  962|  2.54k|    }
  963|       |
  964|       |    /* 9. (re-)init filterbank */
  965|  96.9k|    for (i = 0; i < hgc->nOutputChannels; i++) {
  ------------------
  |  Branch (965:17): [True: 65.4k, False: 31.4k]
  ------------------
  966|  65.4k|      if ((hqd->QmfDomainOut[i].fb.lsb == 0) &&
  ------------------
  |  Branch (966:11): [True: 58.3k, False: 7.15k]
  ------------------
  967|  58.3k|          (hqd->QmfDomainOut[i].fb.usb == 0)) {
  ------------------
  |  Branch (967:11): [True: 58.3k, False: 0]
  ------------------
  968|       |        /* Although lsb and usb are set in the SBR module, they are initialized
  969|       |         * at this point due to the case of using MPS without SBR. */
  970|  58.3k|        hqd->QmfDomainOut[i].fb.lsb = hgc->nBandsAnalysis_requested;
  971|  58.3k|        hqd->QmfDomainOut[i].fb.usb =
  972|  58.3k|            fMin((INT)hgc->nBandsSynthesis_requested, 64);
  973|  58.3k|      }
  974|  65.4k|    }
  975|  31.4k|    if (FDK_QmfDomain_InitFilterBank(hqd, 0)) {
  ------------------
  |  Branch (975:9): [True: 4, False: 31.4k]
  ------------------
  976|      4|      err = QMF_DOMAIN_INIT_ERROR;
  977|      4|    }
  978|  31.4k|  }
  979|       |
  980|   398k|bail:
  981|   398k|  if (err) {
  ------------------
  |  Branch (981:7): [True: 4, False: 398k]
  ------------------
  982|      4|    FDK_QmfDomain_FreeMem(hqd);
  983|      4|  }
  984|   398k|  return err;
  985|   398k|}
_Z21FDK_QmfDomain_FreeMemP14FDK_QMF_DOMAIN:
  997|   311k|void FDK_QmfDomain_FreeMem(HANDLE_FDK_QMF_DOMAIN hqd) {
  998|   311k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
  999|       |
 1000|   311k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1001|       |
 1002|   311k|  FDK_QmfDomain_ClearFilterBank(hqd);
 1003|       |
 1004|   311k|  FDK_QmfDomain_ClearConfigured(&hqd->globalConf);
 1005|       |
 1006|   311k|  FDK_QmfDomain_ClearRequested(&hqd->globalConf);
 1007|   311k|}
_Z19FDK_QmfDomain_CloseP14FDK_QMF_DOMAIN:
 1009|  21.8k|void FDK_QmfDomain_Close(HANDLE_FDK_QMF_DOMAIN hqd) {
 1010|  21.8k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
 1011|       |
 1012|  21.8k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1013|  21.8k|}
FDK_qmf_domain.cpp:_ZL17FDK_getWorkBufferPPittt:
  431|  8.34M|                                   USHORT workBufferSectSize, USHORT memSize) {
  432|  8.34M|  int idx1;
  433|  8.34M|  int idx2;
  434|  8.34M|  FIXP_DBL *pwb;
  435|       |
  436|       |  /* a section must be a multiple of the number of processing bands (currently
  437|       |   * always 64) */
  438|  8.34M|  FDK_ASSERT((workBufferSectSize % 64) == 0);
  ------------------
  |  |  221|  8.34M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (438:3): [True: 8.34M, False: 0]
  ------------------
  439|       |
  440|       |  /* calculate offset within the section */
  441|  8.34M|  idx2 = workBufferOffset % workBufferSectSize;
  442|       |  /* calculate section number */
  443|  8.34M|  idx1 = (workBufferOffset - idx2) / workBufferSectSize;
  444|       |  /* maximum sectionnumber is QMF_MAX_WB_SECTIONS */
  445|  8.34M|  FDK_ASSERT(idx1 < QMF_MAX_WB_SECTIONS);
  ------------------
  |  |  221|  8.34M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (445:3): [True: 8.34M, False: 0]
  ------------------
  446|       |
  447|       |  /* check, whether workbuffer is available  */
  448|  8.34M|  FDK_ASSERT(pWorkBuffer[idx1] != NULL);
  ------------------
  |  |  221|  8.34M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (448:3): [True: 8.34M, False: 0]
  ------------------
  449|       |
  450|       |  /* check, whether buffer fits into selected section */
  451|  8.34M|  FDK_ASSERT((idx2 + memSize) <= workBufferSectSize);
  ------------------
  |  |  221|  8.34M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (451:3): [True: 8.34M, False: 0]
  ------------------
  452|       |
  453|       |  /* get requested address to workbuffer */
  454|  8.34M|  pwb = &pWorkBuffer[idx1][idx2];
  455|       |
  456|  8.34M|  return pwb;
  457|  8.34M|}
FDK_qmf_domain.cpp:_ZL38FDK_QmfDomain_AllocatePersistentMemoryP14FDK_QMF_DOMAIN:
  259|  28.1k|static int FDK_QmfDomain_AllocatePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) {
  260|  28.1k|  int err = 0;
  261|  28.1k|  int ch;
  262|  28.1k|  HANDLE_FDK_QMF_DOMAIN_GC gc = &qd->globalConf;
  263|       |
  264|  28.1k|  if ((gc->nInputChannels > ((8) + (1))) || (gc->nOutputChannels > ((8) + (1))))
  ------------------
  |  Branch (264:7): [True: 0, False: 28.1k]
  |  Branch (264:45): [True: 0, False: 28.1k]
  ------------------
  265|      0|    return err = 1;
  266|  80.2k|  for (ch = 0; ch < gc->nInputChannels; ch++) {
  ------------------
  |  Branch (266:16): [True: 52.0k, False: 28.1k]
  ------------------
  267|  52.0k|    int size;
  268|       |
  269|  52.0k|    size = gc->nBandsAnalysis * 10;
  270|  52.0k|    if (size > 0) {
  ------------------
  |  Branch (270:9): [True: 52.0k, False: 6]
  ------------------
  271|  52.0k|      if (gc->nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_16) {
  ------------------
  |  |  137|  52.0k|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_16 (16)
  ------------------
  |  Branch (271:11): [True: 11.7k, False: 40.3k]
  ------------------
  272|  11.7k|        if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) {
  ------------------
  |  Branch (272:13): [True: 11.7k, False: 0]
  ------------------
  273|  11.7k|          if (NULL ==
  ------------------
  |  Branch (273:15): [True: 0, False: 11.7k]
  ------------------
  274|  11.7k|              (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates16(ch)))
  275|      0|            goto bail;
  276|  11.7k|        }
  277|  40.3k|      } else if (gc->nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_24) {
  ------------------
  |  |  138|  40.3k|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_24 (24)
  ------------------
  |  Branch (277:18): [True: 9.36k, False: 30.9k]
  ------------------
  278|  9.36k|        if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) {
  ------------------
  |  Branch (278:13): [True: 9.36k, False: 0]
  ------------------
  279|  9.36k|          if (NULL ==
  ------------------
  |  Branch (279:15): [True: 0, False: 9.36k]
  ------------------
  280|  9.36k|              (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates24(ch)))
  281|      0|            goto bail;
  282|  9.36k|        }
  283|  30.9k|      } else if (gc->nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_32) {
  ------------------
  |  |  139|  30.9k|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_32 (32)
  ------------------
  |  Branch (283:18): [True: 28.8k, False: 2.08k]
  ------------------
  284|  28.8k|        if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) {
  ------------------
  |  Branch (284:13): [True: 28.3k, False: 509]
  ------------------
  285|  28.3k|          if (NULL ==
  ------------------
  |  Branch (285:15): [True: 0, False: 28.3k]
  ------------------
  286|  28.3k|              (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates32(ch)))
  287|      0|            goto bail;
  288|  28.3k|        }
  289|  28.8k|      } else {
  290|  2.08k|        if (qd->QmfDomainIn[ch].pAnaQmfStates == NULL) {
  ------------------
  |  Branch (290:13): [True: 2.08k, False: 0]
  ------------------
  291|  2.08k|          if (NULL == (qd->QmfDomainIn[ch].pAnaQmfStates = GetAnaQmfStates(ch)))
  ------------------
  |  Branch (291:15): [True: 0, False: 2.08k]
  ------------------
  292|      0|            goto bail;
  293|  2.08k|        }
  294|  2.08k|      }
  295|  52.0k|    } else {
  296|      6|      qd->QmfDomainIn[ch].pAnaQmfStates = NULL;
  297|      6|    }
  298|       |
  299|  52.0k|    size = gc->nQmfOvTimeSlots + gc->nQmfTimeSlots;
  300|  52.0k|    if (size > 0) {
  ------------------
  |  Branch (300:9): [True: 50.0k, False: 2.07k]
  ------------------
  301|  50.0k|      if (gc->nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) {
  ------------------
  |  |  141|  50.0k|#define QMF_DOMAIN_TIMESLOTS_16 (16)
  ------------------
  |  Branch (301:11): [True: 8.61k, False: 41.3k]
  ------------------
  302|  8.61k|        if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) {
  ------------------
  |  Branch (302:13): [True: 8.61k, False: 0]
  ------------------
  303|  8.61k|          if (NULL ==
  ------------------
  |  Branch (303:15): [True: 0, False: 8.61k]
  ------------------
  304|  8.61k|              (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal16(ch)))
  305|      0|            goto bail;
  306|  8.61k|        }
  307|  8.61k|        if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) {
  ------------------
  |  Branch (307:13): [True: 8.61k, False: 0]
  ------------------
  308|  8.61k|          if (NULL ==
  ------------------
  |  Branch (308:15): [True: 0, False: 8.61k]
  ------------------
  309|  8.61k|              (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag16(ch)))
  310|      0|            goto bail;
  311|  8.61k|        }
  312|  41.3k|      } else if (gc->nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) {
  ------------------
  |  |  142|  41.3k|#define QMF_DOMAIN_TIMESLOTS_32 (32)
  ------------------
  |  Branch (312:18): [True: 17.4k, False: 23.9k]
  ------------------
  313|  17.4k|        if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) {
  ------------------
  |  Branch (313:13): [True: 17.2k, False: 246]
  ------------------
  314|  17.2k|          if (NULL ==
  ------------------
  |  Branch (314:15): [True: 0, False: 17.2k]
  ------------------
  315|  17.2k|              (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal32(ch)))
  316|      0|            goto bail;
  317|  17.2k|        }
  318|  17.4k|        if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) {
  ------------------
  |  Branch (318:13): [True: 17.2k, False: 246]
  ------------------
  319|  17.2k|          if (NULL ==
  ------------------
  |  Branch (319:15): [True: 0, False: 17.2k]
  ------------------
  320|  17.2k|              (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag32(ch)))
  321|      0|            goto bail;
  322|  17.2k|        }
  323|  23.9k|      } else {
  324|  23.9k|        if (qd->QmfDomainIn[ch].hQmfSlotsReal == NULL) {
  ------------------
  |  Branch (324:13): [True: 23.6k, False: 263]
  ------------------
  325|  23.6k|          if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsReal = GetQmfSlotsReal(ch)))
  ------------------
  |  Branch (325:15): [True: 0, False: 23.6k]
  ------------------
  326|      0|            goto bail;
  327|  23.6k|        }
  328|  23.9k|        if (qd->QmfDomainIn[ch].hQmfSlotsImag == NULL) {
  ------------------
  |  Branch (328:13): [True: 23.6k, False: 263]
  ------------------
  329|  23.6k|          if (NULL == (qd->QmfDomainIn[ch].hQmfSlotsImag = GetQmfSlotsImag(ch)))
  ------------------
  |  Branch (329:15): [True: 0, False: 23.6k]
  ------------------
  330|      0|            goto bail;
  331|  23.6k|        }
  332|  23.9k|      }
  333|  50.0k|    } else {
  334|  2.07k|      qd->QmfDomainIn[ch].hQmfSlotsReal = NULL;
  335|  2.07k|      qd->QmfDomainIn[ch].hQmfSlotsImag = NULL;
  336|  2.07k|    }
  337|       |
  338|  52.0k|    size = gc->nQmfOvTimeSlots * gc->nQmfProcBands * CMPLX_MOD;
  ------------------
  |  |  120|  52.0k|#define CMPLX_MOD (2)
  ------------------
  339|  52.0k|    if (size > 0) {
  ------------------
  |  Branch (339:9): [True: 25.0k, False: 27.0k]
  ------------------
  340|  25.0k|      if (gc->nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_16) {
  ------------------
  |  |  144|  25.0k|#define QMF_DOMAIN_OV_TIMESLOTS_16 (3)
  ------------------
  |  Branch (340:11): [True: 0, False: 25.0k]
  ------------------
  341|      0|        if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) {
  ------------------
  |  Branch (341:13): [True: 0, False: 0]
  ------------------
  342|      0|          if (NULL ==
  ------------------
  |  Branch (342:15): [True: 0, False: 0]
  ------------------
  343|      0|              (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer16(ch)))
  344|      0|            goto bail;
  345|      0|        }
  346|  25.0k|      } else if (gc->nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_32) {
  ------------------
  |  |  145|  25.0k|#define QMF_DOMAIN_OV_TIMESLOTS_32 (6)
  ------------------
  |  Branch (346:18): [True: 20.9k, False: 4.14k]
  ------------------
  347|  20.9k|        if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) {
  ------------------
  |  Branch (347:13): [True: 20.4k, False: 509]
  ------------------
  348|  20.4k|          if (NULL ==
  ------------------
  |  Branch (348:15): [True: 0, False: 20.4k]
  ------------------
  349|  20.4k|              (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer32(ch)))
  350|      0|            goto bail;
  351|  20.4k|        }
  352|  20.9k|      } else {
  353|  4.14k|        if (qd->QmfDomainIn[ch].pOverlapBuffer == NULL) {
  ------------------
  |  Branch (353:13): [True: 4.14k, False: 0]
  ------------------
  354|  4.14k|          if (NULL ==
  ------------------
  |  Branch (354:15): [True: 0, False: 4.14k]
  ------------------
  355|  4.14k|              (qd->QmfDomainIn[ch].pOverlapBuffer = GetQmfOverlapBuffer(ch)))
  356|      0|            goto bail;
  357|  4.14k|        }
  358|  4.14k|      }
  359|  27.0k|    } else {
  360|  27.0k|      qd->QmfDomainIn[ch].pOverlapBuffer = NULL;
  361|  27.0k|    }
  362|  52.0k|  }
  363|       |
  364|  86.9k|  for (ch = 0; ch < gc->nOutputChannels; ch++) {
  ------------------
  |  Branch (364:16): [True: 58.8k, False: 28.1k]
  ------------------
  365|  58.8k|    int size = gc->nBandsSynthesis * 9;
  366|  58.8k|    if (size > 0) {
  ------------------
  |  Branch (366:9): [True: 58.8k, False: 8]
  ------------------
  367|  58.8k|      if (qd->QmfDomainOut[ch].pSynQmfStates == NULL) {
  ------------------
  |  Branch (367:11): [True: 58.3k, False: 509]
  ------------------
  368|  58.3k|        if (NULL == (qd->QmfDomainOut[ch].pSynQmfStates = GetSynQmfStates(ch)))
  ------------------
  |  Branch (368:13): [True: 0, False: 58.3k]
  ------------------
  369|      0|          goto bail;
  370|  58.3k|      }
  371|  58.8k|    } else {
  372|      8|      qd->QmfDomainOut[ch].pSynQmfStates = NULL;
  373|      8|    }
  374|  58.8k|  }
  375|       |
  376|  28.1k|  return err;
  377|       |
  378|      0|bail:
  379|      0|  FDK_QmfDomain_FreePersistentMemory(qd);
  380|      0|  return -1;
  381|  28.1k|}
FDK_qmf_domain.cpp:_ZL28FDK_QmfDomain_FeedWorkBufferP14FDK_QMF_DOMAINiPPitti:
  462|  33.9k|                                        USHORT workBufferSectSize, int size) {
  463|  33.9k|  int err = 0;
  464|  33.9k|  int mem_needed;
  465|       |
  466|  33.9k|  mem_needed = qd->QmfDomainIn[ch].workBuf_nBands *
  467|  33.9k|               qd->QmfDomainIn[ch].workBuf_nTimeSlots * CMPLX_MOD;
  ------------------
  |  |  120|  33.9k|#define CMPLX_MOD (2)
  ------------------
  468|  33.9k|  if (mem_needed > size) {
  ------------------
  |  Branch (468:7): [True: 0, False: 33.9k]
  ------------------
  469|      0|    return (err = 1);
  470|      0|  }
  471|  33.9k|  qd->QmfDomainIn[ch].pWorkBuffer = pWorkBuffer;
  472|  33.9k|  qd->QmfDomainIn[ch].workBufferOffset = workBufferOffset;
  473|  33.9k|  qd->QmfDomainIn[ch].workBufferSectSize = workBufferSectSize;
  474|       |
  475|  33.9k|  return err;
  476|  33.9k|}
FDK_qmf_domain.cpp:_ZL28FDK_QmfDomain_FreeWorkBufferP14FDK_QMF_DOMAIN:
  987|   333k|static void FDK_QmfDomain_FreeWorkBuffer(HANDLE_FDK_QMF_DOMAIN hqd) {
  988|   333k|  FIXP_DBL **pWorkBuffer = hqd->globalConf.pWorkBuffer;
  989|       |
  990|   333k|  if (pWorkBuffer[0]) FreeQmfWorkBufferCore6(&pWorkBuffer[0]);
  ------------------
  |  Branch (990:7): [True: 25.8k, False: 307k]
  ------------------
  991|   333k|  if (pWorkBuffer[1]) FreeQmfWorkBufferCore1(&pWorkBuffer[1]);
  ------------------
  |  Branch (991:7): [True: 17.4k, False: 316k]
  ------------------
  992|   333k|  if (pWorkBuffer[2]) FreeQmfWorkBufferCore3(&pWorkBuffer[2]);
  ------------------
  |  Branch (992:7): [True: 5.05k, False: 328k]
  ------------------
  993|   333k|  if (pWorkBuffer[3]) FreeQmfWorkBufferCore4(&pWorkBuffer[3]);
  ------------------
  |  Branch (993:7): [True: 3.60k, False: 330k]
  ------------------
  994|   333k|  if (pWorkBuffer[4]) FreeQmfWorkBufferCore7(&pWorkBuffer[4]);
  ------------------
  |  Branch (994:7): [True: 398, False: 333k]
  ------------------
  995|   333k|}
FDK_qmf_domain.cpp:_ZL34FDK_QmfDomain_FreePersistentMemoryP14FDK_QMF_DOMAIN:
  199|   333k|static int FDK_QmfDomain_FreePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) {
  200|   333k|  int err = 0;
  201|   333k|  int ch;
  202|       |
  203|  3.33M|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (203:16): [True: 3.00M, False: 333k]
  ------------------
  204|  3.00M|    if (qd->QmfDomainIn[ch].pAnaQmfStates) {
  ------------------
  |  Branch (204:9): [True: 51.5k, False: 2.95M]
  ------------------
  205|  51.5k|      if (qd->globalConf.nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_16) {
  ------------------
  |  |  137|  51.5k|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_16 (16)
  ------------------
  |  Branch (205:11): [True: 11.7k, False: 39.8k]
  ------------------
  206|  11.7k|        FreeAnaQmfStates16(&qd->QmfDomainIn[ch].pAnaQmfStates);
  207|  39.8k|      } else if (qd->globalConf.nBandsAnalysis ==
  ------------------
  |  Branch (207:18): [True: 9.36k, False: 30.4k]
  ------------------
  208|  39.8k|                 QMF_DOMAIN_ANALYSIS_QMF_BANDS_24) {
  ------------------
  |  |  138|  39.8k|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_24 (24)
  ------------------
  209|  9.36k|        FreeAnaQmfStates24(&qd->QmfDomainIn[ch].pAnaQmfStates);
  210|  30.4k|      } else if (qd->globalConf.nBandsAnalysis ==
  ------------------
  |  Branch (210:18): [True: 28.3k, False: 2.08k]
  ------------------
  211|  30.4k|                 QMF_DOMAIN_ANALYSIS_QMF_BANDS_32) {
  ------------------
  |  |  139|  30.4k|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_32 (32)
  ------------------
  212|  28.3k|        FreeAnaQmfStates32(&qd->QmfDomainIn[ch].pAnaQmfStates);
  213|  28.3k|      } else {
  214|  2.08k|        FreeAnaQmfStates(&qd->QmfDomainIn[ch].pAnaQmfStates);
  215|  2.08k|      }
  216|  51.5k|    }
  217|       |
  218|  3.00M|    if (qd->QmfDomainIn[ch].pOverlapBuffer) {
  ------------------
  |  Branch (218:9): [True: 24.5k, False: 2.97M]
  ------------------
  219|  24.5k|      if (qd->globalConf.nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_16) {
  ------------------
  |  |  144|  24.5k|#define QMF_DOMAIN_OV_TIMESLOTS_16 (3)
  ------------------
  |  Branch (219:11): [True: 0, False: 24.5k]
  ------------------
  220|      0|        FreeQmfOverlapBuffer16(&qd->QmfDomainIn[ch].pOverlapBuffer);
  221|  24.5k|      } else if (qd->globalConf.nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_32) {
  ------------------
  |  |  145|  24.5k|#define QMF_DOMAIN_OV_TIMESLOTS_32 (6)
  ------------------
  |  Branch (221:18): [True: 20.4k, False: 4.14k]
  ------------------
  222|  20.4k|        FreeQmfOverlapBuffer32(&qd->QmfDomainIn[ch].pOverlapBuffer);
  223|  20.4k|      } else {
  224|  4.14k|        FreeQmfOverlapBuffer(&qd->QmfDomainIn[ch].pOverlapBuffer);
  225|  4.14k|      }
  226|  24.5k|    }
  227|       |
  228|  3.00M|    if (qd->QmfDomainIn[ch].hQmfSlotsReal) {
  ------------------
  |  Branch (228:9): [True: 49.5k, False: 2.95M]
  ------------------
  229|  49.5k|      if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) {
  ------------------
  |  |  141|  49.5k|#define QMF_DOMAIN_TIMESLOTS_16 (16)
  ------------------
  |  Branch (229:11): [True: 8.61k, False: 40.8k]
  ------------------
  230|  8.61k|        FreeQmfSlotsReal16(&qd->QmfDomainIn[ch].hQmfSlotsReal);
  231|  40.8k|      } else if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) {
  ------------------
  |  |  142|  40.8k|#define QMF_DOMAIN_TIMESLOTS_32 (32)
  ------------------
  |  Branch (231:18): [True: 17.2k, False: 23.6k]
  ------------------
  232|  17.2k|        FreeQmfSlotsReal32(&qd->QmfDomainIn[ch].hQmfSlotsReal);
  233|  23.6k|      } else {
  234|  23.6k|        FreeQmfSlotsReal(&qd->QmfDomainIn[ch].hQmfSlotsReal);
  235|  23.6k|      }
  236|  49.5k|    }
  237|       |
  238|  3.00M|    if (qd->QmfDomainIn[ch].hQmfSlotsImag) {
  ------------------
  |  Branch (238:9): [True: 49.5k, False: 2.95M]
  ------------------
  239|  49.5k|      if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) {
  ------------------
  |  |  141|  49.5k|#define QMF_DOMAIN_TIMESLOTS_16 (16)
  ------------------
  |  Branch (239:11): [True: 8.61k, False: 40.8k]
  ------------------
  240|  8.61k|        FreeQmfSlotsImag16(&qd->QmfDomainIn[ch].hQmfSlotsImag);
  241|  8.61k|      }
  242|  49.5k|      if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) {
  ------------------
  |  |  142|  49.5k|#define QMF_DOMAIN_TIMESLOTS_32 (32)
  ------------------
  |  Branch (242:11): [True: 17.2k, False: 32.2k]
  ------------------
  243|  17.2k|        FreeQmfSlotsImag32(&qd->QmfDomainIn[ch].hQmfSlotsImag);
  244|  32.2k|      } else {
  245|  32.2k|        FreeQmfSlotsImag(&qd->QmfDomainIn[ch].hQmfSlotsImag);
  246|  32.2k|      }
  247|  49.5k|    }
  248|  3.00M|  }
  249|       |
  250|  3.33M|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (250:16): [True: 3.00M, False: 333k]
  ------------------
  251|  3.00M|    if (qd->QmfDomainOut[ch].pSynQmfStates) {
  ------------------
  |  Branch (251:9): [True: 58.3k, False: 2.94M]
  ------------------
  252|  58.3k|      FreeSynQmfStates(&qd->QmfDomainOut[ch].pSynQmfStates);
  253|  58.3k|    }
  254|  3.00M|  }
  255|       |
  256|   333k|  return err;
  257|   333k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearFilterBankP14FDK_QMF_DOMAIN:
  806|   311k|static void FDK_QmfDomain_ClearFilterBank(HANDLE_FDK_QMF_DOMAIN hqd) {
  807|   311k|  int ch;
  808|       |
  809|  3.11M|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (809:16): [True: 2.80M, False: 311k]
  ------------------
  810|  2.80M|    FDKmemclear(&hqd->QmfDomainIn[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  811|  2.80M|  }
  812|       |
  813|  3.11M|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (813:16): [True: 2.80M, False: 311k]
  ------------------
  814|  2.80M|    FDKmemclear(&hqd->QmfDomainOut[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  815|  2.80M|  }
  816|   311k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearConfiguredP17FDK_QMF_DOMAIN_GC:
  793|   311k|static void FDK_QmfDomain_ClearConfigured(HANDLE_FDK_QMF_DOMAIN_GC hgc) {
  794|   311k|  hgc->flags = 0;
  795|   311k|  hgc->nInputChannels = 0;
  796|   311k|  hgc->nOutputChannels = 0;
  797|   311k|  hgc->parkChannel = 0;
  798|   311k|  hgc->nBandsAnalysis = 0;
  799|   311k|  hgc->nBandsSynthesis = 0;
  800|   311k|  hgc->nQmfTimeSlots = 0;
  801|   311k|  hgc->nQmfOvTimeSlots = 0;
  802|   311k|  hgc->nQmfProcBands = 0;
  803|   311k|  hgc->nQmfProcChannels = 0;
  804|   311k|}

_Z17FDKgetWindowSlopeii:
 4070|   782k|const FIXP_WTP *FDKgetWindowSlope(int length, int shape) {
 4071|   782k|  const FIXP_WTP *w = NULL;
 4072|   782k|  int raster, ld2_length;
 4073|       |
 4074|       |  /* Get ld2 of length - 2 + 1
 4075|       |     -2: because first table entry is window of size 4
 4076|       |     +1: because we already include +1 because of ceil(log2(length)) */
 4077|   782k|  ld2_length = DFRACT_BITS - 1 - fNormz((FIXP_DBL)length) - 1;
  ------------------
  |  |  113|   782k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 4078|       |
 4079|       |  /* Extract sort of "eigenvalue" (the 4 left most bits) of length. */
 4080|   782k|  switch ((length) >> (ld2_length - 2)) {
 4081|   400k|    case 0x8: /* radix 2 */
  ------------------
  |  Branch (4081:5): [True: 400k, False: 382k]
  ------------------
 4082|   400k|      raster = 0;
 4083|   400k|      ld2_length--; /* revert + 1 because of ceil(log2(length)) from above. */
 4084|   400k|      break;
 4085|  81.7k|    case 0xf: /* 10 ms */
  ------------------
  |  Branch (4085:5): [True: 81.7k, False: 700k]
  ------------------
 4086|  81.7k|      raster = 1;
 4087|  81.7k|      break;
 4088|   300k|    case 0xc: /* 3/4 of radix 2 */
  ------------------
  |  Branch (4088:5): [True: 300k, False: 482k]
  ------------------
 4089|   300k|      raster = 2;
 4090|   300k|      break;
 4091|      0|    default:
  ------------------
  |  Branch (4091:5): [True: 0, False: 782k]
  ------------------
 4092|      0|      raster = 0;
 4093|      0|      break;
 4094|   782k|  }
 4095|       |
 4096|       |  /* The table for sine windows (shape == 0) is 4 entries longer. */
 4097|   782k|  if (shape == 1) {
  ------------------
  |  Branch (4097:7): [True: 233k, False: 549k]
  ------------------
 4098|   233k|    ld2_length -= 4;
 4099|   233k|  }
 4100|       |
 4101|       |  /* Look up table */
 4102|   782k|  w = windowSlopes[shape & 1][raster][ld2_length];
 4103|       |
 4104|   782k|  FDK_ASSERT(w != NULL);
  ------------------
  |  |  221|   782k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (4104:3): [True: 782k, False: 0]
  ------------------
 4105|       |
 4106|   782k|  return w;
 4107|   782k|}
_Z23getBitstreamElementList17AUDIO_OBJECT_TYPEahhj:
 7135|   430k|                                              UCHAR layer, UINT elFlags) {
 7136|   430k|  switch (aot) {
 7137|  20.3k|    case AOT_AAC_LC:
  ------------------
  |  Branch (7137:5): [True: 20.3k, False: 410k]
  ------------------
 7138|  20.3k|    case AOT_SBR:
  ------------------
  |  Branch (7138:5): [True: 0, False: 430k]
  ------------------
 7139|  20.3k|    case AOT_PS:
  ------------------
  |  Branch (7139:5): [True: 0, False: 430k]
  ------------------
 7140|  20.3k|      FDK_ASSERT(epConfig == -1);
  ------------------
  |  |  221|  20.3k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (7140:7): [True: 20.3k, False: 0]
  ------------------
 7141|  20.3k|      if (elFlags & AC_EL_GA_CCE) {
  ------------------
  |  |  292|  20.3k|#define AC_EL_GA_CCE 0x00000001 /*!< GA AAC coupling channel element (CCE) */
  ------------------
  |  Branch (7141:11): [True: 973, False: 19.3k]
  ------------------
 7142|    973|        return &node_aac_cce;
 7143|  19.3k|      } else {
 7144|  19.3k|        if (nChannels == 1) {
  ------------------
  |  Branch (7144:13): [True: 15.5k, False: 3.76k]
  ------------------
 7145|  15.5k|          return &node_aac_sce;
 7146|  15.5k|        } else {
 7147|  3.76k|          return &node_aac_cpe;
 7148|  3.76k|        }
 7149|  19.3k|      }
 7150|    739|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (7150:5): [True: 739, False: 429k]
  ------------------
 7151|  1.83k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (7151:5): [True: 1.09k, False: 429k]
  ------------------
 7152|  1.83k|      if (nChannels == 1) {
  ------------------
  |  Branch (7152:11): [True: 860, False: 976]
  ------------------
 7153|    860|        if (epConfig == 0) {
  ------------------
  |  Branch (7153:13): [True: 681, False: 179]
  ------------------
 7154|    681|          return &node_aac_sce_epc0;
 7155|    681|        } else {
 7156|    179|          return &node_aac_sce_epc1;
 7157|    179|        }
 7158|    976|      } else {
 7159|    976|        if (epConfig == 0)
  ------------------
  |  Branch (7159:13): [True: 817, False: 159]
  ------------------
 7160|    817|          return &node_aac_cpe_epc0;
 7161|    159|        else
 7162|    159|          return &node_aac_cpe_epc1;
 7163|    976|      }
 7164|   220k|    case AOT_USAC:
  ------------------
  |  Branch (7164:5): [True: 220k, False: 210k]
  ------------------
 7165|   220k|      if (elFlags & AC_EL_USAC_LFE) {
  ------------------
  |  |  349|   220k|#define AC_EL_USAC_LFE 0x000020    /*!< USAC element is LFE */
  ------------------
  |  Branch (7165:11): [True: 0, False: 220k]
  ------------------
 7166|      0|        FDK_ASSERT(nChannels == 1);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (7166:9): [True: 0, False: 0]
  ------------------
 7167|      0|        return &node_usac_lfe_epc0;
 7168|      0|      }
 7169|   220k|      if (nChannels == 1) {
  ------------------
  |  Branch (7169:11): [True: 151k, False: 69.0k]
  ------------------
 7170|   151k|        return &node_usac_sce_epc0;
 7171|   151k|      } else {
 7172|  69.0k|        return &node_usac_cpe_epc0;
 7173|  69.0k|      }
 7174|  34.8k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (7174:5): [True: 34.8k, False: 395k]
  ------------------
 7175|  34.8k|      if (nChannels == 1) {
  ------------------
  |  Branch (7175:11): [True: 4.78k, False: 30.0k]
  ------------------
 7176|  4.78k|        if (epConfig <= 0)
  ------------------
  |  Branch (7176:13): [True: 4.69k, False: 88]
  ------------------
 7177|  4.69k|          return &node_scal_sce_epc0;
 7178|     88|        else
 7179|     88|          return &node_scal_sce_epc1;
 7180|  30.0k|      } else {
 7181|  30.0k|        if (epConfig <= 0)
  ------------------
  |  Branch (7181:13): [True: 27.9k, False: 2.11k]
  ------------------
 7182|  27.9k|          return &node_scal_cpe_epc0;
 7183|  2.11k|        else
 7184|  2.11k|          return &node_scal_cpe_epc1;
 7185|  30.0k|      }
 7186|   153k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (7186:5): [True: 153k, False: 277k]
  ------------------
 7187|   153k|      if (nChannels == 1) {
  ------------------
  |  Branch (7187:11): [True: 83.4k, False: 69.8k]
  ------------------
 7188|  83.4k|        if (epConfig <= 0)
  ------------------
  |  Branch (7188:13): [True: 63.4k, False: 19.9k]
  ------------------
 7189|  63.4k|          return &node_eld_sce_epc0;
 7190|  19.9k|        else
 7191|  19.9k|          return &node_eld_sce_epc1;
  ------------------
  |  | 6863|  19.9k|#define node_eld_sce_epc1 node_eld_sce_epc0
  ------------------
 7192|  83.4k|      } else {
 7193|  69.8k|        if (epConfig <= 0)
  ------------------
  |  Branch (7193:13): [True: 42.0k, False: 27.8k]
  ------------------
 7194|  42.0k|          return &node_eld_cpe_epc0;
 7195|  27.8k|        else
 7196|  27.8k|          return &node_eld_cpe_epc1;
 7197|  69.8k|      }
 7198|      0|    case AOT_DRM_AAC:
  ------------------
  |  Branch (7198:5): [True: 0, False: 430k]
  ------------------
 7199|      0|    case AOT_DRM_SBR:
  ------------------
  |  Branch (7199:5): [True: 0, False: 430k]
  ------------------
 7200|      0|    case AOT_DRM_MPEG_PS:
  ------------------
  |  Branch (7200:5): [True: 0, False: 430k]
  ------------------
 7201|      0|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (7201:5): [True: 0, False: 430k]
  ------------------
 7202|      0|      FDK_ASSERT(epConfig == 1);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (7202:7): [True: 0, False: 0]
  ------------------
 7203|      0|      if (nChannels == 1) {
  ------------------
  |  Branch (7203:11): [True: 0, False: 0]
  ------------------
 7204|      0|        return &node_drm_sce;
 7205|      0|      } else {
 7206|      0|        return &node_drm_cpe;
 7207|      0|      }
 7208|      0|    default:
  ------------------
  |  Branch (7208:5): [True: 0, False: 430k]
  ------------------
 7209|      0|      break;
 7210|   430k|  }
 7211|      0|  return NULL;
 7212|   430k|}

_Z8fixp_cosii:
  299|  3.88M|FIXP_DBL fixp_cos(FIXP_DBL x, int scale) {
  300|  3.88M|  FIXP_DBL residual, error, sine, cosine;
  301|       |
  302|  3.88M|  residual = fixp_sin_cos_residual_inline(x, scale, &sine, &cosine);
  303|  3.88M|  error = fMult(sine, residual);
  304|       |
  305|  3.88M|#ifdef SINETABLE_16BIT
  306|  3.88M|  return cosine - error;
  307|       |#else
  308|       |  /* Undo downscaling by 1 which was done at fixp_sin_cos_residual_inline */
  309|       |  return SATURATE_LEFT_SHIFT(cosine - error, 1, DFRACT_BITS);
  310|       |#endif
  311|  3.88M|}

_Z16autoCorr2nd_realP11ACORR_COEFSPKii:
  115|   695k|) {
  116|   695k|  int j, autoCorrScaling, mScale;
  117|       |
  118|   695k|  FIXP_DBL accu1, accu2, accu3, accu4, accu5;
  119|       |
  120|   695k|  const FIXP_DBL *pReBuf;
  121|       |
  122|   695k|  const FIXP_DBL *realBuf = reBuffer;
  123|       |
  124|   695k|  const int len_scale = fMax(DFRACT_BITS - fNormz((FIXP_DBL)(len / 2)), 1);
  ------------------
  |  |  113|   695k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  125|       |  /*
  126|       |    r11r,r22r
  127|       |    r01r,r12r
  128|       |    r02r
  129|       |  */
  130|   695k|  pReBuf = realBuf - 2;
  131|   695k|  accu5 =
  132|   695k|      ((fMultDiv2(pReBuf[0], pReBuf[2]) + fMultDiv2(pReBuf[1], pReBuf[3])) >>
  133|   695k|       len_scale);
  134|   695k|  pReBuf++;
  135|       |
  136|       |  /* len must be even */
  137|   695k|  accu1 = fPow2Div2(pReBuf[0]) >> len_scale;
  138|   695k|  accu3 = fMultDiv2(pReBuf[0], pReBuf[1]) >> len_scale;
  139|   695k|  pReBuf++;
  140|       |
  141|  10.7M|  for (j = (len - 2) >> 1; j != 0; j--, pReBuf += 2) {
  ------------------
  |  Branch (141:28): [True: 10.0M, False: 695k]
  ------------------
  142|  10.0M|    accu1 += ((fPow2Div2(pReBuf[0]) + fPow2Div2(pReBuf[1])) >> len_scale);
  143|       |
  144|  10.0M|    accu3 +=
  145|  10.0M|        ((fMultDiv2(pReBuf[0], pReBuf[1]) + fMultDiv2(pReBuf[1], pReBuf[2])) >>
  146|  10.0M|         len_scale);
  147|       |
  148|  10.0M|    accu5 +=
  149|  10.0M|        ((fMultDiv2(pReBuf[0], pReBuf[2]) + fMultDiv2(pReBuf[1], pReBuf[3])) >>
  150|  10.0M|         len_scale);
  151|  10.0M|  }
  152|       |
  153|   695k|  accu2 = (fPow2Div2(realBuf[-2]) >> len_scale);
  154|   695k|  accu2 += accu1;
  155|       |
  156|   695k|  accu1 += (fPow2Div2(realBuf[len - 2]) >> len_scale);
  157|       |
  158|   695k|  accu4 = (fMultDiv2(realBuf[-1], realBuf[-2]) >> len_scale);
  159|   695k|  accu4 += accu3;
  160|       |
  161|   695k|  accu3 += (fMultDiv2(realBuf[len - 1], realBuf[len - 2]) >> len_scale);
  162|       |
  163|   695k|  mScale = CntLeadingZeros(
  ------------------
  |  |  308|   695k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  164|   695k|               (accu1 | accu2 | fAbs(accu3) | fAbs(accu4) | fAbs(accu5))) -
  165|   695k|           1;
  166|   695k|  autoCorrScaling = mScale - 1 - len_scale; /* -1 because of fMultDiv2*/
  167|       |
  168|       |  /* Scale to common scale factor */
  169|   695k|  ac->r11r = accu1 << mScale;
  170|   695k|  ac->r22r = accu2 << mScale;
  171|   695k|  ac->r01r = accu3 << mScale;
  172|   695k|  ac->r12r = accu4 << mScale;
  173|   695k|  ac->r02r = accu5 << mScale;
  174|       |
  175|   695k|  ac->det = (fMultDiv2(ac->r11r, ac->r22r) - fMultDiv2(ac->r12r, ac->r12r));
  176|   695k|  mScale = CountLeadingBits(fAbs(ac->det));
  ------------------
  |  |  309|   695k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  177|       |
  178|   695k|  ac->det <<= mScale;
  179|   695k|  ac->det_scale = mScale - 1;
  180|       |
  181|   695k|  return autoCorrScaling;
  182|   695k|}
_Z16autoCorr2nd_cplxP11ACORR_COEFSPKiS2_i:
  191|  3.67M|) {
  192|  3.67M|  int j, autoCorrScaling, mScale;
  193|       |
  194|  3.67M|  FIXP_DBL accu0, accu1, accu2, accu3, accu4, accu5, accu6, accu7, accu8;
  195|       |
  196|  3.67M|  const FIXP_DBL *pReBuf, *pImBuf;
  197|       |
  198|  3.67M|  const FIXP_DBL *realBuf = reBuffer;
  199|  3.67M|  const FIXP_DBL *imagBuf = imBuffer;
  200|       |
  201|  3.67M|  const int len_scale = fMax(DFRACT_BITS - fNormz((FIXP_DBL)len), 1);
  ------------------
  |  |  113|  3.67M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  202|       |  /*
  203|       |    r00r,
  204|       |    r11r,r22r
  205|       |    r01r,r12r
  206|       |    r01i,r12i
  207|       |    r02r,r02i
  208|       |  */
  209|  3.67M|  accu1 = accu3 = accu5 = accu7 = accu8 = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  3.67M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.67M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.67M, Folded]
  |  |  ------------------
  |  |  194|  3.67M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.67M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.67M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.67M]
  |  |  ------------------
  |  |  195|  3.67M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.67M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.67M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.67M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.67M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.67M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.67M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|       |
  211|  3.67M|  pReBuf = realBuf - 2, pImBuf = imagBuf - 2;
  212|  3.67M|  accu7 +=
  213|  3.67M|      ((fMultDiv2(pReBuf[2], pReBuf[0]) + fMultDiv2(pImBuf[2], pImBuf[0])) >>
  214|  3.67M|       len_scale);
  215|  3.67M|  accu8 +=
  216|  3.67M|      ((fMultDiv2(pImBuf[2], pReBuf[0]) - fMultDiv2(pReBuf[2], pImBuf[0])) >>
  217|  3.67M|       len_scale);
  218|       |
  219|  3.67M|  pReBuf = realBuf - 1, pImBuf = imagBuf - 1;
  220|   159M|  for (j = (len - 1); j != 0; j--, pReBuf++, pImBuf++) {
  ------------------
  |  Branch (220:23): [True: 156M, False: 3.67M]
  ------------------
  221|   156M|    accu1 += ((fPow2Div2(pReBuf[0]) + fPow2Div2(pImBuf[0])) >> len_scale);
  222|   156M|    accu3 +=
  223|   156M|        ((fMultDiv2(pReBuf[0], pReBuf[1]) + fMultDiv2(pImBuf[0], pImBuf[1])) >>
  224|   156M|         len_scale);
  225|   156M|    accu5 +=
  226|   156M|        ((fMultDiv2(pImBuf[1], pReBuf[0]) - fMultDiv2(pReBuf[1], pImBuf[0])) >>
  227|   156M|         len_scale);
  228|   156M|    accu7 +=
  229|   156M|        ((fMultDiv2(pReBuf[2], pReBuf[0]) + fMultDiv2(pImBuf[2], pImBuf[0])) >>
  230|   156M|         len_scale);
  231|   156M|    accu8 +=
  232|   156M|        ((fMultDiv2(pImBuf[2], pReBuf[0]) - fMultDiv2(pReBuf[2], pImBuf[0])) >>
  233|   156M|         len_scale);
  234|   156M|  }
  235|       |
  236|  3.67M|  accu2 = ((fPow2Div2(realBuf[-2]) + fPow2Div2(imagBuf[-2])) >> len_scale);
  237|  3.67M|  accu2 += accu1;
  238|       |
  239|  3.67M|  accu1 += ((fPow2Div2(realBuf[len - 2]) + fPow2Div2(imagBuf[len - 2])) >>
  240|  3.67M|            len_scale);
  241|  3.67M|  accu0 = ((fPow2Div2(realBuf[len - 1]) + fPow2Div2(imagBuf[len - 1])) >>
  242|  3.67M|           len_scale) -
  243|  3.67M|          ((fPow2Div2(realBuf[-1]) + fPow2Div2(imagBuf[-1])) >> len_scale);
  244|  3.67M|  accu0 += accu1;
  245|       |
  246|  3.67M|  accu4 = ((fMultDiv2(realBuf[-1], realBuf[-2]) +
  247|  3.67M|            fMultDiv2(imagBuf[-1], imagBuf[-2])) >>
  248|  3.67M|           len_scale);
  249|  3.67M|  accu4 += accu3;
  250|       |
  251|  3.67M|  accu3 += ((fMultDiv2(realBuf[len - 1], realBuf[len - 2]) +
  252|  3.67M|             fMultDiv2(imagBuf[len - 1], imagBuf[len - 2])) >>
  253|  3.67M|            len_scale);
  254|       |
  255|  3.67M|  accu6 = ((fMultDiv2(imagBuf[-1], realBuf[-2]) -
  256|  3.67M|            fMultDiv2(realBuf[-1], imagBuf[-2])) >>
  257|  3.67M|           len_scale);
  258|  3.67M|  accu6 += accu5;
  259|       |
  260|  3.67M|  accu5 += ((fMultDiv2(imagBuf[len - 1], realBuf[len - 2]) -
  261|  3.67M|             fMultDiv2(realBuf[len - 1], imagBuf[len - 2])) >>
  262|  3.67M|            len_scale);
  263|       |
  264|  3.67M|  mScale =
  265|  3.67M|      CntLeadingZeros((accu0 | accu1 | accu2 | fAbs(accu3) | fAbs(accu4) |
  ------------------
  |  |  308|  3.67M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  266|  3.67M|                       fAbs(accu5) | fAbs(accu6) | fAbs(accu7) | fAbs(accu8))) -
  267|  3.67M|      1;
  268|  3.67M|  autoCorrScaling = mScale - 1 - len_scale; /* -1 because of fMultDiv2*/
  269|       |
  270|       |  /* Scale to common scale factor */
  271|  3.67M|  ac->r00r = (FIXP_DBL)accu0 << mScale;
  272|  3.67M|  ac->r11r = (FIXP_DBL)accu1 << mScale;
  273|  3.67M|  ac->r22r = (FIXP_DBL)accu2 << mScale;
  274|  3.67M|  ac->r01r = (FIXP_DBL)accu3 << mScale;
  275|  3.67M|  ac->r12r = (FIXP_DBL)accu4 << mScale;
  276|  3.67M|  ac->r01i = (FIXP_DBL)accu5 << mScale;
  277|  3.67M|  ac->r12i = (FIXP_DBL)accu6 << mScale;
  278|  3.67M|  ac->r02r = (FIXP_DBL)accu7 << mScale;
  279|  3.67M|  ac->r02i = (FIXP_DBL)accu8 << mScale;
  280|       |
  281|  3.67M|  ac->det =
  282|  3.67M|      (fMultDiv2(ac->r11r, ac->r22r) >> 1) -
  283|  3.67M|      ((fMultDiv2(ac->r12r, ac->r12r) + fMultDiv2(ac->r12i, ac->r12i)) >> 1);
  284|  3.67M|  mScale = CntLeadingZeros(fAbs(ac->det)) - 1;
  ------------------
  |  |  308|  3.67M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  285|       |
  286|  3.67M|  ac->det <<= mScale;
  287|  3.67M|  ac->det_scale = mScale - 2;
  288|       |
  289|  3.67M|  return autoCorrScaling;
  290|  3.67M|}

_Z13dct_getTablesPPK8FIXP_SPKS2_Pii:
  128|  65.8M|                   int *sin_step, int length) {
  129|  65.8M|  const FIXP_WTP *twiddle;
  130|  65.8M|  int ld2_length;
  131|       |
  132|       |  /* Get ld2 of length - 2 + 1
  133|       |      -2: because first table entry is window of size 4
  134|       |      +1: because we already include +1 because of ceil(log2(length)) */
  135|  65.8M|  ld2_length = DFRACT_BITS - 1 - fNormz((FIXP_DBL)length) - 1;
  ------------------
  |  |  113|  65.8M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  136|       |
  137|       |  /* Extract sort of "eigenvalue" (the 4 left most bits) of length. */
  138|  65.8M|  switch ((length) >> (ld2_length - 1)) {
  139|  51.4M|    case 0x4: /* radix 2 */
  ------------------
  |  Branch (139:5): [True: 51.4M, False: 14.3M]
  ------------------
  140|  51.4M|      *sin_twiddle = SineTable1024;
  141|  51.4M|      *sin_step = 1 << (10 - ld2_length);
  142|  51.4M|      twiddle = windowSlopes[0][0][ld2_length - 1];
  143|  51.4M|      break;
  144|   393k|    case 0x7: /* 10 ms */
  ------------------
  |  Branch (144:5): [True: 393k, False: 65.4M]
  ------------------
  145|   393k|      *sin_twiddle = SineTable480;
  146|   393k|      *sin_step = 1 << (8 - ld2_length);
  147|   393k|      twiddle = windowSlopes[0][1][ld2_length];
  148|   393k|      break;
  149|  13.6M|    case 0x6: /* 3/4 of radix 2 */
  ------------------
  |  Branch (149:5): [True: 13.6M, False: 52.1M]
  ------------------
  150|  13.6M|      *sin_twiddle = SineTable384;
  151|  13.6M|      *sin_step = 1 << (8 - ld2_length);
  152|  13.6M|      twiddle = windowSlopes[0][2][ld2_length];
  153|  13.6M|      break;
  154|   294k|    case 0x5: /* 5/16 of radix 2*/
  ------------------
  |  Branch (154:5): [True: 294k, False: 65.5M]
  ------------------
  155|   294k|      *sin_twiddle = SineTable80;
  156|   294k|      *sin_step = 1 << (6 - ld2_length);
  157|   294k|      twiddle = windowSlopes[0][3][ld2_length];
  158|   294k|      break;
  159|      0|    default:
  ------------------
  |  Branch (159:5): [True: 0, False: 65.8M]
  ------------------
  160|      0|      *sin_twiddle = NULL;
  161|      0|      *sin_step = 0;
  162|      0|      twiddle = NULL;
  163|      0|      break;
  164|  65.8M|  }
  165|       |
  166|  65.8M|  if (ptwiddle != NULL) {
  ------------------
  |  Branch (166:7): [True: 59.2M, False: 6.62M]
  ------------------
  167|  59.2M|    FDK_ASSERT(twiddle != NULL);
  ------------------
  |  |  221|  59.2M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (167:5): [True: 59.2M, False: 0]
  ------------------
  168|  59.2M|    *ptwiddle = twiddle;
  169|  59.2M|  }
  170|       |
  171|  65.8M|  FDK_ASSERT(*sin_step > 0);
  ------------------
  |  |  221|  65.8M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (171:3): [True: 65.8M, False: 0]
  ------------------
  172|  65.8M|}
_Z7dct_IIIPiS_iS_:
  178|  1.04M|             int *pDat_e) {
  179|  1.04M|  const FIXP_WTP *sin_twiddle;
  180|  1.04M|  int i;
  181|  1.04M|  FIXP_DBL xr, accu1, accu2;
  182|  1.04M|  int inc, index;
  183|  1.04M|  int M = L >> 1;
  184|       |
  185|  1.04M|  FDK_ASSERT(L % 4 == 0);
  ------------------
  |  |  221|  1.04M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (185:3): [True: 1.04M, False: 0]
  ------------------
  186|  1.04M|  dct_getTables(NULL, &sin_twiddle, &inc, L);
  187|  1.04M|  inc >>= 1;
  188|       |
  189|  1.04M|  FIXP_DBL *pTmp_0 = &tmp[2];
  190|  1.04M|  FIXP_DBL *pTmp_1 = &tmp[(M - 1) * 2];
  191|       |
  192|  1.04M|  index = 4 * inc;
  193|       |
  194|       |  /* This loop performs multiplication for index i (i*inc) */
  195|  8.34M|  for (i = 1; i<M>> 1; i++, pTmp_0 += 2, pTmp_1 -= 2) {
  ------------------
  |  Branch (195:15): [True: 7.30M, False: 1.04M]
  ------------------
  196|  7.30M|    FIXP_DBL accu3, accu4, accu5, accu6;
  197|       |
  198|  7.30M|    cplxMultDiv2(&accu2, &accu1, pDat[L - i], pDat[i], sin_twiddle[i * inc]);
  199|  7.30M|    cplxMultDiv2(&accu4, &accu3, pDat[M + i], pDat[M - i],
  200|  7.30M|                 sin_twiddle[(M - i) * inc]);
  201|  7.30M|    accu3 >>= 1;
  202|  7.30M|    accu4 >>= 1;
  203|       |
  204|       |    /* This method is better for ARM926, that uses operand2 shifted right by 1
  205|       |     * always */
  206|  7.30M|    if (2 * i < (M / 2)) {
  ------------------
  |  Branch (206:9): [True: 3.12M, False: 4.17M]
  ------------------
  207|  3.12M|      cplxMultDiv2(&accu6, &accu5, (accu3 - (accu1 >> 1)),
  208|  3.12M|                   ((accu2 >> 1) + accu4), sin_twiddle[index]);
  209|  4.17M|    } else {
  210|  4.17M|      cplxMultDiv2(&accu6, &accu5, ((accu2 >> 1) + accu4),
  211|  4.17M|                   (accu3 - (accu1 >> 1)), sin_twiddle[index]);
  212|  4.17M|      accu6 = -accu6;
  213|  4.17M|    }
  214|  7.30M|    xr = (accu1 >> 1) + accu3;
  215|  7.30M|    pTmp_0[0] = (xr >> 1) - accu5;
  216|  7.30M|    pTmp_1[0] = (xr >> 1) + accu5;
  217|       |
  218|  7.30M|    xr = (accu2 >> 1) - accu4;
  219|  7.30M|    pTmp_0[1] = (xr >> 1) - accu6;
  220|  7.30M|    pTmp_1[1] = -((xr >> 1) + accu6);
  221|       |
  222|       |    /* Create index helper variables for (4*i)*inc indexed equivalent values of
  223|       |     * short tables. */
  224|  7.30M|    if (2 * i < ((M / 2) - 1)) {
  ------------------
  |  Branch (224:9): [True: 3.12M, False: 4.17M]
  ------------------
  225|  3.12M|      index += 4 * inc;
  226|  4.17M|    } else if (2 * i >= ((M / 2))) {
  ------------------
  |  Branch (226:16): [True: 4.17M, False: 0]
  ------------------
  227|  4.17M|      index -= 4 * inc;
  228|  4.17M|    }
  229|  7.30M|  }
  230|       |
  231|  1.04M|  xr = fMultDiv2(pDat[M], sin_twiddle[M * inc].v.re); /* cos((PI/(2*L))*M); */
  232|  1.04M|  tmp[0] = ((pDat[0] >> 1) + xr) >> 1;
  233|  1.04M|  tmp[1] = ((pDat[0] >> 1) - xr) >> 1;
  234|       |
  235|  1.04M|  cplxMultDiv2(&accu2, &accu1, pDat[L - (M / 2)], pDat[M / 2],
  236|  1.04M|               sin_twiddle[M * inc / 2]);
  237|  1.04M|  tmp[M] = accu1 >> 1;
  238|  1.04M|  tmp[M + 1] = accu2 >> 1;
  239|       |
  240|       |  /* dit_fft expects 1 bit scaled input values */
  241|  1.04M|  fft(M, tmp, pDat_e);
  242|       |
  243|       |  /* ARM926: 12 cycles per 2-iteration, no overhead code by compiler */
  244|  1.04M|  pTmp_1 = &tmp[L];
  245|  9.38M|  for (i = M >> 1; i--;) {
  ------------------
  |  Branch (245:20): [True: 8.34M, False: 1.04M]
  ------------------
  246|  8.34M|    FIXP_DBL tmp1, tmp2, tmp3, tmp4;
  247|  8.34M|    tmp1 = *tmp++;
  248|  8.34M|    tmp2 = *tmp++;
  249|  8.34M|    tmp3 = *--pTmp_1;
  250|  8.34M|    tmp4 = *--pTmp_1;
  251|  8.34M|    *pDat++ = tmp1;
  252|  8.34M|    *pDat++ = tmp3;
  253|  8.34M|    *pDat++ = tmp2;
  254|  8.34M|    *pDat++ = tmp4;
  255|  8.34M|  }
  256|       |
  257|  1.04M|  *pDat_e += 2;
  258|  1.04M|}
_Z6dct_IIPiS_iS_:
  293|  5.58M|    int *pDat_e) {
  294|  5.58M|  const FIXP_WTP *sin_twiddle;
  295|  5.58M|  FIXP_DBL accu1, accu2;
  296|  5.58M|  FIXP_DBL *pTmp_0, *pTmp_1;
  297|       |
  298|  5.58M|  int i;
  299|  5.58M|  int inc, index = 0;
  300|  5.58M|  int M = L >> 1;
  301|       |
  302|  5.58M|  FDK_ASSERT(L % 4 == 0);
  ------------------
  |  |  221|  5.58M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (302:3): [True: 5.58M, False: 0]
  ------------------
  303|  5.58M|  dct_getTables(NULL, &sin_twiddle, &inc, L);
  304|  5.58M|  inc >>= 1;
  305|       |
  306|  5.58M|  {
  307|  67.5M|    for (i = 0; i < M; i++) {
  ------------------
  |  Branch (307:17): [True: 61.9M, False: 5.58M]
  ------------------
  308|  61.9M|      tmp[i] = pDat[2 * i] >> 2;
  309|  61.9M|      tmp[L - 1 - i] = pDat[2 * i + 1] >> 2;
  310|  61.9M|    }
  311|  5.58M|  }
  312|       |
  313|  5.58M|  fft(M, tmp, pDat_e);
  314|       |
  315|  5.58M|  pTmp_0 = &tmp[2];
  316|  5.58M|  pTmp_1 = &tmp[(M - 1) * 2];
  317|       |
  318|  5.58M|  index = inc * 4;
  319|       |
  320|  30.9M|  for (i = 1; i<M>> 1; i++, pTmp_0 += 2, pTmp_1 -= 2) {
  ------------------
  |  Branch (320:15): [True: 25.3M, False: 5.58M]
  ------------------
  321|  25.3M|    FIXP_DBL a1, a2;
  322|  25.3M|    FIXP_DBL accu3, accu4;
  323|       |
  324|  25.3M|    a1 = ((pTmp_0[1] >> 1) + (pTmp_1[1] >> 1));
  325|  25.3M|    a2 = ((pTmp_1[0] >> 1) - (pTmp_0[0] >> 1));
  326|       |
  327|  25.3M|    if (2 * i < (M / 2)) {
  ------------------
  |  Branch (327:9): [True: 11.3M, False: 14.0M]
  ------------------
  328|  11.3M|      cplxMultDiv2(&accu1, &accu2, a2, a1, sin_twiddle[index]);
  329|  14.0M|    } else {
  330|  14.0M|      cplxMultDiv2(&accu1, &accu2, a1, a2, sin_twiddle[index]);
  331|  14.0M|      accu1 = -accu1;
  332|  14.0M|    }
  333|  25.3M|    accu1 <<= 1;
  334|  25.3M|    accu2 <<= 1;
  335|       |
  336|  25.3M|    a1 = ((pTmp_0[0] >> 1) + (pTmp_1[0] >> 1));
  337|  25.3M|    a2 = ((pTmp_0[1] >> 1) - (pTmp_1[1] >> 1));
  338|       |
  339|  25.3M|    cplxMult(&accu3, &accu4, (accu1 + a2), (a1 + accu2), sin_twiddle[i * inc]);
  340|  25.3M|    pDat[L - i] = -accu3;
  341|  25.3M|    pDat[i] = accu4;
  342|       |
  343|  25.3M|    cplxMult(&accu3, &accu4, (accu1 - a2), (a1 - accu2),
  344|  25.3M|             sin_twiddle[(M - i) * inc]);
  345|  25.3M|    pDat[M + i] = -accu3;
  346|  25.3M|    pDat[M - i] = accu4;
  347|       |
  348|       |    /* Create index helper variables for (4*i)*inc indexed equivalent values of
  349|       |     * short tables. */
  350|  25.3M|    if (2 * i < ((M / 2) - 1)) {
  ------------------
  |  Branch (350:9): [True: 8.43M, False: 16.9M]
  ------------------
  351|  8.43M|      index += 4 * inc;
  352|  16.9M|    } else if (2 * i >= ((M / 2))) {
  ------------------
  |  Branch (352:16): [True: 14.0M, False: 2.92M]
  ------------------
  353|  14.0M|      index -= 4 * inc;
  354|  14.0M|    }
  355|  25.3M|  }
  356|       |
  357|  5.58M|  cplxMult(&accu1, &accu2, tmp[M], tmp[M + 1], sin_twiddle[(M / 2) * inc]);
  358|  5.58M|  pDat[L - (M / 2)] = accu2;
  359|  5.58M|  pDat[M / 2] = accu1;
  360|       |
  361|  5.58M|  pDat[0] = tmp[0] + tmp[1];
  362|  5.58M|  pDat[M] = fMult(tmp[0] - tmp[1],
  363|  5.58M|                  sin_twiddle[M * inc].v.re); /* cos((PI/(2*L))*M); */
  364|       |
  365|  5.58M|  *pDat_e += 2;
  366|  5.58M|}
_Z6dct_IVPiiS_:
  371|  32.3M|void dct_IV(FIXP_DBL *pDat, int L, int *pDat_e) {
  372|  32.3M|  int sin_step = 0;
  373|  32.3M|  int M = L >> 1;
  374|       |
  375|  32.3M|  const FIXP_WTP *twiddle;
  376|  32.3M|  const FIXP_STP *sin_twiddle;
  377|       |
  378|  32.3M|  FDK_ASSERT(L >= 4);
  ------------------
  |  |  221|  32.3M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (378:3): [True: 32.3M, False: 0]
  ------------------
  379|       |
  380|  32.3M|  FDK_ASSERT(L >= 4);
  ------------------
  |  |  221|  32.3M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (380:3): [True: 32.3M, False: 0]
  ------------------
  381|       |
  382|  32.3M|  dct_getTables(&twiddle, &sin_twiddle, &sin_step, L);
  383|       |
  384|  32.3M|  {
  385|  32.3M|    FIXP_DBL *RESTRICT pDat_0 = &pDat[0];
  386|  32.3M|    FIXP_DBL *RESTRICT pDat_1 = &pDat[L - 2];
  387|  32.3M|    int i;
  388|       |
  389|       |    /* 29 cycles on ARM926 */
  390|   484M|    for (i = 0; i < M - 1; i += 2, pDat_0 += 2, pDat_1 -= 2) {
  ------------------
  |  Branch (390:17): [True: 451M, False: 32.3M]
  ------------------
  391|   451M|      FIXP_DBL accu1, accu2, accu3, accu4;
  392|       |
  393|   451M|      accu1 = pDat_1[1];
  394|   451M|      accu2 = pDat_0[0];
  395|   451M|      accu3 = pDat_0[1];
  396|   451M|      accu4 = pDat_1[0];
  397|       |
  398|   451M|      cplxMultDiv2(&accu1, &accu2, accu1, accu2, twiddle[i]);
  399|   451M|      cplxMultDiv2(&accu3, &accu4, accu4, accu3, twiddle[i + 1]);
  400|       |
  401|   451M|      pDat_0[0] = accu2 >> 1;
  402|   451M|      pDat_0[1] = accu1 >> 1;
  403|   451M|      pDat_1[0] = accu4 >> 1;
  404|   451M|      pDat_1[1] = -(accu3 >> 1);
  405|   451M|    }
  406|  32.3M|    if (M & 1) {
  ------------------
  |  Branch (406:9): [True: 0, False: 32.3M]
  ------------------
  407|      0|      FIXP_DBL accu1, accu2;
  408|       |
  409|      0|      accu1 = pDat_1[1];
  410|      0|      accu2 = pDat_0[0];
  411|       |
  412|      0|      cplxMultDiv2(&accu1, &accu2, accu1, accu2, twiddle[i]);
  413|       |
  414|      0|      pDat_0[0] = accu2 >> 1;
  415|      0|      pDat_0[1] = accu1 >> 1;
  416|      0|    }
  417|  32.3M|  }
  418|       |
  419|  32.3M|  fft(M, pDat, pDat_e);
  420|       |
  421|  32.3M|  {
  422|  32.3M|    FIXP_DBL *RESTRICT pDat_0 = &pDat[0];
  423|  32.3M|    FIXP_DBL *RESTRICT pDat_1 = &pDat[L - 2];
  424|  32.3M|    FIXP_DBL accu1, accu2, accu3, accu4;
  425|  32.3M|    int idx, i;
  426|       |
  427|       |    /* Sin and Cos values are 0.0f and 1.0f */
  428|  32.3M|    accu1 = pDat_1[0];
  429|  32.3M|    accu2 = pDat_1[1];
  430|       |
  431|  32.3M|    pDat_1[1] = -pDat_0[1];
  432|       |
  433|       |    /* 28 cycles for ARM926 */
  434|   451M|    for (idx = sin_step, i = 1; i<(M + 1)>> 1; i++, idx += sin_step) {
  ------------------
  |  Branch (434:33): [True: 419M, False: 32.3M]
  ------------------
  435|   419M|      FIXP_STP twd = sin_twiddle[idx];
  ------------------
  |  |  236|   419M|#define FIXP_STP FIXP_SPK
  ------------------
  436|   419M|      cplxMult(&accu3, &accu4, accu1, accu2, twd);
  437|   419M|      pDat_0[1] = accu3;
  438|   419M|      pDat_1[0] = accu4;
  439|       |
  440|   419M|      pDat_0 += 2;
  441|   419M|      pDat_1 -= 2;
  442|       |
  443|   419M|      cplxMult(&accu3, &accu4, pDat_0[1], pDat_0[0], twd);
  444|       |
  445|   419M|      accu1 = pDat_1[0];
  446|   419M|      accu2 = pDat_1[1];
  447|       |
  448|   419M|      pDat_1[1] = -accu3;
  449|   419M|      pDat_0[0] = accu4;
  450|   419M|    }
  451|       |
  452|  32.3M|    if ((M & 1) == 0) {
  ------------------
  |  Branch (452:9): [True: 32.3M, False: 0]
  ------------------
  453|       |      /* Last Sin and Cos value pair are the same */
  454|  32.3M|      accu1 = fMult(accu1, WTC(0x5a82799a));
  ------------------
  |  |  253|  32.3M|#define WTC(a) FX_DBL2FXCONST_SGL(a)
  |  |  ------------------
  |  |  |  |  161|  32.3M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  32.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  32.3M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 32.3M]
  |  |  |  |  ------------------
  |  |  |  |  162|  32.3M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  32.3M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  32.3M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  32.3M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  32.3M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  32.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  32.3M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  32.3M|                           1))
  |  |  ------------------
  ------------------
  455|  32.3M|      accu2 = fMult(accu2, WTC(0x5a82799a));
  ------------------
  |  |  253|  32.3M|#define WTC(a) FX_DBL2FXCONST_SGL(a)
  |  |  ------------------
  |  |  |  |  161|  32.3M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  32.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  32.3M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 32.3M]
  |  |  |  |  ------------------
  |  |  |  |  162|  32.3M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  32.3M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  32.3M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  32.3M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  32.3M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  32.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  32.3M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  32.3M|                           1))
  |  |  ------------------
  ------------------
  456|       |
  457|  32.3M|      pDat_1[0] = accu1 + accu2;
  458|  32.3M|      pDat_0[1] = accu1 - accu2;
  459|  32.3M|    }
  460|  32.3M|  }
  461|       |
  462|       |  /* Add twiddeling scale. */
  463|  32.3M|  *pDat_e += 2;
  464|  32.3M|}
_Z6dst_IVPiiS_:
  468|  26.8M|void dst_IV(FIXP_DBL *pDat, int L, int *pDat_e) {
  469|  26.8M|  int sin_step = 0;
  470|  26.8M|  int M = L >> 1;
  471|       |
  472|  26.8M|  const FIXP_WTP *twiddle;
  473|  26.8M|  const FIXP_STP *sin_twiddle;
  474|       |
  475|  26.8M|  FDK_ASSERT(L >= 4);
  ------------------
  |  |  221|  26.8M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (475:3): [True: 26.8M, False: 0]
  ------------------
  476|       |
  477|  26.8M|  FDK_ASSERT(L >= 4);
  ------------------
  |  |  221|  26.8M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (477:3): [True: 26.8M, False: 0]
  ------------------
  478|       |
  479|  26.8M|  dct_getTables(&twiddle, &sin_twiddle, &sin_step, L);
  480|       |
  481|  26.8M|  {
  482|  26.8M|    FIXP_DBL *RESTRICT pDat_0 = &pDat[0];
  483|  26.8M|    FIXP_DBL *RESTRICT pDat_1 = &pDat[L - 2];
  484|  26.8M|    int i;
  485|       |
  486|       |    /* 34 cycles on ARM926 */
  487|   327M|    for (i = 0; i < M - 1; i += 2, pDat_0 += 2, pDat_1 -= 2) {
  ------------------
  |  Branch (487:17): [True: 300M, False: 26.8M]
  ------------------
  488|   300M|      FIXP_DBL accu1, accu2, accu3, accu4;
  489|       |
  490|   300M|      accu1 = pDat_1[1] >> 1;
  491|   300M|      accu2 = -(pDat_0[0] >> 1);
  492|   300M|      accu3 = pDat_0[1] >> 1;
  493|   300M|      accu4 = -(pDat_1[0] >> 1);
  494|       |
  495|   300M|      cplxMultDiv2(&accu1, &accu2, accu1, accu2, twiddle[i]);
  496|   300M|      cplxMultDiv2(&accu3, &accu4, accu4, accu3, twiddle[i + 1]);
  497|       |
  498|   300M|      pDat_0[0] = accu2;
  499|   300M|      pDat_0[1] = accu1;
  500|   300M|      pDat_1[0] = accu4;
  501|   300M|      pDat_1[1] = -accu3;
  502|   300M|    }
  503|  26.8M|    if (M & 1) {
  ------------------
  |  Branch (503:9): [True: 0, False: 26.8M]
  ------------------
  504|      0|      FIXP_DBL accu1, accu2;
  505|       |
  506|      0|      accu1 = pDat_1[1];
  507|      0|      accu2 = -pDat_0[0];
  508|       |
  509|      0|      cplxMultDiv2(&accu1, &accu2, accu1, accu2, twiddle[i]);
  510|       |
  511|      0|      pDat_0[0] = accu2 >> 1;
  512|      0|      pDat_0[1] = accu1 >> 1;
  513|      0|    }
  514|  26.8M|  }
  515|       |
  516|  26.8M|  fft(M, pDat, pDat_e);
  517|       |
  518|  26.8M|  {
  519|  26.8M|    FIXP_DBL *RESTRICT pDat_0;
  520|  26.8M|    FIXP_DBL *RESTRICT pDat_1;
  521|  26.8M|    FIXP_DBL accu1, accu2, accu3, accu4;
  522|  26.8M|    int idx, i;
  523|       |
  524|  26.8M|    pDat_0 = &pDat[0];
  525|  26.8M|    pDat_1 = &pDat[L - 2];
  526|       |
  527|       |    /* Sin and Cos values are 0.0f and 1.0f */
  528|  26.8M|    accu1 = pDat_1[0];
  529|  26.8M|    accu2 = pDat_1[1];
  530|       |
  531|  26.8M|    pDat_1[1] = -pDat_0[0];
  532|  26.8M|    pDat_0[0] = pDat_0[1];
  533|       |
  534|   300M|    for (idx = sin_step, i = 1; i<(M + 1)>> 1; i++, idx += sin_step) {
  ------------------
  |  Branch (534:33): [True: 273M, False: 26.8M]
  ------------------
  535|   273M|      FIXP_STP twd = sin_twiddle[idx];
  ------------------
  |  |  236|   273M|#define FIXP_STP FIXP_SPK
  ------------------
  536|       |
  537|   273M|      cplxMult(&accu3, &accu4, accu1, accu2, twd);
  538|   273M|      pDat_1[0] = -accu3;
  539|   273M|      pDat_0[1] = -accu4;
  540|       |
  541|   273M|      pDat_0 += 2;
  542|   273M|      pDat_1 -= 2;
  543|       |
  544|   273M|      cplxMult(&accu3, &accu4, pDat_0[1], pDat_0[0], twd);
  545|       |
  546|   273M|      accu1 = pDat_1[0];
  547|   273M|      accu2 = pDat_1[1];
  548|       |
  549|   273M|      pDat_0[0] = accu3;
  550|   273M|      pDat_1[1] = -accu4;
  551|   273M|    }
  552|       |
  553|  26.8M|    if ((M & 1) == 0) {
  ------------------
  |  Branch (553:9): [True: 26.8M, False: 0]
  ------------------
  554|       |      /* Last Sin and Cos value pair are the same */
  555|  26.8M|      accu1 = fMult(accu1, WTC(0x5a82799a));
  ------------------
  |  |  253|  26.8M|#define WTC(a) FX_DBL2FXCONST_SGL(a)
  |  |  ------------------
  |  |  |  |  161|  26.8M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 26.8M]
  |  |  |  |  ------------------
  |  |  |  |  162|  26.8M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  26.8M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  26.8M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  26.8M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  26.8M|                           1))
  |  |  ------------------
  ------------------
  556|  26.8M|      accu2 = fMult(accu2, WTC(0x5a82799a));
  ------------------
  |  |  253|  26.8M|#define WTC(a) FX_DBL2FXCONST_SGL(a)
  |  |  ------------------
  |  |  |  |  161|  26.8M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 26.8M]
  |  |  |  |  ------------------
  |  |  |  |  162|  26.8M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  26.8M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  26.8M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  26.8M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  26.8M|                           1))
  |  |  ------------------
  ------------------
  557|       |
  558|  26.8M|      pDat_0[1] = -accu1 - accu2;
  559|  26.8M|      pDat_1[0] = accu2 - accu1;
  560|  26.8M|    }
  561|  26.8M|  }
  562|       |
  563|       |  /* Add twiddeling scale. */
  564|  26.8M|  *pDat_e += 2;
  565|  26.8M|}

_Z3fftiPiS_:
 1800|  65.9M|void fft(int length, FIXP_DBL *pInput, INT *pScalefactor) {
 1801|       |  /* Ensure, that the io-ptr is always (at least 8-byte) aligned */
 1802|  65.9M|  C_ALLOC_ALIGNED_CHECK(pInput);
 1803|       |
 1804|  65.9M|  if (length == 32) {
  ------------------
  |  Branch (1804:7): [True: 28.7M, False: 37.2M]
  ------------------
 1805|  28.7M|    fft_32(pInput);
 1806|  28.7M|    *pScalefactor += SCALEFACTOR32;
  ------------------
  |  |  133|  28.7M|#define SCALEFACTOR32 4
  ------------------
 1807|  37.2M|  } else {
 1808|  37.2M|    switch (length) {
 1809|  15.4M|      case 16:
  ------------------
  |  Branch (1809:7): [True: 15.4M, False: 21.7M]
  ------------------
 1810|  15.4M|        fft_16(pInput);
 1811|  15.4M|        *pScalefactor += SCALEFACTOR16;
  ------------------
  |  |  134|  15.4M|#define SCALEFACTOR16 3
  ------------------
 1812|  15.4M|        break;
 1813|  6.08M|      case 8:
  ------------------
  |  Branch (1813:7): [True: 6.08M, False: 31.1M]
  ------------------
 1814|  6.08M|        fft_8(pInput);
 1815|  6.08M|        *pScalefactor += SCALEFACTOR8;
  ------------------
  |  |  135|  6.08M|#define SCALEFACTOR8 2
  ------------------
 1816|  6.08M|        break;
 1817|      0|      case 2:
  ------------------
  |  Branch (1817:7): [True: 0, False: 37.2M]
  ------------------
 1818|      0|        fft2(pInput);
 1819|      0|        *pScalefactor += SCALEFACTOR2;
  ------------------
  |  |  137|      0|#define SCALEFACTOR2 1
  ------------------
 1820|      0|        break;
 1821|      0|      case 3:
  ------------------
  |  Branch (1821:7): [True: 0, False: 37.2M]
  ------------------
 1822|      0|        fft3(pInput);
 1823|      0|        *pScalefactor += SCALEFACTOR3;
  ------------------
  |  |  139|      0|#define SCALEFACTOR3 1
  ------------------
 1824|      0|        break;
 1825|   640k|      case 4:
  ------------------
  |  Branch (1825:7): [True: 640k, False: 36.5M]
  ------------------
 1826|   640k|        fft_4(pInput);
 1827|   640k|        *pScalefactor += SCALEFACTOR4;
  ------------------
  |  |  136|   640k|#define SCALEFACTOR4 1
  ------------------
 1828|   640k|        break;
 1829|      0|      case 5:
  ------------------
  |  Branch (1829:7): [True: 0, False: 37.2M]
  ------------------
 1830|      0|        fft5(pInput);
 1831|      0|        *pScalefactor += SCALEFACTOR5;
  ------------------
  |  |  140|      0|#define SCALEFACTOR5 1
  ------------------
 1832|      0|        break;
 1833|  2.77M|      case 6:
  ------------------
  |  Branch (1833:7): [True: 2.77M, False: 34.4M]
  ------------------
 1834|  2.77M|        fft6(pInput);
 1835|  2.77M|        *pScalefactor += SCALEFACTOR6;
  ------------------
  |  |  141|  2.77M|#define SCALEFACTOR6 (SCALEFACTOR2 + SCALEFACTOR3 + 2)
  |  |  ------------------
  |  |  |  |  137|  2.77M|#define SCALEFACTOR2 1
  |  |  ------------------
  |  |               #define SCALEFACTOR6 (SCALEFACTOR2 + SCALEFACTOR3 + 2)
  |  |  ------------------
  |  |  |  |  139|  2.77M|#define SCALEFACTOR3 1
  |  |  ------------------
  ------------------
 1836|  2.77M|        break;
 1837|   147k|      case 10:
  ------------------
  |  Branch (1837:7): [True: 147k, False: 37.0M]
  ------------------
 1838|   147k|        fft10(pInput);
 1839|   147k|        *pScalefactor += SCALEFACTOR10;
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
 1840|   147k|        break;
 1841|  10.4M|      case 12:
  ------------------
  |  Branch (1841:7): [True: 10.4M, False: 26.7M]
  ------------------
 1842|  10.4M|        fft12(pInput);
 1843|  10.4M|        *pScalefactor += SCALEFACTOR12;
  ------------------
  |  |  145|  10.4M|#define SCALEFACTOR12 3
  ------------------
 1844|  10.4M|        break;
 1845|      0|      case 15:
  ------------------
  |  Branch (1845:7): [True: 0, False: 37.2M]
  ------------------
 1846|      0|        fft15(pInput);
 1847|      0|        *pScalefactor += SCALEFACTOR15;
  ------------------
  |  |  146|      0|#define SCALEFACTOR15 3
  ------------------
 1848|      0|        break;
 1849|   147k|      case 20:
  ------------------
  |  Branch (1849:7): [True: 147k, False: 37.0M]
  ------------------
 1850|   147k|        fft20(pInput);
 1851|   147k|        *pScalefactor += SCALEFACTOR20;
  ------------------
  |  |  148|   147k|#define SCALEFACTOR20 (SCALEFACTOR4 + SCALEFACTOR5 + 2)
  |  |  ------------------
  |  |  |  |  136|   147k|#define SCALEFACTOR4 1
  |  |  ------------------
  |  |               #define SCALEFACTOR20 (SCALEFACTOR4 + SCALEFACTOR5 + 2)
  |  |  ------------------
  |  |  |  |  140|   147k|#define SCALEFACTOR5 1
  |  |  ------------------
  ------------------
 1852|   147k|        break;
 1853|  8.73k|      case 24:
  ------------------
  |  Branch (1853:7): [True: 8.73k, False: 37.2M]
  ------------------
 1854|  8.73k|        fft24(pInput);
 1855|  8.73k|        *pScalefactor += SCALEFACTOR24;
  ------------------
  |  |  150|  8.73k|#define SCALEFACTOR24 (SCALEFACTOR2 + SCALEFACTOR12 + 2)
  |  |  ------------------
  |  |  |  |  137|  8.73k|#define SCALEFACTOR2 1
  |  |  ------------------
  |  |               #define SCALEFACTOR24 (SCALEFACTOR2 + SCALEFACTOR12 + 2)
  |  |  ------------------
  |  |  |  |  145|  8.73k|#define SCALEFACTOR12 3
  |  |  ------------------
  ------------------
 1856|  8.73k|        break;
 1857|   350k|      case 48:
  ------------------
  |  Branch (1857:7): [True: 350k, False: 36.8M]
  ------------------
 1858|   350k|        fft48(pInput);
 1859|   350k|        *pScalefactor += SCALEFACTOR48;
  ------------------
  |  |  153|   350k|#define SCALEFACTOR48 (SCALEFACTOR4 + SCALEFACTOR12 + 2)
  |  |  ------------------
  |  |  |  |  136|   350k|#define SCALEFACTOR4 1
  |  |  ------------------
  |  |               #define SCALEFACTOR48 (SCALEFACTOR4 + SCALEFACTOR12 + 2)
  |  |  ------------------
  |  |  |  |  145|   350k|#define SCALEFACTOR12 3
  |  |  ------------------
  ------------------
 1860|   350k|        break;
 1861|   221k|      case 60:
  ------------------
  |  Branch (1861:7): [True: 221k, False: 37.0M]
  ------------------
 1862|   221k|        fft60(pInput);
 1863|   221k|        *pScalefactor += SCALEFACTOR60;
  ------------------
  |  |  154|   221k|#define SCALEFACTOR60 (SCALEFACTOR4 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  136|   221k|#define SCALEFACTOR4 1
  |  |  ------------------
  |  |               #define SCALEFACTOR60 (SCALEFACTOR4 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  146|   221k|#define SCALEFACTOR15 3
  |  |  ------------------
  ------------------
 1864|   221k|        break;
 1865|   362k|      case 64:
  ------------------
  |  Branch (1865:7): [True: 362k, False: 36.8M]
  ------------------
 1866|   362k|        dit_fft(pInput, 6, SineTable512, 512);
 1867|   362k|        *pScalefactor += SCALEFACTOR64;
  ------------------
  |  |  132|   362k|#define SCALEFACTOR64 5
  ------------------
 1868|   362k|        break;
 1869|    132|      case 80:
  ------------------
  |  Branch (1869:7): [True: 132, False: 37.2M]
  ------------------
 1870|    132|        fft80(pInput);
 1871|    132|        *pScalefactor += SCALEFACTOR80;
  ------------------
  |  |  155|    132|#define SCALEFACTOR80 (SCALEFACTOR5 + SCALEFACTOR16 + 2)
  |  |  ------------------
  |  |  |  |  140|    132|#define SCALEFACTOR5 1
  |  |  ------------------
  |  |               #define SCALEFACTOR80 (SCALEFACTOR5 + SCALEFACTOR16 + 2)
  |  |  ------------------
  |  |  |  |  134|    132|#define SCALEFACTOR16 3
  |  |  ------------------
  ------------------
 1872|    132|        break;
 1873|  70.2k|      case 96:
  ------------------
  |  Branch (1873:7): [True: 70.2k, False: 37.1M]
  ------------------
 1874|  70.2k|        fft96(pInput);
 1875|  70.2k|        *pScalefactor += SCALEFACTOR96;
  ------------------
  |  |  156|  70.2k|#define SCALEFACTOR96 (SCALEFACTOR3 + SCALEFACTOR32 + 2)
  |  |  ------------------
  |  |  |  |  139|  70.2k|#define SCALEFACTOR3 1
  |  |  ------------------
  |  |               #define SCALEFACTOR96 (SCALEFACTOR3 + SCALEFACTOR32 + 2)
  |  |  ------------------
  |  |  |  |  133|  70.2k|#define SCALEFACTOR32 4
  |  |  ------------------
  ------------------
 1876|  70.2k|        break;
 1877|  3.52k|      case 120:
  ------------------
  |  Branch (1877:7): [True: 3.52k, False: 37.2M]
  ------------------
 1878|  3.52k|        fft120(pInput);
 1879|  3.52k|        *pScalefactor += SCALEFACTOR120;
  ------------------
  |  |  157|  3.52k|#define SCALEFACTOR120 (SCALEFACTOR8 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  135|  3.52k|#define SCALEFACTOR8 2
  |  |  ------------------
  |  |               #define SCALEFACTOR120 (SCALEFACTOR8 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  146|  3.52k|#define SCALEFACTOR15 3
  |  |  ------------------
  ------------------
 1880|  3.52k|        break;
 1881|  70.7k|      case 128:
  ------------------
  |  Branch (1881:7): [True: 70.7k, False: 37.1M]
  ------------------
 1882|  70.7k|        dit_fft(pInput, 7, SineTable512, 512);
 1883|  70.7k|        *pScalefactor += SCALEFACTOR128;
  ------------------
  |  |  131|  70.7k|#define SCALEFACTOR128 6
  ------------------
 1884|  70.7k|        break;
 1885|  8.86k|      case 192:
  ------------------
  |  Branch (1885:7): [True: 8.86k, False: 37.2M]
  ------------------
 1886|  8.86k|        fft192(pInput);
 1887|  8.86k|        *pScalefactor += SCALEFACTOR192;
  ------------------
  |  |  160|  8.86k|#define SCALEFACTOR192 (SCALEFACTOR12 + SCALEFACTOR16 + 2)
  |  |  ------------------
  |  |  |  |  145|  8.86k|#define SCALEFACTOR12 3
  |  |  ------------------
  |  |               #define SCALEFACTOR192 (SCALEFACTOR12 + SCALEFACTOR16 + 2)
  |  |  ------------------
  |  |  |  |  134|  8.86k|#define SCALEFACTOR16 3
  |  |  ------------------
  ------------------
 1888|  8.86k|        break;
 1889|   156k|      case 240:
  ------------------
  |  Branch (1889:7): [True: 156k, False: 37.0M]
  ------------------
 1890|   156k|        fft240(pInput);
 1891|   156k|        *pScalefactor += SCALEFACTOR240;
  ------------------
  |  |  161|   156k|#define SCALEFACTOR240 (SCALEFACTOR16 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  134|   156k|#define SCALEFACTOR16 3
  |  |  ------------------
  |  |               #define SCALEFACTOR240 (SCALEFACTOR16 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  146|   156k|#define SCALEFACTOR15 3
  |  |  ------------------
  ------------------
 1892|   156k|        break;
 1893|  67.0k|      case 256:
  ------------------
  |  Branch (1893:7): [True: 67.0k, False: 37.1M]
  ------------------
 1894|  67.0k|        dit_fft(pInput, 8, SineTable512, 512);
 1895|  67.0k|        *pScalefactor += SCALEFACTOR256;
  ------------------
  |  |  130|  67.0k|#define SCALEFACTOR256 7
  ------------------
 1896|  67.0k|        break;
 1897|  82.4k|      case 384:
  ------------------
  |  Branch (1897:7): [True: 82.4k, False: 37.1M]
  ------------------
 1898|  82.4k|        fft384(pInput);
 1899|  82.4k|        *pScalefactor += SCALEFACTOR384;
  ------------------
  |  |  164|  82.4k|#define SCALEFACTOR384 (SCALEFACTOR12 + SCALEFACTOR32 + 2)
  |  |  ------------------
  |  |  |  |  145|  82.4k|#define SCALEFACTOR12 3
  |  |  ------------------
  |  |               #define SCALEFACTOR384 (SCALEFACTOR12 + SCALEFACTOR32 + 2)
  |  |  ------------------
  |  |  |  |  133|  82.4k|#define SCALEFACTOR32 4
  |  |  ------------------
  ------------------
 1900|  82.4k|        break;
 1901|  13.0k|      case 480:
  ------------------
  |  Branch (1901:7): [True: 13.0k, False: 37.2M]
  ------------------
 1902|  13.0k|        fft480(pInput);
 1903|  13.0k|        *pScalefactor += SCALEFACTOR480;
  ------------------
  |  |  165|  13.0k|#define SCALEFACTOR480 (SCALEFACTOR32 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  133|  13.0k|#define SCALEFACTOR32 4
  |  |  ------------------
  |  |               #define SCALEFACTOR480 (SCALEFACTOR32 + SCALEFACTOR15 + 2)
  |  |  ------------------
  |  |  |  |  146|  13.0k|#define SCALEFACTOR15 3
  |  |  ------------------
  ------------------
 1904|  13.0k|        break;
 1905|   130k|      case 512:
  ------------------
  |  Branch (1905:7): [True: 130k, False: 37.1M]
  ------------------
 1906|   130k|        dit_fft(pInput, 9, SineTable512, 512);
 1907|   130k|        *pScalefactor += SCALEFACTOR512;
  ------------------
  |  |  129|   130k|#define SCALEFACTOR512 8
  ------------------
 1908|   130k|        break;
 1909|      0|      default:
  ------------------
  |  Branch (1909:7): [True: 0, False: 37.2M]
  ------------------
 1910|      0|        FDK_ASSERT(0); /* FFT length not supported! */
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1910:9): [Folded, False: 0]
  ------------------
 1911|      0|        break;
 1912|  37.2M|    }
 1913|  37.2M|  }
 1914|  65.9M|}
_Z6fft_32Pi:
 1004|  30.1M|inline void fft_32(FIXP_DBL *const _x) {
 1005|       |  /*
 1006|       |   * 1+2 stage radix 4
 1007|       |   */
 1008|       |
 1009|       |  /////////////////////////////////////////////////////////////////////////////////////////
 1010|  30.1M|  {
 1011|  30.1M|    FIXP_DBL *const x = _x;
 1012|  30.1M|    FIXP_DBL vi, ui;
 1013|  30.1M|    FIXP_DBL vi2, ui2;
 1014|  30.1M|    FIXP_DBL vi3, ui3;
 1015|  30.1M|    FIXP_DBL vr, ur;
 1016|  30.1M|    FIXP_DBL vr2, ur2;
 1017|  30.1M|    FIXP_DBL vr3, ur3;
 1018|  30.1M|    FIXP_DBL vr4, ur4;
 1019|       |
 1020|       |    // i = 0
 1021|  30.1M|    vr = (x[0] + x[32]) >> 1;     /* Re A + Re B */
 1022|  30.1M|    ur = (x[1] + x[33]) >> 1;     /* Im A + Im B */
 1023|  30.1M|    vi = (x[16] + x[48]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1024|  30.1M|    ui = (x[17] + x[49]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1025|       |
 1026|  30.1M|    x[0] = vr + (vi SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1027|  30.1M|    x[1] = ur + (ui SHIFT_B); /* Im A' = sum of imag values */
 1028|       |
 1029|  30.1M|    vr2 = (x[4] + x[36]) >> 1; /* Re A + Re B */
 1030|  30.1M|    ur2 = (x[5] + x[37]) >> 1; /* Im A + Im B */
 1031|       |
 1032|  30.1M|    x[4] = vr - (vi SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1033|  30.1M|    x[5] = ur - (ui SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1034|       |
 1035|  30.1M|    vr -= x[32];             /* Re A - Re B */
 1036|  30.1M|    ur -= x[33];             /* Im A - Im B */
 1037|  30.1M|    vi = (vi SHIFT_B)-x[48]; /* Re C - Re D */
 1038|  30.1M|    ui = (ui SHIFT_B)-x[49]; /* Im C - Im D */
 1039|       |
 1040|  30.1M|    vr3 = (x[2] + x[34]) >> 1; /* Re A + Re B */
 1041|  30.1M|    ur3 = (x[3] + x[35]) >> 1; /* Im A + Im B */
 1042|       |
 1043|  30.1M|    x[2] = ui + vr; /* Re B' = Im C - Im D  + Re A - Re B */
 1044|  30.1M|    x[3] = ur - vi; /* Im B'= -Re C + Re D + Im A - Im B */
 1045|       |
 1046|  30.1M|    vr4 = (x[6] + x[38]) >> 1; /* Re A + Re B */
 1047|  30.1M|    ur4 = (x[7] + x[39]) >> 1; /* Im A + Im B */
 1048|       |
 1049|  30.1M|    x[6] = vr - ui; /* Re D' = -Im C + Im D + Re A - Re B */
 1050|  30.1M|    x[7] = vi + ur; /* Im D'= Re C - Re D + Im A - Im B */
 1051|       |
 1052|       |    // i=16
 1053|  30.1M|    vi = (x[20] + x[52]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1054|  30.1M|    ui = (x[21] + x[53]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1055|       |
 1056|  30.1M|    x[16] = vr2 + (vi SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1057|  30.1M|    x[17] = ur2 + (ui SHIFT_B); /* Im A' = sum of imag values */
 1058|  30.1M|    x[20] = vr2 - (vi SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1059|  30.1M|    x[21] = ur2 - (ui SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1060|       |
 1061|  30.1M|    vr2 -= x[36];            /* Re A - Re B */
 1062|  30.1M|    ur2 -= x[37];            /* Im A - Im B */
 1063|  30.1M|    vi = (vi SHIFT_B)-x[52]; /* Re C - Re D */
 1064|  30.1M|    ui = (ui SHIFT_B)-x[53]; /* Im C - Im D */
 1065|       |
 1066|  30.1M|    vi2 = (x[18] + x[50]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1067|  30.1M|    ui2 = (x[19] + x[51]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1068|       |
 1069|  30.1M|    x[18] = ui + vr2; /* Re B' = Im C - Im D  + Re A - Re B */
 1070|  30.1M|    x[19] = ur2 - vi; /* Im B'= -Re C + Re D + Im A - Im B */
 1071|       |
 1072|  30.1M|    vi3 = (x[22] + x[54]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1073|  30.1M|    ui3 = (x[23] + x[55]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1074|       |
 1075|  30.1M|    x[22] = vr2 - ui; /* Re D' = -Im C + Im D + Re A - Re B */
 1076|  30.1M|    x[23] = vi + ur2; /* Im D'= Re C - Re D + Im A - Im B */
 1077|       |
 1078|       |    // i = 32
 1079|       |
 1080|  30.1M|    x[32] = vr3 + (vi2 SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1081|  30.1M|    x[33] = ur3 + (ui2 SHIFT_B); /* Im A' = sum of imag values */
 1082|  30.1M|    x[36] = vr3 - (vi2 SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1083|  30.1M|    x[37] = ur3 - (ui2 SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1084|       |
 1085|  30.1M|    vr3 -= x[34];              /* Re A - Re B */
 1086|  30.1M|    ur3 -= x[35];              /* Im A - Im B */
 1087|  30.1M|    vi2 = (vi2 SHIFT_B)-x[50]; /* Re C - Re D */
 1088|  30.1M|    ui2 = (ui2 SHIFT_B)-x[51]; /* Im C - Im D */
 1089|       |
 1090|  30.1M|    x[34] = ui2 + vr3; /* Re B' = Im C - Im D  + Re A - Re B */
 1091|  30.1M|    x[35] = ur3 - vi2; /* Im B'= -Re C + Re D + Im A - Im B */
 1092|       |
 1093|       |    // i=48
 1094|       |
 1095|  30.1M|    x[48] = vr4 + (vi3 SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1096|  30.1M|    x[52] = vr4 - (vi3 SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1097|  30.1M|    x[49] = ur4 + (ui3 SHIFT_B); /* Im A' = sum of imag values */
 1098|  30.1M|    x[53] = ur4 - (ui3 SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1099|       |
 1100|  30.1M|    vr4 -= x[38]; /* Re A - Re B */
 1101|  30.1M|    ur4 -= x[39]; /* Im A - Im B */
 1102|       |
 1103|  30.1M|    x[38] = vr3 - ui2; /* Re D' = -Im C + Im D + Re A - Re B */
 1104|  30.1M|    x[39] = vi2 + ur3; /* Im D'= Re C - Re D + Im A - Im B */
 1105|       |
 1106|  30.1M|    vi3 = (vi3 SHIFT_B)-x[54]; /* Re C - Re D */
 1107|  30.1M|    ui3 = (ui3 SHIFT_B)-x[55]; /* Im C - Im D */
 1108|       |
 1109|  30.1M|    x[50] = ui3 + vr4; /* Re B' = Im C - Im D  + Re A - Re B */
 1110|  30.1M|    x[54] = vr4 - ui3; /* Re D' = -Im C + Im D + Re A - Re B */
 1111|  30.1M|    x[51] = ur4 - vi3; /* Im B'= -Re C + Re D + Im A - Im B */
 1112|  30.1M|    x[55] = vi3 + ur4; /* Im D'= Re C - Re D + Im A - Im B */
 1113|       |
 1114|       |    // i=8
 1115|  30.1M|    vr = (x[8] + x[40]) >> 1;     /* Re A + Re B */
 1116|  30.1M|    ur = (x[9] + x[41]) >> 1;     /* Im A + Im B */
 1117|  30.1M|    vi = (x[24] + x[56]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1118|  30.1M|    ui = (x[25] + x[57]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1119|       |
 1120|  30.1M|    x[8] = vr + (vi SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1121|  30.1M|    x[9] = ur + (ui SHIFT_B); /* Im A' = sum of imag values */
 1122|       |
 1123|  30.1M|    vr2 = (x[12] + x[44]) >> 1; /* Re A + Re B */
 1124|  30.1M|    ur2 = (x[13] + x[45]) >> 1; /* Im A + Im B */
 1125|       |
 1126|  30.1M|    x[12] = vr - (vi SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1127|  30.1M|    x[13] = ur - (ui SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1128|       |
 1129|  30.1M|    vr -= x[40];             /* Re A - Re B */
 1130|  30.1M|    ur -= x[41];             /* Im A - Im B */
 1131|  30.1M|    vi = (vi SHIFT_B)-x[56]; /* Re C - Re D */
 1132|  30.1M|    ui = (ui SHIFT_B)-x[57]; /* Im C - Im D */
 1133|       |
 1134|  30.1M|    vr3 = (x[10] + x[42]) >> 1; /* Re A + Re B */
 1135|  30.1M|    ur3 = (x[11] + x[43]) >> 1; /* Im A + Im B */
 1136|       |
 1137|  30.1M|    x[10] = ui + vr; /* Re B' = Im C - Im D  + Re A - Re B */
 1138|  30.1M|    x[11] = ur - vi; /* Im B'= -Re C + Re D + Im A - Im B */
 1139|       |
 1140|  30.1M|    vr4 = (x[14] + x[46]) >> 1; /* Re A + Re B */
 1141|  30.1M|    ur4 = (x[15] + x[47]) >> 1; /* Im A + Im B */
 1142|       |
 1143|  30.1M|    x[14] = vr - ui; /* Re D' = -Im C + Im D + Re A - Re B */
 1144|  30.1M|    x[15] = vi + ur; /* Im D'= Re C - Re D + Im A - Im B */
 1145|       |
 1146|       |    // i=24
 1147|  30.1M|    vi = (x[28] + x[60]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1148|  30.1M|    ui = (x[29] + x[61]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1149|       |
 1150|  30.1M|    x[24] = vr2 + (vi SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1151|  30.1M|    x[28] = vr2 - (vi SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1152|  30.1M|    x[25] = ur2 + (ui SHIFT_B); /* Im A' = sum of imag values */
 1153|  30.1M|    x[29] = ur2 - (ui SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1154|       |
 1155|  30.1M|    vr2 -= x[44];            /* Re A - Re B */
 1156|  30.1M|    ur2 -= x[45];            /* Im A - Im B */
 1157|  30.1M|    vi = (vi SHIFT_B)-x[60]; /* Re C - Re D */
 1158|  30.1M|    ui = (ui SHIFT_B)-x[61]; /* Im C - Im D */
 1159|       |
 1160|  30.1M|    vi2 = (x[26] + x[58]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1161|  30.1M|    ui2 = (x[27] + x[59]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1162|       |
 1163|  30.1M|    x[26] = ui + vr2; /* Re B' = Im C - Im D  + Re A - Re B */
 1164|  30.1M|    x[27] = ur2 - vi; /* Im B'= -Re C + Re D + Im A - Im B */
 1165|       |
 1166|  30.1M|    vi3 = (x[30] + x[62]) SHIFT_A; /* Re C + Re D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1167|  30.1M|    ui3 = (x[31] + x[63]) SHIFT_A; /* Im C + Im D */
  ------------------
  |  |  720|  30.1M|#define SHIFT_A >> 1
  ------------------
 1168|       |
 1169|  30.1M|    x[30] = vr2 - ui; /* Re D' = -Im C + Im D + Re A - Re B */
 1170|  30.1M|    x[31] = vi + ur2; /* Im D'= Re C - Re D + Im A - Im B */
 1171|       |
 1172|       |    // i=40
 1173|       |
 1174|  30.1M|    x[40] = vr3 + (vi2 SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1175|  30.1M|    x[44] = vr3 - (vi2 SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1176|  30.1M|    x[41] = ur3 + (ui2 SHIFT_B); /* Im A' = sum of imag values */
 1177|  30.1M|    x[45] = ur3 - (ui2 SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1178|       |
 1179|  30.1M|    vr3 -= x[42];              /* Re A - Re B */
 1180|  30.1M|    ur3 -= x[43];              /* Im A - Im B */
 1181|  30.1M|    vi2 = (vi2 SHIFT_B)-x[58]; /* Re C - Re D */
 1182|  30.1M|    ui2 = (ui2 SHIFT_B)-x[59]; /* Im C - Im D */
 1183|       |
 1184|  30.1M|    x[42] = ui2 + vr3; /* Re B' = Im C - Im D  + Re A - Re B */
 1185|  30.1M|    x[43] = ur3 - vi2; /* Im B'= -Re C + Re D + Im A - Im B */
 1186|       |
 1187|       |    // i=56
 1188|       |
 1189|  30.1M|    x[56] = vr4 + (vi3 SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
 1190|  30.1M|    x[60] = vr4 - (vi3 SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
 1191|  30.1M|    x[57] = ur4 + (ui3 SHIFT_B); /* Im A' = sum of imag values */
 1192|  30.1M|    x[61] = ur4 - (ui3 SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
 1193|       |
 1194|  30.1M|    vr4 -= x[46]; /* Re A - Re B */
 1195|  30.1M|    ur4 -= x[47]; /* Im A - Im B */
 1196|       |
 1197|  30.1M|    x[46] = vr3 - ui2; /* Re D' = -Im C + Im D + Re A - Re B */
 1198|  30.1M|    x[47] = vi2 + ur3; /* Im D'= Re C - Re D + Im A - Im B */
 1199|       |
 1200|  30.1M|    vi3 = (vi3 SHIFT_B)-x[62]; /* Re C - Re D */
 1201|  30.1M|    ui3 = (ui3 SHIFT_B)-x[63]; /* Im C - Im D */
 1202|       |
 1203|  30.1M|    x[58] = ui3 + vr4; /* Re B' = Im C - Im D  + Re A - Re B */
 1204|  30.1M|    x[62] = vr4 - ui3; /* Re D' = -Im C + Im D + Re A - Re B */
 1205|  30.1M|    x[59] = ur4 - vi3; /* Im B'= -Re C + Re D + Im A - Im B */
 1206|  30.1M|    x[63] = vi3 + ur4; /* Im D'= Re C - Re D + Im A - Im B */
 1207|  30.1M|  }
 1208|       |
 1209|  30.1M|  {
 1210|  30.1M|    FIXP_DBL *xt = _x;
 1211|       |
 1212|  30.1M|    int j = 4;
 1213|   120M|    do {
 1214|   120M|      FIXP_DBL vi, ui, vr, ur;
 1215|       |
 1216|   120M|      vr = xt[8];
 1217|   120M|      vi = xt[9];
 1218|   120M|      ur = xt[0] >> 1;
 1219|   120M|      ui = xt[1] >> 1;
 1220|   120M|      xt[0] = ur + (vr >> 1);
 1221|   120M|      xt[1] = ui + (vi >> 1);
 1222|   120M|      xt[8] = ur - (vr >> 1);
 1223|   120M|      xt[9] = ui - (vi >> 1);
 1224|       |
 1225|   120M|      vr = xt[13];
 1226|   120M|      vi = xt[12];
 1227|   120M|      ur = xt[4] >> 1;
 1228|   120M|      ui = xt[5] >> 1;
 1229|   120M|      xt[4] = ur + (vr >> 1);
 1230|   120M|      xt[5] = ui - (vi >> 1);
 1231|   120M|      xt[12] = ur - (vr >> 1);
 1232|   120M|      xt[13] = ui + (vi >> 1);
 1233|       |
 1234|   120M|      SUMDIFF_PIFOURTH(vi, vr, xt[10], xt[11])
  ------------------
  |  |  110|   120M|  {                                       \
  |  |  111|   120M|    FIXP_DBL wa, wb;                      \
  |  |  112|   120M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|   120M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   120M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   120M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 120M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   120M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   120M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   120M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   120M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   120M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|   120M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|   120M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   120M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   120M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 120M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   120M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   120M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   120M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   120M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   120M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|   120M|    diff = wb - wa;                       \
  |  |  115|   120M|    sum = wb + wa;                        \
  |  |  116|   120M|  }
  ------------------
 1235|   120M|      ur = xt[2];
 1236|   120M|      ui = xt[3];
 1237|   120M|      xt[2] = (ur >> 1) + vr;
 1238|   120M|      xt[3] = (ui >> 1) + vi;
 1239|   120M|      xt[10] = (ur >> 1) - vr;
 1240|   120M|      xt[11] = (ui >> 1) - vi;
 1241|       |
 1242|   120M|      SUMDIFF_PIFOURTH(vr, vi, xt[14], xt[15])
  ------------------
  |  |  110|   120M|  {                                       \
  |  |  111|   120M|    FIXP_DBL wa, wb;                      \
  |  |  112|   120M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|   120M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   120M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   120M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 120M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   120M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   120M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   120M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   120M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   120M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|   120M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|   120M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   120M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   120M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 120M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   120M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   120M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   120M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   120M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   120M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   120M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   120M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|   120M|    diff = wb - wa;                       \
  |  |  115|   120M|    sum = wb + wa;                        \
  |  |  116|   120M|  }
  ------------------
 1243|   120M|      ur = xt[6];
 1244|   120M|      ui = xt[7];
 1245|       |
 1246|   120M|      xt[6] = (ur >> 1) + vr;
 1247|   120M|      xt[7] = (ui >> 1) - vi;
 1248|   120M|      xt[14] = (ur >> 1) - vr;
 1249|   120M|      xt[15] = (ui >> 1) + vi;
 1250|   120M|      xt += 16;
 1251|   120M|    } while (--j != 0);
  ------------------
  |  Branch (1251:14): [True: 90.3M, False: 30.1M]
  ------------------
 1252|  30.1M|  }
 1253|       |
 1254|  30.1M|  {
 1255|  30.1M|    FIXP_DBL *const x = _x;
 1256|  30.1M|    FIXP_DBL vi, ui, vr, ur;
 1257|       |
 1258|  30.1M|    vr = x[16];
 1259|  30.1M|    vi = x[17];
 1260|  30.1M|    ur = x[0] >> 1;
 1261|  30.1M|    ui = x[1] >> 1;
 1262|  30.1M|    x[0] = ur + (vr >> 1);
 1263|  30.1M|    x[1] = ui + (vi >> 1);
 1264|  30.1M|    x[16] = ur - (vr >> 1);
 1265|  30.1M|    x[17] = ui - (vi >> 1);
 1266|       |
 1267|  30.1M|    vi = x[24];
 1268|  30.1M|    vr = x[25];
 1269|  30.1M|    ur = x[8] >> 1;
 1270|  30.1M|    ui = x[9] >> 1;
 1271|  30.1M|    x[8] = ur + (vr >> 1);
 1272|  30.1M|    x[9] = ui - (vi >> 1);
 1273|  30.1M|    x[24] = ur - (vr >> 1);
 1274|  30.1M|    x[25] = ui + (vi >> 1);
 1275|       |
 1276|  30.1M|    vr = x[48];
 1277|  30.1M|    vi = x[49];
 1278|  30.1M|    ur = x[32] >> 1;
 1279|  30.1M|    ui = x[33] >> 1;
 1280|  30.1M|    x[32] = ur + (vr >> 1);
 1281|  30.1M|    x[33] = ui + (vi >> 1);
 1282|  30.1M|    x[48] = ur - (vr >> 1);
 1283|  30.1M|    x[49] = ui - (vi >> 1);
 1284|       |
 1285|  30.1M|    vi = x[56];
 1286|  30.1M|    vr = x[57];
 1287|  30.1M|    ur = x[40] >> 1;
 1288|  30.1M|    ui = x[41] >> 1;
 1289|  30.1M|    x[40] = ur + (vr >> 1);
 1290|  30.1M|    x[41] = ui - (vi >> 1);
 1291|  30.1M|    x[56] = ur - (vr >> 1);
 1292|  30.1M|    x[57] = ui + (vi >> 1);
 1293|       |
 1294|  30.1M|    cplxMultDiv2(&vi, &vr, x[19], x[18], fft32_w32[0]);
 1295|  30.1M|    ur = x[2];
 1296|  30.1M|    ui = x[3];
 1297|  30.1M|    x[2] = (ur >> 1) + vr;
 1298|  30.1M|    x[3] = (ui >> 1) + vi;
 1299|  30.1M|    x[18] = (ur >> 1) - vr;
 1300|  30.1M|    x[19] = (ui >> 1) - vi;
 1301|       |
 1302|  30.1M|    cplxMultDiv2(&vr, &vi, x[27], x[26], fft32_w32[0]);
 1303|  30.1M|    ur = x[10];
 1304|  30.1M|    ui = x[11];
 1305|  30.1M|    x[10] = (ur >> 1) + vr;
 1306|  30.1M|    x[11] = (ui >> 1) - vi;
 1307|  30.1M|    x[26] = (ur >> 1) - vr;
 1308|  30.1M|    x[27] = (ui >> 1) + vi;
 1309|       |
 1310|  30.1M|    cplxMultDiv2(&vi, &vr, x[51], x[50], fft32_w32[0]);
 1311|  30.1M|    ur = x[34];
 1312|  30.1M|    ui = x[35];
 1313|  30.1M|    x[34] = (ur >> 1) + vr;
 1314|  30.1M|    x[35] = (ui >> 1) + vi;
 1315|  30.1M|    x[50] = (ur >> 1) - vr;
 1316|  30.1M|    x[51] = (ui >> 1) - vi;
 1317|       |
 1318|  30.1M|    cplxMultDiv2(&vr, &vi, x[59], x[58], fft32_w32[0]);
 1319|  30.1M|    ur = x[42];
 1320|  30.1M|    ui = x[43];
 1321|  30.1M|    x[42] = (ur >> 1) + vr;
 1322|  30.1M|    x[43] = (ui >> 1) - vi;
 1323|  30.1M|    x[58] = (ur >> 1) - vr;
 1324|  30.1M|    x[59] = (ui >> 1) + vi;
 1325|       |
 1326|  30.1M|    SUMDIFF_PIFOURTH(vi, vr, x[20], x[21])
  ------------------
  |  |  110|  30.1M|  {                                       \
  |  |  111|  30.1M|    FIXP_DBL wa, wb;                      \
  |  |  112|  30.1M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  30.1M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  30.1M|    diff = wb - wa;                       \
  |  |  115|  30.1M|    sum = wb + wa;                        \
  |  |  116|  30.1M|  }
  ------------------
 1327|  30.1M|    ur = x[4];
 1328|  30.1M|    ui = x[5];
 1329|  30.1M|    x[4] = (ur >> 1) + vr;
 1330|  30.1M|    x[5] = (ui >> 1) + vi;
 1331|  30.1M|    x[20] = (ur >> 1) - vr;
 1332|  30.1M|    x[21] = (ui >> 1) - vi;
 1333|       |
 1334|  30.1M|    SUMDIFF_PIFOURTH(vr, vi, x[28], x[29])
  ------------------
  |  |  110|  30.1M|  {                                       \
  |  |  111|  30.1M|    FIXP_DBL wa, wb;                      \
  |  |  112|  30.1M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  30.1M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  30.1M|    diff = wb - wa;                       \
  |  |  115|  30.1M|    sum = wb + wa;                        \
  |  |  116|  30.1M|  }
  ------------------
 1335|  30.1M|    ur = x[12];
 1336|  30.1M|    ui = x[13];
 1337|  30.1M|    x[12] = (ur >> 1) + vr;
 1338|  30.1M|    x[13] = (ui >> 1) - vi;
 1339|  30.1M|    x[28] = (ur >> 1) - vr;
 1340|  30.1M|    x[29] = (ui >> 1) + vi;
 1341|       |
 1342|  30.1M|    SUMDIFF_PIFOURTH(vi, vr, x[52], x[53])
  ------------------
  |  |  110|  30.1M|  {                                       \
  |  |  111|  30.1M|    FIXP_DBL wa, wb;                      \
  |  |  112|  30.1M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  30.1M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  30.1M|    diff = wb - wa;                       \
  |  |  115|  30.1M|    sum = wb + wa;                        \
  |  |  116|  30.1M|  }
  ------------------
 1343|  30.1M|    ur = x[36];
 1344|  30.1M|    ui = x[37];
 1345|  30.1M|    x[36] = (ur >> 1) + vr;
 1346|  30.1M|    x[37] = (ui >> 1) + vi;
 1347|  30.1M|    x[52] = (ur >> 1) - vr;
 1348|  30.1M|    x[53] = (ui >> 1) - vi;
 1349|       |
 1350|  30.1M|    SUMDIFF_PIFOURTH(vr, vi, x[60], x[61])
  ------------------
  |  |  110|  30.1M|  {                                       \
  |  |  111|  30.1M|    FIXP_DBL wa, wb;                      \
  |  |  112|  30.1M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  30.1M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  30.1M|    diff = wb - wa;                       \
  |  |  115|  30.1M|    sum = wb + wa;                        \
  |  |  116|  30.1M|  }
  ------------------
 1351|  30.1M|    ur = x[44];
 1352|  30.1M|    ui = x[45];
 1353|  30.1M|    x[44] = (ur >> 1) + vr;
 1354|  30.1M|    x[45] = (ui >> 1) - vi;
 1355|  30.1M|    x[60] = (ur >> 1) - vr;
 1356|  30.1M|    x[61] = (ui >> 1) + vi;
 1357|       |
 1358|  30.1M|    cplxMultDiv2(&vi, &vr, x[23], x[22], fft32_w32[1]);
 1359|  30.1M|    ur = x[6];
 1360|  30.1M|    ui = x[7];
 1361|  30.1M|    x[6] = (ur >> 1) + vr;
 1362|  30.1M|    x[7] = (ui >> 1) + vi;
 1363|  30.1M|    x[22] = (ur >> 1) - vr;
 1364|  30.1M|    x[23] = (ui >> 1) - vi;
 1365|       |
 1366|  30.1M|    cplxMultDiv2(&vr, &vi, x[31], x[30], fft32_w32[1]);
 1367|  30.1M|    ur = x[14];
 1368|  30.1M|    ui = x[15];
 1369|  30.1M|    x[14] = (ur >> 1) + vr;
 1370|  30.1M|    x[15] = (ui >> 1) - vi;
 1371|  30.1M|    x[30] = (ur >> 1) - vr;
 1372|  30.1M|    x[31] = (ui >> 1) + vi;
 1373|       |
 1374|  30.1M|    cplxMultDiv2(&vi, &vr, x[55], x[54], fft32_w32[1]);
 1375|  30.1M|    ur = x[38];
 1376|  30.1M|    ui = x[39];
 1377|  30.1M|    x[38] = (ur >> 1) + vr;
 1378|  30.1M|    x[39] = (ui >> 1) + vi;
 1379|  30.1M|    x[54] = (ur >> 1) - vr;
 1380|  30.1M|    x[55] = (ui >> 1) - vi;
 1381|       |
 1382|  30.1M|    cplxMultDiv2(&vr, &vi, x[63], x[62], fft32_w32[1]);
 1383|  30.1M|    ur = x[46];
 1384|  30.1M|    ui = x[47];
 1385|       |
 1386|  30.1M|    x[46] = (ur >> 1) + vr;
 1387|  30.1M|    x[47] = (ui >> 1) - vi;
 1388|  30.1M|    x[62] = (ur >> 1) - vr;
 1389|  30.1M|    x[63] = (ui >> 1) + vi;
 1390|       |
 1391|  30.1M|    vr = x[32];
 1392|  30.1M|    vi = x[33];
 1393|  30.1M|    ur = x[0] >> 1;
 1394|  30.1M|    ui = x[1] >> 1;
 1395|  30.1M|    x[0] = ur + (vr >> 1);
 1396|  30.1M|    x[1] = ui + (vi >> 1);
 1397|  30.1M|    x[32] = ur - (vr >> 1);
 1398|  30.1M|    x[33] = ui - (vi >> 1);
 1399|       |
 1400|  30.1M|    vi = x[48];
 1401|  30.1M|    vr = x[49];
 1402|  30.1M|    ur = x[16] >> 1;
 1403|  30.1M|    ui = x[17] >> 1;
 1404|  30.1M|    x[16] = ur + (vr >> 1);
 1405|  30.1M|    x[17] = ui - (vi >> 1);
 1406|  30.1M|    x[48] = ur - (vr >> 1);
 1407|  30.1M|    x[49] = ui + (vi >> 1);
 1408|       |
 1409|  30.1M|    cplxMultDiv2(&vi, &vr, x[35], x[34], fft32_w32[2]);
 1410|  30.1M|    ur = x[2];
 1411|  30.1M|    ui = x[3];
 1412|  30.1M|    x[2] = (ur >> 1) + vr;
 1413|  30.1M|    x[3] = (ui >> 1) + vi;
 1414|  30.1M|    x[34] = (ur >> 1) - vr;
 1415|  30.1M|    x[35] = (ui >> 1) - vi;
 1416|       |
 1417|  30.1M|    cplxMultDiv2(&vr, &vi, x[51], x[50], fft32_w32[2]);
 1418|  30.1M|    ur = x[18];
 1419|  30.1M|    ui = x[19];
 1420|  30.1M|    x[18] = (ur >> 1) + vr;
 1421|  30.1M|    x[19] = (ui >> 1) - vi;
 1422|  30.1M|    x[50] = (ur >> 1) - vr;
 1423|  30.1M|    x[51] = (ui >> 1) + vi;
 1424|       |
 1425|  30.1M|    cplxMultDiv2(&vi, &vr, x[37], x[36], fft32_w32[0]);
 1426|  30.1M|    ur = x[4];
 1427|  30.1M|    ui = x[5];
 1428|  30.1M|    x[4] = (ur >> 1) + vr;
 1429|  30.1M|    x[5] = (ui >> 1) + vi;
 1430|  30.1M|    x[36] = (ur >> 1) - vr;
 1431|  30.1M|    x[37] = (ui >> 1) - vi;
 1432|       |
 1433|  30.1M|    cplxMultDiv2(&vr, &vi, x[53], x[52], fft32_w32[0]);
 1434|  30.1M|    ur = x[20];
 1435|  30.1M|    ui = x[21];
 1436|  30.1M|    x[20] = (ur >> 1) + vr;
 1437|  30.1M|    x[21] = (ui >> 1) - vi;
 1438|  30.1M|    x[52] = (ur >> 1) - vr;
 1439|  30.1M|    x[53] = (ui >> 1) + vi;
 1440|       |
 1441|  30.1M|    cplxMultDiv2(&vi, &vr, x[39], x[38], fft32_w32[3]);
 1442|  30.1M|    ur = x[6];
 1443|  30.1M|    ui = x[7];
 1444|  30.1M|    x[6] = (ur >> 1) + vr;
 1445|  30.1M|    x[7] = (ui >> 1) + vi;
 1446|  30.1M|    x[38] = (ur >> 1) - vr;
 1447|  30.1M|    x[39] = (ui >> 1) - vi;
 1448|       |
 1449|  30.1M|    cplxMultDiv2(&vr, &vi, x[55], x[54], fft32_w32[3]);
 1450|  30.1M|    ur = x[22];
 1451|  30.1M|    ui = x[23];
 1452|  30.1M|    x[22] = (ur >> 1) + vr;
 1453|  30.1M|    x[23] = (ui >> 1) - vi;
 1454|  30.1M|    x[54] = (ur >> 1) - vr;
 1455|  30.1M|    x[55] = (ui >> 1) + vi;
 1456|       |
 1457|  30.1M|    SUMDIFF_PIFOURTH(vi, vr, x[40], x[41])
  ------------------
  |  |  110|  30.1M|  {                                       \
  |  |  111|  30.1M|    FIXP_DBL wa, wb;                      \
  |  |  112|  30.1M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  30.1M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  30.1M|    diff = wb - wa;                       \
  |  |  115|  30.1M|    sum = wb + wa;                        \
  |  |  116|  30.1M|  }
  ------------------
 1458|  30.1M|    ur = x[8];
 1459|  30.1M|    ui = x[9];
 1460|  30.1M|    x[8] = (ur >> 1) + vr;
 1461|  30.1M|    x[9] = (ui >> 1) + vi;
 1462|  30.1M|    x[40] = (ur >> 1) - vr;
 1463|  30.1M|    x[41] = (ui >> 1) - vi;
 1464|       |
 1465|  30.1M|    SUMDIFF_PIFOURTH(vr, vi, x[56], x[57])
  ------------------
  |  |  110|  30.1M|  {                                       \
  |  |  111|  30.1M|    FIXP_DBL wa, wb;                      \
  |  |  112|  30.1M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  30.1M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  | 1001|  30.1M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  30.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  30.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 30.1M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  30.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  30.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  30.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  30.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  30.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  30.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  30.1M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  30.1M|    diff = wb - wa;                       \
  |  |  115|  30.1M|    sum = wb + wa;                        \
  |  |  116|  30.1M|  }
  ------------------
 1466|  30.1M|    ur = x[24];
 1467|  30.1M|    ui = x[25];
 1468|  30.1M|    x[24] = (ur >> 1) + vr;
 1469|  30.1M|    x[25] = (ui >> 1) - vi;
 1470|  30.1M|    x[56] = (ur >> 1) - vr;
 1471|  30.1M|    x[57] = (ui >> 1) + vi;
 1472|       |
 1473|  30.1M|    cplxMultDiv2(&vi, &vr, x[43], x[42], fft32_w32[4]);
 1474|  30.1M|    ur = x[10];
 1475|  30.1M|    ui = x[11];
 1476|       |
 1477|  30.1M|    x[10] = (ur >> 1) + vr;
 1478|  30.1M|    x[11] = (ui >> 1) + vi;
 1479|  30.1M|    x[42] = (ur >> 1) - vr;
 1480|  30.1M|    x[43] = (ui >> 1) - vi;
 1481|       |
 1482|  30.1M|    cplxMultDiv2(&vr, &vi, x[59], x[58], fft32_w32[4]);
 1483|  30.1M|    ur = x[26];
 1484|  30.1M|    ui = x[27];
 1485|  30.1M|    x[26] = (ur >> 1) + vr;
 1486|  30.1M|    x[27] = (ui >> 1) - vi;
 1487|  30.1M|    x[58] = (ur >> 1) - vr;
 1488|  30.1M|    x[59] = (ui >> 1) + vi;
 1489|       |
 1490|  30.1M|    cplxMultDiv2(&vi, &vr, x[45], x[44], fft32_w32[1]);
 1491|  30.1M|    ur = x[12];
 1492|  30.1M|    ui = x[13];
 1493|  30.1M|    x[12] = (ur >> 1) + vr;
 1494|  30.1M|    x[13] = (ui >> 1) + vi;
 1495|  30.1M|    x[44] = (ur >> 1) - vr;
 1496|  30.1M|    x[45] = (ui >> 1) - vi;
 1497|       |
 1498|  30.1M|    cplxMultDiv2(&vr, &vi, x[61], x[60], fft32_w32[1]);
 1499|  30.1M|    ur = x[28];
 1500|  30.1M|    ui = x[29];
 1501|  30.1M|    x[28] = (ur >> 1) + vr;
 1502|  30.1M|    x[29] = (ui >> 1) - vi;
 1503|  30.1M|    x[60] = (ur >> 1) - vr;
 1504|  30.1M|    x[61] = (ui >> 1) + vi;
 1505|       |
 1506|  30.1M|    cplxMultDiv2(&vi, &vr, x[47], x[46], fft32_w32[5]);
 1507|  30.1M|    ur = x[14];
 1508|  30.1M|    ui = x[15];
 1509|  30.1M|    x[14] = (ur >> 1) + vr;
 1510|  30.1M|    x[15] = (ui >> 1) + vi;
 1511|  30.1M|    x[46] = (ur >> 1) - vr;
 1512|  30.1M|    x[47] = (ui >> 1) - vi;
 1513|       |
 1514|  30.1M|    cplxMultDiv2(&vr, &vi, x[63], x[62], fft32_w32[5]);
 1515|  30.1M|    ur = x[30];
 1516|  30.1M|    ui = x[31];
 1517|  30.1M|    x[30] = (ur >> 1) + vr;
 1518|  30.1M|    x[31] = (ui >> 1) - vi;
 1519|  30.1M|    x[62] = (ur >> 1) - vr;
 1520|  30.1M|    x[63] = (ui >> 1) + vi;
 1521|  30.1M|  }
 1522|  30.1M|}
_Z6fft_16Pi:
  737|  17.9M|inline void fft_16(FIXP_DBL *RESTRICT x) {
  738|  17.9M|  FIXP_DBL vr, ur;
  739|  17.9M|  FIXP_DBL vr2, ur2;
  740|  17.9M|  FIXP_DBL vr3, ur3;
  741|  17.9M|  FIXP_DBL vr4, ur4;
  742|  17.9M|  FIXP_DBL vi, ui;
  743|  17.9M|  FIXP_DBL vi2, ui2;
  744|  17.9M|  FIXP_DBL vi3, ui3;
  745|       |
  746|  17.9M|  vr = (x[0] >> 1) + (x[16] >> 1);       /* Re A + Re B */
  747|  17.9M|  ur = (x[1] >> 1) + (x[17] >> 1);       /* Im A + Im B */
  748|  17.9M|  vi = (x[8] SHIFT_A) + (x[24] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                vi = (x[8] SHIFT_A) + (x[24] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  749|  17.9M|  ui = (x[9] SHIFT_A) + (x[25] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                ui = (x[9] SHIFT_A) + (x[25] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  750|  17.9M|  x[0] = vr + (vi SHIFT_B);              /* Re A' = ReA + ReB +ReC + ReD */
  751|  17.9M|  x[1] = ur + (ui SHIFT_B);              /* Im A' = sum of imag values */
  752|       |
  753|  17.9M|  vr2 = (x[4] >> 1) + (x[20] >> 1); /* Re A + Re B */
  754|  17.9M|  ur2 = (x[5] >> 1) + (x[21] >> 1); /* Im A + Im B */
  755|       |
  756|  17.9M|  x[4] = vr - (vi SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
  757|  17.9M|  x[5] = ur - (ui SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
  758|  17.9M|  vr -= x[16];              /* Re A - Re B */
  759|  17.9M|  vi = (vi SHIFT_B)-x[24];  /* Re C - Re D */
  760|  17.9M|  ur -= x[17];              /* Im A - Im B */
  761|  17.9M|  ui = (ui SHIFT_B)-x[25];  /* Im C - Im D */
  762|       |
  763|  17.9M|  vr3 = (x[2] >> 1) + (x[18] >> 1); /* Re A + Re B */
  764|  17.9M|  ur3 = (x[3] >> 1) + (x[19] >> 1); /* Im A + Im B */
  765|       |
  766|  17.9M|  x[2] = ui + vr; /* Re B' = Im C - Im D  + Re A - Re B */
  767|  17.9M|  x[3] = ur - vi; /* Im B'= -Re C + Re D + Im A - Im B */
  768|       |
  769|  17.9M|  vr4 = (x[6] >> 1) + (x[22] >> 1); /* Re A + Re B */
  770|  17.9M|  ur4 = (x[7] >> 1) + (x[23] >> 1); /* Im A + Im B */
  771|       |
  772|  17.9M|  x[6] = vr - ui; /* Re D' = -Im C + Im D + Re A - Re B */
  773|  17.9M|  x[7] = vi + ur; /* Im D'= Re C - Re D + Im A - Im B */
  774|       |
  775|  17.9M|  vi2 = (x[12] SHIFT_A) + (x[28] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                vi2 = (x[12] SHIFT_A) + (x[28] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  776|  17.9M|  ui2 = (x[13] SHIFT_A) + (x[29] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                ui2 = (x[13] SHIFT_A) + (x[29] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  777|  17.9M|  x[8] = vr2 + (vi2 SHIFT_B);              /* Re A' = ReA + ReB +ReC + ReD */
  778|  17.9M|  x[9] = ur2 + (ui2 SHIFT_B);              /* Im A' = sum of imag values */
  779|  17.9M|  x[12] = vr2 - (vi2 SHIFT_B);             /* Re C' = -(ReC+ReD) + (ReA+ReB) */
  780|  17.9M|  x[13] = ur2 - (ui2 SHIFT_B);             /* Im C' = -Im C -Im D +Im A +Im B */
  781|  17.9M|  vr2 -= x[20];                            /* Re A - Re B */
  782|  17.9M|  ur2 -= x[21];                            /* Im A - Im B */
  783|  17.9M|  vi2 = (vi2 SHIFT_B)-x[28];               /* Re C - Re D */
  784|  17.9M|  ui2 = (ui2 SHIFT_B)-x[29];               /* Im C - Im D */
  785|       |
  786|  17.9M|  vi = (x[10] SHIFT_A) + (x[26] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                vi = (x[10] SHIFT_A) + (x[26] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  787|  17.9M|  ui = (x[11] SHIFT_A) + (x[27] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                ui = (x[11] SHIFT_A) + (x[27] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  788|       |
  789|  17.9M|  x[10] = ui2 + vr2; /* Re B' = Im C - Im D  + Re A - Re B */
  790|  17.9M|  x[11] = ur2 - vi2; /* Im B'= -Re C + Re D + Im A - Im B */
  791|       |
  792|  17.9M|  vi3 = (x[14] SHIFT_A) + (x[30] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                vi3 = (x[14] SHIFT_A) + (x[30] SHIFT_A); /* Re C + Re D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  793|  17.9M|  ui3 = (x[15] SHIFT_A) + (x[31] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
                ui3 = (x[15] SHIFT_A) + (x[31] SHIFT_A); /* Im C + Im D */
  ------------------
  |  |  720|  17.9M|#define SHIFT_A >> 1
  ------------------
  794|       |
  795|  17.9M|  x[14] = vr2 - ui2; /* Re D' = -Im C + Im D + Re A - Re B */
  796|  17.9M|  x[15] = vi2 + ur2; /* Im D'= Re C - Re D + Im A - Im B */
  797|       |
  798|  17.9M|  x[16] = vr3 + (vi SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
  799|  17.9M|  x[17] = ur3 + (ui SHIFT_B); /* Im A' = sum of imag values */
  800|  17.9M|  x[20] = vr3 - (vi SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
  801|  17.9M|  x[21] = ur3 - (ui SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
  802|  17.9M|  vr3 -= x[18];               /* Re A - Re B */
  803|  17.9M|  ur3 -= x[19];               /* Im A - Im B */
  804|  17.9M|  vi = (vi SHIFT_B)-x[26];    /* Re C - Re D */
  805|  17.9M|  ui = (ui SHIFT_B)-x[27];    /* Im C - Im D */
  806|  17.9M|  x[18] = ui + vr3;           /* Re B' = Im C - Im D  + Re A - Re B */
  807|  17.9M|  x[19] = ur3 - vi;           /* Im B'= -Re C + Re D + Im A - Im B */
  808|       |
  809|  17.9M|  x[24] = vr4 + (vi3 SHIFT_B); /* Re A' = ReA + ReB +ReC + ReD */
  810|  17.9M|  x[28] = vr4 - (vi3 SHIFT_B); /* Re C' = -(ReC+ReD) + (ReA+ReB) */
  811|  17.9M|  x[25] = ur4 + (ui3 SHIFT_B); /* Im A' = sum of imag values */
  812|  17.9M|  x[29] = ur4 - (ui3 SHIFT_B); /* Im C' = -Im C -Im D +Im A +Im B */
  813|  17.9M|  vr4 -= x[22];                /* Re A - Re B */
  814|  17.9M|  ur4 -= x[23];                /* Im A - Im B */
  815|       |
  816|  17.9M|  x[22] = vr3 - ui; /* Re D' = -Im C + Im D + Re A - Re B */
  817|  17.9M|  x[23] = vi + ur3; /* Im D'= Re C - Re D + Im A - Im B */
  818|       |
  819|  17.9M|  vi3 = (vi3 SHIFT_B)-x[30]; /* Re C - Re D */
  820|  17.9M|  ui3 = (ui3 SHIFT_B)-x[31]; /* Im C - Im D */
  821|  17.9M|  x[26] = ui3 + vr4;         /* Re B' = Im C - Im D  + Re A - Re B */
  822|  17.9M|  x[30] = vr4 - ui3;         /* Re D' = -Im C + Im D + Re A - Re B */
  823|  17.9M|  x[27] = ur4 - vi3;         /* Im B'= -Re C + Re D + Im A - Im B */
  824|  17.9M|  x[31] = vi3 + ur4;         /* Im D'= Re C - Re D + Im A - Im B */
  825|       |
  826|       |  // xt1 =  0
  827|       |  // xt2 =  8
  828|  17.9M|  vr = x[8];
  829|  17.9M|  vi = x[9];
  830|  17.9M|  ur = x[0] >> 1;
  831|  17.9M|  ui = x[1] >> 1;
  832|  17.9M|  x[0] = ur + (vr >> 1);
  833|  17.9M|  x[1] = ui + (vi >> 1);
  834|  17.9M|  x[8] = ur - (vr >> 1);
  835|  17.9M|  x[9] = ui - (vi >> 1);
  836|       |
  837|       |  // xt1 =  4
  838|       |  // xt2 = 12
  839|  17.9M|  vr = x[13];
  840|  17.9M|  vi = x[12];
  841|  17.9M|  ur = x[4] >> 1;
  842|  17.9M|  ui = x[5] >> 1;
  843|  17.9M|  x[4] = ur + (vr >> 1);
  844|  17.9M|  x[5] = ui - (vi >> 1);
  845|  17.9M|  x[12] = ur - (vr >> 1);
  846|  17.9M|  x[13] = ui + (vi >> 1);
  847|       |
  848|       |  // xt1 = 16
  849|       |  // xt2 = 24
  850|  17.9M|  vr = x[24];
  851|  17.9M|  vi = x[25];
  852|  17.9M|  ur = x[16] >> 1;
  853|  17.9M|  ui = x[17] >> 1;
  854|  17.9M|  x[16] = ur + (vr >> 1);
  855|  17.9M|  x[17] = ui + (vi >> 1);
  856|  17.9M|  x[24] = ur - (vr >> 1);
  857|  17.9M|  x[25] = ui - (vi >> 1);
  858|       |
  859|       |  // xt1 = 20
  860|       |  // xt2 = 28
  861|  17.9M|  vr = x[29];
  862|  17.9M|  vi = x[28];
  863|  17.9M|  ur = x[20] >> 1;
  864|  17.9M|  ui = x[21] >> 1;
  865|  17.9M|  x[20] = ur + (vr >> 1);
  866|  17.9M|  x[21] = ui - (vi >> 1);
  867|  17.9M|  x[28] = ur - (vr >> 1);
  868|  17.9M|  x[29] = ui + (vi >> 1);
  869|       |
  870|       |  // xt1 =  2
  871|       |  // xt2 = 10
  872|  17.9M|  SUMDIFF_PIFOURTH(vi, vr, x[10], x[11])
  ------------------
  |  |  110|  17.9M|  {                                       \
  |  |  111|  17.9M|    FIXP_DBL wa, wb;                      \
  |  |  112|  17.9M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  17.9M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  17.9M|    diff = wb - wa;                       \
  |  |  115|  17.9M|    sum = wb + wa;                        \
  |  |  116|  17.9M|  }
  ------------------
  873|       |  // vr = fMultDiv2((x[11] + x[10]),W_PiFOURTH);
  874|       |  // vi = fMultDiv2((x[11] - x[10]),W_PiFOURTH);
  875|  17.9M|  ur = x[2];
  876|  17.9M|  ui = x[3];
  877|  17.9M|  x[2] = (ur >> 1) + vr;
  878|  17.9M|  x[3] = (ui >> 1) + vi;
  879|  17.9M|  x[10] = (ur >> 1) - vr;
  880|  17.9M|  x[11] = (ui >> 1) - vi;
  881|       |
  882|       |  // xt1 =  6
  883|       |  // xt2 = 14
  884|  17.9M|  SUMDIFF_PIFOURTH(vr, vi, x[14], x[15])
  ------------------
  |  |  110|  17.9M|  {                                       \
  |  |  111|  17.9M|    FIXP_DBL wa, wb;                      \
  |  |  112|  17.9M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  17.9M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  17.9M|    diff = wb - wa;                       \
  |  |  115|  17.9M|    sum = wb + wa;                        \
  |  |  116|  17.9M|  }
  ------------------
  885|  17.9M|  ur = x[6];
  886|  17.9M|  ui = x[7];
  887|  17.9M|  x[6] = (ur >> 1) + vr;
  888|  17.9M|  x[7] = (ui >> 1) - vi;
  889|  17.9M|  x[14] = (ur >> 1) - vr;
  890|  17.9M|  x[15] = (ui >> 1) + vi;
  891|       |
  892|       |  // xt1 = 18
  893|       |  // xt2 = 26
  894|  17.9M|  SUMDIFF_PIFOURTH(vi, vr, x[26], x[27])
  ------------------
  |  |  110|  17.9M|  {                                       \
  |  |  111|  17.9M|    FIXP_DBL wa, wb;                      \
  |  |  112|  17.9M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  17.9M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  17.9M|    diff = wb - wa;                       \
  |  |  115|  17.9M|    sum = wb + wa;                        \
  |  |  116|  17.9M|  }
  ------------------
  895|  17.9M|  ur = x[18];
  896|  17.9M|  ui = x[19];
  897|  17.9M|  x[18] = (ur >> 1) + vr;
  898|  17.9M|  x[19] = (ui >> 1) + vi;
  899|  17.9M|  x[26] = (ur >> 1) - vr;
  900|  17.9M|  x[27] = (ui >> 1) - vi;
  901|       |
  902|       |  // xt1 = 22
  903|       |  // xt2 = 30
  904|  17.9M|  SUMDIFF_PIFOURTH(vr, vi, x[30], x[31])
  ------------------
  |  |  110|  17.9M|  {                                       \
  |  |  111|  17.9M|    FIXP_DBL wa, wb;                      \
  |  |  112|  17.9M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  17.9M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  17.9M|    diff = wb - wa;                       \
  |  |  115|  17.9M|    sum = wb + wa;                        \
  |  |  116|  17.9M|  }
  ------------------
  905|  17.9M|  ur = x[22];
  906|  17.9M|  ui = x[23];
  907|  17.9M|  x[22] = (ur >> 1) + vr;
  908|  17.9M|  x[23] = (ui >> 1) - vi;
  909|  17.9M|  x[30] = (ur >> 1) - vr;
  910|  17.9M|  x[31] = (ui >> 1) + vi;
  911|       |
  912|       |  // xt1 =  0
  913|       |  // xt2 = 16
  914|  17.9M|  vr = x[16];
  915|  17.9M|  vi = x[17];
  916|  17.9M|  ur = x[0] >> 1;
  917|  17.9M|  ui = x[1] >> 1;
  918|  17.9M|  x[0] = ur + (vr >> 1);
  919|  17.9M|  x[1] = ui + (vi >> 1);
  920|  17.9M|  x[16] = ur - (vr >> 1);
  921|  17.9M|  x[17] = ui - (vi >> 1);
  922|       |
  923|       |  // xt1 =  8
  924|       |  // xt2 = 24
  925|  17.9M|  vi = x[24];
  926|  17.9M|  vr = x[25];
  927|  17.9M|  ur = x[8] >> 1;
  928|  17.9M|  ui = x[9] >> 1;
  929|  17.9M|  x[8] = ur + (vr >> 1);
  930|  17.9M|  x[9] = ui - (vi >> 1);
  931|  17.9M|  x[24] = ur - (vr >> 1);
  932|  17.9M|  x[25] = ui + (vi >> 1);
  933|       |
  934|       |  // xt1 =  2
  935|       |  // xt2 = 18
  936|  17.9M|  cplxMultDiv2(&vi, &vr, x[19], x[18], fft16_w16[0]);
  937|  17.9M|  ur = x[2];
  938|  17.9M|  ui = x[3];
  939|  17.9M|  x[2] = (ur >> 1) + vr;
  940|  17.9M|  x[3] = (ui >> 1) + vi;
  941|  17.9M|  x[18] = (ur >> 1) - vr;
  942|  17.9M|  x[19] = (ui >> 1) - vi;
  943|       |
  944|       |  // xt1 = 10
  945|       |  // xt2 = 26
  946|  17.9M|  cplxMultDiv2(&vr, &vi, x[27], x[26], fft16_w16[0]);
  947|  17.9M|  ur = x[10];
  948|  17.9M|  ui = x[11];
  949|  17.9M|  x[10] = (ur >> 1) + vr;
  950|  17.9M|  x[11] = (ui >> 1) - vi;
  951|  17.9M|  x[26] = (ur >> 1) - vr;
  952|  17.9M|  x[27] = (ui >> 1) + vi;
  953|       |
  954|       |  // xt1 =  4
  955|       |  // xt2 = 20
  956|  17.9M|  SUMDIFF_PIFOURTH(vi, vr, x[20], x[21])
  ------------------
  |  |  110|  17.9M|  {                                       \
  |  |  111|  17.9M|    FIXP_DBL wa, wb;                      \
  |  |  112|  17.9M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  17.9M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  17.9M|    diff = wb - wa;                       \
  |  |  115|  17.9M|    sum = wb + wa;                        \
  |  |  116|  17.9M|  }
  ------------------
  957|  17.9M|  ur = x[4];
  958|  17.9M|  ui = x[5];
  959|  17.9M|  x[4] = (ur >> 1) + vr;
  960|  17.9M|  x[5] = (ui >> 1) + vi;
  961|  17.9M|  x[20] = (ur >> 1) - vr;
  962|  17.9M|  x[21] = (ui >> 1) - vi;
  963|       |
  964|       |  // xt1 = 12
  965|       |  // xt2 = 28
  966|  17.9M|  SUMDIFF_PIFOURTH(vr, vi, x[28], x[29])
  ------------------
  |  |  110|  17.9M|  {                                       \
  |  |  111|  17.9M|    FIXP_DBL wa, wb;                      \
  |  |  112|  17.9M|    wa = fMultDiv2(a, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  17.9M|    wb = fMultDiv2(b, W_PiFOURTH);        \
  |  |  ------------------
  |  |  |  |  106|  17.9M|#define W_PiFOURTH STC(0x5a82799a)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  17.9M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  17.9M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 17.9M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  17.9M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  17.9M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  17.9M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  17.9M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  17.9M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  17.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  17.9M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  17.9M|    diff = wb - wa;                       \
  |  |  115|  17.9M|    sum = wb + wa;                        \
  |  |  116|  17.9M|  }
  ------------------
  967|  17.9M|  ur = x[12];
  968|  17.9M|  ui = x[13];
  969|  17.9M|  x[12] = (ur >> 1) + vr;
  970|  17.9M|  x[13] = (ui >> 1) - vi;
  971|  17.9M|  x[28] = (ur >> 1) - vr;
  972|  17.9M|  x[29] = (ui >> 1) + vi;
  973|       |
  974|       |  // xt1 =  6
  975|       |  // xt2 = 22
  976|  17.9M|  cplxMultDiv2(&vi, &vr, x[23], x[22], fft16_w16[1]);
  977|  17.9M|  ur = x[6];
  978|  17.9M|  ui = x[7];
  979|  17.9M|  x[6] = (ur >> 1) + vr;
  980|  17.9M|  x[7] = (ui >> 1) + vi;
  981|  17.9M|  x[22] = (ur >> 1) - vr;
  982|  17.9M|  x[23] = (ui >> 1) - vi;
  983|       |
  984|       |  // xt1 = 14
  985|       |  // xt2 = 30
  986|  17.9M|  cplxMultDiv2(&vr, &vi, x[31], x[30], fft16_w16[1]);
  987|  17.9M|  ur = x[14];
  988|  17.9M|  ui = x[15];
  989|  17.9M|  x[14] = (ur >> 1) + vr;
  990|  17.9M|  x[15] = (ui >> 1) - vi;
  991|  17.9M|  x[30] = (ur >> 1) - vr;
  992|  17.9M|  x[31] = (ui >> 1) + vi;
  993|  17.9M|}
fft.cpp:_ZL4fft2Pi:
  173|  8.43M|static FDK_FORCEINLINE void fft2(FIXP_DBL *RESTRICT pDat) {
  174|  8.43M|  FIXP_DBL r1, i1;
  175|  8.43M|  FIXP_DBL r2, i2;
  176|       |
  177|       |  /* real part */
  178|  8.43M|  r1 = pDat[2];
  179|  8.43M|  r2 = pDat[0];
  180|       |
  181|       |  /* imaginary part */
  182|  8.43M|  i1 = pDat[3];
  183|  8.43M|  i2 = pDat[1];
  184|       |
  185|       |  /* real part */
  186|  8.43M|  pDat[0] = (r2 + r1) >> 1;
  187|  8.43M|  pDat[2] = (r2 - r1) >> 1;
  188|       |
  189|       |  /* imaginary part */
  190|  8.43M|  pDat[1] = (i2 + i1) >> 1;
  191|  8.43M|  pDat[3] = (i2 - i1) >> 1;
  192|  8.43M|}
fft.cpp:_ZL4fft3Pi:
  199|  7.80M|static FDK_FORCEINLINE void fft3(FIXP_DBL *RESTRICT pDat) {
  200|  7.80M|  FIXP_DBL r1, r2;
  201|  7.80M|  FIXP_DBL s1, s2;
  202|  7.80M|  FIXP_DBL pD;
  203|       |
  204|       |  /* real part */
  205|  7.80M|  r1 = pDat[2] + pDat[4];
  206|  7.80M|  r2 = fMultDiv2((pDat[2] - pDat[4]), C31);
  ------------------
  |  |  195|  7.80M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  7.80M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  7.80M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.80M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.80M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  7.80M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.80M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  7.80M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  7.80M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  7.80M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.80M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.80M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  7.80M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|  7.80M|  pD = pDat[0] >> 1;
  208|  7.80M|  pDat[0] = pD + (r1 >> 1);
  209|  7.80M|  r1 = pD - (r1 >> 2);
  210|       |
  211|       |  /* imaginary part */
  212|  7.80M|  s1 = pDat[3] + pDat[5];
  213|  7.80M|  s2 = fMultDiv2((pDat[3] - pDat[5]), C31);
  ------------------
  |  |  195|  7.80M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  7.80M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  7.80M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.80M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.80M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  7.80M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.80M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  7.80M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  7.80M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  7.80M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.80M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  7.80M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  7.80M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  7.80M|  pD = pDat[1] >> 1;
  215|  7.80M|  pDat[1] = pD + (s1 >> 1);
  216|  7.80M|  s1 = pD - (s1 >> 2);
  217|       |
  218|       |  /* combination */
  219|  7.80M|  pDat[2] = r1 - s2;
  220|  7.80M|  pDat[4] = r1 + s2;
  221|  7.80M|  pDat[3] = s1 + r2;
  222|  7.80M|  pDat[5] = s1 - r2;
  223|  7.80M|}
fft.cpp:_ZL4fft5Pi:
  236|  12.0M|static FDK_FORCEINLINE void fft5(FIXP_DBL *RESTRICT pDat) {
  237|  12.0M|  FIXP_DBL r1, r2, r3, r4;
  238|  12.0M|  FIXP_DBL s1, s2, s3, s4;
  239|  12.0M|  FIXP_DBL t;
  240|       |
  241|       |  /* real part */
  242|  12.0M|  r1 = (pDat[2] + pDat[8]) >> 1;
  243|  12.0M|  r4 = (pDat[2] - pDat[8]) >> 1;
  244|  12.0M|  r3 = (pDat[4] + pDat[6]) >> 1;
  245|  12.0M|  r2 = (pDat[4] - pDat[6]) >> 1;
  246|  12.0M|  t = fMult((r1 - r3), C54);
  ------------------
  |  |  231|  12.0M|#define C54 (F5C(0x478dde64)) /* FL2FXCONST_DBL( 0.55901699)   */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 12.0M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|  12.0M|  r1 = r1 + r3;
  248|  12.0M|  pDat[0] = (pDat[0] >> 1) + r1;
  249|       |  /* Bit shift left because of the constant C55 which was scaled with the factor
  250|       |     0.5 because of the representation of the values as fracts */
  251|  12.0M|  r1 = pDat[0] + (fMultDiv2(r1, C55) << (2));
  ------------------
  |  |  232|  12.0M|#define C55 (F5C(0xb0000001)) /* FL2FXCONST_DBL(-1.25/2)       */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  252|  12.0M|  r3 = r1 - t;
  253|  12.0M|  r1 = r1 + t;
  254|  12.0M|  t = fMult((r4 + r2), C51);
  ------------------
  |  |  228|  12.0M|#define C51 (F5C(0x79bc3854)) /* FL2FXCONST_DBL( 0.95105652)   */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 12.0M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|       |  /* Bit shift left because of the constant C55 which was scaled with the factor
  256|       |     0.5 because of the representation of the values as fracts */
  257|  12.0M|  r4 = t + (fMultDiv2(r4, C52) << (2));
  ------------------
  |  |  229|  12.0M|#define C52 (F5C(0x9d839db0)) /* FL2FXCONST_DBL(-1.53884180/2) */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  258|  12.0M|  r2 = t + fMult(r2, C53);
  ------------------
  |  |  230|  12.0M|#define C53 (F5C(0xd18053ce)) /* FL2FXCONST_DBL(-0.36327126)   */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|       |
  260|       |  /* imaginary part */
  261|  12.0M|  s1 = (pDat[3] + pDat[9]) >> 1;
  262|  12.0M|  s4 = (pDat[3] - pDat[9]) >> 1;
  263|  12.0M|  s3 = (pDat[5] + pDat[7]) >> 1;
  264|  12.0M|  s2 = (pDat[5] - pDat[7]) >> 1;
  265|  12.0M|  t = fMult((s1 - s3), C54);
  ------------------
  |  |  231|  12.0M|#define C54 (F5C(0x478dde64)) /* FL2FXCONST_DBL( 0.55901699)   */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 12.0M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  266|  12.0M|  s1 = s1 + s3;
  267|  12.0M|  pDat[1] = (pDat[1] >> 1) + s1;
  268|       |  /* Bit shift left because of the constant C55 which was scaled with the factor
  269|       |     0.5 because of the representation of the values as fracts */
  270|  12.0M|  s1 = pDat[1] + (fMultDiv2(s1, C55) << (2));
  ------------------
  |  |  232|  12.0M|#define C55 (F5C(0xb0000001)) /* FL2FXCONST_DBL(-1.25/2)       */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  271|  12.0M|  s3 = s1 - t;
  272|  12.0M|  s1 = s1 + t;
  273|  12.0M|  t = fMult((s4 + s2), C51);
  ------------------
  |  |  228|  12.0M|#define C51 (F5C(0x79bc3854)) /* FL2FXCONST_DBL( 0.95105652)   */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 12.0M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  274|       |  /* Bit shift left because of the constant C55 which was scaled with the factor
  275|       |     0.5 because of the representation of the values as fracts */
  276|  12.0M|  s4 = t + (fMultDiv2(s4, C52) << (2));
  ------------------
  |  |  229|  12.0M|#define C52 (F5C(0x9d839db0)) /* FL2FXCONST_DBL(-1.53884180/2) */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  277|  12.0M|  s2 = t + fMult(s2, C53);
  ------------------
  |  |  230|  12.0M|#define C53 (F5C(0xd18053ce)) /* FL2FXCONST_DBL(-0.36327126)   */
  |  |  ------------------
  |  |  |  |  226|  12.0M|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  12.0M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|  12.0M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  12.0M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|  12.0M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|  12.0M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|  12.0M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  12.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|  12.0M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|  12.0M|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|       |
  279|       |  /* combination */
  280|  12.0M|  pDat[2] = r1 + s2;
  281|  12.0M|  pDat[8] = r1 - s2;
  282|  12.0M|  pDat[4] = r3 - s4;
  283|  12.0M|  pDat[6] = r3 + s4;
  284|       |
  285|  12.0M|  pDat[3] = s1 - r2;
  286|  12.0M|  pDat[9] = s1 + r2;
  287|  12.0M|  pDat[5] = s3 + r4;
  288|  12.0M|  pDat[7] = s3 - r4;
  289|  12.0M|}
fft.cpp:_ZL4fft6Pi:
 1715|  2.77M|static inline void fft6(FIXP_DBL *pInput) {
 1716|  2.77M|  fftN2(FIXP_DBL, pInput, 6, 2, 3, fft2, fft3, RotVectorReal6, RotVectorImag6);
  ------------------
  |  | 1695|  2.77M|  {                                                                        \
  |  | 1696|  2.77M|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|  2.77M|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  2.77M|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  2.77M|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  2.77M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  2.77M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  2.77M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  2.77M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  2.77M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  2.77M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  2.77M|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|  2.77M|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|  2.77M|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  2.77M|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  2.77M|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  2.77M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  2.77M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  2.77M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  2.77M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  2.77M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  2.77M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  2.77M|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|  2.77M|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|  2.77M|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|  2.77M|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|  2.77M|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|  2.77M|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|  2.77M|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|  2.77M|  }
  ------------------
 1717|  2.77M|}
fft.cpp:_ZL10fftN2_funcPiiiiPFvS_ES1_PKsS3_S_S_:
 1583|  3.83M|                              FIXP_DBL *aDst2) {
 1584|       |  /* The real part of the input samples are at the addresses with even indices
 1585|       |  and the imaginary part of the input samples are at the addresses with odd
 1586|       |  indices. The output samples are stored at the address of pInput
 1587|       |  */
 1588|  3.83M|  FIXP_DBL *pSrc, *pDst, *pDstOut;
 1589|  3.83M|  int i;
 1590|       |
 1591|  3.83M|  FDK_ASSERT(length == dim1 * dim2);
  ------------------
  |  |  221|  3.83M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1591:3): [True: 3.83M, False: 0]
  ------------------
 1592|       |
 1593|       |  /* Perform dim2 times the fft of length dim1. The input samples are at the
 1594|       |  address of pSrc and the output samples are at the address of pDst. The input
 1595|       |  vector for the fft of length dim1 is built of the interleaved samples in pSrc,
 1596|       |  the output samples are stored consecutively.
 1597|       |  */
 1598|  3.83M|  pSrc = pInput;
 1599|  3.83M|  pDst = aDst;
 1600|  28.1M|  for (i = 0; i < dim2; i++) {
  ------------------
  |  Branch (1600:15): [True: 24.2M, False: 3.83M]
  ------------------
 1601|   158M|    for (int j = 0; j < dim1; j++) {
  ------------------
  |  Branch (1601:21): [True: 134M, False: 24.2M]
  ------------------
 1602|   134M|      pDst[2 * j] = pSrc[2 * j * dim2];
 1603|   134M|      pDst[2 * j + 1] = pSrc[2 * j * dim2 + 1];
 1604|   134M|    }
 1605|       |
 1606|       |      /* fft of size dim1 */
 1607|  24.2M|#ifndef FFT_TWO_STAGE_SWITCH_CASE
 1608|  24.2M|    fft1(pDst);
 1609|       |#else
 1610|       |    switch (dim1) {
 1611|       |      case 2:
 1612|       |        fft2(pDst);
 1613|       |        break;
 1614|       |      case 3:
 1615|       |        fft3(pDst);
 1616|       |        break;
 1617|       |      case 4:
 1618|       |        fft_4(pDst);
 1619|       |        break;
 1620|       |      /* case 5: fft5(pDst); break; */
 1621|       |      /* case 8: fft_8(pDst); break; */
 1622|       |      case 12:
 1623|       |        fft12(pDst);
 1624|       |        break;
 1625|       |      /* case 15: fft15(pDst); break; */
 1626|       |      case 16:
 1627|       |        fft_16(pDst);
 1628|       |        break;
 1629|       |      case 32:
 1630|       |        fft_32(pDst);
 1631|       |        break;
 1632|       |        /*case 64: fft_64(pDst); break;*/
 1633|       |        /* case 128: fft_128(pDst); break; */
 1634|       |    }
 1635|       |#endif
 1636|  24.2M|    pSrc += 2;
 1637|  24.2M|    pDst = pDst + 2 * dim1;
 1638|  24.2M|  }
 1639|       |
 1640|       |  /* Perform the modulation of the output of the fft of length dim1 */
 1641|  3.83M|  pSrc = aDst;
 1642|  3.83M|  fft_apply_rot_vector(pSrc, dim1, length, RotVectorReal, RotVectorImag);
 1643|       |
 1644|       |  /* Perform dim1 times the fft of length dim2. The input samples are at the
 1645|       |  address of aDst and the output samples are at the address of pInput. The input
 1646|       |  vector for the fft of length dim2 is built of the interleaved samples in aDst,
 1647|       |  the output samples are stored consecutively at the address of pInput.
 1648|       |  */
 1649|  3.83M|  pSrc = aDst;
 1650|  3.83M|  pDst = aDst2;
 1651|  3.83M|  pDstOut = pInput;
 1652|  16.5M|  for (i = 0; i < dim1; i++) {
  ------------------
  |  Branch (1652:15): [True: 12.7M, False: 3.83M]
  ------------------
 1653|   146M|    for (int j = 0; j < dim2; j++) {
  ------------------
  |  Branch (1653:21): [True: 134M, False: 12.7M]
  ------------------
 1654|   134M|      pDst[2 * j] = pSrc[2 * j * dim1];
 1655|   134M|      pDst[2 * j + 1] = pSrc[2 * j * dim1 + 1];
 1656|   134M|    }
 1657|       |
 1658|  12.7M|#ifndef FFT_TWO_STAGE_SWITCH_CASE
 1659|  12.7M|    fft2(pDst);
 1660|       |#else
 1661|       |    switch (dim2) {
 1662|       |      case 4:
 1663|       |        fft_4(pDst);
 1664|       |        break;
 1665|       |      case 9:
 1666|       |        fft9(pDst);
 1667|       |        break;
 1668|       |      case 12:
 1669|       |        fft12(pDst);
 1670|       |        break;
 1671|       |      case 15:
 1672|       |        fft15(pDst);
 1673|       |        break;
 1674|       |      case 16:
 1675|       |        fft_16(pDst);
 1676|       |        break;
 1677|       |      case 32:
 1678|       |        fft_32(pDst);
 1679|       |        break;
 1680|       |    }
 1681|       |#endif
 1682|       |
 1683|   146M|    for (int j = 0; j < dim2; j++) {
  ------------------
  |  Branch (1683:21): [True: 134M, False: 12.7M]
  ------------------
 1684|   134M|      pDstOut[2 * j * dim1] = pDst[2 * j];
 1685|   134M|      pDstOut[2 * j * dim1 + 1] = pDst[2 * j + 1];
 1686|   134M|    }
 1687|  12.7M|    pSrc += 2;
 1688|  12.7M|    pDstOut += 2;
 1689|  12.7M|  }
 1690|  3.83M|}
fft.cpp:_ZL20fft_apply_rot_vectorPiiiPKsS1_:
 1542|  3.83M|                                        const FIXP_STB *pVecIm) {
 1543|  3.83M|  FIXP_DBL re, im;
 1544|  3.83M|  FIXP_STB vre, vim;
  ------------------
  |  |  235|  3.83M|#define FIXP_STB FIXP_SGL /* STB sinus Tab used in transformation */
  ------------------
 1545|       |
 1546|  3.83M|  int i, c;
 1547|       |
 1548|  16.5M|  for (i = 0; i < cl; i++) {
  ------------------
  |  Branch (1548:15): [True: 12.7M, False: 3.83M]
  ------------------
 1549|  12.7M|    re = pData[2 * i];
 1550|  12.7M|    im = pData[2 * i + 1];
 1551|       |
 1552|  12.7M|    pData[2 * i] = re >> 2;     /* * 0.25 */
 1553|  12.7M|    pData[2 * i + 1] = im >> 2; /* * 0.25 */
 1554|  12.7M|  }
 1555|  24.2M|  for (; i < l; i += cl) {
  ------------------
  |  Branch (1555:10): [True: 20.4M, False: 3.83M]
  ------------------
 1556|  20.4M|    re = pData[2 * i];
 1557|  20.4M|    im = pData[2 * i + 1];
 1558|       |
 1559|  20.4M|    pData[2 * i] = re >> 2;     /* * 0.25 */
 1560|  20.4M|    pData[2 * i + 1] = im >> 2; /* * 0.25 */
 1561|       |
 1562|   121M|    for (c = i + 1; c < i + cl; c++) {
  ------------------
  |  Branch (1562:21): [True: 101M, False: 20.4M]
  ------------------
 1563|   101M|      re = pData[2 * c] >> 1;
 1564|   101M|      im = pData[2 * c + 1] >> 1;
 1565|   101M|      vre = *pVecRe++;
 1566|   101M|      vim = *pVecIm++;
 1567|       |
 1568|   101M|      cplxMultDiv2(&pData[2 * c + 1], &pData[2 * c], im, re, vre, vim);
 1569|   101M|    }
 1570|  20.4M|  }
 1571|  3.83M|}
fft.cpp:_ZL5fft10Pi:
  313|   147k|{
  314|   147k|  FIXP_DBL t;
  315|   147k|  FIXP_DBL x0, x1, x2, x3, x4;
  316|   147k|  FIXP_DBL r1, r2, r3, r4;
  317|   147k|  FIXP_DBL s1, s2, s3, s4;
  318|   147k|  FIXP_DBL y00, y01, y02, y03, y04, y05, y06, y07, y08, y09;
  319|   147k|  FIXP_DBL y10, y11, y12, y13, y14, y15, y16, y17, y18, y19;
  320|       |
  321|   147k|  const int s = 1;  // stride factor
  322|       |
  323|       |  /* 2 fft5 stages */
  324|       |
  325|       |  /* real part */
  326|   147k|  x0 = (x[s * 0] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  327|   147k|  x1 = (x[s * 4] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  328|   147k|  x2 = (x[s * 8] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  329|   147k|  x3 = (x[s * 12] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  330|   147k|  x4 = (x[s * 16] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  331|       |
  332|   147k|  r1 = (x3 + x2);
  333|   147k|  r4 = (x3 - x2);
  334|   147k|  r3 = (x1 + x4);
  335|   147k|  r2 = (x1 - x4);
  336|   147k|  t = fMult((r1 - r3), C54);
  ------------------
  |  |  296|   147k|#define C54 (F5C(0x478dde64)) /* FL2FXCONST_DBL( 0.55901699)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  337|   147k|  r1 = (r1 + r3);
  338|   147k|  y00 = (x0 + r1);
  339|   147k|  r1 = (y00 + ((fMult(r1, C55) << 1)));
  ------------------
  |  |  297|   147k|#define C55 (F5C(0xb0000001)) /* FL2FXCONST_DBL(-1.25/2)       */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  340|   147k|  r3 = (r1 - t);
  341|   147k|  r1 = (r1 + t);
  342|   147k|  t = fMult((r4 + r2), C51);
  ------------------
  |  |  293|   147k|#define C51 (F5C(0x79bc3854)) /* FL2FXCONST_DBL( 0.95105652)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  343|   147k|  r4 = (t + (fMult(r4, C52) << 1));
  ------------------
  |  |  294|   147k|#define C52 (F5C(0x9d839db0)) /* FL2FXCONST_DBL(-1.53884180/2) */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  344|   147k|  r2 = (t + fMult(r2, C53));
  ------------------
  |  |  295|   147k|#define C53 (F5C(0xd18053ce)) /* FL2FXCONST_DBL(-0.36327126)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  345|       |
  346|       |  /* imaginary part */
  347|   147k|  x0 = (x[s * 0 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  348|   147k|  x1 = (x[s * 4 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  349|   147k|  x2 = (x[s * 8 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  350|   147k|  x3 = (x[s * 12 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  351|   147k|  x4 = (x[s * 16 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  352|       |
  353|   147k|  s1 = (x3 + x2);
  354|   147k|  s4 = (x3 - x2);
  355|   147k|  s3 = (x1 + x4);
  356|   147k|  s2 = (x1 - x4);
  357|   147k|  t = fMult((s1 - s3), C54);
  ------------------
  |  |  296|   147k|#define C54 (F5C(0x478dde64)) /* FL2FXCONST_DBL( 0.55901699)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  358|   147k|  s1 = (s1 + s3);
  359|   147k|  y01 = (x0 + s1);
  360|   147k|  s1 = (y01 + (fMult(s1, C55) << 1));
  ------------------
  |  |  297|   147k|#define C55 (F5C(0xb0000001)) /* FL2FXCONST_DBL(-1.25/2)       */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|   147k|  s3 = (s1 - t);
  362|   147k|  s1 = (s1 + t);
  363|   147k|  t = fMult((s4 + s2), C51);
  ------------------
  |  |  293|   147k|#define C51 (F5C(0x79bc3854)) /* FL2FXCONST_DBL( 0.95105652)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  364|   147k|  s4 = (t + (fMult(s4, C52) << 1));
  ------------------
  |  |  294|   147k|#define C52 (F5C(0x9d839db0)) /* FL2FXCONST_DBL(-1.53884180/2) */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  365|   147k|  s2 = (t + fMult(s2, C53));
  ------------------
  |  |  295|   147k|#define C53 (F5C(0xd18053ce)) /* FL2FXCONST_DBL(-0.36327126)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  366|       |
  367|       |  /* combination */
  368|   147k|  y04 = (r1 + s2);
  369|   147k|  y16 = (r1 - s2);
  370|   147k|  y08 = (r3 - s4);
  371|   147k|  y12 = (r3 + s4);
  372|       |
  373|   147k|  y05 = (s1 - r2);
  374|   147k|  y17 = (s1 + r2);
  375|   147k|  y09 = (s3 + r4);
  376|   147k|  y13 = (s3 - r4);
  377|       |
  378|       |  /* real part */
  379|   147k|  x0 = (x[s * 10] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  380|   147k|  x1 = (x[s * 2] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  381|   147k|  x2 = (x[s * 6] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  382|   147k|  x3 = (x[s * 14] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  383|   147k|  x4 = (x[s * 18] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  384|       |
  385|   147k|  r1 = (x1 + x4);
  386|   147k|  r4 = (x1 - x4);
  387|   147k|  r3 = (x3 + x2);
  388|   147k|  r2 = (x3 - x2);
  389|   147k|  t = fMult((r1 - r3), C54);
  ------------------
  |  |  296|   147k|#define C54 (F5C(0x478dde64)) /* FL2FXCONST_DBL( 0.55901699)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  390|   147k|  r1 = (r1 + r3);
  391|   147k|  y02 = (x0 + r1);
  392|   147k|  r1 = (y02 + ((fMult(r1, C55) << 1)));
  ------------------
  |  |  297|   147k|#define C55 (F5C(0xb0000001)) /* FL2FXCONST_DBL(-1.25/2)       */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  393|   147k|  r3 = (r1 - t);
  394|   147k|  r1 = (r1 + t);
  395|   147k|  t = fMult(((r4 + r2)), C51);
  ------------------
  |  |  293|   147k|#define C51 (F5C(0x79bc3854)) /* FL2FXCONST_DBL( 0.95105652)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  396|   147k|  r4 = (t + (fMult(r4, C52) << 1));
  ------------------
  |  |  294|   147k|#define C52 (F5C(0x9d839db0)) /* FL2FXCONST_DBL(-1.53884180/2) */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  397|   147k|  r2 = (t + fMult(r2, C53));
  ------------------
  |  |  295|   147k|#define C53 (F5C(0xd18053ce)) /* FL2FXCONST_DBL(-0.36327126)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  398|       |
  399|       |  /* imaginary part */
  400|   147k|  x0 = (x[s * 10 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  401|   147k|  x1 = (x[s * 2 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  402|   147k|  x2 = (x[s * 6 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  403|   147k|  x3 = (x[s * 14 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  404|   147k|  x4 = (x[s * 18 + 1] >> SCALEFACTOR10);
  ------------------
  |  |  144|   147k|#define SCALEFACTOR10 5
  ------------------
  405|       |
  406|   147k|  s1 = (x1 + x4);
  407|   147k|  s4 = (x1 - x4);
  408|   147k|  s3 = (x3 + x2);
  409|   147k|  s2 = (x3 - x2);
  410|   147k|  t = fMult((s1 - s3), C54);
  ------------------
  |  |  296|   147k|#define C54 (F5C(0x478dde64)) /* FL2FXCONST_DBL( 0.55901699)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  411|   147k|  s1 = (s1 + s3);
  412|   147k|  y03 = (x0 + s1);
  413|   147k|  s1 = (y03 + (fMult(s1, C55) << 1));
  ------------------
  |  |  297|   147k|#define C55 (F5C(0xb0000001)) /* FL2FXCONST_DBL(-1.25/2)       */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  414|   147k|  s3 = (s1 - t);
  415|   147k|  s1 = (s1 + t);
  416|   147k|  t = fMult((s4 + s2), C51);
  ------------------
  |  |  293|   147k|#define C51 (F5C(0x79bc3854)) /* FL2FXCONST_DBL( 0.95105652)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  417|   147k|  s4 = (t + (fMult(s4, C52) << 1));
  ------------------
  |  |  294|   147k|#define C52 (F5C(0x9d839db0)) /* FL2FXCONST_DBL(-1.53884180/2) */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  418|   147k|  s2 = (t + fMult(s2, C53));
  ------------------
  |  |  295|   147k|#define C53 (F5C(0xd18053ce)) /* FL2FXCONST_DBL(-0.36327126)   */
  |  |  ------------------
  |  |  |  |  291|   147k|#define F5C(x) STC(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|   147k|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  161|   147k|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|   147k|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  163|   147k|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  164|   147k|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  165|   147k|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   147k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  112|   147k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  166|   147k|                           1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  419|       |
  420|       |  /* combination */
  421|   147k|  y06 = (r1 + s2);
  422|   147k|  y18 = (r1 - s2);
  423|   147k|  y10 = (r3 - s4);
  424|   147k|  y14 = (r3 + s4);
  425|       |
  426|   147k|  y07 = (s1 - r2);
  427|   147k|  y19 = (s1 + r2);
  428|   147k|  y11 = (s3 + r4);
  429|   147k|  y15 = (s3 - r4);
  430|       |
  431|       |  /* 5 fft2 stages */
  432|   147k|  x[s * 0] = (y00 + y02);
  433|   147k|  x[s * 0 + 1] = (y01 + y03);
  434|   147k|  x[s * 10] = (y00 - y02);
  435|   147k|  x[s * 10 + 1] = (y01 - y03);
  436|       |
  437|   147k|  x[s * 4] = (y04 + y06);
  438|   147k|  x[s * 4 + 1] = (y05 + y07);
  439|   147k|  x[s * 14] = (y04 - y06);
  440|   147k|  x[s * 14 + 1] = (y05 - y07);
  441|       |
  442|   147k|  x[s * 8] = (y08 + y10);
  443|   147k|  x[s * 8 + 1] = (y09 + y11);
  444|   147k|  x[s * 18] = (y08 - y10);
  445|   147k|  x[s * 18 + 1] = (y09 - y11);
  446|       |
  447|   147k|  x[s * 12] = (y12 + y14);
  448|   147k|  x[s * 12 + 1] = (y13 + y15);
  449|   147k|  x[s * 2] = (y12 - y14);
  450|   147k|  x[s * 2 + 1] = (y13 - y15);
  451|       |
  452|   147k|  x[s * 16] = (y16 + y18);
  453|   147k|  x[s * 16 + 1] = (y17 + y19);
  454|   147k|  x[s * 6] = (y16 - y18);
  455|   147k|  x[s * 6 + 1] = (y17 - y19);
  456|   147k|}
fft.cpp:_ZL5fft12Pi:
  464|  14.6M|static inline void fft12(FIXP_DBL *pInput) {
  465|  14.6M|  FIXP_DBL aDst[24];
  466|  14.6M|  FIXP_DBL *pSrc, *pDst;
  467|  14.6M|  int i;
  468|       |
  469|  14.6M|  pSrc = pInput;
  470|  14.6M|  pDst = aDst;
  471|  14.6M|  FIXP_DBL r1, r2, s1, s2, pD;
  472|       |
  473|       |  /* First 3*2 samples are shifted right by 2 before output */
  474|  14.6M|  r1 = pSrc[8] + pSrc[16];
  475|  14.6M|  r2 = fMultDiv2((pSrc[8] - pSrc[16]), C31);
  ------------------
  |  |  462|  14.6M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  14.6M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  14.6M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  14.6M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  14.6M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  14.6M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  14.6M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  14.6M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  476|  14.6M|  pD = pSrc[0] >> 1;
  477|  14.6M|  pDst[0] = (pD + (r1 >> 1)) >> 1;
  478|  14.6M|  r1 = pD - (r1 >> 2);
  479|       |
  480|       |  /* imaginary part */
  481|  14.6M|  s1 = pSrc[9] + pSrc[17];
  482|  14.6M|  s2 = fMultDiv2((pSrc[9] - pSrc[17]), C31);
  ------------------
  |  |  462|  14.6M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  14.6M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  14.6M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  14.6M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  14.6M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  14.6M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  14.6M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  14.6M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  14.6M|  pD = pSrc[1] >> 1;
  484|  14.6M|  pDst[1] = (pD + (s1 >> 1)) >> 1;
  485|  14.6M|  s1 = pD - (s1 >> 2);
  486|       |
  487|       |  /* combination */
  488|  14.6M|  pDst[2] = (r1 - s2) >> 1;
  489|  14.6M|  pDst[3] = (s1 + r2) >> 1;
  490|  14.6M|  pDst[4] = (r1 + s2) >> 1;
  491|  14.6M|  pDst[5] = (s1 - r2) >> 1;
  492|  14.6M|  pSrc += 2;
  493|  14.6M|  pDst += 6;
  494|       |
  495|  14.6M|  const FIXP_STB *pVecRe = RotVectorReal12;
  496|  14.6M|  const FIXP_STB *pVecIm = RotVectorImag12;
  497|  14.6M|  FIXP_DBL re, im;
  498|  14.6M|  FIXP_STB vre, vim;
  ------------------
  |  |  235|  14.6M|#define FIXP_STB FIXP_SGL /* STB sinus Tab used in transformation */
  ------------------
  499|  43.9M|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (499:15): [True: 29.2M, False: 14.6M]
  ------------------
  500|       |    /* sample 0,1 are shifted right by 2 before output */
  501|       |    /* sample 2,3 4,5 are shifted right by 1 and complex multiplied before
  502|       |     * output */
  503|       |
  504|  29.2M|    r1 = pSrc[8] + pSrc[16];
  505|  29.2M|    r2 = fMultDiv2((pSrc[8] - pSrc[16]), C31);
  ------------------
  |  |  462|  29.2M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  29.2M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  29.2M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  29.2M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  29.2M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  29.2M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  29.2M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  29.2M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  29.2M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  29.2M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  29.2M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  29.2M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  29.2M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  506|  29.2M|    pD = pSrc[0] >> 1;
  507|  29.2M|    pDst[0] = (pD + (r1 >> 1)) >> 1;
  508|  29.2M|    r1 = pD - (r1 >> 2);
  509|       |
  510|       |    /* imaginary part */
  511|  29.2M|    s1 = pSrc[9] + pSrc[17];
  512|  29.2M|    s2 = fMultDiv2((pSrc[9] - pSrc[17]), C31);
  ------------------
  |  |  462|  29.2M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  29.2M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  29.2M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  29.2M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  29.2M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  29.2M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  29.2M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  29.2M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  29.2M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  29.2M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  29.2M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  29.2M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  29.2M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  513|  29.2M|    pD = pSrc[1] >> 1;
  514|  29.2M|    pDst[1] = (pD + (s1 >> 1)) >> 1;
  515|  29.2M|    s1 = pD - (s1 >> 2);
  516|       |
  517|       |    /* combination */
  518|  29.2M|    re = (r1 - s2) >> 0;
  519|  29.2M|    im = (s1 + r2) >> 0;
  520|  29.2M|    vre = *pVecRe++;
  521|  29.2M|    vim = *pVecIm++;
  522|  29.2M|    cplxMultDiv2(&pDst[3], &pDst[2], im, re, vre, vim);
  523|       |
  524|  29.2M|    re = (r1 + s2) >> 0;
  525|  29.2M|    im = (s1 - r2) >> 0;
  526|  29.2M|    vre = *pVecRe++;
  527|  29.2M|    vim = *pVecIm++;
  528|  29.2M|    cplxMultDiv2(&pDst[5], &pDst[4], im, re, vre, vim);
  529|       |
  530|  29.2M|    pDst += 6;
  531|  29.2M|    pSrc += 2;
  532|  29.2M|  }
  533|       |  /* sample 0,1 are shifted right by 2 before output */
  534|       |  /* sample 2,3 is shifted right by 1 and complex multiplied with (0.0,+1.0) */
  535|       |  /* sample 4,5 is shifted right by 1 and complex multiplied with (-1.0,0.0) */
  536|  14.6M|  r1 = pSrc[8] + pSrc[16];
  537|  14.6M|  r2 = fMultDiv2((pSrc[8] - pSrc[16]), C31);
  ------------------
  |  |  462|  14.6M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  14.6M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  14.6M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  14.6M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  14.6M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  14.6M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  14.6M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  14.6M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|  14.6M|  pD = pSrc[0] >> 1;
  539|  14.6M|  pDst[0] = (pD + (r1 >> 1)) >> 1;
  540|  14.6M|  r1 = pD - (r1 >> 2);
  541|       |
  542|       |  /* imaginary part */
  543|  14.6M|  s1 = pSrc[9] + pSrc[17];
  544|  14.6M|  s2 = fMultDiv2((pSrc[9] - pSrc[17]), C31);
  ------------------
  |  |  462|  14.6M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  14.6M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  14.6M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  14.6M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  14.6M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  14.6M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  14.6M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  14.6M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  14.6M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  545|  14.6M|  pD = pSrc[1] >> 1;
  546|  14.6M|  pDst[1] = (pD + (s1 >> 1)) >> 1;
  547|  14.6M|  s1 = pD - (s1 >> 2);
  548|       |
  549|       |  /* combination */
  550|  14.6M|  pDst[2] = (s1 + r2) >> 1;
  551|  14.6M|  pDst[3] = (s2 - r1) >> 1;
  552|  14.6M|  pDst[4] = -((r1 + s2) >> 1);
  553|  14.6M|  pDst[5] = (r2 - s1) >> 1;
  554|       |
  555|       |  /* Perform 3 times the fft of length 4. The input samples are at the address
  556|       |  of aDst and the output samples are at the address of pInput. The input vector
  557|       |  for the fft of length 4 is built of the interleaved samples in aDst, the
  558|       |  output samples are stored consecutively at the address of pInput.
  559|       |  */
  560|  14.6M|  pSrc = aDst;
  561|  14.6M|  pDst = pInput;
  562|  58.5M|  for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (562:15): [True: 43.9M, False: 14.6M]
  ------------------
  563|       |    /* inline FFT4 merged with incoming resorting loop */
  564|  43.9M|    FIXP_DBL a00, a10, a20, a30, tmp0, tmp1;
  565|       |
  566|  43.9M|    a00 = (pSrc[0] + pSrc[12]) >> 1; /* Re A + Re B */
  567|  43.9M|    a10 = (pSrc[6] + pSrc[18]) >> 1; /* Re C + Re D */
  568|  43.9M|    a20 = (pSrc[1] + pSrc[13]) >> 1; /* Im A + Im B */
  569|  43.9M|    a30 = (pSrc[7] + pSrc[19]) >> 1; /* Im C + Im D */
  570|       |
  571|  43.9M|    pDst[0] = a00 + a10; /* Re A' = Re A + Re B + Re C + Re D */
  572|  43.9M|    pDst[1] = a20 + a30; /* Im A' = Im A + Im B + Im C + Im D */
  573|       |
  574|  43.9M|    tmp0 = a00 - pSrc[12]; /* Re A - Re B */
  575|  43.9M|    tmp1 = a20 - pSrc[13]; /* Im A - Im B */
  576|       |
  577|  43.9M|    pDst[12] = a00 - a10; /* Re C' = Re A + Re B - Re C - Re D */
  578|  43.9M|    pDst[13] = a20 - a30; /* Im C' = Im A + Im B - Im C - Im D */
  579|       |
  580|  43.9M|    a10 = a10 - pSrc[18]; /* Re C - Re D */
  581|  43.9M|    a30 = a30 - pSrc[19]; /* Im C - Im D */
  582|       |
  583|  43.9M|    pDst[6] = tmp0 + a30;  /* Re B' = Re A - Re B + Im C - Im D */
  584|  43.9M|    pDst[18] = tmp0 - a30; /* Re D' = Re A - Re B - Im C + Im D */
  585|  43.9M|    pDst[7] = tmp1 - a10;  /* Im B' = Im A - Im B - Re C + Re D */
  586|  43.9M|    pDst[19] = tmp1 + a10; /* Im D' = Im A - Im B + Re C - Re D */
  587|       |
  588|  43.9M|    pSrc += 2;
  589|  43.9M|    pDst += 2;
  590|  43.9M|  }
  591|  14.6M|}
fft.cpp:_ZL5fft15Pi:
  603|  3.82M|static inline void fft15(FIXP_DBL *pInput) {
  604|  3.82M|  FIXP_DBL aDst[2 * N15];
  605|  3.82M|  FIXP_DBL aDst1[2 * N15];
  606|  3.82M|  int i, k, l;
  607|       |
  608|       |  /* Sort input vector for fft's of length 3
  609|       |  input3(0:2)   = [input(0) input(5) input(10)];
  610|       |  input3(3:5)   = [input(3) input(8) input(13)];
  611|       |  input3(6:8)   = [input(6) input(11) input(1)];
  612|       |  input3(9:11)  = [input(9) input(14) input(4)];
  613|       |  input3(12:14) = [input(12) input(2) input(7)]; */
  614|  3.82M|  {
  615|  3.82M|    const FIXP_DBL *pSrc = pInput;
  616|  3.82M|    FIXP_DBL *RESTRICT pDst = aDst;
  617|       |    /* Merge 3 loops into one, skip call of fft3 */
  618|  22.9M|    for (i = 0, l = 0, k = 0; i < N5; i++, k += 6) {
  ------------------
  |  |  597|  22.9M|#define N5 5
  ------------------
  |  Branch (618:31): [True: 19.1M, False: 3.82M]
  ------------------
  619|  19.1M|      pDst[k + 0] = pSrc[l];
  620|  19.1M|      pDst[k + 1] = pSrc[l + 1];
  621|  19.1M|      l += 2 * N5;
  ------------------
  |  |  597|  19.1M|#define N5 5
  ------------------
  622|  19.1M|      if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  19.1M|#define N15 15
  ------------------
                    if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  3.82M|#define N15 15
  ------------------
  |  Branch (622:11): [True: 3.82M, False: 15.3M]
  ------------------
  623|       |
  624|  19.1M|      pDst[k + 2] = pSrc[l];
  625|  19.1M|      pDst[k + 3] = pSrc[l + 1];
  626|  19.1M|      l += 2 * N5;
  ------------------
  |  |  597|  19.1M|#define N5 5
  ------------------
  627|  19.1M|      if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  19.1M|#define N15 15
  ------------------
                    if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  7.65M|#define N15 15
  ------------------
  |  Branch (627:11): [True: 7.65M, False: 11.4M]
  ------------------
  628|  19.1M|      pDst[k + 4] = pSrc[l];
  629|  19.1M|      pDst[k + 5] = pSrc[l + 1];
  630|  19.1M|      l += (2 * N5) + (2 * N3);
  ------------------
  |  |  597|  19.1M|#define N5 5
  ------------------
                    l += (2 * N5) + (2 * N3);
  ------------------
  |  |  596|  19.1M|#define N3 3
  ------------------
  631|  19.1M|      if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  19.1M|#define N15 15
  ------------------
                    if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  11.4M|#define N15 15
  ------------------
  |  Branch (631:11): [True: 11.4M, False: 7.65M]
  ------------------
  632|       |
  633|       |      /* fft3 merged with shift right by 2 loop */
  634|  19.1M|      FIXP_DBL r1, r2, r3;
  635|  19.1M|      FIXP_DBL s1, s2;
  636|       |      /* real part */
  637|  19.1M|      r1 = pDst[k + 2] + pDst[k + 4];
  638|  19.1M|      r2 = fMult((pDst[k + 2] - pDst[k + 4]), C31);
  ------------------
  |  |  462|  19.1M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  19.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  19.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  19.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  19.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  19.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  19.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  19.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  19.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  19.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  19.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  19.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  19.1M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  639|  19.1M|      s1 = pDst[k + 0];
  640|  19.1M|      pDst[k + 0] = (s1 + r1) >> 2;
  641|  19.1M|      r1 = s1 - (r1 >> 1);
  642|       |
  643|       |      /* imaginary part */
  644|  19.1M|      s1 = pDst[k + 3] + pDst[k + 5];
  645|  19.1M|      s2 = fMult((pDst[k + 3] - pDst[k + 5]), C31);
  ------------------
  |  |  462|  19.1M|#define C31 (STC(0x91261468)) /* FL2FXCONST_DBL(-0.86602540) = -sqrt(3)/2  */
  |  |  ------------------
  |  |  |  |  237|  19.1M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  161|  19.1M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  19.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  19.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (161:5): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  162|  19.1M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  19.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  163|  19.1M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (163:5): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  164|  19.1M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|  19.1M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  19.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  19.1M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  166|  19.1M|                           1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  19.1M|      r3 = pDst[k + 1];
  647|  19.1M|      pDst[k + 1] = (r3 + s1) >> 2;
  648|  19.1M|      s1 = r3 - (s1 >> 1);
  649|       |
  650|       |      /* combination */
  651|  19.1M|      pDst[k + 2] = (r1 - s2) >> 2;
  652|  19.1M|      pDst[k + 4] = (r1 + s2) >> 2;
  653|  19.1M|      pDst[k + 3] = (s1 + r2) >> 2;
  654|  19.1M|      pDst[k + 5] = (s1 - r2) >> 2;
  655|  19.1M|    }
  656|  3.82M|  }
  657|       |  /* Sort input vector for fft's of length 5
  658|       |  input5(0:4)   = [output3(0) output3(3) output3(6) output3(9) output3(12)];
  659|       |  input5(5:9)   = [output3(1) output3(4) output3(7) output3(10) output3(13)];
  660|       |  input5(10:14) = [output3(2) output3(5) output3(8) output3(11) output3(14)]; */
  661|       |  /* Merge 2 loops into one, brings about 10% */
  662|  3.82M|  {
  663|  3.82M|    const FIXP_DBL *pSrc = aDst;
  664|  3.82M|    FIXP_DBL *RESTRICT pDst = aDst1;
  665|  15.3M|    for (i = 0, l = 0, k = 0; i < N3; i++, k += 10) {
  ------------------
  |  |  596|  15.3M|#define N3 3
  ------------------
  |  Branch (665:31): [True: 11.4M, False: 3.82M]
  ------------------
  666|  11.4M|      l = 2 * i;
  667|  11.4M|      pDst[k + 0] = pSrc[l + 0];
  668|  11.4M|      pDst[k + 1] = pSrc[l + 1];
  669|  11.4M|      pDst[k + 2] = pSrc[l + 0 + (2 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  670|  11.4M|      pDst[k + 3] = pSrc[l + 1 + (2 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  671|  11.4M|      pDst[k + 4] = pSrc[l + 0 + (4 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  672|  11.4M|      pDst[k + 5] = pSrc[l + 1 + (4 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  673|  11.4M|      pDst[k + 6] = pSrc[l + 0 + (6 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  674|  11.4M|      pDst[k + 7] = pSrc[l + 1 + (6 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  675|  11.4M|      pDst[k + 8] = pSrc[l + 0 + (8 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  676|  11.4M|      pDst[k + 9] = pSrc[l + 1 + (8 * N3)];
  ------------------
  |  |  596|  11.4M|#define N3 3
  ------------------
  677|  11.4M|      fft5(&pDst[k]);
  678|  11.4M|    }
  679|  3.82M|  }
  680|       |  /* Sort output vector of length 15
  681|       |  output = [out5(0)  out5(6)  out5(12) out5(3)  out5(9)
  682|       |            out5(10) out5(1)  out5(7)  out5(13) out5(4)
  683|       |            out5(5)  out5(11) out5(2)  out5(8)  out5(14)]; */
  684|       |  /* optimize clumsy loop, brings about 5% */
  685|  3.82M|  {
  686|  3.82M|    const FIXP_DBL *pSrc = aDst1;
  687|  3.82M|    FIXP_DBL *RESTRICT pDst = pInput;
  688|  15.3M|    for (i = 0, l = 0, k = 0; i < N3; i++, k += 10) {
  ------------------
  |  |  596|  15.3M|#define N3 3
  ------------------
  |  Branch (688:31): [True: 11.4M, False: 3.82M]
  ------------------
  689|  11.4M|      pDst[k + 0] = pSrc[l];
  690|  11.4M|      pDst[k + 1] = pSrc[l + 1];
  691|  11.4M|      l += (2 * N6);
  ------------------
  |  |  598|  11.4M|#define N6 6
  ------------------
  692|  11.4M|      if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  11.4M|#define N15 15
  ------------------
                    if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  3.82M|#define N15 15
  ------------------
  |  Branch (692:11): [True: 3.82M, False: 7.65M]
  ------------------
  693|  11.4M|      pDst[k + 2] = pSrc[l];
  694|  11.4M|      pDst[k + 3] = pSrc[l + 1];
  695|  11.4M|      l += (2 * N6);
  ------------------
  |  |  598|  11.4M|#define N6 6
  ------------------
  696|  11.4M|      if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  11.4M|#define N15 15
  ------------------
                    if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  3.82M|#define N15 15
  ------------------
  |  Branch (696:11): [True: 3.82M, False: 7.65M]
  ------------------
  697|  11.4M|      pDst[k + 4] = pSrc[l];
  698|  11.4M|      pDst[k + 5] = pSrc[l + 1];
  699|  11.4M|      l += (2 * N6);
  ------------------
  |  |  598|  11.4M|#define N6 6
  ------------------
  700|  11.4M|      if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  11.4M|#define N15 15
  ------------------
                    if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  3.82M|#define N15 15
  ------------------
  |  Branch (700:11): [True: 3.82M, False: 7.65M]
  ------------------
  701|  11.4M|      pDst[k + 6] = pSrc[l];
  702|  11.4M|      pDst[k + 7] = pSrc[l + 1];
  703|  11.4M|      l += (2 * N6);
  ------------------
  |  |  598|  11.4M|#define N6 6
  ------------------
  704|  11.4M|      if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  11.4M|#define N15 15
  ------------------
                    if (l >= (2 * N15)) l -= (2 * N15);
  ------------------
  |  |  599|  3.82M|#define N15 15
  ------------------
  |  Branch (704:11): [True: 3.82M, False: 7.65M]
  ------------------
  705|  11.4M|      pDst[k + 8] = pSrc[l];
  706|  11.4M|      pDst[k + 9] = pSrc[l + 1];
  707|  11.4M|      l += 2; /* no modulo check needed, it cannot occur */
  708|  11.4M|    }
  709|  3.82M|  }
  710|  3.82M|}
fft.cpp:_ZL5fft20Pi:
 1728|   147k|static inline void fft20(FIXP_DBL *pInput) {
 1729|   147k|  fftN2(FIXP_DBL, pInput, 20, 4, 5, fft_4, fft5, RotVectorReal20,
  ------------------
  |  | 1695|   147k|  {                                                                        \
  |  | 1696|   147k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|   147k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   147k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   147k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   147k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   147k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   147k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   147k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   147k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   147k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   147k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|   147k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|   147k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   147k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   147k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   147k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   147k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   147k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   147k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   147k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   147k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   147k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|   147k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|   147k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|   147k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|   147k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|   147k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|   147k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|   147k|  }
  ------------------
 1730|   147k|        RotVectorImag20);
 1731|   147k|}
fft.cpp:_ZL5fft24Pi:
 1734|  8.73k|static inline void fft24(FIXP_DBL *pInput) {
 1735|  8.73k|  fftN2(FIXP_DBL, pInput, 24, 2, 12, fft2, fft12, RotVectorReal24,
  ------------------
  |  | 1695|  8.73k|  {                                                                        \
  |  | 1696|  8.73k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|  8.73k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  8.73k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  8.73k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  8.73k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.73k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  8.73k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.73k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  8.73k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.73k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  8.73k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|  8.73k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|  8.73k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  8.73k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  8.73k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  8.73k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.73k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  8.73k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.73k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  8.73k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.73k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  8.73k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|  8.73k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|  8.73k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|  8.73k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|  8.73k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|  8.73k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|  8.73k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|  8.73k|  }
  ------------------
 1736|  8.73k|        RotVectorImag24); /* 16,73 */
 1737|  8.73k|}
fft.cpp:_ZL5fft48Pi:
 1739|   350k|static inline void fft48(FIXP_DBL *pInput) {
 1740|   350k|  fftN2(FIXP_DBL, pInput, 48, 4, 12, fft_4, fft12, RotVectorReal48,
  ------------------
  |  | 1695|   350k|  {                                                                        \
  |  | 1696|   350k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|   350k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   350k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   350k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   350k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   350k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   350k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   350k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   350k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   350k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   350k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|   350k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|   350k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   350k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   350k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   350k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   350k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   350k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   350k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   350k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   350k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   350k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|   350k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|   350k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|   350k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|   350k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|   350k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|   350k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|   350k|  }
  ------------------
 1741|   350k|        RotVectorImag48); /* 16,32 */
 1742|   350k|}
fft.cpp:_ZL5fft60Pi:
 1745|   221k|static inline void fft60(FIXP_DBL *pInput) {
 1746|   221k|  fftN2(FIXP_DBL, pInput, 60, 4, 15, fft_4, fft15, RotVectorReal60,
  ------------------
  |  | 1695|   221k|  {                                                                        \
  |  | 1696|   221k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|   221k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   221k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   221k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   221k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   221k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   221k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   221k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   221k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   221k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   221k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|   221k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|   221k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   221k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   221k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   221k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   221k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   221k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   221k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   221k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   221k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   221k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|   221k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|   221k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|   221k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|   221k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|   221k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|   221k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|   221k|  }
  ------------------
 1747|   221k|        RotVectorImag60); /* 15,51 */
 1748|   221k|}
fft.cpp:_ZL5fft80Pi:
 1752|    132|static inline void fft80(FIXP_DBL *pInput) {
 1753|    132|  fftN2(FIXP_DBL, pInput, 80, 5, 16, fft5, fft_16, RotVectorReal80,
  ------------------
  |  | 1695|    132|  {                                                                        \
  |  | 1696|    132|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|    132|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|    132|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|    132|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|    132|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|    132|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|    132|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|    132|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|    132|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|    132|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|    132|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|    132|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|    132|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|    132|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|    132|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|    132|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|    132|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|    132|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|    132|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|    132|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|    132|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|    132|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|    132|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|    132|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|    132|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|    132|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|    132|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|    132|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|    132|  }
  ------------------
 1754|    132|        RotVectorImag80); /*  */
 1755|    132|}
fft.cpp:_ZL5fft96Pi:
 1759|  70.2k|static inline void fft96(FIXP_DBL *pInput) {
 1760|  70.2k|  fftN2(FIXP_DBL, pInput, 96, 3, 32, fft3, fft_32, RotVectorReal96,
  ------------------
  |  | 1695|  70.2k|  {                                                                        \
  |  | 1696|  70.2k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|  70.2k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  70.2k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  70.2k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  70.2k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  70.2k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  70.2k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  70.2k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  70.2k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  70.2k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  70.2k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|  70.2k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|  70.2k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  70.2k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  70.2k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  70.2k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  70.2k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  70.2k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  70.2k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  70.2k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  70.2k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  70.2k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|  70.2k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|  70.2k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|  70.2k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|  70.2k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|  70.2k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|  70.2k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|  70.2k|  }
  ------------------
 1761|  70.2k|        RotVectorImag96); /* 15,47 */
 1762|  70.2k|}
fft.cpp:_ZL6fft120Pi:
 1766|  3.52k|static inline void fft120(FIXP_DBL *pInput) {
 1767|  3.52k|  fftN2(FIXP_DBL, pInput, 120, 8, 15, fft_8, fft15, RotVectorReal120,
  ------------------
  |  | 1695|  3.52k|  {                                                                        \
  |  | 1696|  3.52k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|  3.52k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  3.52k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  3.52k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  3.52k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  3.52k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  3.52k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  3.52k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  3.52k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  3.52k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  3.52k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|  3.52k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|  3.52k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  3.52k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  3.52k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  3.52k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  3.52k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  3.52k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  3.52k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  3.52k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  3.52k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  3.52k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|  3.52k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|  3.52k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|  3.52k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|  3.52k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|  3.52k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|  3.52k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|  3.52k|  }
  ------------------
 1768|  3.52k|        RotVectorImag120);
 1769|  3.52k|}
fft.cpp:_ZL6fft192Pi:
 1773|  8.86k|static inline void fft192(FIXP_DBL *pInput) {
 1774|  8.86k|  fftN2(FIXP_DBL, pInput, 192, 16, 12, fft_16, fft12, RotVectorReal192,
  ------------------
  |  | 1695|  8.86k|  {                                                                        \
  |  | 1696|  8.86k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|  8.86k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  8.86k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  8.86k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  8.86k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.86k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  8.86k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.86k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  8.86k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.86k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  8.86k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|  8.86k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|  8.86k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  8.86k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  8.86k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  8.86k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.86k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  8.86k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.86k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  8.86k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  8.86k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  8.86k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|  8.86k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|  8.86k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|  8.86k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|  8.86k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|  8.86k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|  8.86k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|  8.86k|  }
  ------------------
 1775|  8.86k|        RotVectorImag192); /* 15,50 */
 1776|  8.86k|}
fft.cpp:_ZL6fft240Pi:
 1780|   156k|static inline void fft240(FIXP_DBL *pInput) {
 1781|   156k|  fftN2(FIXP_DBL, pInput, 240, 16, 15, fft_16, fft15, RotVectorReal240,
  ------------------
  |  | 1695|   156k|  {                                                                        \
  |  | 1696|   156k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|   156k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   156k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   156k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   156k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   156k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   156k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   156k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   156k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   156k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   156k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|   156k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|   156k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|   156k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|   156k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|   156k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   156k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|   156k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   156k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|   156k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|   156k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|   156k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|   156k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|   156k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|   156k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|   156k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|   156k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|   156k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|   156k|  }
  ------------------
 1782|   156k|        RotVectorImag240); /* 15.44 */
 1783|   156k|}
fft.cpp:_ZL6fft384Pi:
 1787|  82.4k|static inline void fft384(FIXP_DBL *pInput) {
 1788|  82.4k|  fftN2(FIXP_DBL, pInput, 384, 12, 32, fft12, fft_32, RotVectorReal384,
  ------------------
  |  | 1695|  82.4k|  {                                                                        \
  |  | 1696|  82.4k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|  82.4k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  82.4k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  82.4k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  82.4k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  82.4k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  82.4k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  82.4k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  82.4k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  82.4k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  82.4k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|  82.4k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|  82.4k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  82.4k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  82.4k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  82.4k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  82.4k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  82.4k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  82.4k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  82.4k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  82.4k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  82.4k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|  82.4k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|  82.4k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|  82.4k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|  82.4k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|  82.4k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|  82.4k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|  82.4k|  }
  ------------------
 1789|  82.4k|        RotVectorImag384); /* 16.02 */
 1790|  82.4k|}
fft.cpp:_ZL6fft480Pi:
 1794|  13.0k|static inline void fft480(FIXP_DBL *pInput) {
 1795|  13.0k|  fftN2(FIXP_DBL, pInput, 480, 32, 15, fft_32, fft15, RotVectorReal480,
  ------------------
  |  | 1695|  13.0k|  {                                                                        \
  |  | 1696|  13.0k|    C_AALLOC_SCRATCH_START(aDst, DATA_TYPE, 2 * length)                    \
  |  |  ------------------
  |  |  |  |  319|  13.0k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  13.0k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  13.0k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  13.0k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  13.0k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  13.0k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  13.0k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  13.0k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  13.0k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  13.0k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1697|  13.0k|    C_AALLOC_SCRATCH_START(aDst2, DATA_TYPE, 2 * dim2)                     \
  |  |  ------------------
  |  |  |  |  319|  13.0k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  |  |  320|  13.0k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|  13.0k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  |  |  313|  13.0k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  13.0k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  314|  13.0k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  13.0k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  315|  13.0k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  256|  13.0k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  321|  13.0k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  |  |  ------------------
  |  | 1698|  13.0k|    fftN2_func(pInput, length, dim1, dim2, fft_func1, fft_func2,           \
  |  | 1699|  13.0k|               RotVectorReal, RotVectorImag, aDst, aDst2);                 \
  |  | 1700|  13.0k|    C_AALLOC_SCRATCH_END(aDst2, DATA_TYPE, 2 * dim2)                       \
  |  |  ------------------
  |  |  |  |  327|  13.0k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1701|  13.0k|    C_AALLOC_SCRATCH_END(aDst, DATA_TYPE, 2 * length)                      \
  |  |  ------------------
  |  |  |  |  327|  13.0k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  |  |  ------------------
  |  | 1702|  13.0k|  }
  ------------------
 1796|  13.0k|        RotVectorImag480); /* 15.84 */
 1797|  13.0k|}

_Z7dit_fftPiiPK8FIXP_SPKi:
  132|   630k|             const INT trigDataSize) {
  133|   630k|  const INT n = 1 << ldn;
  134|   630k|  INT trigstep, i, ldm;
  135|       |
  136|   630k|  C_ALLOC_ALIGNED_CHECK(x);
  137|       |
  138|   630k|  scramble(x, n);
  139|       |  /*
  140|       |   * 1+2 stage radix 4
  141|       |   */
  142|       |
  143|  29.7M|  for (i = 0; i < n * 2; i += 8) {
  ------------------
  |  Branch (143:15): [True: 29.0M, False: 630k]
  ------------------
  144|  29.0M|    FIXP_DBL a00, a10, a20, a30;
  145|  29.0M|    a00 = (x[i + 0] + x[i + 2]) >> 1; /* Re A + Re B */
  146|  29.0M|    a10 = (x[i + 4] + x[i + 6]) >> 1; /* Re C + Re D */
  147|  29.0M|    a20 = (x[i + 1] + x[i + 3]) >> 1; /* Im A + Im B */
  148|  29.0M|    a30 = (x[i + 5] + x[i + 7]) >> 1; /* Im C + Im D */
  149|       |
  150|  29.0M|    x[i + 0] = a00 + a10; /* Re A' = Re A + Re B + Re C + Re D */
  151|  29.0M|    x[i + 4] = a00 - a10; /* Re C' = Re A + Re B - Re C - Re D */
  152|  29.0M|    x[i + 1] = a20 + a30; /* Im A' = Im A + Im B + Im C + Im D */
  153|  29.0M|    x[i + 5] = a20 - a30; /* Im C' = Im A + Im B - Im C - Im D */
  154|       |
  155|  29.0M|    a00 = a00 - x[i + 2]; /* Re A - Re B */
  156|  29.0M|    a10 = a10 - x[i + 6]; /* Re C - Re D */
  157|  29.0M|    a20 = a20 - x[i + 3]; /* Im A - Im B */
  158|  29.0M|    a30 = a30 - x[i + 7]; /* Im C - Im D */
  159|       |
  160|  29.0M|    x[i + 2] = a00 + a30; /* Re B' = Re A - Re B + Im C - Im D */
  161|  29.0M|    x[i + 6] = a00 - a30; /* Re D' = Re A - Re B - Im C + Im D */
  162|  29.0M|    x[i + 3] = a20 - a10; /* Im B' = Im A - Im B - Re C + Re D */
  163|  29.0M|    x[i + 7] = a20 + a10; /* Im D' = Im A - Im B + Re C - Re D */
  164|  29.0M|  }
  165|       |
  166|  3.75M|  for (ldm = 3; ldm <= ldn; ++ldm) {
  ------------------
  |  Branch (166:17): [True: 3.11M, False: 630k]
  ------------------
  167|  3.11M|    INT m = (1 << ldm);
  168|  3.11M|    INT mh = (m >> 1);
  169|  3.11M|    INT j, r;
  170|       |
  171|  3.11M|    trigstep = ((trigDataSize << 2) >> ldm);
  172|       |
  173|  3.11M|    FDK_ASSERT(trigstep > 0);
  ------------------
  |  |  221|  3.11M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (173:5): [True: 3.11M, False: 0]
  ------------------
  174|       |
  175|       |    /* Do first iteration with c=1.0 and s=0.0 separately to avoid loosing to
  176|       |       much precision. Beware: The impact on the overal FFT precision is rather
  177|       |       large. */
  178|  3.11M|    { /* block 1 */
  179|       |
  180|  3.11M|      j = 0;
  181|       |
  182|  31.5M|      for (r = 0; r < n; r += m) {
  ------------------
  |  Branch (182:19): [True: 28.4M, False: 3.11M]
  ------------------
  183|  28.4M|        INT t1 = (r + j) << 1;
  184|  28.4M|        INT t2 = t1 + (mh << 1);
  185|  28.4M|        FIXP_DBL vr, vi, ur, ui;
  186|       |
  187|       |        // cplxMultDiv2(&vi, &vr, x[t2+1], x[t2], (FIXP_SGL)1.0, (FIXP_SGL)0.0);
  188|  28.4M|        vi = x[t2 + 1] >> 1;
  189|  28.4M|        vr = x[t2] >> 1;
  190|       |
  191|  28.4M|        ur = x[t1] >> 1;
  192|  28.4M|        ui = x[t1 + 1] >> 1;
  193|       |
  194|  28.4M|        x[t1] = ur + vr;
  195|  28.4M|        x[t1 + 1] = ui + vi;
  196|       |
  197|  28.4M|        x[t2] = ur - vr;
  198|  28.4M|        x[t2 + 1] = ui - vi;
  199|       |
  200|  28.4M|        t1 += mh;
  201|  28.4M|        t2 = t1 + (mh << 1);
  202|       |
  203|       |        // cplxMultDiv2(&vr, &vi, x[t2+1], x[t2], (FIXP_SGL)1.0, (FIXP_SGL)0.0);
  204|  28.4M|        vr = x[t2 + 1] >> 1;
  205|  28.4M|        vi = x[t2] >> 1;
  206|       |
  207|  28.4M|        ur = x[t1] >> 1;
  208|  28.4M|        ui = x[t1 + 1] >> 1;
  209|       |
  210|  28.4M|        x[t1] = ur + vr;
  211|  28.4M|        x[t1 + 1] = ui - vi;
  212|       |
  213|  28.4M|        x[t2] = ur - vr;
  214|  28.4M|        x[t2 + 1] = ui + vi;
  215|  28.4M|      }
  216|       |
  217|  3.11M|    } /* end of  block 1 */
  218|       |
  219|  28.4M|    for (j = 1; j < mh / 4; ++j) {
  ------------------
  |  Branch (219:17): [True: 25.3M, False: 3.11M]
  ------------------
  220|  25.3M|      FIXP_STP cs;
  ------------------
  |  |  236|  25.3M|#define FIXP_STP FIXP_SPK
  ------------------
  221|       |
  222|  25.3M|      cs = trigdata[j * trigstep];
  223|       |
  224|  85.5M|      for (r = 0; r < n; r += m) {
  ------------------
  |  Branch (224:19): [True: 60.2M, False: 25.3M]
  ------------------
  225|  60.2M|        INT t1 = (r + j) << 1;
  226|  60.2M|        INT t2 = t1 + (mh << 1);
  227|  60.2M|        FIXP_DBL vr, vi, ur, ui;
  228|       |
  229|  60.2M|        cplxMultDiv2(&vi, &vr, x[t2 + 1], x[t2], cs);
  230|       |
  231|  60.2M|        ur = x[t1] >> 1;
  232|  60.2M|        ui = x[t1 + 1] >> 1;
  233|       |
  234|  60.2M|        x[t1] = ur + vr;
  235|  60.2M|        x[t1 + 1] = ui + vi;
  236|       |
  237|  60.2M|        x[t2] = ur - vr;
  238|  60.2M|        x[t2 + 1] = ui - vi;
  239|       |
  240|  60.2M|        t1 += mh;
  241|  60.2M|        t2 = t1 + (mh << 1);
  242|       |
  243|  60.2M|        cplxMultDiv2(&vr, &vi, x[t2 + 1], x[t2], cs);
  244|       |
  245|  60.2M|        ur = x[t1] >> 1;
  246|  60.2M|        ui = x[t1 + 1] >> 1;
  247|       |
  248|  60.2M|        x[t1] = ur + vr;
  249|  60.2M|        x[t1 + 1] = ui - vi;
  250|       |
  251|  60.2M|        x[t2] = ur - vr;
  252|  60.2M|        x[t2 + 1] = ui + vi;
  253|       |
  254|       |        /* Same as above but for t1,t2 with j>mh/4 and thus cs swapped */
  255|  60.2M|        t1 = (r + mh / 2 - j) << 1;
  256|  60.2M|        t2 = t1 + (mh << 1);
  257|       |
  258|  60.2M|        cplxMultDiv2(&vi, &vr, x[t2], x[t2 + 1], cs);
  259|       |
  260|  60.2M|        ur = x[t1] >> 1;
  261|  60.2M|        ui = x[t1 + 1] >> 1;
  262|       |
  263|  60.2M|        x[t1] = ur + vr;
  264|  60.2M|        x[t1 + 1] = ui - vi;
  265|       |
  266|  60.2M|        x[t2] = ur - vr;
  267|  60.2M|        x[t2 + 1] = ui + vi;
  268|       |
  269|  60.2M|        t1 += mh;
  270|  60.2M|        t2 = t1 + (mh << 1);
  271|       |
  272|  60.2M|        cplxMultDiv2(&vr, &vi, x[t2], x[t2 + 1], cs);
  273|       |
  274|  60.2M|        ur = x[t1] >> 1;
  275|  60.2M|        ui = x[t1 + 1] >> 1;
  276|       |
  277|  60.2M|        x[t1] = ur - vr;
  278|  60.2M|        x[t1 + 1] = ui - vi;
  279|       |
  280|  60.2M|        x[t2] = ur + vr;
  281|  60.2M|        x[t2 + 1] = ui + vi;
  282|  60.2M|      }
  283|  25.3M|    }
  284|       |
  285|  3.11M|    { /* block 2 */
  286|  3.11M|      j = mh / 4;
  287|       |
  288|  31.5M|      for (r = 0; r < n; r += m) {
  ------------------
  |  Branch (288:19): [True: 28.4M, False: 3.11M]
  ------------------
  289|  28.4M|        INT t1 = (r + j) << 1;
  290|  28.4M|        INT t2 = t1 + (mh << 1);
  291|  28.4M|        FIXP_DBL vr, vi, ur, ui;
  292|       |
  293|  28.4M|        cplxMultDiv2(&vi, &vr, x[t2 + 1], x[t2], STC(0x5a82799a),
  ------------------
  |  |  237|  28.4M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  ------------------
  |  |  |  |  161|  28.4M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 28.4M]
  |  |  |  |  ------------------
  |  |  |  |  162|  28.4M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  28.4M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  28.4M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  28.4M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  28.4M|                           1))
  |  |  ------------------
  ------------------
  294|  28.4M|                     STC(0x5a82799a));
  ------------------
  |  |  237|  28.4M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  ------------------
  |  |  |  |  161|  28.4M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 28.4M]
  |  |  |  |  ------------------
  |  |  |  |  162|  28.4M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  28.4M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  28.4M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  28.4M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  28.4M|                           1))
  |  |  ------------------
  ------------------
  295|       |
  296|  28.4M|        ur = x[t1] >> 1;
  297|  28.4M|        ui = x[t1 + 1] >> 1;
  298|       |
  299|  28.4M|        x[t1] = ur + vr;
  300|  28.4M|        x[t1 + 1] = ui + vi;
  301|       |
  302|  28.4M|        x[t2] = ur - vr;
  303|  28.4M|        x[t2 + 1] = ui - vi;
  304|       |
  305|  28.4M|        t1 += mh;
  306|  28.4M|        t2 = t1 + (mh << 1);
  307|       |
  308|  28.4M|        cplxMultDiv2(&vr, &vi, x[t2 + 1], x[t2], STC(0x5a82799a),
  ------------------
  |  |  237|  28.4M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  ------------------
  |  |  |  |  161|  28.4M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 28.4M]
  |  |  |  |  ------------------
  |  |  |  |  162|  28.4M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  28.4M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  28.4M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  28.4M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  28.4M|                           1))
  |  |  ------------------
  ------------------
  309|  28.4M|                     STC(0x5a82799a));
  ------------------
  |  |  237|  28.4M|#define STC(a) (FX_DBL2FXCONST_SGL(a))
  |  |  ------------------
  |  |  |  |  161|  28.4M|  ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (161:5): [Folded, False: 28.4M]
  |  |  |  |  ------------------
  |  |  |  |  162|  28.4M|     (((LONG)1 << FRACT_BITS) - 1)) &&                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  163|  28.4M|    ((LONG)(val) > 0))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (163:5): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  164|  28.4M|       ? (FIXP_SGL)(SHORT)(((LONG)1 << (FRACT_BITS - 1)) - 1)                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  165|  28.4M|       : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                      : (FIXP_SGL)(SHORT)((((val) >> (DFRACT_BITS - FRACT_BITS - 1)) + 1) >> \
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  28.4M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  166|  28.4M|                           1))
  |  |  ------------------
  ------------------
  310|       |
  311|  28.4M|        ur = x[t1] >> 1;
  312|  28.4M|        ui = x[t1 + 1] >> 1;
  313|       |
  314|  28.4M|        x[t1] = ur + vr;
  315|  28.4M|        x[t1 + 1] = ui - vi;
  316|       |
  317|  28.4M|        x[t2] = ur - vr;
  318|  28.4M|        x[t2 + 1] = ui + vi;
  319|  28.4M|      }
  320|  3.11M|    } /* end of block 2 */
  321|  3.11M|  }
  322|   630k|}

_Z9CalcLdInti:
  378|  1.08M|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|  1.08M|  FDK_ASSERT((LD_INT_TAB_LEN > 0) &&
  ------------------
  |  |  221|  1.08M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, Folded]
  |  Branch (382:3): [True: 0, Folded]
  |  Branch (382:3): [True: 1.08M, Folded]
  ------------------
  383|  1.08M|             ((FIXP_DBL)ldIntCoeff[0] ==
  384|  1.08M|              (FIXP_DBL)0x80000001)); /* tab has to be initialized */
  385|       |
  386|  1.08M|  if ((i > 0) && (i < LD_INT_TAB_LEN))
  ------------------
  |  |  250|  1.08M|  193 /* Default tab length. Lower value should be set in fix.h */
  ------------------
  |  Branch (386:7): [True: 1.08M, False: 0]
  |  Branch (386:18): [True: 1.08M, False: 0]
  ------------------
  387|  1.08M|    return ldIntCoeff[i];
  388|      0|  else {
  389|      0|    return (0);
  390|      0|  }
  391|  1.08M|}
_Z9fMultNormiiPi:
  427|  10.5M|FIXP_DBL fMultNorm(FIXP_DBL f1, FIXP_DBL f2, INT *result_e) {
  428|  10.5M|  INT product = 0;
  429|  10.5M|  INT norm_f1, norm_f2;
  430|       |
  431|  10.5M|  if ((f1 == (FIXP_DBL)0) || (f2 == (FIXP_DBL)0)) {
  ------------------
  |  Branch (431:7): [True: 261k, False: 10.3M]
  |  Branch (431:30): [True: 959k, False: 9.36M]
  ------------------
  432|  1.22M|    *result_e = 0;
  433|  1.22M|    return (FIXP_DBL)0;
  434|  1.22M|  }
  435|  9.36M|  norm_f1 = CountLeadingBits(f1);
  ------------------
  |  |  309|  9.36M|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  436|  9.36M|  f1 = f1 << norm_f1;
  437|  9.36M|  norm_f2 = CountLeadingBits(f2);
  ------------------
  |  |  309|  9.36M|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  438|  9.36M|  f2 = f2 << norm_f2;
  439|       |
  440|  9.36M|  if ((f1 == (FIXP_DBL)MINVAL_DBL) && (f2 == (FIXP_DBL)MINVAL_DBL)) {
  ------------------
  |  |  158|  9.36M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
                if ((f1 == (FIXP_DBL)MINVAL_DBL) && (f2 == (FIXP_DBL)MINVAL_DBL)) {
  ------------------
  |  |  158|  2.05k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (440:7): [True: 2.05k, False: 9.36M]
  |  Branch (440:39): [True: 0, False: 2.05k]
  ------------------
  441|      0|    product = -((FIXP_DBL)MINVAL_DBL >> 1);
  ------------------
  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  442|      0|    *result_e = -(norm_f1 + norm_f2 - 1);
  443|  9.36M|  } else {
  444|  9.36M|    product = fMult(f1, f2);
  445|  9.36M|    *result_e = -(norm_f1 + norm_f2);
  446|  9.36M|  }
  447|       |
  448|  9.36M|  return (FIXP_DBL)product;
  449|  10.5M|}
_Z8fDivNormiiPi:
  453|   245M|FIXP_DBL fDivNorm(FIXP_DBL L_num, FIXP_DBL L_denum, INT *result_e) {
  454|   245M|  FIXP_DBL div;
  455|   245M|  INT norm_num, norm_den;
  456|       |
  457|   245M|  FDK_ASSERT(L_num >= (FIXP_DBL)0);
  ------------------
  |  |  221|   245M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (457:3): [True: 245M, False: 0]
  ------------------
  458|   245M|  FDK_ASSERT(L_denum > (FIXP_DBL)0);
  ------------------
  |  |  221|   245M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (458:3): [True: 245M, False: 0]
  ------------------
  459|       |
  460|   245M|  if (L_num == (FIXP_DBL)0) {
  ------------------
  |  Branch (460:7): [True: 535k, False: 245M]
  ------------------
  461|   535k|    *result_e = 0;
  462|   535k|    return ((FIXP_DBL)0);
  463|   535k|  }
  464|       |
  465|   245M|  norm_num = CountLeadingBits(L_num);
  ------------------
  |  |  309|   245M|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  466|   245M|  L_num = L_num << norm_num;
  467|   245M|  L_num = L_num >> 1;
  468|   245M|  *result_e = -norm_num + 1;
  469|       |
  470|   245M|  norm_den = CountLeadingBits(L_denum);
  ------------------
  |  |  309|   245M|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  471|   245M|  L_denum = L_denum << norm_den;
  472|   245M|  *result_e -= -norm_den;
  473|       |
  474|   245M|  div = schur_div(L_num, L_denum, FRACT_BITS);
  ------------------
  |  |  112|   245M|#define FRACT_BITS 16  /* single precision */
  ------------------
  475|       |
  476|   245M|  return div;
  477|   245M|}
_Z8fDivNormii:
  481|   187M|FIXP_DBL fDivNorm(FIXP_DBL num, FIXP_DBL denom) {
  482|   187M|  INT e;
  483|   187M|  FIXP_DBL res;
  484|       |
  485|   187M|  FDK_ASSERT(denom >= num);
  ------------------
  |  |  221|   187M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (485:3): [True: 187M, False: 0]
  ------------------
  486|       |
  487|   187M|  res = fDivNorm(num, denom, &e);
  488|       |
  489|       |  /* Avoid overflow since we must output a value with exponent 0
  490|       |     there is no other choice than saturating to almost 1.0f */
  491|   187M|  if (res == (FIXP_DBL)(1 << (DFRACT_BITS - 2)) && e == 1) {
  ------------------
  |  |  113|   187M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (491:7): [True: 1.16M, False: 186M]
  |  Branch (491:52): [True: 199k, False: 967k]
  ------------------
  492|   199k|    res = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|   199k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  493|   187M|  } else {
  494|   187M|    res = scaleValue(res, e);
  495|   187M|  }
  496|       |
  497|   187M|  return res;
  498|   187M|}
_Z14fDivNormSignediiPi:
  527|   232k|FIXP_DBL fDivNormSigned(FIXP_DBL L_num, FIXP_DBL L_denum, INT *result_e) {
  528|   232k|  FIXP_DBL div;
  529|   232k|  INT norm_num, norm_den;
  530|   232k|  int sign;
  531|       |
  532|   232k|  sign = ((L_num >= (FIXP_DBL)0) != (L_denum >= (FIXP_DBL)0));
  533|       |
  534|   232k|  if (L_num == (FIXP_DBL)0) {
  ------------------
  |  Branch (534:7): [True: 8.43k, False: 223k]
  ------------------
  535|  8.43k|    *result_e = 0;
  536|  8.43k|    return ((FIXP_DBL)0);
  537|  8.43k|  }
  538|   223k|  if (L_denum == (FIXP_DBL)0) {
  ------------------
  |  Branch (538:7): [True: 0, False: 223k]
  ------------------
  539|      0|    *result_e = 14;
  540|      0|    return ((FIXP_DBL)MAXVAL_DBL);
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  541|      0|  }
  542|       |
  543|   223k|  norm_num = CountLeadingBits(L_num);
  ------------------
  |  |  309|   223k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  544|   223k|  L_num = L_num << norm_num;
  545|   223k|  L_num = L_num >> 2;
  546|   223k|  L_num = fAbs(L_num);
  547|   223k|  *result_e = -norm_num + 1;
  548|       |
  549|   223k|  norm_den = CountLeadingBits(L_denum);
  ------------------
  |  |  309|   223k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  550|   223k|  L_denum = L_denum << norm_den;
  551|   223k|  L_denum = L_denum >> 1;
  552|   223k|  L_denum = fAbs(L_denum);
  553|   223k|  *result_e -= -norm_den;
  554|       |
  555|   223k|  div = schur_div(L_num, L_denum, FRACT_BITS);
  ------------------
  |  |  112|   223k|#define FRACT_BITS 16  /* single precision */
  ------------------
  556|       |
  557|   223k|  if (sign) {
  ------------------
  |  Branch (557:7): [True: 59.3k, False: 164k]
  ------------------
  558|  59.3k|    div = -div;
  559|  59.3k|  }
  560|       |
  561|   223k|  return div;
  562|   223k|}
_Z16fDivNormHighPreciiPi:
  566|   336k|FIXP_DBL fDivNormHighPrec(FIXP_DBL num, FIXP_DBL denom, INT *result_e) {
  567|   336k|  FIXP_DBL div;
  568|   336k|  INT norm_num, norm_den;
  569|       |
  570|   336k|  FDK_ASSERT(num >= (FIXP_DBL)0);
  ------------------
  |  |  221|   336k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (570:3): [True: 336k, False: 0]
  ------------------
  571|   336k|  FDK_ASSERT(denom > (FIXP_DBL)0);
  ------------------
  |  |  221|   336k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (571:3): [True: 336k, False: 0]
  ------------------
  572|       |
  573|   336k|  if (num == (FIXP_DBL)0) {
  ------------------
  |  Branch (573:7): [True: 0, False: 336k]
  ------------------
  574|      0|    *result_e = 0;
  575|      0|    return ((FIXP_DBL)0);
  576|      0|  }
  577|       |
  578|   336k|  norm_num = CountLeadingBits(num);
  ------------------
  |  |  309|   336k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  579|   336k|  num = num << norm_num;
  580|   336k|  num = num >> 1;
  581|   336k|  *result_e = -norm_num + 1;
  582|       |
  583|   336k|  norm_den = CountLeadingBits(denom);
  ------------------
  |  |  309|   336k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  584|   336k|  denom = denom << norm_den;
  585|   336k|  *result_e -= -norm_den;
  586|       |
  587|   336k|  div = schur_div(num, denom, 31);
  588|   336k|  return div;
  589|   336k|}
_Z5f2PowiiPi:
  593|  10.3M|FIXP_DBL f2Pow(const FIXP_DBL exp_m, const INT exp_e, INT *result_e) {
  594|  10.3M|  FIXP_DBL frac_part, result_m;
  595|  10.3M|  INT int_part;
  596|       |
  597|  10.3M|  if (exp_e > 0) {
  ------------------
  |  Branch (597:7): [True: 9.58M, False: 811k]
  ------------------
  598|  9.58M|    INT exp_bits = DFRACT_BITS - 1 - exp_e;
  ------------------
  |  |  113|  9.58M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  599|  9.58M|    int_part = exp_m >> exp_bits;
  600|  9.58M|    frac_part = exp_m - (FIXP_DBL)(int_part << exp_bits);
  601|  9.58M|    frac_part = frac_part << exp_e;
  602|  9.58M|  } else {
  603|   811k|    int_part = 0;
  604|   811k|    frac_part = exp_m >> -exp_e;
  605|   811k|  }
  606|       |
  607|       |  /* Best accuracy is around 0, so try to get there with the fractional part. */
  608|  10.3M|  if (frac_part > FL2FXCONST_DBL(0.5f)) {
  ------------------
  |  |  192|  10.3M|  (FIXP_DBL)(                                                                \
  |  |  193|  10.3M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 10.3M, Folded]
  |  |  ------------------
  |  |  194|  10.3M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  10.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  10.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 10.3M]
  |  |  ------------------
  |  |  195|  10.3M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  10.3M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  10.3M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  10.3M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  10.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  10.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  10.3M|          : ((((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: 5.17M, False: 5.22M]
  ------------------
  609|  5.17M|    int_part = int_part + 1;
  610|  5.17M|    frac_part = frac_part + FL2FXCONST_DBL(-1.0f);
  ------------------
  |  |  192|  5.17M|  (FIXP_DBL)(                                                                \
  |  |  193|  5.17M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 5.17M]
  |  |  ------------------
  |  |  194|  5.17M|          ? ((((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|  5.17M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  5.17M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.17M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 5.17M, Folded]
  |  |  ------------------
  |  |  199|  5.17M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  5.17M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  5.17M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  5.17M|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  5.17M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  5.17M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  5.17M|                 : (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|  5.17M|  }
  612|  10.3M|  if (frac_part < FL2FXCONST_DBL(-0.5f)) {
  ------------------
  |  |  192|  10.3M|  (FIXP_DBL)(                                                                \
  |  |  193|  10.3M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 10.3M]
  |  |  ------------------
  |  |  194|  10.3M|          ? ((((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|  10.3M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  10.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  10.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 10.3M]
  |  |  ------------------
  |  |  199|  10.3M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  10.3M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  10.3M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  10.3M|                 ? (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|  10.3M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  10.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  10.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (612:7): [True: 4.95k, False: 10.3M]
  ------------------
  613|  4.95k|    int_part = int_part - 1;
  614|  4.95k|    frac_part = -(FL2FXCONST_DBL(-1.0f) - frac_part);
  ------------------
  |  |  192|  4.95k|  (FIXP_DBL)(                                                                \
  |  |  193|  4.95k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 4.95k]
  |  |  ------------------
  |  |  194|  4.95k|          ? ((((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|  4.95k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  4.95k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.95k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 4.95k, Folded]
  |  |  ------------------
  |  |  199|  4.95k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  4.95k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  4.95k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  4.95k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  4.95k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  4.95k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  4.95k|                 : (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|  4.95k|  }
  616|       |
  617|       |  /* "+ 1" compensates fMultAddDiv2() of the polynomial evaluation below. */
  618|  10.3M|  *result_e = int_part + 1;
  619|       |
  620|       |  /* Evaluate taylor polynomial which approximates 2^x */
  621|  10.3M|  {
  622|  10.3M|    FIXP_DBL p;
  623|       |
  624|       |    /* result_m ~= 2^frac_part */
  625|  10.3M|    p = frac_part;
  626|       |    /* First taylor series coefficient a_0 = 1.0, scaled by 0.5 due to
  627|       |     * fMultDiv2(). */
  628|  10.3M|    result_m = FL2FXCONST_DBL(1.0f / 2.0f);
  ------------------
  |  |  192|  10.3M|  (FIXP_DBL)(                                                                \
  |  |  193|  10.3M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 10.3M, Folded]
  |  |  ------------------
  |  |  194|  10.3M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  10.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  10.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 10.3M]
  |  |  ------------------
  |  |  195|  10.3M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  10.3M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  10.3M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  10.3M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  10.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  10.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  10.3M|          : ((((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|  62.3M|    for (INT i = 0; i < POW2_PRECISION; i++) {
  ------------------
  |  |  128|  62.3M|#define POW2_PRECISION 5
  ------------------
  |  Branch (629:21): [True: 51.9M, False: 10.3M]
  ------------------
  630|       |      /* next taylor series term: a_i * x^i, x=0 */
  631|  51.9M|      result_m = fMultAddDiv2(result_m, pow2Coeff[i], p);
  632|  51.9M|      p = fMult(p, frac_part);
  633|  51.9M|    }
  634|  10.3M|  }
  635|  10.3M|  return result_m;
  636|  10.3M|}
_Z4fPowiiiiPi:
  649|   624k|              INT *result_e) {
  650|   624k|  INT ans_lg2_e, baselg2_e;
  651|   624k|  FIXP_DBL base_lg2, ans_lg2, result;
  652|       |
  653|   624k|  if (base_m <= (FIXP_DBL)0) {
  ------------------
  |  Branch (653:7): [True: 0, False: 624k]
  ------------------
  654|      0|    result = (FIXP_DBL)0;
  655|      0|    *result_e = 0;
  656|      0|    return result;
  657|      0|  }
  658|       |
  659|       |  /* Calc log2 of base */
  660|   624k|  base_lg2 = fLog2(base_m, base_e, &baselg2_e);
  661|       |
  662|       |  /* Prepare exp */
  663|   624k|  {
  664|   624k|    INT leadingBits;
  665|       |
  666|   624k|    leadingBits = CountLeadingBits(fAbs(exp_m));
  ------------------
  |  |  309|   624k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  667|   624k|    exp_m = exp_m << leadingBits;
  668|   624k|    exp_e -= leadingBits;
  669|   624k|  }
  670|       |
  671|       |  /* Calc base pow exp */
  672|   624k|  ans_lg2 = fMult(base_lg2, exp_m);
  673|   624k|  ans_lg2_e = exp_e + baselg2_e;
  674|       |
  675|       |  /* Calc antilog */
  676|   624k|  result = f2Pow(ans_lg2, ans_lg2_e, result_e);
  677|       |
  678|   624k|  return result;
  679|   624k|}
_Z6fLdPowiiiiPi:
  682|   394k|                INT *result_e) {
  683|   394k|  INT ans_lg2_e;
  684|   394k|  FIXP_DBL ans_lg2, result;
  685|       |
  686|       |  /* Prepare exp */
  687|   394k|  {
  688|   394k|    INT leadingBits;
  689|       |
  690|   394k|    leadingBits = CountLeadingBits(fAbs(exp_m));
  ------------------
  |  |  309|   394k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  691|   394k|    exp_m = exp_m << leadingBits;
  692|   394k|    exp_e -= leadingBits;
  693|   394k|  }
  694|       |
  695|       |  /* Calc base pow exp */
  696|   394k|  ans_lg2 = fMult(baseLd_m, exp_m);
  697|   394k|  ans_lg2_e = exp_e + baseLd_e;
  698|       |
  699|       |  /* Calc antilog */
  700|   394k|  result = f2Pow(ans_lg2, ans_lg2_e, result_e);
  701|       |
  702|   394k|  return result;
  703|   394k|}
_Z7fPowIntiiiPi:
  714|  3.04k|FIXP_DBL fPowInt(FIXP_DBL base_m, INT base_e, INT exp, INT *pResult_e) {
  715|  3.04k|  FIXP_DBL result;
  716|       |
  717|  3.04k|  if (exp != 0) {
  ------------------
  |  Branch (717:7): [True: 1.02k, False: 2.01k]
  ------------------
  718|  1.02k|    INT result_e = 0;
  719|       |
  720|  1.02k|    if (base_m != (FIXP_DBL)0) {
  ------------------
  |  Branch (720:9): [True: 1.02k, False: 0]
  ------------------
  721|  1.02k|      {
  722|  1.02k|        INT leadingBits;
  723|  1.02k|        leadingBits = CountLeadingBits(base_m);
  ------------------
  |  |  309|  1.02k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  724|  1.02k|        base_m <<= leadingBits;
  725|  1.02k|        base_e -= leadingBits;
  726|  1.02k|      }
  727|       |
  728|  1.02k|      result = base_m;
  729|       |
  730|  1.02k|      {
  731|  1.02k|        int i;
  732|  5.97k|        for (i = 1; i < fAbs(exp); i++) {
  ------------------
  |  Branch (732:21): [True: 4.94k, False: 1.02k]
  ------------------
  733|  4.94k|          result = fMult(result, base_m);
  734|  4.94k|        }
  735|  1.02k|      }
  736|       |
  737|  1.02k|      if (exp < 0) {
  ------------------
  |  Branch (737:11): [True: 0, False: 1.02k]
  ------------------
  738|       |        /* 1.0 / ans */
  739|      0|        result = fDivNorm(FL2FXCONST_DBL(0.5f), result, &result_e);
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  740|      0|        result_e++;
  741|  1.02k|      } else {
  742|  1.02k|        int ansScale = CountLeadingBits(result);
  ------------------
  |  |  309|  1.02k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  743|  1.02k|        result <<= ansScale;
  744|  1.02k|        result_e -= ansScale;
  745|  1.02k|      }
  746|       |
  747|  1.02k|      result_e += exp * base_e;
  748|       |
  749|  1.02k|    } else {
  750|      0|      result = (FIXP_DBL)0;
  751|      0|    }
  752|  1.02k|    *pResult_e = result_e;
  753|  2.01k|  } else {
  754|  2.01k|    result = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  2.01k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.01k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.01k, Folded]
  |  |  ------------------
  |  |  194|  2.01k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.01k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.01k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.01k]
  |  |  ------------------
  |  |  195|  2.01k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.01k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.01k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.01k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.01k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.01k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.01k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  755|  2.01k|    *pResult_e = 1;
  756|  2.01k|  }
  757|       |
  758|  3.04k|  return result;
  759|  3.04k|}
_Z8CalcLog2iiPi:
  763|  3.34M|FIXP_DBL CalcLog2(FIXP_DBL base_m, INT base_e, INT *result_e) {
  764|  3.34M|  return fLog2(base_m, base_e, result_e);
  765|  3.34M|}

_Z9mdct_initP6mdct_tPii:
  109|  1.97M|void mdct_init(H_MDCT hMdct, FIXP_DBL *overlap, INT overlapBufferSize) {
  110|  1.97M|  hMdct->overlap.freq = overlap;
  111|       |  // FDKmemclear(overlap, overlapBufferSize*sizeof(FIXP_DBL));
  112|  1.97M|  hMdct->prev_fr = 0;
  113|  1.97M|  hMdct->prev_nr = 0;
  114|  1.97M|  hMdct->prev_tl = 0;
  115|  1.97M|  hMdct->ov_size = overlapBufferSize;
  116|  1.97M|  hMdct->prevAliasSymmetry = 0;
  117|  1.97M|  hMdct->prevPrevAliasSymmetry = 0;
  118|  1.97M|  hMdct->pFacZir = NULL;
  119|       |  hMdct->pAsymOvlp = NULL;
  120|  1.97M|}
_Z10imdct_gainPiS_i:
  272|   683k|void imdct_gain(FIXP_DBL *pGain_m, int *pGain_e, int tl) {
  273|   683k|  FIXP_DBL gain_m = *pGain_m;
  274|   683k|  int gain_e = *pGain_e;
  275|   683k|  int log2_tl;
  276|       |
  277|   683k|  gain_e += -MDCT_OUTPUT_GAIN - MDCT_OUT_HEADROOM + 1;
  ------------------
  |  |  115|   683k|#define MDCT_OUTPUT_GAIN 16
  ------------------
                gain_e += -MDCT_OUTPUT_GAIN - MDCT_OUT_HEADROOM + 1;
  ------------------
  |  |  108|   683k|#define MDCT_OUT_HEADROOM 2 /* Output additional headroom */
  ------------------
  278|   683k|  if (tl == 0) {
  ------------------
  |  Branch (278:7): [True: 21.7k, False: 661k]
  ------------------
  279|       |    /* Dont regard the 2/N factor from the IDCT. It is compensated for somewhere
  280|       |     * else. */
  281|  21.7k|    *pGain_e = gain_e;
  282|  21.7k|    return;
  283|  21.7k|  }
  284|       |
  285|   661k|  log2_tl = DFRACT_BITS - 1 - fNormz((FIXP_DBL)tl);
  ------------------
  |  |  113|   661k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  286|   661k|  gain_e += -log2_tl;
  287|       |
  288|       |  /* Detect non-radix 2 transform length and add amplitude compensation factor
  289|       |     which cannot be included into the exponent above */
  290|   661k|  switch ((tl) >> (log2_tl - 2)) {
  291|   201k|    case 0x7: /* 10 ms, 1/tl = 1.0/(FDKpow(2.0, -log2_tl) *
  ------------------
  |  Branch (291:5): [True: 201k, False: 459k]
  ------------------
  292|       |                 0.53333333333333333333) */
  293|   201k|      if (gain_m == (FIXP_DBL)0) {
  ------------------
  |  Branch (293:11): [True: 201k, False: 0]
  ------------------
  294|   201k|        gain_m = FL2FXCONST_DBL(0.53333333333333333333f);
  ------------------
  |  |  192|   201k|  (FIXP_DBL)(                                                                \
  |  |  193|   201k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 201k, Folded]
  |  |  ------------------
  |  |  194|   201k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   201k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   201k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 201k]
  |  |  ------------------
  |  |  195|   201k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   201k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   201k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   201k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   201k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   201k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   201k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  295|   201k|      } else {
  296|      0|        gain_m = fMult(gain_m, FL2FXCONST_DBL(0.53333333333333333333f));
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  297|      0|      }
  298|   201k|      break;
  299|   176k|    case 0x6: /* 3/4 of radix 2, 1/tl = 1.0/(FDKpow(2.0, -log2_tl) * 2.0/3.0) */
  ------------------
  |  Branch (299:5): [True: 176k, False: 484k]
  ------------------
  300|   176k|      if (gain_m == (FIXP_DBL)0) {
  ------------------
  |  Branch (300:11): [True: 150k, False: 26.5k]
  ------------------
  301|   150k|        gain_m = FL2FXCONST_DBL(2.0 / 3.0f);
  ------------------
  |  |  192|   150k|  (FIXP_DBL)(                                                                \
  |  |  193|   150k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 150k, Folded]
  |  |  ------------------
  |  |  194|   150k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   150k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   150k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 150k]
  |  |  ------------------
  |  |  195|   150k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   150k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   150k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   150k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   150k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   150k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   150k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  302|   150k|      } else {
  303|  26.5k|        gain_m = fMult(gain_m, FL2FXCONST_DBL(2.0 / 3.0f));
  ------------------
  |  |  192|  26.5k|  (FIXP_DBL)(                                                                \
  |  |  193|  26.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 26.5k, Folded]
  |  |  ------------------
  |  |  194|  26.5k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  26.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 26.5k]
  |  |  ------------------
  |  |  195|  26.5k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  26.5k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  26.5k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  26.5k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  26.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  26.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  304|  26.5k|      }
  305|   176k|      break;
  306|    132|    case 0x5: /* 0.8 of radix 2 (e.g. tl 160), 1/tl = 1.0/(FDKpow(2.0, -log2_tl)
  ------------------
  |  Branch (306:5): [True: 132, False: 661k]
  ------------------
  307|       |               * 0.8/1.5) */
  308|    132|      if (gain_m == (FIXP_DBL)0) {
  ------------------
  |  Branch (308:11): [True: 132, False: 0]
  ------------------
  309|    132|        gain_m = FL2FXCONST_DBL(0.53333333333333333333f);
  ------------------
  |  |  192|    132|  (FIXP_DBL)(                                                                \
  |  |  193|    132|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 132, Folded]
  |  |  ------------------
  |  |  194|    132|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    132|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    132|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 132]
  |  |  ------------------
  |  |  195|    132|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    132|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    132|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    132|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    132|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    132|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    132|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  310|    132|      } else {
  311|      0|        gain_m = fMult(gain_m, FL2FXCONST_DBL(0.53333333333333333333f));
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  312|      0|      }
  313|    132|      break;
  314|   283k|    case 0x4:
  ------------------
  |  Branch (314:5): [True: 283k, False: 378k]
  ------------------
  315|       |      /* radix 2, nothing to do. */
  316|   283k|      break;
  317|      0|    default:
  ------------------
  |  Branch (317:5): [True: 0, False: 661k]
  ------------------
  318|       |      /* unsupported */
  319|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (319:7): [Folded, False: 0]
  ------------------
  320|      0|      break;
  321|   661k|  }
  322|       |
  323|   661k|  *pGain_m = gain_m;
  324|   661k|  *pGain_e = gain_e;
  325|   661k|}
_Z11imdct_drainP6mdct_tPii:
  327|  53.2k|INT imdct_drain(H_MDCT hMdct, FIXP_DBL *output, INT nrSamplesRoom) {
  328|  53.2k|  int buffered_samples = 0;
  329|       |
  330|  53.2k|  if (nrSamplesRoom > 0) {
  ------------------
  |  Branch (330:7): [True: 22.0k, False: 31.1k]
  ------------------
  331|  22.0k|    buffered_samples = hMdct->ov_offset;
  332|       |
  333|  22.0k|    FDK_ASSERT(buffered_samples <= nrSamplesRoom);
  ------------------
  |  |  221|  22.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (333:5): [True: 22.0k, False: 0]
  ------------------
  334|       |
  335|  22.0k|    if (buffered_samples > 0) {
  ------------------
  |  Branch (335:9): [True: 3.13k, False: 18.9k]
  ------------------
  336|  3.13k|      FDKmemcpy(output, hMdct->overlap.time,
  337|  3.13k|                buffered_samples * sizeof(FIXP_DBL));
  338|  3.13k|      hMdct->ov_offset = 0;
  339|  3.13k|    }
  340|  22.0k|  }
  341|  53.2k|  return buffered_samples;
  342|  53.2k|}
_Z20imdct_copy_ov_and_nrP6mdct_tPii:
  344|  42.4k|INT imdct_copy_ov_and_nr(H_MDCT hMdct, FIXP_DBL *pTimeData, INT nrSamples) {
  345|  42.4k|  FIXP_DBL *pOvl;
  346|  42.4k|  int nt, nf, i;
  347|       |
  348|  42.4k|  nt = fMin(hMdct->ov_offset, nrSamples);
  349|  42.4k|  nrSamples -= nt;
  350|  42.4k|  nf = fMin(hMdct->prev_nr, nrSamples);
  351|  42.4k|  FDKmemcpy(pTimeData, hMdct->overlap.time, nt * sizeof(FIXP_DBL));
  352|  42.4k|  pTimeData += nt;
  353|       |
  354|  42.4k|  pOvl = hMdct->overlap.freq + hMdct->ov_size - 1;
  355|  42.4k|  if (hMdct->prevPrevAliasSymmetry == 0) {
  ------------------
  |  Branch (355:7): [True: 42.4k, False: 0]
  ------------------
  356|   419k|    for (i = 0; i < nf; i++) {
  ------------------
  |  Branch (356:17): [True: 377k, False: 42.4k]
  ------------------
  357|   377k|      FIXP_DBL x = -(*pOvl--);
  358|   377k|      *pTimeData = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|   377k|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  359|   377k|      pTimeData++;
  360|   377k|    }
  361|  42.4k|  } else {
  362|      0|    for (i = 0; i < nf; i++) {
  ------------------
  |  Branch (362:17): [True: 0, False: 0]
  ------------------
  363|      0|      FIXP_DBL x = (*pOvl--);
  364|      0|      *pTimeData = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|      0|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  365|      0|      pTimeData++;
  366|      0|    }
  367|      0|  }
  368|       |
  369|  42.4k|  return (nt + nf);
  370|  42.4k|}
_Z22imdct_adapt_parametersP6mdct_tPiS1_iPK8FIXP_SPKi:
  373|   108k|                            const FIXP_WTP *wls, int noOutSamples) {
  374|   108k|  int fl = *pfl, nl = *pnl;
  375|   108k|  int window_diff, use_current = 0, use_previous = 0;
  376|   108k|  if (hMdct->prev_tl == 0) {
  ------------------
  |  Branch (376:7): [True: 27.8k, False: 80.9k]
  ------------------
  377|  27.8k|    hMdct->prev_wrs = wls;
  378|  27.8k|    hMdct->prev_fr = fl;
  379|  27.8k|    hMdct->prev_nr = (noOutSamples - fl) >> 1;
  380|  27.8k|    hMdct->prev_tl = noOutSamples;
  381|  27.8k|    hMdct->ov_offset = 0;
  382|  27.8k|    use_current = 1;
  383|  27.8k|  }
  384|       |
  385|   108k|  window_diff = (hMdct->prev_fr - fl) >> 1;
  386|       |
  387|       |  /* check if the previous window slope can be adjusted to match the current
  388|       |   * window slope */
  389|   108k|  if (hMdct->prev_nr + window_diff > 0) {
  ------------------
  |  Branch (389:7): [True: 47.8k, False: 61.0k]
  ------------------
  390|  47.8k|    use_current = 1;
  391|  47.8k|  }
  392|       |  /* check if the current window slope can be adjusted to match the previous
  393|       |   * window slope */
  394|   108k|  if (nl - window_diff > 0) {
  ------------------
  |  Branch (394:7): [True: 51.0k, False: 57.8k]
  ------------------
  395|  51.0k|    use_previous = 1;
  396|  51.0k|  }
  397|       |
  398|       |  /* if both is possible choose the larger of both window slope lengths */
  399|   108k|  if (use_current && use_previous) {
  ------------------
  |  Branch (399:7): [True: 63.7k, False: 45.1k]
  |  Branch (399:22): [True: 5.86k, False: 57.8k]
  ------------------
  400|  5.86k|    if (fl < hMdct->prev_fr) {
  ------------------
  |  Branch (400:9): [True: 419, False: 5.44k]
  ------------------
  401|    419|      use_current = 0;
  402|    419|    }
  403|  5.86k|  }
  404|       |  /*
  405|       |   * If the previous transform block is big enough, enlarge previous window
  406|       |   * overlap, if not, then shrink current window overlap.
  407|       |   */
  408|   108k|  if (use_current) {
  ------------------
  |  Branch (408:7): [True: 63.3k, False: 45.5k]
  ------------------
  409|  63.3k|    hMdct->prev_nr += window_diff;
  410|  63.3k|    hMdct->prev_fr = fl;
  411|  63.3k|    hMdct->prev_wrs = wls;
  412|  63.3k|  } else {
  413|  45.5k|    nl -= window_diff;
  414|  45.5k|    fl = hMdct->prev_fr;
  415|  45.5k|  }
  416|       |
  417|   108k|  *pfl = fl;
  418|   108k|  *pnl = nl;
  419|   108k|}
_Z10imlt_blockP6mdct_tPiS1_PKsiiiPK8FIXP_SPKiS6_iii:
  469|   348k|               int flags) {
  470|   348k|  FIXP_DBL *pOvl;
  471|   348k|  FIXP_DBL *pOut0 = output, *pOut1;
  472|   348k|  INT nl, nr;
  473|   348k|  int w, i, nrSamples = 0, specShiftScale, transform_gain_e = 0;
  474|   348k|  int currAliasSymmetry = (flags & MLT_FLAG_CURR_ALIAS_SYMMETRY);
  ------------------
  |  |  122|   348k|#define MLT_FLAG_CURR_ALIAS_SYMMETRY 1
  ------------------
  475|       |
  476|       |  /* Derive NR and NL */
  477|   348k|  nr = (tl - fr) >> 1;
  478|   348k|  nl = (tl - fl) >> 1;
  479|       |
  480|       |  /* Include 2/N IMDCT gain into gain factor and exponent. */
  481|   348k|  imdct_gain(&gain, &transform_gain_e, tl);
  482|       |
  483|       |  /* Detect FRprevious / FL mismatches and override parameters accordingly */
  484|   348k|  if (hMdct->prev_fr != fl) {
  ------------------
  |  Branch (484:7): [True: 97.7k, False: 250k]
  ------------------
  485|  97.7k|    imdct_adapt_parameters(hMdct, &fl, &nl, tl, wls, noOutSamples);
  486|  97.7k|  }
  487|       |
  488|   348k|  pOvl = hMdct->overlap.freq + hMdct->ov_size - 1;
  489|       |
  490|   348k|  if (noOutSamples > nrSamples) {
  ------------------
  |  Branch (490:7): [True: 345k, False: 2.41k]
  ------------------
  491|       |    /* Purge buffered output. */
  492|  42.3M|    for (i = 0; i < hMdct->ov_offset; i++) {
  ------------------
  |  Branch (492:17): [True: 42.0M, False: 345k]
  ------------------
  493|  42.0M|      *pOut0 = hMdct->overlap.time[i];
  494|  42.0M|      pOut0++;
  495|  42.0M|    }
  496|   345k|    nrSamples = hMdct->ov_offset;
  497|   345k|    hMdct->ov_offset = 0;
  498|   345k|  }
  499|       |
  500|  1.37M|  for (w = 0; w < nSpec; w++) {
  ------------------
  |  Branch (500:15): [True: 1.02M, False: 348k]
  ------------------
  501|  1.02M|    FIXP_DBL *pSpec, *pCurr;
  502|  1.02M|    const FIXP_WTP *pWindow;
  503|       |
  504|       |    /* Detect FRprevious / FL mismatches and override parameters accordingly */
  505|  1.02M|    if (hMdct->prev_fr != fl) {
  ------------------
  |  Branch (505:9): [True: 0, False: 1.02M]
  ------------------
  506|      0|      imdct_adapt_parameters(hMdct, &fl, &nl, tl, wls, noOutSamples);
  507|      0|    }
  508|       |
  509|  1.02M|    specShiftScale = transform_gain_e;
  510|       |
  511|       |    /* Setup window pointers */
  512|  1.02M|    pWindow = hMdct->prev_wrs;
  513|       |
  514|       |    /* Current spectrum */
  515|  1.02M|    pSpec = spectrum + w * tl;
  516|       |
  517|       |    /* DCT IV of current spectrum. */
  518|  1.02M|    if (currAliasSymmetry == 0) {
  ------------------
  |  Branch (518:9): [True: 1.02M, False: 0]
  ------------------
  519|  1.02M|      if (hMdct->prevAliasSymmetry == 0) {
  ------------------
  |  Branch (519:11): [True: 1.02M, False: 0]
  ------------------
  520|  1.02M|        dct_IV(pSpec, tl, &specShiftScale);
  521|  1.02M|      } else {
  522|      0|        FIXP_DBL _tmp[1024 + ALIGNMENT_DEFAULT / sizeof(FIXP_DBL)];
  523|      0|        FIXP_DBL *tmp = (FIXP_DBL *)ALIGN_PTR(_tmp);
  ------------------
  |  |  312|      0|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|      0|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|      0|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|      0|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  524|      0|        C_ALLOC_ALIGNED_REGISTER(tmp, sizeof(_tmp));
  525|      0|        dct_III(pSpec, tmp, tl, &specShiftScale);
  526|      0|        C_ALLOC_ALIGNED_UNREGISTER(tmp);
  527|      0|      }
  528|  1.02M|    } else {
  529|      0|      if (hMdct->prevAliasSymmetry == 0) {
  ------------------
  |  Branch (529:11): [True: 0, False: 0]
  ------------------
  530|      0|        FIXP_DBL _tmp[1024 + ALIGNMENT_DEFAULT / sizeof(FIXP_DBL)];
  531|      0|        FIXP_DBL *tmp = (FIXP_DBL *)ALIGN_PTR(_tmp);
  ------------------
  |  |  312|      0|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|      0|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|      0|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|      0|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|      0|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  532|      0|        C_ALLOC_ALIGNED_REGISTER(tmp, sizeof(_tmp));
  533|      0|        dst_III(pSpec, tmp, tl, &specShiftScale);
  534|      0|        C_ALLOC_ALIGNED_UNREGISTER(tmp);
  535|      0|      } else {
  536|      0|        dst_IV(pSpec, tl, &specShiftScale);
  537|      0|      }
  538|      0|    }
  539|       |
  540|       |    /* Optional scaling of time domain - no yet windowed - of current spectrum
  541|       |     */
  542|       |    /* and de-scale current spectrum signal (time domain, no yet windowed) */
  543|  1.02M|    if (gain != (FIXP_DBL)0) {
  ------------------
  |  Branch (543:9): [True: 600k, False: 421k]
  ------------------
  544|   135M|      for (i = 0; i < tl; i++) {
  ------------------
  |  Branch (544:19): [True: 135M, False: 600k]
  ------------------
  545|   135M|        pSpec[i] = fMult(pSpec[i], gain);
  546|   135M|      }
  547|   600k|    }
  548|       |
  549|  1.02M|    {
  550|  1.02M|      int loc_scale =
  551|  1.02M|          fixmin_I(scalefactor[w] + specShiftScale, (INT)DFRACT_BITS - 1);
  ------------------
  |  |  127|  1.02M|#define fixmin_I(a, b) fixmin(a, b)
  ------------------
  552|  1.02M|      DWORD_ALIGNED(pSpec);
  ------------------
  |  |  291|  1.02M|#define DWORD_ALIGNED(x) C_ALLOC_ALIGNED_CHECK2((const void *)(x), 4);
  ------------------
  553|  1.02M|      scaleValuesSaturate(pSpec, tl, loc_scale);
  554|  1.02M|    }
  555|       |
  556|  1.02M|    if (noOutSamples <= nrSamples) {
  ------------------
  |  Branch (556:9): [True: 291k, False: 731k]
  ------------------
  557|       |      /* Divert output first half to overlap buffer if we already got enough
  558|       |       * output samples. */
  559|   291k|      pOut0 = hMdct->overlap.time + hMdct->ov_offset;
  560|   291k|      hMdct->ov_offset += hMdct->prev_nr + fl / 2;
  561|   731k|    } else {
  562|       |      /* Account output samples */
  563|   731k|      nrSamples += hMdct->prev_nr + fl / 2;
  564|   731k|    }
  565|       |
  566|       |    /* NR output samples 0 .. NR. -overlap[TL/2..TL/2-NR] */
  567|  1.02M|    if ((hMdct->pFacZir != 0) && (hMdct->prev_nr == fl / 2)) {
  ------------------
  |  Branch (567:9): [True: 4.76k, False: 1.01M]
  |  Branch (567:34): [True: 468, False: 4.29k]
  ------------------
  568|       |      /* In the case of ACELP -> TCX20 -> FD short add FAC ZIR on nr signal part
  569|       |       */
  570|  27.4k|      for (i = 0; i < hMdct->prev_nr; i++) {
  ------------------
  |  Branch (570:19): [True: 27.0k, False: 468]
  ------------------
  571|  27.0k|        FIXP_DBL x = -(*pOvl--);
  572|  27.0k|        *pOut0 = fAddSaturate(x, IMDCT_SCALE_DBL(hMdct->pFacZir[i]));
  ------------------
  |  |  119|  27.0k|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  573|  27.0k|        pOut0++;
  574|  27.0k|      }
  575|    468|      hMdct->pFacZir = NULL;
  576|  1.02M|    } else {
  577|       |      /* Here we implement a simplified version of what happens after the this
  578|       |      piece of code (see the comments below). We implement the folding of C and
  579|       |      D segments from (-D-Cr) but D is zero, because in this part of the MDCT
  580|       |      sequence the window coefficients with which D must be multiplied are zero.
  581|       |      "pOut0" writes sequentially the C block from left to right.   */
  582|  1.02M|      if (hMdct->prevPrevAliasSymmetry == 0) {
  ------------------
  |  Branch (582:11): [True: 1.02M, False: 0]
  ------------------
  583|  29.6M|        for (i = 0; i < hMdct->prev_nr; i++) {
  ------------------
  |  Branch (583:21): [True: 28.6M, False: 1.02M]
  ------------------
  584|  28.6M|          FIXP_DBL x = -(*pOvl--);
  585|  28.6M|          *pOut0 = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|  28.6M|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  586|  28.6M|          pOut0++;
  587|  28.6M|        }
  588|  1.02M|      } else {
  589|      0|        for (i = 0; i < hMdct->prev_nr; i++) {
  ------------------
  |  Branch (589:21): [True: 0, False: 0]
  ------------------
  590|      0|          FIXP_DBL x = *pOvl--;
  591|      0|          *pOut0 = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|      0|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  592|      0|          pOut0++;
  593|      0|        }
  594|      0|      }
  595|  1.02M|    }
  596|       |
  597|  1.02M|    if (noOutSamples <= nrSamples) {
  ------------------
  |  Branch (597:9): [True: 398k, False: 623k]
  ------------------
  598|       |      /* Divert output second half to overlap buffer if we already got enough
  599|       |       * output samples. */
  600|   398k|      pOut1 = hMdct->overlap.time + hMdct->ov_offset + fl / 2 - 1;
  601|   398k|      hMdct->ov_offset += fl / 2 + nl;
  602|   623k|    } else {
  603|   623k|      pOut1 = pOut0 + (fl - 1);
  604|   623k|      nrSamples += fl / 2 + nl;
  605|   623k|    }
  606|       |
  607|       |    /* output samples before window crossing point NR .. TL/2.
  608|       |     * -overlap[TL/2-NR..TL/2-NR-FL/2] + current[NR..TL/2] */
  609|       |    /* output samples after window crossing point TL/2 .. TL/2+FL/2.
  610|       |     * -overlap[0..FL/2] - current[TL/2..FL/2] */
  611|  1.02M|    pCurr = pSpec + tl - fl / 2;
  612|  1.02M|    DWORD_ALIGNED(pCurr);
  ------------------
  |  |  291|  1.02M|#define DWORD_ALIGNED(x) C_ALLOC_ALIGNED_CHECK2((const void *)(x), 4);
  ------------------
  613|  1.02M|    C_ALLOC_ALIGNED_REGISTER(pWindow, fl);
  614|  1.02M|    DWORD_ALIGNED(pWindow);
  ------------------
  |  |  291|  1.02M|#define DWORD_ALIGNED(x) C_ALLOC_ALIGNED_CHECK2((const void *)(x), 4);
  ------------------
  615|  1.02M|    C_ALLOC_ALIGNED_UNREGISTER(pWindow);
  616|       |
  617|  1.02M|    if (hMdct->prevPrevAliasSymmetry == 0) {
  ------------------
  |  Branch (617:9): [True: 1.02M, False: 0]
  ------------------
  618|  1.02M|      if (hMdct->prevAliasSymmetry == 0) {
  ------------------
  |  Branch (618:11): [True: 1.02M, False: 0]
  ------------------
  619|  1.02M|        if (!hMdct->pAsymOvlp) {
  ------------------
  |  Branch (619:13): [True: 1.02M, False: 0]
  ------------------
  620|   125M|          for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (620:23): [True: 124M, False: 1.02M]
  ------------------
  621|   124M|            FIXP_DBL x0, x1;
  622|   124M|            cplxMultDiv2(&x1, &x0, *pCurr++, -*pOvl--, pWindow[i]);
  623|   124M|            *pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|   124M|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|   124M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 3.27M, False: 121M]
  |  |  |  |  ------------------
  |  |  |  |  271|   124M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|   124M|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 9.02M, False: 112M]
  |  |  |  |  ------------------
  |  |  |  |  273|   121M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|   121M|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  624|   124M|            *pOut1 = IMDCT_SCALE_DBL_LSH1(-x1);
  ------------------
  |  |  120|   124M|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|   124M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 7.41M, False: 117M]
  |  |  |  |  ------------------
  |  |  |  |  271|   124M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|   124M|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 3.69M, False: 113M]
  |  |  |  |  ------------------
  |  |  |  |  273|   117M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|   117M|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  625|   124M|            pOut0++;
  626|   124M|            pOut1--;
  627|   124M|          }
  628|  1.02M|        } else {
  629|      0|          FIXP_DBL *pAsymOvl = hMdct->pAsymOvlp + fl / 2 - 1;
  630|      0|          for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (630:23): [True: 0, False: 0]
  ------------------
  631|      0|            FIXP_DBL x0, x1;
  632|      0|            x1 = -fMultDiv2(*pCurr, pWindow[i].v.re) +
  633|      0|                 fMultDiv2(*pAsymOvl, pWindow[i].v.im);
  634|      0|            x0 = fMultDiv2(*pCurr, pWindow[i].v.im) -
  635|      0|                 fMultDiv2(*pOvl, pWindow[i].v.re);
  636|      0|            pCurr++;
  637|      0|            pOvl--;
  638|      0|            pAsymOvl--;
  639|      0|            *pOut0++ = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  640|      0|            *pOut1-- = IMDCT_SCALE_DBL_LSH1(x1);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  641|      0|          }
  642|      0|          hMdct->pAsymOvlp = NULL;
  643|      0|        }
  644|  1.02M|      } else { /* prevAliasingSymmetry == 1 */
  645|      0|        for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (645:21): [True: 0, False: 0]
  ------------------
  646|      0|          FIXP_DBL x0, x1;
  647|      0|          cplxMultDiv2(&x1, &x0, *pCurr++, -*pOvl--, pWindow[i]);
  648|      0|          *pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  649|      0|          *pOut1 = IMDCT_SCALE_DBL_LSH1(x1);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  650|      0|          pOut0++;
  651|      0|          pOut1--;
  652|      0|        }
  653|      0|      }
  654|  1.02M|    } else { /* prevPrevAliasingSymmetry == 1 */
  655|      0|      if (hMdct->prevAliasSymmetry == 0) {
  ------------------
  |  Branch (655:11): [True: 0, False: 0]
  ------------------
  656|      0|        for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (656:21): [True: 0, False: 0]
  ------------------
  657|      0|          FIXP_DBL x0, x1;
  658|      0|          cplxMultDiv2(&x1, &x0, *pCurr++, *pOvl--, pWindow[i]);
  659|      0|          *pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  660|      0|          *pOut1 = IMDCT_SCALE_DBL_LSH1(-x1);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  661|      0|          pOut0++;
  662|      0|          pOut1--;
  663|      0|        }
  664|      0|      } else { /* prevAliasingSymmetry == 1 */
  665|      0|        for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (665:21): [True: 0, False: 0]
  ------------------
  666|      0|          FIXP_DBL x0, x1;
  667|      0|          cplxMultDiv2(&x1, &x0, *pCurr++, *pOvl--, pWindow[i]);
  668|      0|          *pOut0 = IMDCT_SCALE_DBL_LSH1(x0);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  669|      0|          *pOut1 = IMDCT_SCALE_DBL_LSH1(x1);
  ------------------
  |  |  120|      0|#define IMDCT_SCALE_DBL_LSH1(x) SATURATE_LEFT_SHIFT_ALT((x), 1, DFRACT_BITS)
  |  |  ------------------
  |  |  |  |  270|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  271|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                \
  |  |  |  |  272|      0|       : ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (272:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  273|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 2))                       \
  |  |  |  |  274|      0|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  ------------------
  670|      0|          pOut0++;
  671|      0|          pOut1--;
  672|      0|        }
  673|      0|      }
  674|      0|    }
  675|       |
  676|  1.02M|    if (hMdct->pFacZir != 0) {
  ------------------
  |  Branch (676:9): [True: 4.29k, False: 1.01M]
  ------------------
  677|       |      /* add FAC ZIR of previous ACELP -> mdct transition */
  678|  4.29k|      FIXP_DBL *pOut = pOut0 - fl / 2;
  679|  4.29k|      FDK_ASSERT(fl / 2 <= 128);
  ------------------
  |  |  221|  4.29k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (679:7): [True: 4.29k, False: 0]
  ------------------
  680|   530k|      for (i = 0; i < fl / 2; i++) {
  ------------------
  |  Branch (680:19): [True: 526k, False: 4.29k]
  ------------------
  681|   526k|        pOut[i] = fAddSaturate(pOut[i], IMDCT_SCALE_DBL(hMdct->pFacZir[i]));
  ------------------
  |  |  119|   526k|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  682|   526k|      }
  683|  4.29k|      hMdct->pFacZir = NULL;
  684|  4.29k|    }
  685|  1.02M|    pOut0 += (fl / 2) + nl;
  686|       |
  687|       |    /* NL output samples TL/2+FL/2..TL. - current[FL/2..0] */
  688|  1.02M|    pOut1 += (fl / 2) + 1;
  689|  1.02M|    pCurr = pSpec + tl - fl / 2 - 1;
  690|       |    /* Here we implement a simplified version of what happens above the this
  691|       |    piece of code (see the comments above). We implement the folding of C and D
  692|       |    segments from (C-Dr) but C is zero, because in this part of the MDCT
  693|       |    sequence the window coefficients with which C must be multiplied are zero.
  694|       |    "pOut1" writes sequentially the D block from left to right.   */
  695|  1.02M|    if (hMdct->prevAliasSymmetry == 0) {
  ------------------
  |  Branch (695:9): [True: 1.02M, False: 0]
  ------------------
  696|  28.5M|      for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (696:19): [True: 27.4M, False: 1.02M]
  ------------------
  697|  27.4M|        FIXP_DBL x = -(*pCurr--);
  698|  27.4M|        *pOut1++ = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|  27.4M|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  699|  27.4M|      }
  700|  1.02M|    } else {
  701|      0|      for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (701:19): [True: 0, False: 0]
  ------------------
  702|      0|        FIXP_DBL x = *pCurr--;
  703|      0|        *pOut1++ = IMDCT_SCALE_DBL(x);
  ------------------
  |  |  119|      0|#define IMDCT_SCALE_DBL(x) (FIXP_DBL)(x)
  ------------------
  704|      0|      }
  705|      0|    }
  706|       |
  707|       |    /* Set overlap source pointer for next window pOvl = pSpec + tl/2 - 1; */
  708|  1.02M|    pOvl = pSpec + tl / 2 - 1;
  709|       |
  710|       |    /* Previous window values. */
  711|  1.02M|    hMdct->prev_nr = nr;
  712|  1.02M|    hMdct->prev_fr = fr;
  713|  1.02M|    hMdct->prev_tl = tl;
  714|  1.02M|    hMdct->prev_wrs = wrs;
  715|       |
  716|       |    /* Previous aliasing symmetry */
  717|  1.02M|    hMdct->prevPrevAliasSymmetry = hMdct->prevAliasSymmetry;
  718|  1.02M|    hMdct->prevAliasSymmetry = currAliasSymmetry;
  719|  1.02M|  }
  720|       |
  721|       |  /* Save overlap */
  722|       |
  723|   348k|  pOvl = hMdct->overlap.freq + hMdct->ov_size - tl / 2;
  724|   348k|  FDKmemcpy(pOvl, &spectrum[(nSpec - 1) * tl], (tl / 2) * sizeof(FIXP_DBL));
  725|       |
  726|   348k|  return nrSamples;
  727|   348k|}

_Z14sym_restoreIPDP13FDK_BITSTREAMiPa:
  112|  10.7k|ERROR_t sym_restoreIPD(HANDLE_FDK_BITSTREAM strm, int lav, SCHAR data[2]) {
  113|  10.7k|  int sum_val = data[0] + data[1];
  114|  10.7k|  int diff_val = data[0] - data[1];
  115|       |
  116|  10.7k|  if (sum_val > lav) {
  ------------------
  |  Branch (116:7): [True: 4.51k, False: 6.26k]
  ------------------
  117|  4.51k|    data[0] = -sum_val + (2 * lav + 1);
  118|  4.51k|    data[1] = -diff_val;
  119|  6.26k|  } else {
  120|  6.26k|    data[0] = sum_val;
  121|  6.26k|    data[1] = diff_val;
  122|  6.26k|  }
  123|       |
  124|  10.7k|  if (data[0] - data[1] != 0) {
  ------------------
  |  Branch (124:7): [True: 6.05k, False: 4.72k]
  ------------------
  125|  6.05k|    ULONG sym_bit;
  ------------------
  |  |  182|  6.05k|#define ULONG UINT
  ------------------
  126|  6.05k|    sym_bit = FDKreadBits(strm, 1);
  127|  6.05k|    if (sym_bit) {
  ------------------
  |  Branch (127:9): [True: 1.74k, False: 4.31k]
  ------------------
  128|  1.74k|      int tmp;
  129|  1.74k|      tmp = data[0];
  130|  1.74k|      data[0] = data[1];
  131|  1.74k|      data[1] = tmp;
  132|  1.74k|    }
  133|  6.05k|  }
  134|       |
  135|  10.7k|  return HUFFDEC_OK;
  ------------------
  |  |  167|  10.7k|#define HUFFDEC_OK 0
  ------------------
  136|  10.7k|}
_Z13EcDataPairDec12DECODER_TYPEP13FDK_BITSTREAMPaS2_S2_9DATA_TYPEiiiii:
  825|  54.8k|{
  826|  54.8k|  ERROR_t err = HUFFDEC_OK;
  ------------------
  |  |  167|  54.8k|#define HUFFDEC_OK 0
  ------------------
  827|       |
  828|       |  // int allowDiffTimeBack_flag = !independency_flag || (setIdx > 0);
  829|  54.8k|  int attachLsb_flag = 0;
  830|  54.8k|  int pcmCoding_flag = 0;
  831|       |
  832|  54.8k|  int mixed_time_pair = 0, numValPcm = 0;
  833|  54.8k|  int quant_levels = 0, quant_offset = 0;
  834|  54.8k|  ULONG data = 0;
  ------------------
  |  |  182|  54.8k|#define ULONG UINT
  ------------------
  835|       |
  836|  54.8k|  SCHAR aaDataPair[2][28] = {{0}};
  837|  54.8k|  SCHAR aaDataDiff[2][28] = {{0}};
  838|       |
  839|  54.8k|  SCHAR aHistoryMsb[28] = {0};
  840|       |
  841|  54.8k|  SCHAR* pDataVec[2] = {NULL, NULL};
  842|       |
  843|  54.8k|  DIFF_TYPE diff_type[2] = {DIFF_FREQ, DIFF_FREQ};
  844|  54.8k|  PAIRING pairing = FREQ_PAIR;
  845|  54.8k|  DIRECTION direction = BACKWARDS;
  846|       |
  847|  54.8k|  switch (data_type) {
  848|  23.1k|    case t_CLD:
  ------------------
  |  Branch (848:5): [True: 23.1k, False: 31.7k]
  ------------------
  849|  23.1k|      if (coarse_flag) {
  ------------------
  |  Branch (849:11): [True: 14.0k, False: 9.11k]
  ------------------
  850|  14.0k|        attachLsb_flag = 0;
  851|  14.0k|        quant_levels = 15;
  852|  14.0k|        quant_offset = 7;
  853|  14.0k|      } else {
  854|  9.11k|        attachLsb_flag = 0;
  855|  9.11k|        quant_levels = 31;
  856|  9.11k|        quant_offset = 15;
  857|  9.11k|      }
  858|       |
  859|  23.1k|      break;
  860|       |
  861|  22.8k|    case t_ICC:
  ------------------
  |  Branch (861:5): [True: 22.8k, False: 32.0k]
  ------------------
  862|  22.8k|      if (coarse_flag) {
  ------------------
  |  Branch (862:11): [True: 13.9k, False: 8.89k]
  ------------------
  863|  13.9k|        attachLsb_flag = 0;
  864|  13.9k|        quant_levels = 4;
  865|  13.9k|        quant_offset = 0;
  866|  13.9k|      } else {
  867|  8.89k|        attachLsb_flag = 0;
  868|  8.89k|        quant_levels = 8;
  869|  8.89k|        quant_offset = 0;
  870|  8.89k|      }
  871|       |
  872|  22.8k|      break;
  873|       |
  874|      0|    case t_OLD:
  ------------------
  |  Branch (874:5): [True: 0, False: 54.8k]
  ------------------
  875|      0|      if (coarse_flag) {
  ------------------
  |  Branch (875:11): [True: 0, False: 0]
  ------------------
  876|      0|        attachLsb_flag = 0;
  877|      0|        quant_levels = 8;
  878|      0|        quant_offset = 0;
  879|      0|      } else {
  880|      0|        attachLsb_flag = 0;
  881|      0|        quant_levels = 16;
  882|      0|        quant_offset = 0;
  883|      0|      }
  884|      0|      break;
  885|       |
  886|      0|    case t_NRG:
  ------------------
  |  Branch (886:5): [True: 0, False: 54.8k]
  ------------------
  887|      0|      if (coarse_flag) {
  ------------------
  |  Branch (887:11): [True: 0, False: 0]
  ------------------
  888|      0|        attachLsb_flag = 0;
  889|      0|        quant_levels = 32;
  890|      0|        quant_offset = 0;
  891|      0|      } else {
  892|      0|        attachLsb_flag = 0;
  893|      0|        quant_levels = 64;
  894|      0|        quant_offset = 0;
  895|      0|      }
  896|      0|      break;
  897|       |
  898|  8.84k|    case t_IPD:
  ------------------
  |  Branch (898:5): [True: 8.84k, False: 46.0k]
  ------------------
  899|  8.84k|      if (!coarse_flag) {
  ------------------
  |  Branch (899:11): [True: 5.47k, False: 3.37k]
  ------------------
  900|  5.47k|        attachLsb_flag = 1;
  901|  5.47k|        quant_levels = 16;
  902|  5.47k|        quant_offset = 0;
  903|  5.47k|      } else {
  904|  3.37k|        attachLsb_flag = 0;
  905|  3.37k|        quant_levels = 8;
  906|  3.37k|        quant_offset = 0;
  907|  3.37k|      }
  908|  8.84k|      break;
  909|       |
  910|      0|    default:
  ------------------
  |  Branch (910:5): [True: 0, False: 54.8k]
  ------------------
  911|      0|      return HUFFDEC_NOTOK;
  ------------------
  |  |  168|      0|#define HUFFDEC_NOTOK (-1)
  ------------------
  912|  54.8k|  }
  913|       |
  914|  54.8k|  data = FDKreadBits(strm, 1);
  915|  54.8k|  pcmCoding_flag = data;
  916|       |
  917|  54.8k|  if (pcmCoding_flag) {
  ------------------
  |  Branch (917:7): [True: 23.8k, False: 31.0k]
  ------------------
  918|  23.8k|    if (pair_flag) {
  ------------------
  |  Branch (918:9): [True: 17.1k, False: 6.69k]
  ------------------
  919|  17.1k|      pDataVec[0] = aaDataPair[0];
  920|  17.1k|      pDataVec[1] = aaDataPair[1];
  921|  17.1k|      numValPcm = 2 * dataBands;
  922|  17.1k|    } else {
  923|  6.69k|      pDataVec[0] = aaDataPair[0];
  924|  6.69k|      pDataVec[1] = NULL;
  925|  6.69k|      numValPcm = dataBands;
  926|  6.69k|    }
  927|       |
  928|  23.8k|    err = pcm_decode(strm, pDataVec[0], pDataVec[1], quant_offset, numValPcm,
  929|  23.8k|                     quant_levels);
  930|  23.8k|    if (err != HUFFDEC_OK) return HUFFDEC_NOTOK;
  ------------------
  |  |  167|  23.8k|#define HUFFDEC_OK 0
  ------------------
                  if (err != HUFFDEC_OK) return HUFFDEC_NOTOK;
  ------------------
  |  |  168|      0|#define HUFFDEC_NOTOK (-1)
  ------------------
  |  Branch (930:9): [True: 0, False: 23.8k]
  ------------------
  931|       |
  932|  31.0k|  } else { /* Differential/Huffman/LSB Coding */
  933|       |
  934|  31.0k|    if (pair_flag) {
  ------------------
  |  Branch (934:9): [True: 16.8k, False: 14.2k]
  ------------------
  935|  16.8k|      pDataVec[0] = aaDataDiff[0];
  936|  16.8k|      pDataVec[1] = aaDataDiff[1];
  937|  16.8k|    } else {
  938|  14.2k|      pDataVec[0] = aaDataDiff[0];
  939|  14.2k|      pDataVec[1] = NULL;
  940|  14.2k|    }
  941|       |
  942|  31.0k|    diff_type[0] = DIFF_FREQ;
  943|  31.0k|    diff_type[1] = DIFF_FREQ;
  944|       |
  945|  31.0k|    direction = BACKWARDS;
  946|  31.0k|    {
  947|  31.0k|      if (pair_flag || allowDiffTimeBack_flag) {
  ------------------
  |  Branch (947:11): [True: 16.8k, False: 14.2k]
  |  Branch (947:24): [True: 10.7k, False: 3.40k]
  ------------------
  948|  27.6k|        data = FDKreadBits(strm, 1);
  949|  27.6k|        diff_type[0] = (DIFF_TYPE)data;
  950|  27.6k|      }
  951|       |
  952|  31.0k|      if (pair_flag &&
  ------------------
  |  Branch (952:11): [True: 16.8k, False: 14.2k]
  ------------------
  953|  16.8k|          ((diff_type[0] == DIFF_FREQ) || allowDiffTimeBack_flag)) {
  ------------------
  |  Branch (953:12): [True: 9.35k, False: 7.47k]
  |  Branch (953:43): [True: 4.14k, False: 3.32k]
  ------------------
  954|  13.5k|        data = FDKreadBits(strm, 1);
  955|  13.5k|        diff_type[1] = (DIFF_TYPE)data;
  956|  13.5k|      }
  957|  31.0k|    }
  958|       |    /* Huffman decoding */
  959|  31.0k|    err = huff_decode(strm, pDataVec[0], pDataVec[1], data_type, diff_type[0],
  960|  31.0k|                      diff_type[1], dataBands, &pairing,
  961|  31.0k|                      (DECODER == SAOC_DECODER));
  962|  31.0k|    if (err != HUFFDEC_OK) {
  ------------------
  |  |  167|  31.0k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (962:9): [True: 1.06k, False: 29.9k]
  ------------------
  963|  1.06k|      return HUFFDEC_NOTOK;
  ------------------
  |  |  168|  1.06k|#define HUFFDEC_NOTOK (-1)
  ------------------
  964|  1.06k|    }
  965|       |
  966|  29.9k|    {
  967|       |      /* Differential decoding */
  968|  29.9k|      if ((diff_type[0] == DIFF_TIME) || (diff_type[1] == DIFF_TIME)) {
  ------------------
  |  Branch (968:11): [True: 13.9k, False: 16.0k]
  |  Branch (968:42): [True: 4.97k, False: 11.0k]
  ------------------
  969|  18.9k|        if (DECODER == SAOC_DECODER) {
  ------------------
  |  Branch (969:13): [True: 2.20k, False: 16.7k]
  ------------------
  970|  2.20k|          direction = BACKWARDS;
  971|  16.7k|        } else {
  972|  16.7k|          if (pair_flag) {
  ------------------
  |  Branch (972:15): [True: 10.2k, False: 6.52k]
  ------------------
  973|  10.2k|            if ((diff_type[0] == DIFF_TIME) && !allowDiffTimeBack_flag) {
  ------------------
  |  Branch (973:17): [True: 7.05k, False: 3.14k]
  |  Branch (973:48): [True: 3.31k, False: 3.74k]
  ------------------
  974|  3.31k|              direction = FORWARDS;
  975|  6.88k|            } else if (diff_type[1] == DIFF_TIME) {
  ------------------
  |  Branch (975:24): [True: 4.23k, False: 2.65k]
  ------------------
  976|  4.23k|              direction = BACKWARDS;
  977|  4.23k|            } else {
  978|  2.65k|              data = FDKreadBits(strm, 1);
  979|  2.65k|              direction = (DIRECTION)data;
  980|  2.65k|            }
  981|  10.2k|          } else {
  982|  6.52k|            direction = BACKWARDS;
  983|  6.52k|          }
  984|  16.7k|        }
  985|  18.9k|      }
  986|       |
  987|  29.9k|      mixed_time_pair =
  988|  29.9k|          (diff_type[0] != diff_type[1]) && (pairing == TIME_PAIR);
  ------------------
  |  Branch (988:11): [True: 17.6k, False: 12.2k]
  |  Branch (988:45): [True: 5.46k, False: 12.2k]
  ------------------
  989|       |
  990|  29.9k|      if (direction == BACKWARDS) {
  ------------------
  |  Branch (990:11): [True: 24.2k, False: 5.67k]
  ------------------
  991|  24.2k|        if (diff_type[0] == DIFF_FREQ) {
  ------------------
  |  Branch (991:13): [True: 16.0k, False: 8.27k]
  ------------------
  992|  16.0k|          diff_freq_decode(aaDataDiff[0], aaDataPair[0], dataBands);
  993|  16.0k|        } else {
  994|  8.27k|          int i;
  995|  65.1k|          for (i = 0; i < dataBands; i++) {
  ------------------
  |  Branch (995:23): [True: 56.9k, False: 8.27k]
  ------------------
  996|  56.9k|            aHistoryMsb[i] = aHistory[i + startBand] + quant_offset;
  997|  56.9k|            if (attachLsb_flag) {
  ------------------
  |  Branch (997:17): [True: 12.8k, False: 44.0k]
  ------------------
  998|  12.8k|              aHistoryMsb[i] >>= 1;
  999|  12.8k|            }
 1000|  56.9k|          }
 1001|  8.27k|          diff_time_decode_backwards(aHistoryMsb, aaDataDiff[0], aaDataPair[0],
 1002|  8.27k|                                     mixed_time_pair, dataBands);
 1003|  8.27k|        }
 1004|  24.2k|        if (diff_type[1] == DIFF_FREQ) {
  ------------------
  |  Branch (1004:13): [True: 18.0k, False: 6.23k]
  ------------------
 1005|  18.0k|          diff_freq_decode(aaDataDiff[1], aaDataPair[1], dataBands);
 1006|  18.0k|        } else {
 1007|  6.23k|          diff_time_decode_backwards(aaDataPair[0], aaDataDiff[1],
 1008|  6.23k|                                     aaDataPair[1], mixed_time_pair, dataBands);
 1009|  6.23k|        }
 1010|  24.2k|      } else {
 1011|       |        /* diff_type[1] MUST BE DIFF_FREQ */
 1012|  5.67k|        diff_freq_decode(aaDataDiff[1], aaDataPair[1], dataBands);
 1013|       |
 1014|  5.67k|        if (diff_type[0] == DIFF_FREQ) {
  ------------------
  |  Branch (1014:13): [True: 0, False: 5.67k]
  ------------------
 1015|      0|          diff_freq_decode(aaDataDiff[0], aaDataPair[0], dataBands);
 1016|  5.67k|        } else {
 1017|  5.67k|          diff_time_decode_forwards(aaDataPair[1], aaDataDiff[0], aaDataPair[0],
 1018|  5.67k|                                    mixed_time_pair, dataBands);
 1019|  5.67k|        }
 1020|  5.67k|      }
 1021|  29.9k|    }
 1022|       |
 1023|       |    /* LSB decoding */
 1024|  29.9k|    err = attach_lsb(strm, aaDataPair[0], quant_offset, attachLsb_flag ? 1 : 0,
  ------------------
  |  Branch (1024:57): [True: 3.87k, False: 26.0k]
  ------------------
 1025|  29.9k|                     dataBands, aaDataPair[0]);
 1026|  29.9k|    if (err != HUFFDEC_OK) goto bail;
  ------------------
  |  |  167|  29.9k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (1026:9): [True: 0, False: 29.9k]
  ------------------
 1027|       |
 1028|  29.9k|    if (pair_flag) {
  ------------------
  |  Branch (1028:9): [True: 16.3k, False: 13.6k]
  ------------------
 1029|  16.3k|      err = attach_lsb(strm, aaDataPair[1], quant_offset,
 1030|  16.3k|                       attachLsb_flag ? 1 : 0, dataBands, aaDataPair[1]);
  ------------------
  |  Branch (1030:24): [True: 1.60k, False: 14.7k]
  ------------------
 1031|  16.3k|      if (err != HUFFDEC_OK) goto bail;
  ------------------
  |  |  167|  16.3k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (1031:11): [True: 0, False: 16.3k]
  ------------------
 1032|  16.3k|    }
 1033|  29.9k|  } /* End: Differential/Huffman/LSB Coding */
 1034|       |
 1035|       |  /* Copy data to output arrays */
 1036|  53.8k|  FDKmemcpy(aaOutData1 + startBand, aaDataPair[0], sizeof(SCHAR) * dataBands);
 1037|  53.8k|  if (pair_flag) {
  ------------------
  |  Branch (1037:7): [True: 33.4k, False: 20.3k]
  ------------------
 1038|  33.4k|    FDKmemcpy(aaOutData2 + startBand, aaDataPair[1], sizeof(SCHAR) * dataBands);
 1039|  33.4k|  }
 1040|       |
 1041|  53.8k|bail:
 1042|  53.8k|  return err;
 1043|  53.8k|}
_Z16huff_dec_reshapeP13FDK_BITSTREAMPii:
 1046|  2.94k|                         int num_val) {
 1047|  2.94k|  ERROR_t err = HUFFDEC_OK;
  ------------------
  |  |  167|  2.94k|#define HUFFDEC_OK 0
  ------------------
 1048|  2.94k|  int val_rcvd = 0, dummy = 0, i = 0, val = 0, len = 0;
 1049|  2.94k|  SCHAR rl_data[2] = {0};
 1050|       |
 1051|  48.6k|  while (val_rcvd < num_val) {
  ------------------
  |  Branch (1051:10): [True: 45.8k, False: 2.76k]
  ------------------
 1052|  45.8k|    err = huff_read_2D(strm,
 1053|  45.8k|                       (HANDLE_HUFF_NODE)&FDK_huffReshapeNodes.nodeTab[0][0],
 1054|  45.8k|                       rl_data, &dummy);
 1055|  45.8k|    if (err != HUFFDEC_OK) goto bail;
  ------------------
  |  |  167|  45.8k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (1055:9): [True: 0, False: 45.8k]
  ------------------
 1056|  45.8k|    val = rl_data[0];
 1057|  45.8k|    len = rl_data[1] + 1;
 1058|  45.8k|    if (val_rcvd + len > num_val) {
  ------------------
  |  Branch (1058:9): [True: 180, False: 45.7k]
  ------------------
 1059|    180|      err = HUFFDEC_NOTOK;
  ------------------
  |  |  168|    180|#define HUFFDEC_NOTOK (-1)
  ------------------
 1060|    180|      goto bail;
 1061|    180|    }
 1062|   133k|    for (i = val_rcvd; i < val_rcvd + len; i++) {
  ------------------
  |  Branch (1062:24): [True: 88.1k, False: 45.7k]
  ------------------
 1063|  88.1k|      out_data[i] = val;
 1064|  88.1k|    }
 1065|  45.7k|    val_rcvd += len;
 1066|  45.7k|  }
 1067|  2.94k|bail:
 1068|  2.94k|  return err;
 1069|  2.94k|}
nlc_dec.cpp:_ZL10pcm_decodeP13FDK_BITSTREAMPaS1_iii:
  152|  24.2k|                          int num_levels) {
  153|  24.2k|  int i = 0, j = 0, idx = 0;
  154|  24.2k|  int max_grp_len = 0, next_val = 0;
  155|  24.2k|  ULONG tmp;
  ------------------
  |  |  182|  24.2k|#define ULONG UINT
  ------------------
  156|       |
  157|  24.2k|  int pcm_chunk_size[7] = {0};
  158|       |
  159|  24.2k|  switch (num_levels) {
  160|    316|    case 3:
  ------------------
  |  Branch (160:5): [True: 316, False: 23.9k]
  ------------------
  161|    316|      max_grp_len = 5;
  162|    316|      break;
  163|     60|    case 7:
  ------------------
  |  Branch (163:5): [True: 60, False: 24.2k]
  ------------------
  164|     60|      max_grp_len = 6;
  165|     60|      break;
  166|     32|    case 11:
  ------------------
  |  Branch (166:5): [True: 32, False: 24.2k]
  ------------------
  167|     32|      max_grp_len = 2;
  168|     32|      break;
  169|      0|    case 13:
  ------------------
  |  Branch (169:5): [True: 0, False: 24.2k]
  ------------------
  170|      0|      max_grp_len = 4;
  171|      0|      break;
  172|      3|    case 19:
  ------------------
  |  Branch (172:5): [True: 3, False: 24.2k]
  ------------------
  173|      3|      max_grp_len = 4;
  174|      3|      break;
  175|      0|    case 25:
  ------------------
  |  Branch (175:5): [True: 0, False: 24.2k]
  ------------------
  176|      0|      max_grp_len = 3;
  177|      0|      break;
  178|      0|    case 51:
  ------------------
  |  Branch (178:5): [True: 0, False: 24.2k]
  ------------------
  179|      0|      max_grp_len = 4;
  180|      0|      break;
  181|  8.93k|    case 4:
  ------------------
  |  Branch (181:5): [True: 8.93k, False: 15.3k]
  ------------------
  182|  12.9k|    case 8:
  ------------------
  |  Branch (182:5): [True: 3.98k, False: 20.2k]
  ------------------
  183|  21.5k|    case 15:
  ------------------
  |  Branch (183:5): [True: 8.63k, False: 15.6k]
  ------------------
  184|  23.0k|    case 16:
  ------------------
  |  Branch (184:5): [True: 1.54k, False: 22.7k]
  ------------------
  185|  23.0k|    case 26:
  ------------------
  |  Branch (185:5): [True: 0, False: 24.2k]
  ------------------
  186|  23.8k|    case 31:
  ------------------
  |  Branch (186:5): [True: 765, False: 23.5k]
  ------------------
  187|  23.8k|      max_grp_len = 1;
  188|  23.8k|      break;
  189|      0|    default:
  ------------------
  |  Branch (189:5): [True: 0, False: 24.2k]
  ------------------
  190|      0|      return HUFFDEC_NOTOK;
  ------------------
  |  |  168|      0|#define HUFFDEC_NOTOK (-1)
  ------------------
  191|  24.2k|  }
  192|       |
  193|  24.2k|  tmp = 1;
  194|  50.1k|  for (i = 1; i <= max_grp_len; i++) {
  ------------------
  |  Branch (194:15): [True: 25.8k, False: 24.2k]
  ------------------
  195|  25.8k|    tmp *= num_levels;
  196|  25.8k|    pcm_chunk_size[i] = ilog2(tmp);
  197|  25.8k|  }
  198|       |
  199|   110k|  for (i = 0; i < num_val; i += max_grp_len) {
  ------------------
  |  Branch (199:15): [True: 85.9k, False: 24.2k]
  ------------------
  200|  85.9k|    int grp_len, grp_val, data;
  201|  85.9k|    grp_len = min(max_grp_len, num_val - i);
  ------------------
  |  |  109|  85.9k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (109:20): [True: 61.9k, False: 23.9k]
  |  |  ------------------
  ------------------
  202|  85.9k|    data = FDKreadBits(strm, pcm_chunk_size[grp_len]);
  203|       |
  204|  85.9k|    grp_val = data;
  205|       |
  206|   172k|    for (j = 0; j < grp_len; j++) {
  ------------------
  |  Branch (206:17): [True: 86.6k, False: 85.9k]
  ------------------
  207|  86.6k|      idx = i + (grp_len - j - 1);
  208|  86.6k|      next_val = grp_val % num_levels;
  209|       |
  210|  86.6k|      if (out_data_2 == NULL) {
  ------------------
  |  Branch (210:11): [True: 35.3k, False: 51.2k]
  ------------------
  211|  35.3k|        out_data_1[idx] = next_val - offset;
  212|  51.2k|      } else if (out_data_1 == NULL) {
  ------------------
  |  Branch (212:18): [True: 0, False: 51.2k]
  ------------------
  213|      0|        out_data_2[idx] = next_val - offset;
  214|  51.2k|      } else {
  215|  51.2k|        if (idx % 2) {
  ------------------
  |  Branch (215:13): [True: 25.6k, False: 25.6k]
  ------------------
  216|  25.6k|          out_data_2[idx / 2] = next_val - offset;
  217|  25.6k|        } else {
  218|  25.6k|          out_data_1[idx / 2] = next_val - offset;
  219|  25.6k|        }
  220|  51.2k|      }
  221|       |
  222|  86.6k|      grp_val = (grp_val - next_val) / num_levels;
  223|  86.6k|    }
  224|  85.9k|  }
  225|       |
  226|  24.2k|  return HUFFDEC_OK;
  ------------------
  |  |  167|  24.2k|#define HUFFDEC_OK 0
  ------------------
  227|  24.2k|}
nlc_dec.cpp:_ZL5ilog2j:
  138|  25.8k|static int ilog2(unsigned int i) {
  139|  25.8k|  int l = 0;
  140|       |
  141|  25.8k|  if (i) i--;
  ------------------
  |  Branch (141:7): [True: 25.8k, False: 0]
  ------------------
  142|   112k|  while (i > 0) {
  ------------------
  |  Branch (142:10): [True: 86.7k, False: 25.8k]
  ------------------
  143|  86.7k|    i >>= 1;
  144|  86.7k|    l++;
  145|  86.7k|  }
  146|       |
  147|  25.8k|  return l;
  148|  25.8k|}
nlc_dec.cpp:_ZL11huff_decodeP13FDK_BITSTREAMPaS1_9DATA_TYPE9DIFF_TYPES3_iP7PAIRINGi:
  571|  31.0k|                           int num_val, PAIRING* pairing_scheme, int ldMode) {
  572|  31.0k|  ERROR_t err = HUFFDEC_OK;
  ------------------
  |  |  167|  31.0k|#define HUFFDEC_OK 0
  ------------------
  573|  31.0k|  CODING_SCHEME coding_scheme = HUFF_1D;
  574|  31.0k|  DIFF_TYPE diff_type;
  575|       |
  576|  31.0k|  int i = 0;
  577|       |
  578|  31.0k|  SCHAR pair_vec[28][2];
  579|       |
  580|  31.0k|  SCHAR* p0_data_1[2] = {NULL, NULL};
  581|  31.0k|  SCHAR* p0_data_2[2] = {NULL, NULL};
  582|       |
  583|  31.0k|  int p0_flag[2];
  584|       |
  585|  31.0k|  int num_val_1_int = num_val;
  586|  31.0k|  int num_val_2_int = num_val;
  587|       |
  588|  31.0k|  SCHAR* out_data_1_int = out_data_1;
  589|  31.0k|  SCHAR* out_data_2_int = out_data_2;
  590|       |
  591|  31.0k|  int df_rest_flag_1 = 0;
  592|  31.0k|  int df_rest_flag_2 = 0;
  593|       |
  594|  31.0k|  int hufYY1;
  595|  31.0k|  int hufYY2;
  596|  31.0k|  int hufYY;
  597|       |
  598|       |  /* Coding scheme */
  599|  31.0k|  coding_scheme = (CODING_SCHEME)FDKreadBits(strm, 1);
  600|       |
  601|  31.0k|  if (coding_scheme == HUFF_2D) {
  ------------------
  |  Branch (601:7): [True: 19.2k, False: 11.8k]
  ------------------
  602|  19.2k|    if ((out_data_1 != NULL) && (out_data_2 != NULL) && (ldMode == 0)) {
  ------------------
  |  Branch (602:9): [True: 19.2k, False: 0]
  |  Branch (602:33): [True: 13.2k, False: 5.97k]
  |  Branch (602:57): [True: 10.6k, False: 2.58k]
  ------------------
  603|  10.6k|      *pairing_scheme = (PAIRING)FDKreadBits(strm, 1);
  604|  10.6k|    } else {
  605|  8.56k|      *pairing_scheme = FREQ_PAIR;
  606|  8.56k|    }
  607|  19.2k|  }
  608|       |
  609|  31.0k|  {
  610|  31.0k|    hufYY1 = diff_type_1;
  611|  31.0k|    hufYY2 = diff_type_2;
  612|  31.0k|  }
  613|       |
  614|  31.0k|  switch (coding_scheme) {
  615|  11.8k|    case HUFF_1D:
  ------------------
  |  Branch (615:5): [True: 11.8k, False: 19.2k]
  ------------------
  616|  11.8k|      p0_flag[0] = (diff_type_1 == DIFF_FREQ);
  617|  11.8k|      p0_flag[1] = (diff_type_2 == DIFF_FREQ);
  618|  11.8k|      if (out_data_1 != NULL) {
  ------------------
  |  Branch (618:11): [True: 11.8k, False: 0]
  ------------------
  619|  11.8k|        if ((err = huff_dec_1D(strm, data_type, hufYY1, out_data_1,
  ------------------
  |  Branch (619:13): [True: 522, False: 11.2k]
  ------------------
  620|  11.8k|                               num_val_1_int, p0_flag[0])) != HUFFDEC_OK) {
  ------------------
  |  |  167|  11.8k|#define HUFFDEC_OK 0
  ------------------
  621|    522|          goto bail;
  622|    522|        }
  623|  11.8k|      }
  624|  11.2k|      if (out_data_2 != NULL) {
  ------------------
  |  Branch (624:11): [True: 3.35k, False: 7.93k]
  ------------------
  625|  3.35k|        if ((err = huff_dec_1D(strm, data_type, hufYY2, out_data_2,
  ------------------
  |  Branch (625:13): [True: 8, False: 3.34k]
  ------------------
  626|  3.35k|                               num_val_2_int, p0_flag[1])) != HUFFDEC_OK) {
  ------------------
  |  |  167|  3.35k|#define HUFFDEC_OK 0
  ------------------
  627|      8|          goto bail;
  628|      8|        }
  629|  3.35k|      }
  630|       |
  631|  11.2k|      break; /* HUFF_1D */
  632|       |
  633|  19.2k|    case HUFF_2D:
  ------------------
  |  Branch (633:5): [True: 19.2k, False: 11.8k]
  ------------------
  634|       |
  635|  19.2k|      switch (*pairing_scheme) {
  636|  11.4k|        case FREQ_PAIR:
  ------------------
  |  Branch (636:9): [True: 11.4k, False: 7.81k]
  ------------------
  637|       |
  638|  11.4k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (638:15): [True: 11.4k, False: 0]
  ------------------
  639|  11.4k|            if (diff_type_1 == DIFF_FREQ) {
  ------------------
  |  Branch (639:17): [True: 7.75k, False: 3.66k]
  ------------------
  640|  7.75k|              p0_data_1[0] = &out_data_1[0];
  641|  7.75k|              p0_data_1[1] = NULL;
  642|       |
  643|  7.75k|              num_val_1_int -= 1;
  644|  7.75k|              out_data_1_int += 1;
  645|  7.75k|            }
  646|  11.4k|            df_rest_flag_1 = num_val_1_int % 2;
  647|  11.4k|            if (df_rest_flag_1) num_val_1_int -= 1;
  ------------------
  |  Branch (647:17): [True: 4.83k, False: 6.58k]
  ------------------
  648|  11.4k|            if (num_val_1_int < 0) {
  ------------------
  |  Branch (648:17): [True: 2, False: 11.4k]
  ------------------
  649|      2|              err = HUFFDEC_NOTOK;
  ------------------
  |  |  168|      2|#define HUFFDEC_NOTOK (-1)
  ------------------
  650|      2|              goto bail;
  651|      2|            }
  652|  11.4k|          }
  653|  11.4k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (653:15): [True: 5.44k, False: 5.96k]
  ------------------
  654|  5.44k|            if (diff_type_2 == DIFF_FREQ) {
  ------------------
  |  Branch (654:17): [True: 2.94k, False: 2.50k]
  ------------------
  655|  2.94k|              p0_data_2[0] = NULL;
  656|  2.94k|              p0_data_2[1] = &out_data_2[0];
  657|       |
  658|  2.94k|              num_val_2_int -= 1;
  659|  2.94k|              out_data_2_int += 1;
  660|  2.94k|            }
  661|  5.44k|            df_rest_flag_2 = num_val_2_int % 2;
  662|  5.44k|            if (df_rest_flag_2) num_val_2_int -= 1;
  ------------------
  |  Branch (662:17): [True: 3.34k, False: 2.09k]
  ------------------
  663|  5.44k|            if (num_val_2_int < 0) {
  ------------------
  |  Branch (663:17): [True: 1, False: 5.44k]
  ------------------
  664|      1|              err = HUFFDEC_NOTOK;
  ------------------
  |  |  168|      1|#define HUFFDEC_NOTOK (-1)
  ------------------
  665|      1|              goto bail;
  666|      1|            }
  667|  5.44k|          }
  668|       |
  669|  11.4k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (669:15): [True: 11.4k, False: 0]
  ------------------
  670|  11.4k|            if ((err = huff_dec_2D(strm, data_type, hufYY1, FREQ_PAIR, pair_vec,
  ------------------
  |  Branch (670:17): [True: 0, False: 11.4k]
  ------------------
  671|  11.4k|                                   num_val_1_int, 2, p0_data_1)) !=
  672|  11.4k|                HUFFDEC_OK) {
  ------------------
  |  |  167|  11.4k|#define HUFFDEC_OK 0
  ------------------
  673|      0|              goto bail;
  674|      0|            }
  675|  11.4k|            if (df_rest_flag_1) {
  ------------------
  |  Branch (675:17): [True: 4.83k, False: 6.58k]
  ------------------
  676|  4.83k|              if ((err = huff_dec_1D(strm, data_type, hufYY1,
  ------------------
  |  Branch (676:19): [True: 289, False: 4.54k]
  ------------------
  677|  4.83k|                                     out_data_1_int + num_val_1_int, 1, 0)) !=
  678|  4.83k|                  HUFFDEC_OK) {
  ------------------
  |  |  167|  4.83k|#define HUFFDEC_OK 0
  ------------------
  679|    289|                goto bail;
  680|    289|              }
  681|  4.83k|            }
  682|  11.4k|          }
  683|  11.1k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (683:15): [True: 5.40k, False: 5.72k]
  ------------------
  684|  5.40k|            if ((err = huff_dec_2D(strm, data_type, hufYY2, FREQ_PAIR,
  ------------------
  |  Branch (684:17): [True: 0, False: 5.40k]
  ------------------
  685|  5.40k|                                   pair_vec + 1, num_val_2_int, 2,
  686|  5.40k|                                   p0_data_2)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  5.40k|#define HUFFDEC_OK 0
  ------------------
  687|      0|              goto bail;
  688|      0|            }
  689|  5.40k|            if (df_rest_flag_2) {
  ------------------
  |  Branch (689:17): [True: 3.33k, False: 2.07k]
  ------------------
  690|  3.33k|              if ((err = huff_dec_1D(strm, data_type, hufYY2,
  ------------------
  |  Branch (690:19): [True: 244, False: 3.08k]
  ------------------
  691|  3.33k|                                     out_data_2_int + num_val_2_int, 1, 0)) !=
  692|  3.33k|                  HUFFDEC_OK) {
  ------------------
  |  |  167|  3.33k|#define HUFFDEC_OK 0
  ------------------
  693|    244|                goto bail;
  694|    244|              }
  695|  3.33k|            }
  696|  5.40k|          }
  697|       |
  698|  10.8k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (698:15): [True: 10.8k, False: 0]
  ------------------
  699|  36.4k|            for (i = 0; i < num_val_1_int - 1; i += 2) {
  ------------------
  |  Branch (699:25): [True: 25.6k, False: 10.8k]
  ------------------
  700|  25.6k|              out_data_1_int[i] = pair_vec[i][0];
  701|  25.6k|              out_data_1_int[i + 1] = pair_vec[i][1];
  702|  25.6k|            }
  703|  10.8k|          }
  704|  10.8k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (704:15): [True: 5.15k, False: 5.72k]
  ------------------
  705|  18.2k|            for (i = 0; i < num_val_2_int - 1; i += 2) {
  ------------------
  |  Branch (705:25): [True: 13.0k, False: 5.15k]
  ------------------
  706|  13.0k|              out_data_2_int[i] = pair_vec[i + 1][0];
  707|  13.0k|              out_data_2_int[i + 1] = pair_vec[i + 1][1];
  708|  13.0k|            }
  709|  5.15k|          }
  710|  10.8k|          break; /* FREQ_PAIR */
  711|       |
  712|  7.81k|        case TIME_PAIR:
  ------------------
  |  Branch (712:9): [True: 7.81k, False: 11.4k]
  ------------------
  713|  7.81k|          if (((diff_type_1 == DIFF_FREQ) || (diff_type_2 == DIFF_FREQ))) {
  ------------------
  |  Branch (713:16): [True: 4.49k, False: 3.31k]
  |  Branch (713:46): [True: 2.61k, False: 697]
  ------------------
  714|  7.11k|            p0_data_1[0] = &out_data_1[0];
  715|  7.11k|            p0_data_1[1] = &out_data_2[0];
  716|       |
  717|  7.11k|            out_data_1_int += 1;
  718|  7.11k|            out_data_2_int += 1;
  719|       |
  720|  7.11k|            num_val_1_int -= 1;
  721|  7.11k|          }
  722|       |
  723|  7.81k|          if ((diff_type_1 == DIFF_TIME) || (diff_type_2 == DIFF_TIME)) {
  ------------------
  |  Branch (723:15): [True: 3.31k, False: 4.49k]
  |  Branch (723:45): [True: 2.85k, False: 1.64k]
  ------------------
  724|  6.16k|            diff_type = DIFF_TIME;
  725|  6.16k|          } else {
  726|  1.64k|            diff_type = DIFF_FREQ;
  727|  1.64k|          }
  728|  7.81k|          { hufYY = diff_type; }
  729|       |
  730|  7.81k|          if ((err = huff_dec_2D(strm, data_type, hufYY, TIME_PAIR, pair_vec,
  ------------------
  |  Branch (730:15): [True: 0, False: 7.81k]
  ------------------
  731|  7.81k|                                 num_val_1_int, 1, p0_data_1)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  7.81k|#define HUFFDEC_OK 0
  ------------------
  732|      0|            goto bail;
  733|      0|          }
  734|       |
  735|  18.6k|          for (i = 0; i < num_val_1_int; i++) {
  ------------------
  |  Branch (735:23): [True: 10.8k, False: 7.81k]
  ------------------
  736|  10.8k|            out_data_1_int[i] = pair_vec[i][0];
  737|  10.8k|            out_data_2_int[i] = pair_vec[i][1];
  738|  10.8k|          }
  739|       |
  740|  7.81k|          break; /* TIME_PAIR */
  741|       |
  742|      0|        default:
  ------------------
  |  Branch (742:9): [True: 0, False: 19.2k]
  ------------------
  743|      0|          break;
  744|  19.2k|      }
  745|       |
  746|  18.6k|      break; /* HUFF_2D */
  747|       |
  748|  18.6k|    default:
  ------------------
  |  Branch (748:5): [True: 0, False: 31.0k]
  ------------------
  749|      0|      break;
  750|  31.0k|  }
  751|  31.0k|bail:
  752|  31.0k|  return err;
  753|  31.0k|}
nlc_dec.cpp:_ZL11huff_dec_1DP13FDK_BITSTREAM9DATA_TYPEiPaii:
  312|  23.3k|{
  313|  23.3k|  ERROR_t err = HUFFDEC_OK;
  ------------------
  |  |  167|  23.3k|#define HUFFDEC_OK 0
  ------------------
  314|  23.3k|  int i = 0, node = 0, offset = 0;
  315|  23.3k|  int od = 0, od_sign = 0;
  316|  23.3k|  ULONG data = 0;
  ------------------
  |  |  182|  23.3k|#define ULONG UINT
  ------------------
  317|  23.3k|  int bitsAvail = 0;
  318|       |
  319|  23.3k|  const SHORT(*partTab)[MAX_ENTRIES][2] = NULL;
  320|  23.3k|  const SHORT(*nodeTab)[MAX_ENTRIES][2] = NULL;
  321|       |
  322|  23.3k|  switch (data_type) {
  323|  7.01k|    case t_CLD:
  ------------------
  |  Branch (323:5): [True: 7.01k, False: 16.3k]
  ------------------
  324|  7.01k|      partTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.cld[0][0];
  325|  7.01k|      nodeTab = (HANDLE_HUFF_NODE)&FDK_huffCLDNodes.h1D[dim1]->nodeTab[0][0];
  326|  7.01k|      break;
  327|  11.0k|    case t_ICC:
  ------------------
  |  Branch (327:5): [True: 11.0k, False: 12.2k]
  ------------------
  328|  11.0k|      partTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.icc[0][0];
  329|  11.0k|      nodeTab = (HANDLE_HUFF_NODE)&FDK_huffICCNodes.h1D[dim1]->nodeTab[0][0];
  330|  11.0k|      break;
  331|      0|    case t_OLD:
  ------------------
  |  Branch (331:5): [True: 0, False: 23.3k]
  ------------------
  332|      0|      partTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.old[0][0];
  333|      0|      nodeTab = (HANDLE_HUFF_NODE)&huffOLDNodes.h1D[dim1]->nodeTab[0][0];
  334|      0|      break;
  335|  5.21k|    case t_IPD:
  ------------------
  |  Branch (335:5): [True: 5.21k, False: 18.1k]
  ------------------
  336|  5.21k|      partTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.ipd[0][0];
  337|  5.21k|      nodeTab = (HANDLE_HUFF_NODE)&FDK_huffIPDNodes.h1D[dim1].nodeTab[0][0];
  338|  5.21k|      break;
  339|      0|    default:
  ------------------
  |  Branch (339:5): [True: 0, False: 23.3k]
  ------------------
  340|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (340:7): [Folded, False: 0]
  ------------------
  341|      0|      err = HUFFDEC_NOTOK;
  ------------------
  |  |  168|      0|#define HUFFDEC_NOTOK (-1)
  ------------------
  342|      0|      goto bail;
  343|  23.3k|  }
  344|       |
  345|  23.3k|  if (p0_flag) {
  ------------------
  |  Branch (345:7): [True: 7.39k, False: 15.9k]
  ------------------
  346|  7.39k|    if ((err = huff_read(strm, partTab, &node)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  7.39k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (346:9): [True: 0, False: 7.39k]
  ------------------
  347|      0|      goto bail;
  348|      0|    }
  349|       |
  350|  7.39k|    out_data[0] = -(node + 1);
  351|  7.39k|    offset = 1;
  352|  7.39k|  }
  353|       |
  354|  99.2k|  for (i = offset; i < num_val; i++) {
  ------------------
  |  Branch (354:20): [True: 77.0k, False: 22.2k]
  ------------------
  355|  77.0k|    bitsAvail = FDKgetValidBits(strm);
  356|  77.0k|    if (bitsAvail < 1) {
  ------------------
  |  Branch (356:9): [True: 1.02k, False: 76.0k]
  ------------------
  357|  1.02k|      err = HUFFDEC_NOTOK;
  ------------------
  |  |  168|  1.02k|#define HUFFDEC_NOTOK (-1)
  ------------------
  358|  1.02k|      goto bail;
  359|  1.02k|    }
  360|       |
  361|  76.0k|    if ((err = huff_read(strm, nodeTab, &node)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  76.0k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (361:9): [True: 0, False: 76.0k]
  ------------------
  362|      0|      goto bail;
  363|      0|    }
  364|  76.0k|    od = -(node + 1);
  365|       |
  366|  76.0k|    if (data_type != t_IPD) {
  ------------------
  |  Branch (366:9): [True: 58.3k, False: 17.6k]
  ------------------
  367|  58.3k|      if (od != 0) {
  ------------------
  |  Branch (367:11): [True: 18.9k, False: 39.4k]
  ------------------
  368|  18.9k|        bitsAvail = FDKgetValidBits(strm);
  369|  18.9k|        if (bitsAvail < 1) {
  ------------------
  |  Branch (369:13): [True: 37, False: 18.9k]
  ------------------
  370|     37|          err = HUFFDEC_NOTOK;
  ------------------
  |  |  168|     37|#define HUFFDEC_NOTOK (-1)
  ------------------
  371|     37|          goto bail;
  372|     37|        }
  373|       |
  374|  18.9k|        data = FDKreadBits(strm, 1);
  375|  18.9k|        od_sign = data;
  376|       |
  377|  18.9k|        if (od_sign) od = -od;
  ------------------
  |  Branch (377:13): [True: 5.76k, False: 13.1k]
  ------------------
  378|  18.9k|      }
  379|  58.3k|    }
  380|       |
  381|  75.9k|    out_data[i] = od;
  382|  75.9k|  }
  383|       |
  384|  23.3k|bail:
  385|  23.3k|  return err;
  386|  23.3k|}
nlc_dec.cpp:_ZL9huff_readP13FDK_BITSTREAMPA168_A2_KsPi:
  231|   229k|                         int* out_data) {
  232|   229k|  int node = 0;
  233|   229k|  int len = 0;
  234|       |
  235|   607k|  do {
  236|   607k|    ULONG next_bit;
  ------------------
  |  |  182|   607k|#define ULONG UINT
  ------------------
  237|   607k|    next_bit = FDKreadBits(strm, 1);
  238|   607k|    len++;
  239|   607k|    node = (*nodeTab)[node][next_bit];
  240|   607k|  } while (node > 0);
  ------------------
  |  Branch (240:12): [True: 377k, False: 229k]
  ------------------
  241|       |
  242|   229k|  *out_data = node;
  243|       |
  244|   229k|  return HUFFDEC_OK;
  ------------------
  |  |  167|   229k|#define HUFFDEC_OK 0
  ------------------
  245|   229k|}
nlc_dec.cpp:_ZL11huff_dec_2DP13FDK_BITSTREAM9DATA_TYPEiiPA2_aiiPPa:
  391|  24.6k|                           SCHAR* p0_data[2]) {
  392|  24.6k|  ERROR_t err = HUFFDEC_OK;
  ------------------
  |  |  167|  24.6k|#define HUFFDEC_OK 0
  ------------------
  393|  24.6k|  int i = 0, lav = 0, escape = 0, escCntr = 0;
  394|  24.6k|  int node = 0;
  395|  24.6k|  unsigned long data = 0;
  396|       |
  397|  24.6k|  SCHAR esc_data[2][28] = {{0}};
  398|  24.6k|  int escIdx[28] = {0};
  399|  24.6k|  const SHORT(*nodeTab)[MAX_ENTRIES][2] = NULL;
  400|       |
  401|       |  /* LAV */
  402|  24.6k|  if ((err =
  ------------------
  |  Branch (402:7): [True: 0, False: 24.6k]
  ------------------
  403|  24.6k|           huff_read(strm, (HANDLE_HUFF_NODE)&FDK_huffLavIdxNodes.nodeTab[0][0],
  404|  24.6k|                     &node)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  24.6k|#define HUFFDEC_OK 0
  ------------------
  405|      0|    goto bail;
  406|      0|  }
  407|  24.6k|  data = -(node + 1);
  408|       |
  409|  24.6k|  switch (data_type) {
  410|  12.9k|    case t_CLD:
  ------------------
  |  Branch (410:5): [True: 12.9k, False: 11.6k]
  ------------------
  411|  12.9k|      lav = 2 * data + 3; /* 3, 5, 7, 9 */
  412|  12.9k|      nodeTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.cld[0][0];
  413|  12.9k|      break;
  414|  6.81k|    case t_ICC:
  ------------------
  |  Branch (414:5): [True: 6.81k, False: 17.8k]
  ------------------
  415|  6.81k|      lav = 2 * data + 1; /* 1, 3, 5, 7 */
  416|  6.81k|      nodeTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.icc[0][0];
  417|  6.81k|      break;
  418|      0|    case t_OLD:
  ------------------
  |  Branch (418:5): [True: 0, False: 24.6k]
  ------------------
  419|      0|      lav = 3 * data + 3;
  420|      0|      nodeTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.old[0][0];
  421|      0|      break;
  422|  4.84k|    case t_IPD:
  ------------------
  |  Branch (422:5): [True: 4.84k, False: 19.7k]
  ------------------
  423|  4.84k|      if (data == 0)
  ------------------
  |  Branch (423:11): [True: 1.68k, False: 3.15k]
  ------------------
  424|  1.68k|        data = 3;
  425|  3.15k|      else
  426|  3.15k|        data--;
  427|  4.84k|      lav = 2 * data + 1; /* 1, 3, 5, 7 */
  428|  4.84k|      nodeTab = (HANDLE_HUFF_NODE)&FDK_huffPart0Nodes.ipd[0][0];
  429|  4.84k|      break;
  430|      0|    default:
  ------------------
  |  Branch (430:5): [True: 0, False: 24.6k]
  ------------------
  431|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (431:7): [Folded, False: 0]
  ------------------
  432|      0|      err = HUFFDEC_NOTOK;
  ------------------
  |  |  168|      0|#define HUFFDEC_NOTOK (-1)
  ------------------
  433|      0|      goto bail;
  434|  24.6k|  }
  435|       |
  436|       |  /* Partition 0 */
  437|  24.6k|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (437:7): [True: 14.8k, False: 9.75k]
  ------------------
  438|  14.8k|    if ((err = huff_read(strm, nodeTab, &node)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  14.8k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (438:9): [True: 0, False: 14.8k]
  ------------------
  439|      0|      goto bail;
  440|      0|    }
  441|  14.8k|    *p0_data[0] = -(node + 1);
  442|  14.8k|  }
  443|  24.6k|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (443:7): [True: 10.0k, False: 14.5k]
  ------------------
  444|  10.0k|    if ((err = huff_read(strm, nodeTab, &node)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  10.0k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (444:9): [True: 0, False: 10.0k]
  ------------------
  445|      0|      goto bail;
  446|      0|    }
  447|  10.0k|    *p0_data[1] = -(node + 1);
  448|  10.0k|  }
  449|       |
  450|  24.6k|  switch (data_type) {
  451|  12.9k|    case t_CLD:
  ------------------
  |  Branch (451:5): [True: 12.9k, False: 11.6k]
  ------------------
  452|  12.9k|      switch (lav) {
  ------------------
  |  Branch (452:15): [True: 12.9k, False: 0]
  ------------------
  453|  3.39k|        case 3:
  ------------------
  |  Branch (453:9): [True: 3.39k, False: 9.57k]
  ------------------
  454|  3.39k|          nodeTab =
  455|  3.39k|              (HANDLE_HUFF_NODE)&FDK_huffCLDNodes.h2D[dim1][dim2]->lav3[0][0];
  456|  3.39k|          break;
  457|  1.01k|        case 5:
  ------------------
  |  Branch (457:9): [True: 1.01k, False: 11.9k]
  ------------------
  458|  1.01k|          nodeTab =
  459|  1.01k|              (HANDLE_HUFF_NODE)&FDK_huffCLDNodes.h2D[dim1][dim2]->lav5[0][0];
  460|  1.01k|          break;
  461|  3.86k|        case 7:
  ------------------
  |  Branch (461:9): [True: 3.86k, False: 9.10k]
  ------------------
  462|  3.86k|          nodeTab =
  463|  3.86k|              (HANDLE_HUFF_NODE)&FDK_huffCLDNodes.h2D[dim1][dim2]->lav7[0][0];
  464|  3.86k|          break;
  465|  4.69k|        case 9:
  ------------------
  |  Branch (465:9): [True: 4.69k, False: 8.27k]
  ------------------
  466|  4.69k|          nodeTab =
  467|  4.69k|              (HANDLE_HUFF_NODE)&FDK_huffCLDNodes.h2D[dim1][dim2]->lav9[0][0];
  468|  4.69k|          break;
  469|  12.9k|      }
  470|  12.9k|      break;
  471|  12.9k|    case t_ICC:
  ------------------
  |  Branch (471:5): [True: 6.81k, False: 17.8k]
  ------------------
  472|  6.81k|      switch (lav) {
  ------------------
  |  Branch (472:15): [True: 6.81k, False: 0]
  ------------------
  473|  2.41k|        case 1:
  ------------------
  |  Branch (473:9): [True: 2.41k, False: 4.39k]
  ------------------
  474|  2.41k|          nodeTab =
  475|  2.41k|              (HANDLE_HUFF_NODE)&FDK_huffICCNodes.h2D[dim1][dim2]->lav1[0][0];
  476|  2.41k|          break;
  477|  1.21k|        case 3:
  ------------------
  |  Branch (477:9): [True: 1.21k, False: 5.59k]
  ------------------
  478|  1.21k|          nodeTab =
  479|  1.21k|              (HANDLE_HUFF_NODE)&FDK_huffICCNodes.h2D[dim1][dim2]->lav3[0][0];
  480|  1.21k|          break;
  481|    587|        case 5:
  ------------------
  |  Branch (481:9): [True: 587, False: 6.22k]
  ------------------
  482|    587|          nodeTab =
  483|    587|              (HANDLE_HUFF_NODE)&FDK_huffICCNodes.h2D[dim1][dim2]->lav5[0][0];
  484|    587|          break;
  485|  2.59k|        case 7:
  ------------------
  |  Branch (485:9): [True: 2.59k, False: 4.21k]
  ------------------
  486|  2.59k|          nodeTab =
  487|  2.59k|              (HANDLE_HUFF_NODE)&FDK_huffICCNodes.h2D[dim1][dim2]->lav7[0][0];
  488|  2.59k|          break;
  489|  6.81k|      }
  490|  6.81k|      break;
  491|  6.81k|    case t_OLD:
  ------------------
  |  Branch (491:5): [True: 0, False: 24.6k]
  ------------------
  492|      0|      switch (lav) {
  ------------------
  |  Branch (492:15): [True: 0, False: 0]
  ------------------
  493|      0|        case 3:
  ------------------
  |  Branch (493:9): [True: 0, False: 0]
  ------------------
  494|      0|          nodeTab = (HANDLE_HUFF_NODE)&huffOLDNodes.h2D[dim1][dim2]->lav3[0][0];
  495|      0|          break;
  496|      0|        case 6:
  ------------------
  |  Branch (496:9): [True: 0, False: 0]
  ------------------
  497|      0|          nodeTab = (HANDLE_HUFF_NODE)&huffOLDNodes.h2D[dim1][dim2]->lav6[0][0];
  498|      0|          break;
  499|      0|        case 9:
  ------------------
  |  Branch (499:9): [True: 0, False: 0]
  ------------------
  500|      0|          nodeTab = (HANDLE_HUFF_NODE)&huffOLDNodes.h2D[dim1][dim2]->lav9[0][0];
  501|      0|          break;
  502|      0|        case 12:
  ------------------
  |  Branch (502:9): [True: 0, False: 0]
  ------------------
  503|      0|          nodeTab =
  504|      0|              (HANDLE_HUFF_NODE)&huffOLDNodes.h2D[dim1][dim2]->lav12[0][0];
  505|      0|          break;
  506|      0|      }
  507|      0|      break;
  508|  4.84k|    case t_IPD:
  ------------------
  |  Branch (508:5): [True: 4.84k, False: 19.7k]
  ------------------
  509|  4.84k|      switch (lav) {
  ------------------
  |  Branch (509:15): [True: 4.84k, False: 0]
  ------------------
  510|  2.58k|        case 1:
  ------------------
  |  Branch (510:9): [True: 2.58k, False: 2.25k]
  ------------------
  511|  2.58k|          nodeTab =
  512|  2.58k|              (HANDLE_HUFF_NODE)&FDK_huffIPDNodes.h2D[dim1][dim2].lav1[0][0];
  513|  2.58k|          break;
  514|    130|        case 3:
  ------------------
  |  Branch (514:9): [True: 130, False: 4.71k]
  ------------------
  515|    130|          nodeTab =
  516|    130|              (HANDLE_HUFF_NODE)&FDK_huffIPDNodes.h2D[dim1][dim2].lav3[0][0];
  517|    130|          break;
  518|    439|        case 5:
  ------------------
  |  Branch (518:9): [True: 439, False: 4.40k]
  ------------------
  519|    439|          nodeTab =
  520|    439|              (HANDLE_HUFF_NODE)&FDK_huffIPDNodes.h2D[dim1][dim2].lav5[0][0];
  521|    439|          break;
  522|  1.68k|        case 7:
  ------------------
  |  Branch (522:9): [True: 1.68k, False: 3.15k]
  ------------------
  523|  1.68k|          nodeTab =
  524|  1.68k|              (HANDLE_HUFF_NODE)&FDK_huffIPDNodes.h2D[dim1][dim2].lav7[0][0];
  525|  1.68k|          break;
  526|  4.84k|      }
  527|  4.84k|      break;
  528|  4.84k|    default:
  ------------------
  |  Branch (528:5): [True: 0, False: 24.6k]
  ------------------
  529|      0|      break;
  530|  24.6k|  }
  531|       |
  532|  75.6k|  for (i = 0; i < num_val; i += stride) {
  ------------------
  |  Branch (532:15): [True: 51.0k, False: 24.6k]
  ------------------
  533|  51.0k|    if ((err = huff_read_2D(strm, nodeTab, out_data[i], &escape)) !=
  ------------------
  |  Branch (533:9): [True: 0, False: 51.0k]
  ------------------
  534|  51.0k|        HUFFDEC_OK) {
  ------------------
  |  |  167|  51.0k|#define HUFFDEC_OK 0
  ------------------
  535|      0|      goto bail;
  536|      0|    }
  537|       |
  538|  51.0k|    if (escape) {
  ------------------
  |  Branch (538:9): [True: 565, False: 50.4k]
  ------------------
  539|    565|      escIdx[escCntr++] = i;
  540|  50.4k|    } else {
  541|  50.4k|      if (data_type == t_IPD) {
  ------------------
  |  Branch (541:11): [True: 10.7k, False: 39.6k]
  ------------------
  542|  10.7k|        if ((err = sym_restoreIPD(strm, lav, out_data[i])) != HUFFDEC_OK) {
  ------------------
  |  |  167|  10.7k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (542:13): [True: 0, False: 10.7k]
  ------------------
  543|      0|          goto bail;
  544|      0|        }
  545|  39.6k|      } else {
  546|  39.6k|        if ((err = sym_restore(strm, lav, out_data[i])) != HUFFDEC_OK) {
  ------------------
  |  |  167|  39.6k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (546:13): [True: 0, False: 39.6k]
  ------------------
  547|      0|          goto bail;
  548|      0|        }
  549|  39.6k|      }
  550|  50.4k|    }
  551|  51.0k|  } /* i */
  552|       |
  553|  24.6k|  if (escCntr > 0) {
  ------------------
  |  Branch (553:7): [True: 411, False: 24.2k]
  ------------------
  554|    411|    if ((err = pcm_decode(strm, esc_data[0], esc_data[1], 0, 2 * escCntr,
  ------------------
  |  Branch (554:9): [True: 0, False: 411]
  ------------------
  555|    411|                          (2 * lav + 1))) != HUFFDEC_OK) {
  ------------------
  |  |  167|    411|#define HUFFDEC_OK 0
  ------------------
  556|      0|      goto bail;
  557|      0|    }
  558|       |
  559|    976|    for (i = 0; i < escCntr; i++) {
  ------------------
  |  Branch (559:17): [True: 565, False: 411]
  ------------------
  560|    565|      out_data[escIdx[i]][0] = esc_data[0][i] - lav;
  561|    565|      out_data[escIdx[i]][1] = esc_data[1][i] - lav;
  562|    565|    }
  563|    411|  }
  564|  24.6k|bail:
  565|  24.6k|  return err;
  566|  24.6k|}
nlc_dec.cpp:_ZL11sym_restoreP13FDK_BITSTREAMiPa:
  273|  39.6k|static ERROR_t sym_restore(HANDLE_FDK_BITSTREAM strm, int lav, SCHAR data[2]) {
  274|  39.6k|  ULONG sym_bit = 0;
  ------------------
  |  |  182|  39.6k|#define ULONG UINT
  ------------------
  275|       |
  276|  39.6k|  int sum_val = data[0] + data[1];
  277|  39.6k|  int diff_val = data[0] - data[1];
  278|       |
  279|  39.6k|  if (sum_val > lav) {
  ------------------
  |  Branch (279:7): [True: 16.0k, False: 23.6k]
  ------------------
  280|  16.0k|    data[0] = -sum_val + (2 * lav + 1);
  281|  16.0k|    data[1] = -diff_val;
  282|  23.6k|  } else {
  283|  23.6k|    data[0] = sum_val;
  284|  23.6k|    data[1] = diff_val;
  285|  23.6k|  }
  286|       |
  287|  39.6k|  if (data[0] + data[1] != 0) {
  ------------------
  |  Branch (287:7): [True: 22.7k, False: 16.9k]
  ------------------
  288|  22.7k|    sym_bit = FDKreadBits(strm, 1);
  289|  22.7k|    if (sym_bit) {
  ------------------
  |  Branch (289:9): [True: 7.88k, False: 14.8k]
  ------------------
  290|  7.88k|      data[0] = -data[0];
  291|  7.88k|      data[1] = -data[1];
  292|  7.88k|    }
  293|  22.7k|  }
  294|       |
  295|  39.6k|  if (data[0] - data[1] != 0) {
  ------------------
  |  Branch (295:7): [True: 23.6k, False: 15.9k]
  ------------------
  296|  23.6k|    sym_bit = FDKreadBits(strm, 1);
  297|  23.6k|    if (sym_bit) {
  ------------------
  |  Branch (297:9): [True: 9.73k, False: 13.9k]
  ------------------
  298|  9.73k|      int tmp;
  299|  9.73k|      tmp = data[0];
  300|  9.73k|      data[0] = data[1];
  301|  9.73k|      data[1] = tmp;
  302|  9.73k|    }
  303|  23.6k|  }
  304|       |
  305|  39.6k|  return HUFFDEC_OK;
  ------------------
  |  |  167|  39.6k|#define HUFFDEC_OK 0
  ------------------
  306|  39.6k|}
nlc_dec.cpp:_ZL16diff_freq_decodePKaPai:
  756|  39.7k|                             SCHAR* const out_data, const int num_val) {
  757|  39.7k|  int i = 0;
  758|  39.7k|  out_data[0] = diff_data[0];
  759|       |
  760|   195k|  for (i = 1; i < num_val; i++) {
  ------------------
  |  Branch (760:15): [True: 155k, False: 39.7k]
  ------------------
  761|   155k|    out_data[i] = out_data[i - 1] + diff_data[i];
  762|   155k|  }
  763|  39.7k|}
nlc_dec.cpp:_ZL26diff_time_decode_backwardsPKaS0_Paii:
  769|  14.5k|                                       const int num_val) {
  770|  14.5k|  int i = 0; /* default start value*/
  771|       |
  772|  14.5k|  if (mixed_diff_type) {
  ------------------
  |  Branch (772:7): [True: 3.03k, False: 11.4k]
  ------------------
  773|  3.03k|    out_data[0] = diff_data[0];
  774|  3.03k|    i = 1; /* new start value */
  775|  3.03k|  }
  776|  96.8k|  for (; i < num_val; i++) {
  ------------------
  |  Branch (776:10): [True: 82.3k, False: 14.5k]
  ------------------
  777|  82.3k|    out_data[i] = prev_data[i] + diff_data[i];
  778|  82.3k|  }
  779|  14.5k|}
nlc_dec.cpp:_ZL25diff_time_decode_forwardsPKaS0_Paii:
  785|  5.67k|                                      const int num_val) {
  786|  5.67k|  int i = 0; /* default start value*/
  787|       |
  788|  5.67k|  if (mixed_diff_type) {
  ------------------
  |  Branch (788:7): [True: 2.43k, False: 3.24k]
  ------------------
  789|  2.43k|    out_data[0] = diff_data[0];
  790|  2.43k|    i = 1; /* new start value */
  791|  2.43k|  }
  792|  17.3k|  for (; i < num_val; i++) {
  ------------------
  |  Branch (792:10): [True: 11.7k, False: 5.67k]
  ------------------
  793|  11.7k|    out_data[i] = prev_data[i] - diff_data[i];
  794|  11.7k|  }
  795|  5.67k|}
nlc_dec.cpp:_ZL10attach_lsbP13FDK_BITSTREAMPaiiiS1_:
  799|  46.2k|                          SCHAR* out_data) {
  800|  46.2k|  int i = 0, lsb = 0;
  801|  46.2k|  ULONG data = 0;
  ------------------
  |  |  182|  46.2k|#define ULONG UINT
  ------------------
  802|       |
  803|   251k|  for (i = 0; i < num_val; i++) {
  ------------------
  |  Branch (803:15): [True: 205k, False: 46.2k]
  ------------------
  804|   205k|    int msb;
  805|   205k|    msb = in_data_msb[i];
  806|       |
  807|   205k|    if (num_lsb > 0) {
  ------------------
  |  Branch (807:9): [True: 32.7k, False: 172k]
  ------------------
  808|  32.7k|      data = FDKreadBits(strm, num_lsb);
  809|  32.7k|      lsb = data;
  810|       |
  811|  32.7k|      out_data[i] = ((msb << num_lsb) | lsb) - offset;
  812|  32.7k|    } else
  813|   172k|      out_data[i] = msb - offset;
  814|   205k|  }
  815|       |
  816|  46.2k|  return HUFFDEC_OK; /* dummy */
  ------------------
  |  |  167|  46.2k|#define HUFFDEC_OK 0
  ------------------
  817|  46.2k|}
nlc_dec.cpp:_ZL12huff_read_2DP13FDK_BITSTREAMPA168_A2_KsPaPi:
  249|  96.8k|                            SCHAR out_data[2], int* escape) {
  250|  96.8k|  ERROR_t err = HUFFDEC_OK;
  ------------------
  |  |  167|  96.8k|#define HUFFDEC_OK 0
  ------------------
  251|       |
  252|  96.8k|  int huff_2D_8bit = 0;
  253|  96.8k|  int node = 0;
  254|       |
  255|  96.8k|  if ((err = huff_read(strm, nodeTab, &node)) != HUFFDEC_OK) {
  ------------------
  |  |  167|  96.8k|#define HUFFDEC_OK 0
  ------------------
  |  Branch (255:7): [True: 0, False: 96.8k]
  ------------------
  256|      0|    goto bail;
  257|      0|  }
  258|  96.8k|  *escape = (node == 0);
  259|       |
  260|  96.8k|  if (*escape) {
  ------------------
  |  Branch (260:7): [True: 565, False: 96.3k]
  ------------------
  261|    565|    out_data[0] = 0;
  262|    565|    out_data[1] = 1;
  263|  96.3k|  } else {
  264|  96.3k|    huff_2D_8bit = -(node + 1);
  265|  96.3k|    out_data[0] = huff_2D_8bit >> 4;
  266|  96.3k|    out_data[1] = huff_2D_8bit & 0xf;
  267|  96.3k|  }
  268|       |
  269|  96.8k|bail:
  270|  96.8k|  return err;
  271|  96.8k|}

_Z26qmfInitSynthesisFilterBankP15QMF_FILTER_BANKPiiiiii:
  729|   129k|{
  730|   129k|  int oldOutScale = h_Qmf->outScalefactor;
  731|   129k|  int err = qmfInitFilterBank(h_Qmf, pFilterStates, noCols, lsb, usb,
  732|   129k|                              no_channels, flags, 1);
  733|   129k|  if (h_Qmf->FilterStates != NULL) {
  ------------------
  |  Branch (733:7): [True: 129k, False: 8]
  ------------------
  734|   129k|    if (!(flags & QMF_FLAG_KEEP_STATES)) {
  ------------------
  |  |  135|   129k|#define QMF_FLAG_KEEP_STATES 8
  ------------------
  |  Branch (734:9): [True: 89.5k, False: 40.0k]
  ------------------
  735|  89.5k|      FDKmemclear(
  736|  89.5k|          h_Qmf->FilterStates,
  737|  89.5k|          (2 * QMF_NO_POLY - 1) * h_Qmf->no_channels * sizeof(FIXP_QSS));
  ------------------
  |  |  213|  89.5k|#define QMF_NO_POLY 5
  ------------------
  738|  89.5k|    } else {
  739|  40.0k|      qmfAdaptFilterStates(h_Qmf, oldOutScale - h_Qmf->outScalefactor);
  740|  40.0k|    }
  741|   129k|  }
  742|       |
  743|   129k|  FDK_ASSERT(h_Qmf->no_channels >= h_Qmf->lsb);
  ------------------
  |  |  221|   129k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (743:3): [True: 129k, False: 0]
  ------------------
  744|   129k|  FDK_ASSERT(h_Qmf->no_channels >= h_Qmf->usb);
  ------------------
  |  |  221|   129k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (744:3): [True: 129k, False: 0]
  ------------------
  745|       |
  746|   129k|  return err;
  747|   129k|}
_Z23qmfChangeOutScalefactorP15QMF_FILTER_BANKi:
  759|   638k|) {
  760|   638k|  if (synQmf == NULL) {
  ------------------
  |  Branch (760:7): [True: 0, False: 638k]
  ------------------
  761|      0|    return;
  762|      0|  }
  763|       |
  764|       |  /* Add internal filterbank scale */
  765|   638k|  outScalefactor +=
  766|   638k|      (ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK + synQmf->filterScale) +
  ------------------
  |  |  156|   638k|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  767|   638k|      synQmf->synScalefactor;
  768|       |
  769|       |  /* adjust filter states when scale factor has been changed */
  770|   638k|  if (synQmf->outScalefactor != outScalefactor) {
  ------------------
  |  Branch (770:7): [True: 81.5k, False: 556k]
  ------------------
  771|  81.5k|    int diff;
  772|       |
  773|  81.5k|    diff = synQmf->outScalefactor - outScalefactor;
  774|       |
  775|  81.5k|    qmfAdaptFilterStates(synQmf, diff);
  776|       |
  777|       |    /* save new scale factor */
  778|  81.5k|    synQmf->outScalefactor = outScalefactor;
  779|  81.5k|  }
  780|   638k|}
_Z20qmfGetOutScalefactorP15QMF_FILTER_BANK:
  791|  98.8k|{
  792|  98.8k|  int scaleFactor = synQmf->outScalefactor
  ------------------
  |  Branch (792:21): [True: 38.6k, False: 60.2k]
  ------------------
  793|  98.8k|                        ? (synQmf->outScalefactor -
  794|  38.6k|                           (ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK +
  ------------------
  |  |  156|  38.6k|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  795|  38.6k|                            synQmf->filterScale + synQmf->synScalefactor))
  796|  98.8k|                        : 0;
  797|  98.8k|  return scaleFactor;
  798|  98.8k|}
_Z16qmfChangeOutGainP15QMF_FILTER_BANKii:
  811|   141k|) {
  812|   141k|  synQmf->outGain_m = outputGain;
  813|   141k|  synQmf->outGain_e = outputGainScale;
  814|   141k|}
qmf.cpp:_ZL17qmfInitFilterBankP15QMF_FILTER_BANKPviiiiji:
  494|   249k|{
  495|   249k|  FDKmemclear(h_Qmf, sizeof(QMF_FILTER_BANK));
  496|       |
  497|   249k|  if (flags & QMF_FLAG_MPSLDFB) {
  ------------------
  |  |  137|   249k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  |  Branch (497:7): [True: 12.6k, False: 237k]
  ------------------
  498|  12.6k|    flags |= QMF_FLAG_NONSYMMETRIC;
  ------------------
  |  |  131|  12.6k|#define QMF_FLAG_NONSYMMETRIC 2
  ------------------
  499|  12.6k|    flags |= QMF_FLAG_MPSLDFB_OPTIMIZE_MODULATION;
  ------------------
  |  |  140|  12.6k|#define QMF_FLAG_MPSLDFB_OPTIMIZE_MODULATION 32
  ------------------
  500|       |
  501|  12.6k|    h_Qmf->t_cos = NULL;
  502|  12.6k|    h_Qmf->t_sin = NULL;
  503|  12.6k|    h_Qmf->filterScale = QMF_MPSLDFB_PFT_SCALE;
  ------------------
  |  |  284|  12.6k|#define QMF_MPSLDFB_PFT_SCALE 1
  ------------------
  504|  12.6k|    h_Qmf->p_stride = 1;
  505|       |
  506|  12.6k|    switch (no_channels) {
  507|  3.49k|      case 64:
  ------------------
  |  Branch (507:7): [True: 3.49k, False: 9.12k]
  ------------------
  508|  3.49k|        h_Qmf->p_filter = qmf_mpsldfb_640;
  509|  3.49k|        h_Qmf->FilterSize = 640;
  510|  3.49k|        break;
  511|  9.12k|      case 32:
  ------------------
  |  Branch (511:7): [True: 9.12k, False: 3.49k]
  ------------------
  512|  9.12k|        h_Qmf->p_filter = qmf_mpsldfb_320;
  513|  9.12k|        h_Qmf->FilterSize = 320;
  514|  9.12k|        break;
  515|      0|      default:
  ------------------
  |  Branch (515:7): [True: 0, False: 12.6k]
  ------------------
  516|      0|        return -1;
  517|  12.6k|    }
  518|  12.6k|  }
  519|       |
  520|   249k|  if (!(flags & QMF_FLAG_MPSLDFB) && (flags & QMF_FLAG_CLDFB)) {
  ------------------
  |  |  137|   249k|#define QMF_FLAG_MPSLDFB 16
  ------------------
                if (!(flags & QMF_FLAG_MPSLDFB) && (flags & QMF_FLAG_CLDFB)) {
  ------------------
  |  |  133|   237k|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (520:7): [True: 237k, False: 12.6k]
  |  Branch (520:38): [True: 95.1k, False: 142k]
  ------------------
  521|  95.1k|    flags |= QMF_FLAG_NONSYMMETRIC;
  ------------------
  |  |  131|  95.1k|#define QMF_FLAG_NONSYMMETRIC 2
  ------------------
  522|  95.1k|    h_Qmf->filterScale = QMF_CLDFB_PFT_SCALE;
  ------------------
  |  |  258|  95.1k|#define QMF_CLDFB_PFT_SCALE 1
  ------------------
  523|       |
  524|  95.1k|    h_Qmf->p_stride = 1;
  525|  95.1k|    switch (no_channels) {
  526|  7.87k|      case 64:
  ------------------
  |  Branch (526:7): [True: 7.87k, False: 87.2k]
  ------------------
  527|  7.87k|        h_Qmf->t_cos = qmf_phaseshift_cos64_cldfb;
  528|  7.87k|        h_Qmf->t_sin = qmf_phaseshift_sin64_cldfb;
  529|  7.87k|        h_Qmf->p_filter = qmf_cldfb_640;
  530|  7.87k|        h_Qmf->FilterSize = 640;
  531|  7.87k|        break;
  532|  64.8k|      case 32:
  ------------------
  |  Branch (532:7): [True: 64.8k, False: 30.3k]
  ------------------
  533|  64.8k|        h_Qmf->t_cos = (synflag) ? qmf_phaseshift_cos32_cldfb_syn
  ------------------
  |  Branch (533:24): [True: 34.3k, False: 30.4k]
  ------------------
  534|  64.8k|                                 : qmf_phaseshift_cos32_cldfb_ana;
  535|  64.8k|        h_Qmf->t_sin = qmf_phaseshift_sin32_cldfb;
  536|  64.8k|        h_Qmf->p_filter = qmf_cldfb_320;
  537|  64.8k|        h_Qmf->FilterSize = 320;
  538|  64.8k|        break;
  539|  18.8k|      case 16:
  ------------------
  |  Branch (539:7): [True: 18.8k, False: 76.2k]
  ------------------
  540|  18.8k|        h_Qmf->t_cos = (synflag) ? qmf_phaseshift_cos16_cldfb_syn
  ------------------
  |  Branch (540:24): [True: 3.66k, False: 15.2k]
  ------------------
  541|  18.8k|                                 : qmf_phaseshift_cos16_cldfb_ana;
  542|  18.8k|        h_Qmf->t_sin = qmf_phaseshift_sin16_cldfb;
  543|  18.8k|        h_Qmf->p_filter = qmf_cldfb_160;
  544|  18.8k|        h_Qmf->FilterSize = 160;
  545|  18.8k|        break;
  546|  3.56k|      case 8:
  ------------------
  |  Branch (546:7): [True: 3.56k, False: 91.5k]
  ------------------
  547|  3.56k|        h_Qmf->t_cos = (synflag) ? qmf_phaseshift_cos8_cldfb_syn
  ------------------
  |  Branch (547:24): [True: 1.64k, False: 1.91k]
  ------------------
  548|  3.56k|                                 : qmf_phaseshift_cos8_cldfb_ana;
  549|  3.56k|        h_Qmf->t_sin = qmf_phaseshift_sin8_cldfb;
  550|  3.56k|        h_Qmf->p_filter = qmf_cldfb_80;
  551|  3.56k|        h_Qmf->FilterSize = 80;
  552|  3.56k|        break;
  553|      0|      default:
  ------------------
  |  Branch (553:7): [True: 0, False: 95.1k]
  ------------------
  554|      0|        return -1;
  555|  95.1k|    }
  556|  95.1k|  }
  557|       |
  558|   249k|  if (!(flags & QMF_FLAG_MPSLDFB) && ((flags & QMF_FLAG_CLDFB) == 0)) {
  ------------------
  |  |  137|   249k|#define QMF_FLAG_MPSLDFB 16
  ------------------
                if (!(flags & QMF_FLAG_MPSLDFB) && ((flags & QMF_FLAG_CLDFB) == 0)) {
  ------------------
  |  |  133|   237k|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (558:7): [True: 237k, False: 12.6k]
  |  Branch (558:38): [True: 142k, False: 95.1k]
  ------------------
  559|   142k|    switch (no_channels) {
  560|  42.3k|      case 64:
  ------------------
  |  Branch (560:7): [True: 42.3k, False: 99.6k]
  ------------------
  561|  42.3k|        h_Qmf->p_filter = qmf_pfilt640;
  562|  42.3k|        h_Qmf->t_cos = qmf_phaseshift_cos64;
  563|  42.3k|        h_Qmf->t_sin = qmf_phaseshift_sin64;
  564|  42.3k|        h_Qmf->p_stride = 1;
  565|  42.3k|        h_Qmf->FilterSize = 640;
  566|  42.3k|        h_Qmf->filterScale = 0;
  567|  42.3k|        break;
  568|  1.31k|      case 40:
  ------------------
  |  Branch (568:7): [True: 1.31k, False: 140k]
  ------------------
  569|  1.31k|        if (synflag) {
  ------------------
  |  Branch (569:13): [True: 0, False: 1.31k]
  ------------------
  570|      0|          break;
  571|  1.31k|        } else {
  572|  1.31k|          h_Qmf->p_filter = qmf_pfilt400; /* Scaling factor 0.8 */
  573|  1.31k|          h_Qmf->t_cos = qmf_phaseshift_cos40;
  574|  1.31k|          h_Qmf->t_sin = qmf_phaseshift_sin40;
  575|  1.31k|          h_Qmf->filterScale = 1;
  576|  1.31k|          h_Qmf->p_stride = 1;
  577|  1.31k|          h_Qmf->FilterSize = no_channels * 10;
  578|  1.31k|        }
  579|  1.31k|        break;
  580|  35.1k|      case 32:
  ------------------
  |  Branch (580:7): [True: 35.1k, False: 106k]
  ------------------
  581|  35.1k|        h_Qmf->p_filter = qmf_pfilt640;
  582|  35.1k|        if (flags & QMF_FLAG_DOWNSAMPLED) {
  ------------------
  |  |  143|  35.1k|#define QMF_FLAG_DOWNSAMPLED 64
  ------------------
  |  Branch (582:13): [True: 960, False: 34.1k]
  ------------------
  583|    960|          h_Qmf->t_cos = qmf_phaseshift_cos_downsamp32;
  584|    960|          h_Qmf->t_sin = qmf_phaseshift_sin_downsamp32;
  585|  34.1k|        } else {
  586|  34.1k|          h_Qmf->t_cos = qmf_phaseshift_cos32;
  587|  34.1k|          h_Qmf->t_sin = qmf_phaseshift_sin32;
  588|  34.1k|        }
  589|  35.1k|        h_Qmf->p_stride = 2;
  590|  35.1k|        h_Qmf->FilterSize = 640;
  591|  35.1k|        h_Qmf->filterScale = 0;
  592|  35.1k|        break;
  593|  1.31k|      case 20:
  ------------------
  |  Branch (593:7): [True: 1.31k, False: 140k]
  ------------------
  594|  1.31k|        h_Qmf->p_filter = qmf_pfilt200;
  595|  1.31k|        h_Qmf->p_stride = 1;
  596|  1.31k|        h_Qmf->FilterSize = 200;
  597|  1.31k|        h_Qmf->filterScale = 0;
  598|  1.31k|        break;
  599|  14.9k|      case 12:
  ------------------
  |  Branch (599:7): [True: 14.9k, False: 127k]
  ------------------
  600|  14.9k|        h_Qmf->p_filter = qmf_pfilt120;
  601|  14.9k|        h_Qmf->p_stride = 1;
  602|  14.9k|        h_Qmf->FilterSize = 120;
  603|  14.9k|        h_Qmf->filterScale = 0;
  604|  14.9k|        break;
  605|  2.88k|      case 8:
  ------------------
  |  Branch (605:7): [True: 2.88k, False: 139k]
  ------------------
  606|  2.88k|        h_Qmf->p_filter = qmf_pfilt640;
  607|  2.88k|        h_Qmf->p_stride = 8;
  608|  2.88k|        h_Qmf->FilterSize = 640;
  609|  2.88k|        h_Qmf->filterScale = 0;
  610|  2.88k|        break;
  611|  18.9k|      case 16:
  ------------------
  |  Branch (611:7): [True: 18.9k, False: 123k]
  ------------------
  612|  18.9k|        h_Qmf->p_filter = qmf_pfilt640;
  613|  18.9k|        h_Qmf->t_cos = qmf_phaseshift_cos16;
  614|  18.9k|        h_Qmf->t_sin = qmf_phaseshift_sin16;
  615|  18.9k|        h_Qmf->p_stride = 4;
  616|  18.9k|        h_Qmf->FilterSize = 640;
  617|  18.9k|        h_Qmf->filterScale = 0;
  618|  18.9k|        break;
  619|  25.0k|      case 24:
  ------------------
  |  Branch (619:7): [True: 25.0k, False: 116k]
  ------------------
  620|  25.0k|        h_Qmf->p_filter = qmf_pfilt240;
  621|  25.0k|        h_Qmf->t_cos = qmf_phaseshift_cos24;
  622|  25.0k|        h_Qmf->t_sin = qmf_phaseshift_sin24;
  623|  25.0k|        h_Qmf->p_stride = 1;
  624|  25.0k|        h_Qmf->FilterSize = 240;
  625|  25.0k|        h_Qmf->filterScale = 1;
  626|  25.0k|        break;
  627|     14|      default:
  ------------------
  |  Branch (627:7): [True: 14, False: 142k]
  ------------------
  628|     14|        return -1;
  629|   142k|    }
  630|   142k|  }
  631|       |
  632|   249k|  h_Qmf->synScalefactor = h_Qmf->filterScale;
  633|       |  // DCT|DST dependency
  634|   249k|  switch (no_channels) {
  635|      0|    case 128:
  ------------------
  |  Branch (635:5): [True: 0, False: 249k]
  ------------------
  636|      0|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK + 1;
  ------------------
  |  |  168|      0|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  637|      0|      break;
  638|  1.31k|    case 40: {
  ------------------
  |  Branch (638:5): [True: 1.31k, False: 248k]
  ------------------
  639|  1.31k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK - 1;
  ------------------
  |  |  168|  1.31k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  640|  1.31k|    } break;
  641|  53.7k|    case 64:
  ------------------
  |  Branch (641:5): [True: 53.7k, False: 196k]
  ------------------
  642|  53.7k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK;
  ------------------
  |  |  168|  53.7k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  643|  53.7k|      break;
  644|  6.44k|    case 8:
  ------------------
  |  Branch (644:5): [True: 6.44k, False: 243k]
  ------------------
  645|  6.44k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK - 3;
  ------------------
  |  |  168|  6.44k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  646|  6.44k|      break;
  647|  14.9k|    case 12:
  ------------------
  |  Branch (647:5): [True: 14.9k, False: 234k]
  ------------------
  648|  14.9k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK;
  ------------------
  |  |  168|  14.9k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  649|  14.9k|      break;
  650|  1.31k|    case 20:
  ------------------
  |  Branch (650:5): [True: 1.31k, False: 248k]
  ------------------
  651|  1.31k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK + 1;
  ------------------
  |  |  168|  1.31k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  652|  1.31k|      break;
  653|   109k|    case 32:
  ------------------
  |  Branch (653:5): [True: 109k, False: 140k]
  ------------------
  654|   109k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK - 1;
  ------------------
  |  |  168|   109k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  655|   109k|      break;
  656|  37.8k|    case 16:
  ------------------
  |  Branch (656:5): [True: 37.8k, False: 211k]
  ------------------
  657|  37.8k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK - 2;
  ------------------
  |  |  168|  37.8k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  658|  37.8k|      break;
  659|  25.0k|    case 24:
  ------------------
  |  Branch (659:5): [True: 25.0k, False: 224k]
  ------------------
  660|  25.0k|      h_Qmf->synScalefactor += ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK - 1;
  ------------------
  |  |  168|  25.0k|#define ALGORITHMIC_SCALING_IN_SYNTHESIS_FILTERBANK 1
  ------------------
  661|  25.0k|      break;
  662|      0|    default:
  ------------------
  |  Branch (662:5): [True: 0, False: 249k]
  ------------------
  663|      0|      return -1;
  664|   249k|  }
  665|       |
  666|   249k|  h_Qmf->flags = flags;
  667|       |
  668|   249k|  h_Qmf->no_channels = no_channels;
  669|   249k|  h_Qmf->no_col = noCols;
  670|       |
  671|   249k|  h_Qmf->lsb = fMin(lsb, h_Qmf->no_channels);
  672|   249k|  h_Qmf->usb = synflag
  ------------------
  |  Branch (672:16): [True: 129k, False: 120k]
  ------------------
  673|   249k|                   ? fMin(usb, h_Qmf->no_channels)
  674|   249k|                   : usb; /* was: h_Qmf->usb = fMin(usb, h_Qmf->no_channels); */
  675|       |
  676|   249k|  h_Qmf->FilterStates = (void *)pFilterStates;
  677|       |
  678|   249k|  h_Qmf->outScalefactor =
  679|   249k|      (ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK + h_Qmf->filterScale) +
  ------------------
  |  |  156|   249k|#define ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK 7
  ------------------
  680|   249k|      h_Qmf->synScalefactor;
  681|       |
  682|   249k|  h_Qmf->outGain_m =
  683|   249k|      (FIXP_DBL)0x80000000; /* default init value will be not applied */
  684|   249k|  h_Qmf->outGain_e = 0;
  685|       |
  686|   249k|  return (0);
  687|   249k|}
qmf.cpp:_ZL20qmfAdaptFilterStatesP15QMF_FILTER_BANKi:
  699|   121k|{
  700|   121k|  if (synQmf == NULL || synQmf->FilterStates == NULL) {
  ------------------
  |  Branch (700:7): [True: 0, False: 121k]
  |  Branch (700:25): [True: 0, False: 121k]
  ------------------
  701|      0|    return;
  702|      0|  }
  703|   121k|  if (scaleFactorDiff > 0) {
  ------------------
  |  Branch (703:7): [True: 76.4k, False: 45.0k]
  ------------------
  704|  76.4k|    scaleValuesSaturate((FIXP_QSS *)synQmf->FilterStates,
  705|  76.4k|                        synQmf->no_channels * (QMF_NO_POLY * 2 - 1),
  ------------------
  |  |  213|  76.4k|#define QMF_NO_POLY 5
  ------------------
  706|  76.4k|                        scaleFactorDiff);
  707|  76.4k|  } else {
  708|  45.0k|    scaleValues((FIXP_QSS *)synQmf->FilterStates,
  709|  45.0k|                synQmf->no_channels * (QMF_NO_POLY * 2 - 1), scaleFactorDiff);
  ------------------
  |  |  213|  45.0k|#define QMF_NO_POLY 5
  ------------------
  710|  45.0k|  }
  711|   121k|}
qmf.cpp:_ZL22qmfInverseModulationHQP15QMF_FILTER_BANKPKiS2_iiPi:
  405|  14.3M|) {
  406|  14.3M|  int i;
  407|  14.3M|  int L = synQmf->no_channels;
  408|  14.3M|  int M = L >> 1;
  409|  14.3M|  int shift = 0;
  410|  14.3M|  FIXP_DBL *RESTRICT tReal = pWorkBuffer;
  411|  14.3M|  FIXP_DBL *RESTRICT tImag = pWorkBuffer + L;
  412|       |
  413|  14.3M|  if (synQmf->flags & QMF_FLAG_CLDFB) {
  ------------------
  |  |  133|  14.3M|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (413:7): [True: 19.8k, False: 14.3M]
  ------------------
  414|   730k|    for (i = 0; i < synQmf->usb; i++) {
  ------------------
  |  Branch (414:17): [True: 710k, False: 19.8k]
  ------------------
  415|   710k|      cplxMultDiv2(&tImag[i], &tReal[i], qmfImag[i], qmfReal[i],
  416|   710k|                   synQmf->t_cos[i], synQmf->t_sin[i]);
  417|   710k|    }
  418|  19.8k|    scaleValuesSaturate(&tReal[0], synQmf->lsb, scaleFactorLowBand + 1);
  419|  19.8k|    scaleValuesSaturate(&tReal[0 + synQmf->lsb], synQmf->usb - synQmf->lsb,
  420|  19.8k|                        scaleFactorHighBand + 1);
  421|  19.8k|    scaleValuesSaturate(&tImag[0], synQmf->lsb, scaleFactorLowBand + 1);
  422|  19.8k|    scaleValuesSaturate(&tImag[0 + synQmf->lsb], synQmf->usb - synQmf->lsb,
  423|  19.8k|                        scaleFactorHighBand + 1);
  424|  19.8k|  }
  425|       |
  426|  14.3M|  if ((synQmf->flags & QMF_FLAG_CLDFB) == 0) {
  ------------------
  |  |  133|  14.3M|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (426:7): [True: 14.3M, False: 19.8k]
  ------------------
  427|  14.3M|    scaleValuesSaturate(&tReal[0], &qmfReal[0], synQmf->lsb,
  428|  14.3M|                        scaleFactorLowBand);
  429|  14.3M|    scaleValuesSaturate(&tReal[0 + synQmf->lsb], &qmfReal[0 + synQmf->lsb],
  430|  14.3M|                        synQmf->usb - synQmf->lsb, scaleFactorHighBand);
  431|  14.3M|    scaleValuesSaturate(&tImag[0], &qmfImag[0], synQmf->lsb,
  432|  14.3M|                        scaleFactorLowBand);
  433|  14.3M|    scaleValuesSaturate(&tImag[0 + synQmf->lsb], &qmfImag[0 + synQmf->lsb],
  434|  14.3M|                        synQmf->usb - synQmf->lsb, scaleFactorHighBand);
  435|  14.3M|  }
  436|       |
  437|  14.3M|  FDKmemclear(&tReal[synQmf->usb],
  438|  14.3M|              (synQmf->no_channels - synQmf->usb) * sizeof(FIXP_DBL));
  439|  14.3M|  FDKmemclear(&tImag[synQmf->usb],
  440|  14.3M|              (synQmf->no_channels - synQmf->usb) * sizeof(FIXP_DBL));
  441|       |
  442|  14.3M|  dct_IV(tReal, L, &shift);
  443|  14.3M|  dst_IV(tImag, L, &shift);
  444|       |
  445|  14.3M|  if (synQmf->flags & QMF_FLAG_CLDFB) {
  ------------------
  |  |  133|  14.3M|#define QMF_FLAG_CLDFB 4
  ------------------
  |  Branch (445:7): [True: 19.8k, False: 14.3M]
  ------------------
  446|   452k|    for (i = 0; i < M; i++) {
  ------------------
  |  Branch (446:17): [True: 432k, False: 19.8k]
  ------------------
  447|   432k|      FIXP_DBL r1, i1, r2, i2;
  448|   432k|      r1 = tReal[i];
  449|   432k|      i2 = tImag[L - 1 - i];
  450|   432k|      r2 = tReal[L - i - 1];
  451|   432k|      i1 = tImag[i];
  452|       |
  453|   432k|      tReal[i] = (r1 - i1) >> 1;
  454|   432k|      tImag[L - 1 - i] = -(r1 + i1) >> 1;
  455|   432k|      tReal[L - i - 1] = (r2 - i2) >> 1;
  456|   432k|      tImag[i] = -(r2 + i2) >> 1;
  457|   432k|    }
  458|  14.3M|  } else {
  459|       |    /* The array accesses are negative to compensate the missing minus sign in
  460|       |     * the low and hi band gain. */
  461|       |    /* 26 cycles on ARM926 */
  462|   454M|    for (i = 0; i < M; i++) {
  ------------------
  |  Branch (462:17): [True: 440M, False: 14.3M]
  ------------------
  463|   440M|      FIXP_DBL r1, i1, r2, i2;
  464|   440M|      r1 = -tReal[i];
  465|   440M|      i2 = -tImag[L - 1 - i];
  466|   440M|      r2 = -tReal[L - i - 1];
  467|   440M|      i1 = -tImag[i];
  468|       |
  469|   440M|      tReal[i] = (r1 - i1) >> 1;
  470|   440M|      tImag[L - 1 - i] = -(r1 + i1) >> 1;
  471|   440M|      tReal[L - i - 1] = (r2 - i2) >> 1;
  472|   440M|      tImag[i] = -(r2 + i2) >> 1;
  473|   440M|    }
  474|  14.3M|  }
  475|  14.3M|}
qmf.cpp:_ZL26qmfInverseModulationLP_oddP15QMF_FILTER_BANKPKiiiPi:
  371|  1.99M|) {
  372|  1.99M|  int i;
  373|  1.99M|  int L = synQmf->no_channels;
  374|  1.99M|  int M = L >> 1;
  375|  1.99M|  int shift = 0;
  376|       |
  377|       |  /* Move input to output vector with offset */
  378|  1.99M|  scaleValuesSaturate(pTimeOut + M, qmfReal, synQmf->lsb, scaleFactorLowBand);
  379|  1.99M|  scaleValuesSaturate(pTimeOut + M + synQmf->lsb, qmfReal + synQmf->lsb,
  380|  1.99M|                      synQmf->usb - synQmf->lsb, scaleFactorHighBand);
  381|  1.99M|  FDKmemclear(pTimeOut + M + synQmf->usb, (L - synQmf->usb) * sizeof(FIXP_DBL));
  382|       |
  383|  1.99M|  dct_IV(pTimeOut + M, L, &shift);
  384|  53.4M|  for (i = 0; i < M; i++) {
  ------------------
  |  Branch (384:15): [True: 51.4M, False: 1.99M]
  ------------------
  385|  51.4M|    pTimeOut[i] = pTimeOut[L - 1 - i];
  386|  51.4M|    pTimeOut[2 * L - 1 - i] = -pTimeOut[L + i];
  387|  51.4M|  }
  388|  1.99M|}
qmf.cpp:_ZL27qmfInverseModulationLP_evenP15QMF_FILTER_BANKPKiiiPi:
  315|  5.58M|) {
  316|  5.58M|  int i;
  317|  5.58M|  int L = synQmf->no_channels;
  318|  5.58M|  int M = L >> 1;
  319|  5.58M|  int scale = 0;
  320|  5.58M|  FIXP_DBL tmp;
  321|  5.58M|  FIXP_DBL *RESTRICT tReal = pTimeOut;
  322|  5.58M|  FIXP_DBL *RESTRICT tImag = pTimeOut + L;
  323|       |
  324|       |  /* Move input to output vector with offset */
  325|  5.58M|  scaleValuesSaturate(&tReal[0], &qmfReal[0], synQmf->lsb, scaleFactorLowBand);
  326|  5.58M|  scaleValuesSaturate(&tReal[0 + synQmf->lsb], &qmfReal[0 + synQmf->lsb],
  327|  5.58M|                      synQmf->usb - synQmf->lsb, scaleFactorHighBand);
  328|  5.58M|  FDKmemclear(&tReal[0 + synQmf->usb], (L - synQmf->usb) * sizeof(FIXP_DBL));
  329|       |
  330|       |  /* Dct type-2 transform */
  331|  5.58M|  dct_II(tReal, tImag, L, &scale);
  332|       |
  333|       |  /* Expand output and replace inplace the output buffers */
  334|  5.58M|  tImag[0] = tReal[M];
  335|  5.58M|  tImag[M] = (FIXP_DBL)0;
  336|  5.58M|  tmp = tReal[0];
  337|  5.58M|  tReal[0] = tReal[M];
  338|  5.58M|  tReal[M] = tmp;
  339|       |
  340|  30.9M|  for (i = 1; i < M / 2; i++) {
  ------------------
  |  Branch (340:15): [True: 25.3M, False: 5.58M]
  ------------------
  341|       |    /* Imag */
  342|  25.3M|    tmp = tReal[L - i];
  343|  25.3M|    tImag[M - i] = tmp;
  344|  25.3M|    tImag[i + M] = -tmp;
  345|       |
  346|  25.3M|    tmp = tReal[M + i];
  347|  25.3M|    tImag[i] = tmp;
  348|  25.3M|    tImag[L - i] = -tmp;
  349|       |
  350|       |    /* Real */
  351|  25.3M|    tReal[M + i] = tReal[i];
  352|  25.3M|    tReal[L - i] = tReal[M - i];
  353|  25.3M|    tmp = tReal[i];
  354|  25.3M|    tReal[i] = tReal[M - i];
  355|  25.3M|    tReal[M - i] = tmp;
  356|  25.3M|  }
  357|       |  /* Remaining odd terms */
  358|  5.58M|  tmp = tReal[M + M / 2];
  359|  5.58M|  tImag[M / 2] = tmp;
  360|  5.58M|  tImag[M / 2 + M] = -tmp;
  361|       |
  362|  5.58M|  tReal[M + M / 2] = tReal[M / 2];
  363|  5.58M|}
qmf.cpp:_ZL26qmfForwardModulationLP_oddP15QMF_FILTER_BANKPKiPi:
  196|  1.99M|{
  197|  1.99M|  int i;
  198|  1.99M|  int L = anaQmf->no_channels;
  199|  1.99M|  int M = L >> 1;
  200|  1.99M|  int shift = (anaQmf->no_channels >> 6) + 1;
  201|       |
  202|  32.8M|  for (i = 0; i < M; i++) {
  ------------------
  |  Branch (202:15): [True: 30.8M, False: 1.99M]
  ------------------
  203|  30.8M|    rSubband[M + i] = (timeIn[L - 1 - i] >> 1) - (timeIn[i] >> shift);
  204|  30.8M|    rSubband[M - 1 - i] =
  205|  30.8M|        (timeIn[L + i] >> 1) + (timeIn[2 * L - 1 - i] >> shift);
  206|  30.8M|  }
  207|       |
  208|  1.99M|  dct_IV(rSubband, L, &shift);
  209|  1.99M|}
qmf.cpp:_ZL27qmfForwardModulationLP_evenP15QMF_FILTER_BANKPiS1_:
  161|  1.04M|{
  162|  1.04M|  int i;
  163|  1.04M|  int L = anaQmf->no_channels;
  164|  1.04M|  int M = L >> 1;
  165|  1.04M|  int scale = 0;
  166|  1.04M|  FIXP_DBL accu;
  167|       |
  168|  1.04M|  const FIXP_DBL *timeInTmp1 = (FIXP_DBL *)&timeIn[3 * M];
  169|  1.04M|  const FIXP_DBL *timeInTmp2 = timeInTmp1;
  170|  1.04M|  FIXP_DBL *rSubbandTmp = rSubband;
  171|       |
  172|  1.04M|  rSubband[0] = timeIn[3 * M] >> 1;
  173|       |
  174|  16.6M|  for (i = M - 1; i != 0; i--) {
  ------------------
  |  Branch (174:19): [True: 15.6M, False: 1.04M]
  ------------------
  175|  15.6M|    accu = ((*--timeInTmp1) >> 1) + ((*++timeInTmp2) >> 1);
  176|  15.6M|    *++rSubbandTmp = accu;
  177|  15.6M|  }
  178|       |
  179|  1.04M|  timeInTmp1 = &timeIn[2 * M];
  180|  1.04M|  timeInTmp2 = &timeIn[0];
  181|  1.04M|  rSubbandTmp = &rSubband[M];
  182|       |
  183|  17.7M|  for (i = L - M; i != 0; i--) {
  ------------------
  |  Branch (183:19): [True: 16.6M, False: 1.04M]
  ------------------
  184|  16.6M|    accu = ((*timeInTmp1--) >> 1) - ((*timeInTmp2++) >> 1);
  185|  16.6M|    *rSubbandTmp++ = accu;
  186|  16.6M|  }
  187|       |
  188|  1.04M|  dct_III(rSubband, timeIn, L, &scale);
  189|  1.04M|}
qmf.cpp:_ZL22qmfForwardModulationHQP15QMF_FILTER_BANKPKiPiS3_:
  226|  12.5M|) {
  227|  12.5M|  int i;
  228|  12.5M|  int L = anaQmf->no_channels;
  229|  12.5M|  int L2 = L << 1;
  230|  12.5M|  int shift = 0;
  231|       |
  232|       |  /* Time advance by one sample, which is equivalent to the complex
  233|       |     rotation at the end of the analysis. Works only for STD mode. */
  234|  12.5M|  if ((L == 64) && !(anaQmf->flags & (QMF_FLAG_CLDFB | QMF_FLAG_MPSLDFB))) {
  ------------------
  |  |  133|  10.1k|#define QMF_FLAG_CLDFB 4
  ------------------
                if ((L == 64) && !(anaQmf->flags & (QMF_FLAG_CLDFB | QMF_FLAG_MPSLDFB))) {
  ------------------
  |  |  137|  10.1k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  |  Branch (234:7): [True: 10.1k, False: 12.5M]
  |  Branch (234:20): [True: 0, False: 10.1k]
  ------------------
  235|      0|    FIXP_DBL x, y;
  236|       |
  237|       |    /*rSubband[0] = u[1] + u[0]*/
  238|       |    /*iSubband[0] = u[1] - u[0]*/
  239|      0|    x = timeIn[1] >> 1;
  240|      0|    y = timeIn[0];
  241|      0|    rSubband[0] = x + (y >> 1);
  242|      0|    iSubband[0] = x - (y >> 1);
  243|       |
  244|       |    /*rSubband[n] = u[n+1] - u[2M-n], n=1,...,M-1*/
  245|       |    /*iSubband[n] = u[n+1] + u[2M-n], n=1,...,M-1*/
  246|      0|    for (i = 1; i < L; i++) {
  ------------------
  |  Branch (246:17): [True: 0, False: 0]
  ------------------
  247|      0|      x = timeIn[i + 1] >> 1; /*u[n+1]  */
  248|      0|      y = timeIn[L2 - i];     /*u[2M-n] */
  249|      0|      rSubband[i] = x - (y >> 1);
  250|      0|      iSubband[i] = x + (y >> 1);
  251|      0|    }
  252|  12.5M|  } else {
  253|   172M|    for (i = 0; i < L; i += 2) {
  ------------------
  |  Branch (253:17): [True: 160M, False: 12.5M]
  ------------------
  254|   160M|      FIXP_DBL x0, x1, y0, y1;
  255|       |
  256|   160M|      x0 = timeIn[i + 0] >> 1;
  257|   160M|      x1 = timeIn[i + 1] >> 1;
  258|   160M|      y0 = timeIn[L2 - 1 - i];
  259|   160M|      y1 = timeIn[L2 - 2 - i];
  260|       |
  261|   160M|      rSubband[i + 0] = x0 - (y0 >> 1);
  262|   160M|      rSubband[i + 1] = x1 - (y1 >> 1);
  263|   160M|      iSubband[i + 0] = x0 + (y0 >> 1);
  264|   160M|      iSubband[i + 1] = x1 + (y1 >> 1);
  265|   160M|    }
  266|  12.5M|  }
  267|       |
  268|  12.5M|  dct_IV(rSubband, L, &shift);
  269|  12.5M|  dst_IV(iSubband, L, &shift);
  270|       |
  271|       |  /* Do the complex rotation except for the case of 64 bands (in STD mode). */
  272|  12.5M|  if ((L != 64) || (anaQmf->flags & (QMF_FLAG_CLDFB | QMF_FLAG_MPSLDFB))) {
  ------------------
  |  |  133|  10.1k|#define QMF_FLAG_CLDFB 4
  ------------------
                if ((L != 64) || (anaQmf->flags & (QMF_FLAG_CLDFB | QMF_FLAG_MPSLDFB))) {
  ------------------
  |  |  137|  10.1k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  |  Branch (272:7): [True: 12.5M, False: 10.1k]
  |  Branch (272:20): [True: 10.1k, False: 0]
  ------------------
  273|  12.5M|    if (anaQmf->flags & QMF_FLAG_MPSLDFB_OPTIMIZE_MODULATION) {
  ------------------
  |  |  140|  12.5M|#define QMF_FLAG_MPSLDFB_OPTIMIZE_MODULATION 32
  ------------------
  |  Branch (273:9): [True: 584k, False: 11.9M]
  ------------------
  274|   584k|      FIXP_DBL iBand;
  275|  10.0M|      for (i = 0; i < fMin(anaQmf->lsb, L); i += 2) {
  ------------------
  |  Branch (275:19): [True: 9.50M, False: 584k]
  ------------------
  276|  9.50M|        iBand = rSubband[i];
  277|  9.50M|        rSubband[i] = -iSubband[i];
  278|  9.50M|        iSubband[i] = iBand;
  279|       |
  280|  9.50M|        iBand = -rSubband[i + 1];
  281|  9.50M|        rSubband[i + 1] = iSubband[i + 1];
  282|  9.50M|        iSubband[i + 1] = iBand;
  283|  9.50M|      }
  284|  11.9M|    } else {
  285|  11.9M|      const FIXP_QTW *sbr_t_cos;
  286|  11.9M|      const FIXP_QTW *sbr_t_sin;
  287|  11.9M|      const int len = L; /* was len = fMin(anaQmf->lsb, L) but in case of USAC
  288|       |                            the signal above lsb is actually needed in some
  289|       |                            cases (HBE?) */
  290|  11.9M|      sbr_t_cos = anaQmf->t_cos;
  291|  11.9M|      sbr_t_sin = anaQmf->t_sin;
  292|       |
  293|   313M|      for (i = 0; i < len; i++) {
  ------------------
  |  Branch (293:19): [True: 301M, False: 11.9M]
  ------------------
  294|   301M|        cplxMult(&iSubband[i], &rSubband[i], iSubband[i], rSubband[i],
  295|   301M|                 sbr_t_cos[i], sbr_t_sin[i]);
  296|   301M|      }
  297|  11.9M|    }
  298|  12.5M|  }
  299|  12.5M|}

_Z11scaleValuesPiii:
  178|  58.0M|) {
  179|  58.0M|  INT i;
  180|       |
  181|       |  /* Return if scalefactor is Zero */
  182|  58.0M|  if (scalefactor == 0) return;
  ------------------
  |  Branch (182:7): [True: 2.80M, False: 55.2M]
  ------------------
  183|       |
  184|  55.2M|  if (scalefactor > 0) {
  ------------------
  |  Branch (184:7): [True: 51.9M, False: 3.30M]
  ------------------
  185|  51.9M|    scalefactor = fixmin_I(scalefactor, (INT)DFRACT_BITS - 1);
  ------------------
  |  |  127|  51.9M|#define fixmin_I(a, b) fixmin(a, b)
  ------------------
  186|  73.5M|    for (i = len & 3; i--;) {
  ------------------
  |  Branch (186:23): [True: 21.6M, False: 51.9M]
  ------------------
  187|  21.6M|      *(vector++) <<= scalefactor;
  188|  21.6M|    }
  189|   377M|    for (i = len >> 2; i--;) {
  ------------------
  |  Branch (189:24): [True: 326M, False: 51.9M]
  ------------------
  190|   326M|      *(vector++) <<= scalefactor;
  191|   326M|      *(vector++) <<= scalefactor;
  192|   326M|      *(vector++) <<= scalefactor;
  193|   326M|      *(vector++) <<= scalefactor;
  194|   326M|    }
  195|  51.9M|  } else {
  196|  3.30M|    INT negScalefactor = fixmin_I(-scalefactor, (INT)DFRACT_BITS - 1);
  ------------------
  |  |  127|  3.30M|#define fixmin_I(a, b) fixmin(a, b)
  ------------------
  197|  4.92M|    for (i = len & 3; i--;) {
  ------------------
  |  Branch (197:23): [True: 1.62M, False: 3.30M]
  ------------------
  198|  1.62M|      *(vector++) >>= negScalefactor;
  199|  1.62M|    }
  200|  24.3M|    for (i = len >> 2; i--;) {
  ------------------
  |  Branch (200:24): [True: 21.0M, False: 3.30M]
  ------------------
  201|  21.0M|      *(vector++) >>= negScalefactor;
  202|  21.0M|      *(vector++) >>= negScalefactor;
  203|  21.0M|      *(vector++) >>= negScalefactor;
  204|  21.0M|      *(vector++) >>= negScalefactor;
  205|  21.0M|    }
  206|  3.30M|  }
  207|  55.2M|}
_Z19scaleValuesSaturatePiii:
  225|  3.26M|) {
  226|  3.26M|  INT i;
  227|       |
  228|       |  /* Return if scalefactor is Zero */
  229|  3.26M|  if (scalefactor == 0) return;
  ------------------
  |  Branch (229:7): [True: 8.74k, False: 3.25M]
  ------------------
  230|       |
  231|  3.25M|  scalefactor = fixmax_I(fixmin_I(scalefactor, (INT)DFRACT_BITS - 1),
  ------------------
  |  |  126|  3.25M|#define fixmax_I(a, b) fixmax(a, b)
  ------------------
  232|  3.25M|                         (INT) - (DFRACT_BITS - 1));
  233|       |
  234|   591M|  for (i = 0; i < len; i++) {
  ------------------
  |  Branch (234:15): [True: 588M, False: 3.25M]
  ------------------
  235|   588M|    vector[i] = scaleValueSaturate(vector[i], scalefactor);
  236|   588M|  }
  237|  3.25M|}
_Z19scaleValuesSaturatePiPKiii:
  257|  72.9M|) {
  258|  72.9M|  INT i;
  259|       |
  260|       |  /* Return if scalefactor is Zero */
  261|  72.9M|  if (scalefactor == 0) {
  ------------------
  |  Branch (261:7): [True: 37.8M, False: 35.0M]
  ------------------
  262|  37.8M|    FDKmemmove(dst, src, len * sizeof(FIXP_DBL));
  263|  37.8M|    return;
  264|  37.8M|  }
  265|       |
  266|  35.0M|  scalefactor = fixmax_I(fixmin_I(scalefactor, (INT)DFRACT_BITS - 1),
  ------------------
  |  |  126|  35.0M|#define fixmax_I(a, b) fixmax(a, b)
  ------------------
  267|  35.0M|                         (INT) - (DFRACT_BITS - 1));
  268|       |
  269|  1.04G|  for (i = 0; i < len; i++) {
  ------------------
  |  Branch (269:15): [True: 1.00G, False: 35.0M]
  ------------------
  270|  1.00G|    dst[i] = scaleValueSaturate(src[i], scalefactor);
  271|  1.00G|  }
  272|  35.0M|}
_Z19scaleValuesSaturatePsPKiii:
  292|  81.6k|{
  293|  81.6k|  INT i;
  294|  81.6k|  scalefactor = fixmax_I(fixmin_I(scalefactor, (INT)DFRACT_BITS - 1),
  ------------------
  |  |  126|  81.6k|#define fixmax_I(a, b) fixmax(a, b)
  ------------------
  295|  81.6k|                         (INT) - (DFRACT_BITS - 1));
  296|       |
  297|   142M|  for (i = 0; i < len; i++) {
  ------------------
  |  Branch (297:15): [True: 142M, False: 81.6k]
  ------------------
  298|   142M|    dst[i] = FX_DBL2FX_SGL(fAddSaturate(scaleValueSaturate(src[i], scalefactor),
  ------------------
  |  |  220|   142M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   142M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   142M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  299|   142M|                                        (FIXP_DBL)0x8000));
  300|   142M|  }
  301|  81.6k|}
_Z11scaleValuesPiPKiii:
  389|   419k|) {
  390|   419k|  INT i;
  391|       |
  392|       |  /* Return if scalefactor is Zero */
  393|   419k|  if (scalefactor == 0) {
  ------------------
  |  Branch (393:7): [True: 6.28k, False: 413k]
  ------------------
  394|  6.28k|    if (dst != src) FDKmemmove(dst, src, len * sizeof(FIXP_DBL));
  ------------------
  |  Branch (394:9): [True: 6.28k, False: 0]
  ------------------
  395|   413k|  } else {
  396|   413k|    if (scalefactor > 0) {
  ------------------
  |  Branch (396:9): [True: 16.1k, False: 397k]
  ------------------
  397|  16.1k|      scalefactor = fixmin_I(scalefactor, (INT)DFRACT_BITS - 1);
  ------------------
  |  |  127|  16.1k|#define fixmin_I(a, b) fixmin(a, b)
  ------------------
  398|  36.4k|      for (i = len & 3; i--;) {
  ------------------
  |  Branch (398:25): [True: 20.3k, False: 16.1k]
  ------------------
  399|  20.3k|        *(dst++) = *(src++) << scalefactor;
  400|  20.3k|      }
  401|  30.9k|      for (i = len >> 2; i--;) {
  ------------------
  |  Branch (401:26): [True: 14.8k, False: 16.1k]
  ------------------
  402|  14.8k|        *(dst++) = *(src++) << scalefactor;
  403|  14.8k|        *(dst++) = *(src++) << scalefactor;
  404|  14.8k|        *(dst++) = *(src++) << scalefactor;
  405|  14.8k|        *(dst++) = *(src++) << scalefactor;
  406|  14.8k|      }
  407|   397k|    } else {
  408|   397k|      INT negScalefactor = fixmin_I(-scalefactor, (INT)DFRACT_BITS - 1);
  ------------------
  |  |  127|   397k|#define fixmin_I(a, b) fixmin(a, b)
  ------------------
  409|   781k|      for (i = len & 3; i--;) {
  ------------------
  |  Branch (409:25): [True: 384k, False: 397k]
  ------------------
  410|   384k|        *(dst++) = *(src++) >> negScalefactor;
  411|   384k|      }
  412|   946k|      for (i = len >> 2; i--;) {
  ------------------
  |  Branch (412:26): [True: 549k, False: 397k]
  ------------------
  413|   549k|        *(dst++) = *(src++) >> negScalefactor;
  414|   549k|        *(dst++) = *(src++) >> negScalefactor;
  415|   549k|        *(dst++) = *(src++) >> negScalefactor;
  416|   549k|        *(dst++) = *(src++) >> negScalefactor;
  417|   549k|      }
  418|   397k|    }
  419|   413k|  }
  420|   419k|}
_Z14getScalefactorPKii:
  691|  63.0M|{
  692|  63.0M|  INT i;
  693|  63.0M|  FIXP_DBL temp, maxVal = (FIXP_DBL)0;
  694|       |
  695|  2.42G|  for (i = len; i != 0; i--) {
  ------------------
  |  Branch (695:17): [True: 2.36G, False: 63.0M]
  ------------------
  696|  2.36G|    temp = (LONG)(*vector++);
  697|  2.36G|    maxVal |= (FIXP_DBL)((LONG)temp ^ (LONG)(temp >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  2.36G|#define DFRACT_BITS 32 /* double precision */
  ------------------
  698|  2.36G|  }
  699|       |
  700|  63.0M|  return fixmax_I((INT)0, (INT)(fixnormz_D(maxVal) - 1));
  ------------------
  |  |  126|  63.0M|#define fixmax_I(a, b) fixmax(a, b)
  ------------------
  701|  63.0M|}

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

_Z20CProgramConfig_ResetP14CProgramConfig:
  184|   351k|void CProgramConfig_Reset(CProgramConfig *pPce) { pPce->elCounter = 0; }
_Z19CProgramConfig_InitP14CProgramConfig:
  186|  2.81M|void CProgramConfig_Init(CProgramConfig *pPce) {
  187|  2.81M|  FDKmemclear(pPce, sizeof(CProgramConfig));
  188|  2.81M|  pPce->SamplingFrequencyIndex = 0xf;
  189|  2.81M|}
_Z22CProgramConfig_IsValidPK14CProgramConfig:
  191|  1.24M|int CProgramConfig_IsValid(const CProgramConfig *pPce) {
  192|  1.24M|  return ((pPce->isValid) ? 1 : 0);
  ------------------
  |  Branch (192:11): [True: 580k, False: 661k]
  ------------------
  193|  1.24M|}
_Z19CProgramConfig_ReadP14CProgramConfigP13FDK_BITSTREAMj:
  374|   248k|                         UINT alignmentAnchor) {
  375|   248k|  int i;
  376|   248k|  int commentBytes;
  377|   248k|  UCHAR tag, isCpe;
  378|   248k|  UCHAR checkElementTagSelect[3][PC_FSB_CHANNELS_MAX] = {{0}};
  379|       |
  380|   248k|  pPce->isValid = 1;
  381|   248k|  pPce->NumEffectiveChannels = 0;
  382|   248k|  pPce->NumChannels = 0;
  383|   248k|  pPce->ElementInstanceTag = (UCHAR)FDKreadBits(bs, 4);
  384|   248k|  pPce->Profile = (UCHAR)FDKreadBits(bs, 2);
  385|   248k|  pPce->SamplingFrequencyIndex = (UCHAR)FDKreadBits(bs, 4);
  386|   248k|  pPce->NumFrontChannelElements = (UCHAR)FDKreadBits(bs, 4);
  387|   248k|  pPce->NumSideChannelElements = (UCHAR)FDKreadBits(bs, 4);
  388|   248k|  pPce->NumBackChannelElements = (UCHAR)FDKreadBits(bs, 4);
  389|   248k|  pPce->NumLfeChannelElements = (UCHAR)FDKreadBits(bs, 2);
  390|   248k|  pPce->NumAssocDataElements = (UCHAR)FDKreadBits(bs, 3);
  391|   248k|  pPce->NumValidCcElements = (UCHAR)FDKreadBits(bs, 4);
  392|       |
  393|   248k|  if ((pPce->MonoMixdownPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (393:7): [True: 207k, False: 41.5k]
  ------------------
  394|   207k|    pPce->MonoMixdownElementNumber = (UCHAR)FDKreadBits(bs, 4);
  395|   207k|  }
  396|       |
  397|   248k|  if ((pPce->StereoMixdownPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (397:7): [True: 25.2k, False: 223k]
  ------------------
  398|  25.2k|    pPce->StereoMixdownElementNumber = (UCHAR)FDKreadBits(bs, 4);
  399|  25.2k|  }
  400|       |
  401|   248k|  if ((pPce->MatrixMixdownIndexPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (401:7): [True: 15.7k, False: 233k]
  ------------------
  402|  15.7k|    pPce->MatrixMixdownIndex = (UCHAR)FDKreadBits(bs, 2);
  403|  15.7k|    pPce->PseudoSurroundEnable = (UCHAR)FDKreadBits(bs, 1);
  404|  15.7k|  }
  405|       |
  406|   450k|  for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (406:15): [True: 201k, False: 248k]
  ------------------
  407|   201k|    pPce->FrontElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  408|   201k|    pPce->FrontElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  409|   201k|    pPce->NumChannels += pPce->FrontElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (409:26): [True: 77.3k, False: 124k]
  ------------------
  410|       |
  411|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  412|       |     * chapter 8.2.1.1 */
  413|   201k|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (413:9): [True: 141k, False: 60.2k]
  ------------------
  414|   141k|      checkElementTagSelect[isCpe][tag] = 1;
  415|   141k|    } else {
  416|  60.2k|      pPce->isValid = 0;
  417|  60.2k|    }
  418|   201k|  }
  419|       |
  420|   453k|  for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (420:15): [True: 204k, False: 248k]
  ------------------
  421|   204k|    pPce->SideElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  422|   204k|    pPce->SideElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  423|   204k|    pPce->NumChannels += pPce->SideElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (423:26): [True: 83.3k, False: 121k]
  ------------------
  424|       |
  425|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  426|       |     * chapter 8.2.1.1 */
  427|   204k|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (427:9): [True: 116k, False: 88.6k]
  ------------------
  428|   116k|      checkElementTagSelect[isCpe][tag] = 1;
  429|   116k|    } else {
  430|  88.6k|      pPce->isValid = 0;
  431|  88.6k|    }
  432|   204k|  }
  433|       |
  434|  1.27M|  for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (434:15): [True: 1.02M, False: 248k]
  ------------------
  435|  1.02M|    pPce->BackElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  436|  1.02M|    pPce->BackElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  437|  1.02M|    pPce->NumChannels += pPce->BackElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (437:26): [True: 673k, False: 347k]
  ------------------
  438|       |
  439|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  440|       |     * chapter 8.2.1.1 */
  441|  1.02M|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (441:9): [True: 908k, False: 112k]
  ------------------
  442|   908k|      checkElementTagSelect[isCpe][tag] = 1;
  443|   908k|    } else {
  444|   112k|      pPce->isValid = 0;
  445|   112k|    }
  446|  1.02M|  }
  447|       |
  448|   248k|  pPce->NumEffectiveChannels = pPce->NumChannels;
  449|       |
  450|   510k|  for (i = 0; i < pPce->NumLfeChannelElements; i++) {
  ------------------
  |  Branch (450:15): [True: 262k, False: 248k]
  ------------------
  451|   262k|    pPce->LfeElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  452|   262k|    pPce->NumChannels += 1;
  453|       |
  454|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  455|       |     * chapter 8.2.1.1 */
  456|   262k|    if (checkElementTagSelect[2][tag] == 0) {
  ------------------
  |  Branch (456:9): [True: 259k, False: 2.43k]
  ------------------
  457|   259k|      checkElementTagSelect[2][tag] = 1;
  458|   259k|    } else {
  459|  2.43k|      pPce->isValid = 0;
  460|  2.43k|    }
  461|   262k|  }
  462|       |
  463|   363k|  for (i = 0; i < pPce->NumAssocDataElements; i++) {
  ------------------
  |  Branch (463:15): [True: 114k, False: 248k]
  ------------------
  464|   114k|    pPce->AssocDataElementTagSelect[i] = (UCHAR)FDKreadBits(bs, 4);
  465|   114k|  }
  466|       |
  467|   725k|  for (i = 0; i < pPce->NumValidCcElements; i++) {
  ------------------
  |  Branch (467:15): [True: 476k, False: 248k]
  ------------------
  468|   476k|    pPce->CcElementIsIndSw[i] = (UCHAR)FDKreadBits(bs, 1);
  469|   476k|    pPce->ValidCcElementTagSelect[i] = (UCHAR)FDKreadBits(bs, 4);
  470|   476k|  }
  471|       |
  472|   248k|  FDKbyteAlign(bs, alignmentAnchor);
  473|       |
  474|   248k|  pPce->CommentFieldBytes = (UCHAR)FDKreadBits(bs, 8);
  475|   248k|  commentBytes = pPce->CommentFieldBytes;
  476|       |
  477|       |  /* Search for height info extension and read it if available */
  478|   248k|  if (CProgramConfig_ReadHeightExt(pPce, bs, &commentBytes, alignmentAnchor)) {
  ------------------
  |  Branch (478:7): [True: 7.20k, False: 241k]
  ------------------
  479|  7.20k|    pPce->isValid = 0;
  480|  7.20k|  }
  481|       |
  482|       |  /* Check order of elements according to ISO / IEC 13818 - 7:2003(E),
  483|       |   * chapter 8.5.1 */
  484|   248k|  if (CProgramConfig_Check(pPce)) {
  ------------------
  |  Branch (484:7): [True: 29.7k, False: 219k]
  ------------------
  485|  29.7k|    pPce->isValid = 0;
  486|  29.7k|  }
  487|       |
  488|  2.43M|  for (i = 0; i < commentBytes; i++) {
  ------------------
  |  Branch (488:15): [True: 2.18M, False: 248k]
  ------------------
  489|  2.18M|    UCHAR text;
  490|       |
  491|  2.18M|    text = (UCHAR)FDKreadBits(bs, 8);
  492|       |
  493|  2.18M|    if (i < PC_COMMENTLENGTH) {
  ------------------
  |  |  151|  2.18M|#define PC_COMMENTLENGTH 256
  ------------------
  |  Branch (493:9): [True: 2.18M, False: 0]
  ------------------
  494|  2.18M|      pPce->Comment[i] = text;
  495|  2.18M|    }
  496|  2.18M|  }
  497|   248k|}
_Z22CProgramConfig_ComparePK14CProgramConfigS1_:
  508|   828k|                           const CProgramConfig *const pPce2) {
  509|   828k|  int result = 0; /* Innocent until proven false. */
  510|       |
  511|   828k|  if (FDKmemcmp(pPce1, pPce2, sizeof(CProgramConfig)) !=
  ------------------
  |  Branch (511:7): [True: 827k, False: 710]
  ------------------
  512|   828k|      0) { /* Configurations are not completely equal.
  513|       |              So look into details and analyse the channel configurations: */
  514|   827k|    result = -1;
  515|       |
  516|   827k|    if (pPce1->NumChannels ==
  ------------------
  |  Branch (516:9): [True: 826k, False: 1.24k]
  ------------------
  517|   827k|        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|   826k|      result = 1;
  521|       |
  522|       |      /* Front channels */
  523|   826k|      if (pPce1->NumFrontChannelElements != pPce2->NumFrontChannelElements) {
  ------------------
  |  Branch (523:11): [True: 821k, False: 5.58k]
  ------------------
  524|   821k|        result = 2; /* different number of front channel elements */
  525|   821k|      } else {
  526|  5.58k|        int el, numCh1 = 0, numCh2 = 0;
  527|  16.0k|        for (el = 0; el < pPce1->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (527:22): [True: 11.3k, False: 4.76k]
  ------------------
  528|  11.3k|          if (pPce1->FrontElementHeightInfo[el] !=
  ------------------
  |  Branch (528:15): [True: 827, False: 10.5k]
  ------------------
  529|  11.3k|              pPce2->FrontElementHeightInfo[el]) {
  530|    827|            result = 2; /* different height info */
  531|    827|            break;
  532|    827|          }
  533|  10.5k|          numCh1 += pPce1->FrontElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (533:21): [True: 5.93k, False: 4.57k]
  ------------------
  534|  10.5k|          numCh2 += pPce2->FrontElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (534:21): [True: 5.54k, False: 4.95k]
  ------------------
  535|  10.5k|        }
  536|  5.58k|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (536:13): [True: 1.60k, False: 3.97k]
  ------------------
  537|  1.60k|          result = 2; /* different number of front channels */
  538|  1.60k|        }
  539|  5.58k|      }
  540|       |      /* Side channels */
  541|   826k|      if (pPce1->NumSideChannelElements != pPce2->NumSideChannelElements) {
  ------------------
  |  Branch (541:11): [True: 203k, False: 623k]
  ------------------
  542|   203k|        result = 2; /* different number of side channel elements */
  543|   623k|      } else {
  544|   623k|        int el, numCh1 = 0, numCh2 = 0;
  545|   624k|        for (el = 0; el < pPce1->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (545:22): [True: 1.41k, False: 623k]
  ------------------
  546|  1.41k|          if (pPce1->SideElementHeightInfo[el] !=
  ------------------
  |  Branch (546:15): [True: 80, False: 1.33k]
  ------------------
  547|  1.41k|              pPce2->SideElementHeightInfo[el]) {
  548|     80|            result = 2; /* different height info */
  549|     80|            break;
  550|     80|          }
  551|  1.33k|          numCh1 += pPce1->SideElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (551:21): [True: 712, False: 618]
  ------------------
  552|  1.33k|          numCh2 += pPce2->SideElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (552:21): [True: 712, False: 618]
  ------------------
  553|  1.33k|        }
  554|   623k|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (554:13): [True: 0, False: 623k]
  ------------------
  555|      0|          result = 2; /* different number of side channels */
  556|      0|        }
  557|   623k|      }
  558|       |      /* Back channels */
  559|   826k|      if (pPce1->NumBackChannelElements != pPce2->NumBackChannelElements) {
  ------------------
  |  Branch (559:11): [True: 800k, False: 25.6k]
  ------------------
  560|   800k|        result = 2; /* different number of back channel elements */
  561|   800k|      } else {
  562|  25.6k|        int el, numCh1 = 0, numCh2 = 0;
  563|  37.2k|        for (el = 0; el < pPce1->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (563:22): [True: 24.7k, False: 12.4k]
  ------------------
  564|  24.7k|          if (pPce1->BackElementHeightInfo[el] !=
  ------------------
  |  Branch (564:15): [True: 13.1k, False: 11.5k]
  ------------------
  565|  24.7k|              pPce2->BackElementHeightInfo[el]) {
  566|  13.1k|            result = 2; /* different height info */
  567|  13.1k|            break;
  568|  13.1k|          }
  569|  11.5k|          numCh1 += pPce1->BackElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (569:21): [True: 5.39k, False: 6.19k]
  ------------------
  570|  11.5k|          numCh2 += pPce2->BackElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (570:21): [True: 10.5k, False: 1.08k]
  ------------------
  571|  11.5k|        }
  572|  25.6k|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (572:13): [True: 5.47k, False: 20.1k]
  ------------------
  573|  5.47k|          result = 2; /* different number of back channels */
  574|  5.47k|        }
  575|  25.6k|      }
  576|       |      /* LFE channels */
  577|   826k|      if (pPce1->NumLfeChannelElements != pPce2->NumLfeChannelElements) {
  ------------------
  |  Branch (577:11): [True: 6.26k, False: 820k]
  ------------------
  578|  6.26k|        result = 2; /* different number of lfe channels */
  579|  6.26k|      }
  580|       |      /* LFEs are always SCEs so we don't need to count the channels. */
  581|   826k|    }
  582|   827k|  }
  583|       |
  584|   828k|  return result;
  585|   828k|}
_Z25CProgramConfig_GetDefaultP14CProgramConfigj:
  587|   827k|void CProgramConfig_GetDefault(CProgramConfig *pPce, const UINT channelConfig) {
  588|   827k|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|   827k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (588:3): [True: 827k, False: 0]
  ------------------
  589|       |
  590|       |  /* Init PCE */
  591|   827k|  CProgramConfig_Init(pPce);
  592|   827k|  pPce->Profile =
  593|   827k|      1; /* Set AAC LC because it is the only supported object type. */
  594|       |
  595|   827k|  switch (channelConfig) {
  596|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  597|   182k|    case 32: /* 7.1 side channel configuration as defined in FDK_audio.h */
  ------------------
  |  Branch (597:5): [True: 182k, False: 644k]
  ------------------
  598|   182k|      pPce->NumFrontChannelElements = 2;
  599|   182k|      pPce->FrontElementIsCpe[0] = 0;
  600|   182k|      pPce->FrontElementIsCpe[1] = 1;
  601|   182k|      pPce->NumSideChannelElements = 1;
  602|   182k|      pPce->SideElementIsCpe[0] = 1;
  603|   182k|      pPce->NumBackChannelElements = 1;
  604|   182k|      pPce->BackElementIsCpe[0] = 1;
  605|   182k|      pPce->NumLfeChannelElements = 1;
  606|   182k|      pPce->NumChannels = 8;
  607|   182k|      pPce->NumEffectiveChannels = 7;
  608|   182k|      pPce->isValid = 1;
  609|   182k|      break;
  610|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  611|   183k|    case 12: /* 3/0/4.1ch surround back */
  ------------------
  |  Branch (611:5): [True: 183k, False: 644k]
  ------------------
  612|   183k|      pPce->BackElementIsCpe[1] = 1;
  613|   183k|      pPce->NumChannels += 1;
  614|   183k|      pPce->NumEffectiveChannels += 1;
  615|   183k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   183k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  616|   184k|    case 11: /* 3/0/3.1ch */
  ------------------
  |  Branch (616:5): [True: 1.79k, False: 825k]
  ------------------
  617|   184k|      pPce->NumFrontChannelElements += 2;
  618|   184k|      pPce->FrontElementIsCpe[0] = 0;
  619|   184k|      pPce->FrontElementIsCpe[1] = 1;
  620|   184k|      pPce->NumBackChannelElements += 2;
  621|   184k|      pPce->BackElementIsCpe[0] = 1;
  622|   184k|      pPce->BackElementIsCpe[1] += 0;
  623|   184k|      pPce->NumLfeChannelElements += 1;
  624|   184k|      pPce->NumChannels += 7;
  625|   184k|      pPce->NumEffectiveChannels += 6;
  626|   184k|      pPce->isValid = 1;
  627|   184k|      break;
  628|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  629|   182k|    case 14:                               /* 2/0/0-3/0/2-0.1ch front height */
  ------------------
  |  Branch (629:5): [True: 182k, False: 644k]
  ------------------
  630|   182k|      pPce->FrontElementHeightInfo[2] = 1; /* Top speaker */
  631|   182k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   182k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  632|   453k|    case 7: /* 5/0/2.1ch front */
  ------------------
  |  Branch (632:5): [True: 270k, False: 556k]
  ------------------
  633|   453k|      pPce->NumFrontChannelElements += 1;
  634|   453k|      pPce->FrontElementIsCpe[2] = 1;
  635|   453k|      pPce->NumChannels += 2;
  636|   453k|      pPce->NumEffectiveChannels += 2;
  637|   453k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   453k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  638|   454k|    case 6: /* 3/0/2.1ch */
  ------------------
  |  Branch (638:5): [True: 1.06k, False: 826k]
  ------------------
  639|   454k|      pPce->NumLfeChannelElements += 1;
  640|   454k|      pPce->NumChannels += 1;
  641|   454k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   454k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  642|   456k|    case 5: /* 3/0/2.0ch */
  ------------------
  |  Branch (642:5): [True: 1.94k, False: 825k]
  ------------------
  643|   457k|    case 4: /* 3/0/1.0ch */
  ------------------
  |  Branch (643:5): [True: 967, False: 826k]
  ------------------
  644|   457k|      pPce->NumBackChannelElements += 1;
  645|   457k|      pPce->BackElementIsCpe[0] = (channelConfig > 4) ? 1 : 0;
  ------------------
  |  Branch (645:35): [True: 456k, False: 967]
  ------------------
  646|   457k|      pPce->NumChannels += (channelConfig > 4) ? 2 : 1;
  ------------------
  |  Branch (646:28): [True: 456k, False: 967]
  ------------------
  647|   457k|      pPce->NumEffectiveChannels += (channelConfig > 4) ? 2 : 1;
  ------------------
  |  Branch (647:37): [True: 456k, False: 967]
  ------------------
  648|   457k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   457k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  649|   458k|    case 3: /* 3/0/0.0ch */
  ------------------
  |  Branch (649:5): [True: 492, False: 826k]
  ------------------
  650|   458k|      pPce->NumFrontChannelElements += 1;
  651|   458k|      pPce->FrontElementIsCpe[1] = 1;
  652|   458k|      pPce->NumChannels += 2;
  653|   458k|      pPce->NumEffectiveChannels += 2;
  654|   458k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   458k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  655|   458k|    case 1: /* 1/0/0.0ch */
  ------------------
  |  Branch (655:5): [True: 561, False: 826k]
  ------------------
  656|   458k|      pPce->NumFrontChannelElements += 1;
  657|   458k|      pPce->FrontElementIsCpe[0] = 0;
  658|   458k|      pPce->NumChannels += 1;
  659|   458k|      pPce->NumEffectiveChannels += 1;
  660|   458k|      pPce->isValid = 1;
  661|   458k|      break;
  662|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  663|    242|    case 2: /* 2/0/0.ch */
  ------------------
  |  Branch (663:5): [True: 242, False: 827k]
  ------------------
  664|    242|      pPce->NumFrontChannelElements = 1;
  665|    242|      pPce->FrontElementIsCpe[0] = 1;
  666|    242|      pPce->NumChannels += 2;
  667|    242|      pPce->NumEffectiveChannels += 2;
  668|    242|      pPce->isValid = 1;
  669|    242|      break;
  670|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  671|    794|    default:
  ------------------
  |  Branch (671:5): [True: 794, False: 826k]
  ------------------
  672|    794|      pPce->isValid = 0; /* To be explicit! */
  673|    794|      break;
  674|   827k|  }
  675|       |
  676|   827k|  if (pPce->isValid) {
  ------------------
  |  Branch (676:7): [True: 826k, False: 794]
  ------------------
  677|       |    /* Create valid element instance tags */
  678|   826k|    int el, elTagSce = 0, elTagCpe = 0;
  679|       |
  680|  2.93M|    for (el = 0; el < pPce->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (680:18): [True: 2.10M, False: 826k]
  ------------------
  681|  2.10M|      pPce->FrontElementTagSelect[el] =
  682|  2.10M|          (pPce->FrontElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (682:11): [True: 1.27M, False: 826k]
  ------------------
  683|  2.10M|    }
  684|  1.00M|    for (el = 0; el < pPce->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (684:18): [True: 182k, False: 826k]
  ------------------
  685|   182k|      pPce->SideElementTagSelect[el] =
  686|   182k|          (pPce->SideElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (686:11): [True: 182k, False: 0]
  ------------------
  687|   182k|    }
  688|  1.83M|    for (el = 0; el < pPce->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (688:18): [True: 1.01M, False: 826k]
  ------------------
  689|  1.01M|      pPce->BackElementTagSelect[el] =
  690|  1.01M|          (pPce->BackElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (690:11): [True: 1.00M, False: 2.76k]
  ------------------
  691|  1.01M|    }
  692|   826k|    elTagSce = 0;
  693|  1.64M|    for (el = 0; el < pPce->NumLfeChannelElements; el += 1) {
  ------------------
  |  Branch (693:18): [True: 822k, False: 826k]
  ------------------
  694|   822k|      pPce->LfeElementTagSelect[el] = elTagSce++;
  695|   822k|    }
  696|   826k|  }
  697|   827k|}
_Z28CProgramConfig_LookupElementP14CProgramConfigjjjPhP18AUDIO_CHANNEL_TYPES1_jS1_P14MP4_ELEMENT_IDS4_:
  796|   445k|                                 MP4_ELEMENT_ID elType) {
  797|   445k|  if (channelConfig > 0) {
  ------------------
  |  Branch (797:7): [True: 436k, False: 8.94k]
  ------------------
  798|       |    /* Constant channel mapping must have
  799|       |       been set during initialization. */
  800|   436k|    if (IS_CHANNEL_ELEMENT(elType)) {
  ------------------
  |  |  459|   436k|  ((elementId) == ID_SCE || (elementId) == ID_CPE || (elementId) == ID_LFE || \
  |  |  ------------------
  |  |  |  Branch (459:4): [True: 82.3k, False: 353k]
  |  |  |  Branch (459:29): [True: 102k, False: 251k]
  |  |  |  Branch (459:54): [True: 17.9k, False: 233k]
  |  |  ------------------
  |  |  460|   436k|   (elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE ||                \
  |  |  ------------------
  |  |  |  Branch (460:4): [True: 44.7k, False: 188k]
  |  |  |  Branch (460:34): [True: 173k, False: 14.9k]
  |  |  ------------------
  |  |  461|   436k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (461:4): [True: 0, False: 14.9k]
  |  |  ------------------
  ------------------
  801|   421k|      *elMapping = pPce->elCounter;
  802|   421k|      if (elList[pPce->elCounter] != elType &&
  ------------------
  |  Branch (802:11): [True: 22.4k, False: 398k]
  ------------------
  803|  22.4k|          !IS_USAC_CHANNEL_ELEMENT(elType)) {
  ------------------
  |  |  484|  22.4k|  ((elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE || \
  |  |  ------------------
  |  |  |  Branch (484:4): [True: 17.1k, False: 5.37k]
  |  |  |  Branch (484:34): [True: 1.15k, False: 4.22k]
  |  |  ------------------
  |  |  485|  22.4k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (485:4): [True: 0, False: 4.22k]
  |  |  ------------------
  ------------------
  804|       |        /* Not in the list */
  805|  4.22k|        if ((channelConfig == 2) &&
  ------------------
  |  Branch (805:13): [True: 3.52k, False: 697]
  ------------------
  806|  3.52k|            (elType == ID_SCE)) { /* This scenario occurs with HE-AAC v2 streams
  ------------------
  |  Branch (806:13): [True: 3.52k, False: 5]
  ------------------
  807|       |                                     of buggy encoders. In other decoder
  808|       |                                     implementations decoding of this kind of
  809|       |                                     streams is desired. */
  810|  3.52k|          channelConfig = 1;
  811|  3.52k|        } else if ((elList[pPce->elCounter] == ID_LFE) &&
  ------------------
  |  Branch (811:20): [True: 645, False: 57]
  ------------------
  812|    645|                   (elType ==
  ------------------
  |  Branch (812:20): [True: 644, False: 1]
  ------------------
  813|    645|                    ID_SCE)) { /* Decode bitstreams which wrongly use ID_SCE
  814|       |                                  instead of ID_LFE element type. */
  815|    644|          ;
  816|    644|        } else {
  817|     58|          return 0;
  818|     58|        }
  819|  4.22k|      }
  820|       |      /* Assume all front channels */
  821|   421k|      getImplicitAudioChannelTypeAndIndex(
  822|   421k|          &chType[channelIdx], &chIndex[channelIdx], channelConfig, channelIdx);
  823|   421k|      if (elType == ID_CPE || elType == ID_USAC_CPE) {
  ------------------
  |  Branch (823:11): [True: 102k, False: 318k]
  |  Branch (823:31): [True: 173k, False: 145k]
  ------------------
  824|   276k|        chType[channelIdx + 1] = chType[channelIdx];
  825|   276k|        chIndex[channelIdx + 1] = chIndex[channelIdx] + 1;
  826|   276k|      }
  827|   421k|      pPce->elCounter++;
  828|   421k|    }
  829|       |    /* Accept all non-channel elements, too. */
  830|   436k|    return 1;
  831|   436k|  } else {
  832|  8.94k|    if ((!pPce->isValid) || (pPce->NumChannels > chDescrLen)) {
  ------------------
  |  Branch (832:9): [True: 0, False: 8.94k]
  |  Branch (832:29): [True: 0, False: 8.94k]
  ------------------
  833|       |      /* Implicit channel mapping. */
  834|      0|      if (IS_USAC_CHANNEL_ELEMENT(elType)) {
  ------------------
  |  |  484|      0|  ((elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE || \
  |  |  ------------------
  |  |  |  Branch (484:4): [True: 0, False: 0]
  |  |  |  Branch (484:34): [True: 0, False: 0]
  |  |  ------------------
  |  |  485|      0|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (485:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  835|      0|        *elMapping = pPce->elCounter++;
  836|      0|      } else if (IS_MP4_CHANNEL_ELEMENT(elType)) {
  ------------------
  |  |  464|      0|  ((elementId) == ID_SCE || (elementId) == ID_CPE || (elementId) == ID_LFE)
  |  |  ------------------
  |  |  |  Branch (464:4): [True: 0, False: 0]
  |  |  |  Branch (464:29): [True: 0, False: 0]
  |  |  |  Branch (464:54): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  837|       |        /* Store all channel element IDs */
  838|      0|        elList[pPce->elCounter] = elType;
  839|      0|        *elMapping = pPce->elCounter++;
  840|      0|      }
  841|  8.94k|    } else {
  842|       |      /* Accept the additional channel(s), only if the tag is in the lists */
  843|  8.94k|      int isCpe = 0, i;
  844|       |      /* Element counter */
  845|  8.94k|      int ec[PC_NUM_HEIGHT_LAYER] = {0};
  846|       |      /* Channel counters */
  847|  8.94k|      int cc[PC_NUM_HEIGHT_LAYER] = {0};
  848|  8.94k|      int fc[PC_NUM_HEIGHT_LAYER] = {0}; /* front channel counter */
  849|  8.94k|      int sc[PC_NUM_HEIGHT_LAYER] = {0}; /* side channel counter */
  850|  8.94k|      int bc[PC_NUM_HEIGHT_LAYER] = {0}; /* back channel counter */
  851|  8.94k|      int lc = 0;                        /* lfe channel counter */
  852|       |
  853|       |      /* General MPEG (PCE) composition rules:
  854|       |         - Over all:
  855|       |             <normal height channels><top height channels><bottom height
  856|       |         channels>
  857|       |         - Within each height layer:
  858|       |             <front channels><side channels><back channels>
  859|       |         - Exception:
  860|       |             The LFE channels have no height info and thus they are arranged at
  861|       |         the very end of the normal height layer channels.
  862|       |       */
  863|       |
  864|  8.94k|      switch (elType) {
  865|  1.92k|        case ID_CPE:
  ------------------
  |  Branch (865:9): [True: 1.92k, False: 7.01k]
  ------------------
  866|  1.92k|          isCpe = 1;
  867|  1.92k|          FDK_FALLTHROUGH;
  ------------------
  |  |  386|  1.92k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  868|  5.16k|        case ID_SCE:
  ------------------
  |  Branch (868:9): [True: 3.23k, False: 5.70k]
  ------------------
  869|       |          /* search in front channels */
  870|  7.22k|          for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (870:23): [True: 3.31k, False: 3.90k]
  ------------------
  871|  3.31k|            int heightLayer = pPce->FrontElementHeightInfo[i];
  872|  3.31k|            if (isCpe == pPce->FrontElementIsCpe[i] &&
  ------------------
  |  Branch (872:17): [True: 3.11k, False: 205]
  ------------------
  873|  3.11k|                pPce->FrontElementTagSelect[i] == tag) {
  ------------------
  |  Branch (873:17): [True: 1.25k, False: 1.85k]
  ------------------
  874|  1.25k|              int h, elIdx = ec[heightLayer], chIdx = cc[heightLayer];
  875|  1.25k|              AUDIO_CHANNEL_TYPE aChType =
  876|  1.25k|                  (AUDIO_CHANNEL_TYPE)((heightLayer << 4) | ACT_FRONT);
  877|  1.37k|              for (h = heightLayer - 1; h >= 0; h -= 1) {
  ------------------
  |  Branch (877:41): [True: 117, False: 1.25k]
  ------------------
  878|    117|                int el;
  879|       |                /* Count front channels/elements */
  880|    639|                for (el = 0; el < pPce->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (880:30): [True: 522, False: 117]
  ------------------
  881|    522|                  if (pPce->FrontElementHeightInfo[el] == h) {
  ------------------
  |  Branch (881:23): [True: 187, False: 335]
  ------------------
  882|    187|                    elIdx += 1;
  883|    187|                    chIdx += (pPce->FrontElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (883:30): [True: 54, False: 133]
  ------------------
  884|    187|                  }
  885|    522|                }
  886|       |                /* Count side channels/elements */
  887|    254|                for (el = 0; el < pPce->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (887:30): [True: 137, False: 117]
  ------------------
  888|    137|                  if (pPce->SideElementHeightInfo[el] == h) {
  ------------------
  |  Branch (888:23): [True: 56, False: 81]
  ------------------
  889|     56|                    elIdx += 1;
  890|     56|                    chIdx += (pPce->SideElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (890:30): [True: 14, False: 42]
  ------------------
  891|     56|                  }
  892|    137|                }
  893|       |                /* Count back channels/elements */
  894|    239|                for (el = 0; el < pPce->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (894:30): [True: 122, False: 117]
  ------------------
  895|    122|                  if (pPce->BackElementHeightInfo[el] == h) {
  ------------------
  |  Branch (895:23): [True: 39, False: 83]
  ------------------
  896|     39|                    elIdx += 1;
  897|     39|                    chIdx += (pPce->BackElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (897:30): [True: 5, False: 34]
  ------------------
  898|     39|                  }
  899|    122|                }
  900|    117|                if (h == 0) { /* normal height */
  ------------------
  |  Branch (900:21): [True: 64, False: 53]
  ------------------
  901|     64|                  elIdx += pPce->NumLfeChannelElements;
  902|     64|                  chIdx += pPce->NumLfeChannelElements;
  903|     64|                }
  904|    117|              }
  905|  1.25k|              chMapping[chIdx] = channelIdx;
  906|  1.25k|              chType[chIdx] = aChType;
  907|  1.25k|              chIndex[chIdx] = fc[heightLayer];
  908|  1.25k|              if (isCpe) {
  ------------------
  |  Branch (908:19): [True: 336, False: 922]
  ------------------
  909|    336|                chMapping[chIdx + 1] = channelIdx + 1;
  910|    336|                chType[chIdx + 1] = aChType;
  911|    336|                chIndex[chIdx + 1] = fc[heightLayer] + 1;
  912|    336|              }
  913|  1.25k|              *elMapping = elIdx;
  914|  1.25k|              return 1;
  915|  1.25k|            }
  916|  2.06k|            ec[heightLayer] += 1;
  917|  2.06k|            if (pPce->FrontElementIsCpe[i]) {
  ------------------
  |  Branch (917:17): [True: 538, False: 1.52k]
  ------------------
  918|    538|              cc[heightLayer] += 2;
  919|    538|              fc[heightLayer] += 2;
  920|  1.52k|            } else {
  921|  1.52k|              cc[heightLayer] += 1;
  922|  1.52k|              fc[heightLayer] += 1;
  923|  1.52k|            }
  924|  2.06k|          }
  925|       |          /* search in side channels */
  926|  6.79k|          for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (926:23): [True: 4.67k, False: 2.11k]
  ------------------
  927|  4.67k|            int heightLayer = pPce->SideElementHeightInfo[i];
  928|  4.67k|            if (isCpe == pPce->SideElementIsCpe[i] &&
  ------------------
  |  Branch (928:17): [True: 4.48k, False: 191]
  ------------------
  929|  4.48k|                pPce->SideElementTagSelect[i] == tag) {
  ------------------
  |  Branch (929:17): [True: 1.78k, False: 2.69k]
  ------------------
  930|  1.78k|              int h, elIdx = ec[heightLayer], chIdx = cc[heightLayer];
  931|  1.78k|              AUDIO_CHANNEL_TYPE aChType =
  932|  1.78k|                  (AUDIO_CHANNEL_TYPE)((heightLayer << 4) | ACT_SIDE);
  933|  1.92k|              for (h = heightLayer - 1; h >= 0; h -= 1) {
  ------------------
  |  Branch (933:41): [True: 133, False: 1.78k]
  ------------------
  934|    133|                int el;
  935|       |                /* Count front channels/elements */
  936|    309|                for (el = 0; el < pPce->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (936:30): [True: 176, False: 133]
  ------------------
  937|    176|                  if (pPce->FrontElementHeightInfo[el] == h) {
  ------------------
  |  Branch (937:23): [True: 69, False: 107]
  ------------------
  938|     69|                    elIdx += 1;
  939|     69|                    chIdx += (pPce->FrontElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (939:30): [True: 19, False: 50]
  ------------------
  940|     69|                  }
  941|    176|                }
  942|       |                /* Count side channels/elements */
  943|    571|                for (el = 0; el < pPce->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (943:30): [True: 438, False: 133]
  ------------------
  944|    438|                  if (pPce->SideElementHeightInfo[el] == h) {
  ------------------
  |  Branch (944:23): [True: 100, False: 338]
  ------------------
  945|    100|                    elIdx += 1;
  946|    100|                    chIdx += (pPce->SideElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (946:30): [True: 45, False: 55]
  ------------------
  947|    100|                  }
  948|    438|                }
  949|       |                /* Count back channels/elements */
  950|    309|                for (el = 0; el < pPce->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (950:30): [True: 176, False: 133]
  ------------------
  951|    176|                  if (pPce->BackElementHeightInfo[el] == h) {
  ------------------
  |  Branch (951:23): [True: 51, False: 125]
  ------------------
  952|     51|                    elIdx += 1;
  953|     51|                    chIdx += (pPce->BackElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (953:30): [True: 18, False: 33]
  ------------------
  954|     51|                  }
  955|    176|                }
  956|    133|                if (h ==
  ------------------
  |  Branch (956:21): [True: 84, False: 49]
  ------------------
  957|    133|                    0) { /* LFE channels belong to the normal height layer */
  958|     84|                  elIdx += pPce->NumLfeChannelElements;
  959|     84|                  chIdx += pPce->NumLfeChannelElements;
  960|     84|                }
  961|    133|              }
  962|  1.78k|              chMapping[chIdx] = channelIdx;
  963|  1.78k|              chType[chIdx] = aChType;
  964|  1.78k|              chIndex[chIdx] = sc[heightLayer];
  965|  1.78k|              if (isCpe) {
  ------------------
  |  Branch (965:19): [True: 716, False: 1.07k]
  ------------------
  966|    716|                chMapping[chIdx + 1] = channelIdx + 1;
  967|    716|                chType[chIdx + 1] = aChType;
  968|    716|                chIndex[chIdx + 1] = sc[heightLayer] + 1;
  969|    716|              }
  970|  1.78k|              *elMapping = elIdx;
  971|  1.78k|              return 1;
  972|  1.78k|            }
  973|  2.88k|            ec[heightLayer] += 1;
  974|  2.88k|            if (pPce->SideElementIsCpe[i]) {
  ------------------
  |  Branch (974:17): [True: 1.26k, False: 1.61k]
  ------------------
  975|  1.26k|              cc[heightLayer] += 2;
  976|  1.26k|              sc[heightLayer] += 2;
  977|  1.61k|            } else {
  978|  1.61k|              cc[heightLayer] += 1;
  979|  1.61k|              sc[heightLayer] += 1;
  980|  1.61k|            }
  981|  2.88k|          }
  982|       |          /* search in back channels */
  983|  4.04k|          for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (983:23): [True: 4.01k, False: 28]
  ------------------
  984|  4.01k|            int heightLayer = pPce->BackElementHeightInfo[i];
  985|  4.01k|            if (isCpe == pPce->BackElementIsCpe[i] &&
  ------------------
  |  Branch (985:17): [True: 3.92k, False: 87]
  ------------------
  986|  3.92k|                pPce->BackElementTagSelect[i] == tag) {
  ------------------
  |  Branch (986:17): [True: 2.08k, False: 1.83k]
  ------------------
  987|  2.08k|              int h, elIdx = ec[heightLayer], chIdx = cc[heightLayer];
  988|  2.08k|              AUDIO_CHANNEL_TYPE aChType =
  989|  2.08k|                  (AUDIO_CHANNEL_TYPE)((heightLayer << 4) | ACT_BACK);
  990|  2.25k|              for (h = heightLayer - 1; h >= 0; h -= 1) {
  ------------------
  |  Branch (990:41): [True: 170, False: 2.08k]
  ------------------
  991|    170|                int el;
  992|       |                /* Count front channels/elements */
  993|    391|                for (el = 0; el < pPce->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (993:30): [True: 221, False: 170]
  ------------------
  994|    221|                  if (pPce->FrontElementHeightInfo[el] == h) {
  ------------------
  |  Branch (994:23): [True: 74, False: 147]
  ------------------
  995|     74|                    elIdx += 1;
  996|     74|                    chIdx += (pPce->FrontElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (996:30): [True: 45, False: 29]
  ------------------
  997|     74|                  }
  998|    221|                }
  999|       |                /* Count side channels/elements */
 1000|    439|                for (el = 0; el < pPce->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (1000:30): [True: 269, False: 170]
  ------------------
 1001|    269|                  if (pPce->SideElementHeightInfo[el] == h) {
  ------------------
  |  Branch (1001:23): [True: 88, False: 181]
  ------------------
 1002|     88|                    elIdx += 1;
 1003|     88|                    chIdx += (pPce->SideElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (1003:30): [True: 58, False: 30]
  ------------------
 1004|     88|                  }
 1005|    269|                }
 1006|       |                /* Count back channels/elements */
 1007|    646|                for (el = 0; el < pPce->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (1007:30): [True: 476, False: 170]
  ------------------
 1008|    476|                  if (pPce->BackElementHeightInfo[el] == h) {
  ------------------
  |  Branch (1008:23): [True: 137, False: 339]
  ------------------
 1009|    137|                    elIdx += 1;
 1010|    137|                    chIdx += (pPce->BackElementIsCpe[el]) ? 2 : 1;
  ------------------
  |  Branch (1010:30): [True: 28, False: 109]
  ------------------
 1011|    137|                  }
 1012|    476|                }
 1013|    170|                if (h == 0) { /* normal height */
  ------------------
  |  Branch (1013:21): [True: 90, False: 80]
  ------------------
 1014|     90|                  elIdx += pPce->NumLfeChannelElements;
 1015|     90|                  chIdx += pPce->NumLfeChannelElements;
 1016|     90|                }
 1017|    170|              }
 1018|  2.08k|              chMapping[chIdx] = channelIdx;
 1019|  2.08k|              chType[chIdx] = aChType;
 1020|  2.08k|              chIndex[chIdx] = bc[heightLayer];
 1021|  2.08k|              if (isCpe) {
  ------------------
  |  Branch (1021:19): [True: 872, False: 1.21k]
  ------------------
 1022|    872|                chMapping[chIdx + 1] = channelIdx + 1;
 1023|    872|                chType[chIdx + 1] = aChType;
 1024|    872|                chIndex[chIdx + 1] = bc[heightLayer] + 1;
 1025|    872|              }
 1026|  2.08k|              *elMapping = elIdx;
 1027|  2.08k|              return 1;
 1028|  2.08k|            }
 1029|  1.92k|            ec[heightLayer] += 1;
 1030|  1.92k|            if (pPce->BackElementIsCpe[i]) {
  ------------------
  |  Branch (1030:17): [True: 604, False: 1.32k]
  ------------------
 1031|    604|              cc[heightLayer] += 2;
 1032|    604|              bc[heightLayer] += 2;
 1033|  1.32k|            } else {
 1034|  1.32k|              cc[heightLayer] += 1;
 1035|  1.32k|              bc[heightLayer] += 1;
 1036|  1.32k|            }
 1037|  1.92k|          }
 1038|     28|          break;
 1039|       |
 1040|    756|        case ID_LFE: { /* Unfortunately we have to go through all normal height
  ------------------
  |  Branch (1040:9): [True: 756, False: 8.18k]
  ------------------
 1041|       |                          layer elements to get the position of the LFE
 1042|       |                          channels. Start with counting the front
 1043|       |                          channels/elements at normal height */
 1044|  1.61k|          for (i = 0; i < pPce->NumFrontChannelElements; i += 1) {
  ------------------
  |  Branch (1044:23): [True: 857, False: 756]
  ------------------
 1045|    857|            int heightLayer = pPce->FrontElementHeightInfo[i];
 1046|    857|            ec[heightLayer] += 1;
 1047|    857|            cc[heightLayer] += (pPce->FrontElementIsCpe[i]) ? 2 : 1;
  ------------------
  |  Branch (1047:32): [True: 13, False: 844]
  ------------------
 1048|    857|          }
 1049|       |          /* Count side channels/elements at normal height */
 1050|  1.72k|          for (i = 0; i < pPce->NumSideChannelElements; i += 1) {
  ------------------
  |  Branch (1050:23): [True: 973, False: 756]
  ------------------
 1051|    973|            int heightLayer = pPce->SideElementHeightInfo[i];
 1052|    973|            ec[heightLayer] += 1;
 1053|    973|            cc[heightLayer] += (pPce->SideElementIsCpe[i]) ? 2 : 1;
  ------------------
  |  Branch (1053:32): [True: 3, False: 970]
  ------------------
 1054|    973|          }
 1055|       |          /* Count back channels/elements at normal height */
 1056|  1.80k|          for (i = 0; i < pPce->NumBackChannelElements; i += 1) {
  ------------------
  |  Branch (1056:23): [True: 1.04k, False: 756]
  ------------------
 1057|  1.04k|            int heightLayer = pPce->BackElementHeightInfo[i];
 1058|  1.04k|            ec[heightLayer] += 1;
 1059|  1.04k|            cc[heightLayer] += (pPce->BackElementIsCpe[i]) ? 2 : 1;
  ------------------
  |  Branch (1059:32): [True: 14, False: 1.03k]
  ------------------
 1060|  1.04k|          }
 1061|       |
 1062|       |          /* search in lfe channels */
 1063|    819|          for (i = 0; i < pPce->NumLfeChannelElements; i++) {
  ------------------
  |  Branch (1063:23): [True: 807, False: 12]
  ------------------
 1064|    807|            int elIdx =
 1065|    807|                ec[0]; /* LFE channels belong to the normal height layer */
 1066|    807|            int chIdx = cc[0];
 1067|    807|            if (pPce->LfeElementTagSelect[i] == tag) {
  ------------------
  |  Branch (1067:17): [True: 744, False: 63]
  ------------------
 1068|    744|              chMapping[chIdx] = channelIdx;
 1069|    744|              *elMapping = elIdx;
 1070|    744|              chType[chIdx] = ACT_LFE;
 1071|    744|              chIndex[chIdx] = lc;
 1072|    744|              return 1;
 1073|    744|            }
 1074|     63|            ec[0] += 1;
 1075|     63|            cc[0] += 1;
 1076|     63|            lc += 1;
 1077|     63|          }
 1078|    756|        } break;
 1079|       |
 1080|       |        /* Non audio elements */
 1081|     24|        case ID_CCE:
  ------------------
  |  Branch (1081:9): [True: 24, False: 8.91k]
  ------------------
 1082|       |          /* search in cce channels */
 1083|    169|          for (i = 0; i < pPce->NumValidCcElements; i++) {
  ------------------
  |  Branch (1083:23): [True: 163, False: 6]
  ------------------
 1084|    163|            if (pPce->ValidCcElementTagSelect[i] == tag) {
  ------------------
  |  Branch (1084:17): [True: 18, False: 145]
  ------------------
 1085|     18|              return 1;
 1086|     18|            }
 1087|    163|          }
 1088|      6|          break;
 1089|  2.99k|        case ID_DSE:
  ------------------
  |  Branch (1089:9): [True: 2.99k, False: 5.94k]
  ------------------
 1090|       |          /* search associated data elements */
 1091|  5.96k|          for (i = 0; i < pPce->NumAssocDataElements; i++) {
  ------------------
  |  Branch (1091:23): [True: 4.19k, False: 1.77k]
  ------------------
 1092|  4.19k|            if (pPce->AssocDataElementTagSelect[i] == tag) {
  ------------------
  |  Branch (1092:17): [True: 1.22k, False: 2.97k]
  ------------------
 1093|  1.22k|              return 1;
 1094|  1.22k|            }
 1095|  4.19k|          }
 1096|  1.77k|          break;
 1097|  1.77k|        default:
  ------------------
  |  Branch (1097:9): [True: 0, False: 8.94k]
  ------------------
 1098|      0|          return 0;
 1099|  8.94k|      }
 1100|  1.82k|      return 0; /* not found in any list */
 1101|  8.94k|    }
 1102|  8.94k|  }
 1103|       |
 1104|      0|  return 1;
 1105|   445k|}
_Z26CProgramConfig_GetPceChMapPK14CProgramConfigPhj:
 1175|  1.56k|                               const UINT pceChMapLen) {
 1176|  1.56k|  const UCHAR *nElements = &pPce->NumFrontChannelElements;
 1177|  1.56k|  const UCHAR *elHeight[3], *elIsCpe[3];
 1178|  1.56k|  unsigned chIdx, plane, grp, offset, totCh[3], numCh[3][4];
 1179|       |
 1180|  1.56k|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|  1.56k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1180:3): [True: 1.56k, False: 0]
  ------------------
 1181|  1.56k|  FDK_ASSERT(pceChMap != NULL);
  ------------------
  |  |  221|  1.56k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1181:3): [True: 1.56k, False: 0]
  ------------------
 1182|       |
 1183|       |  /* Init counter: */
 1184|  1.56k|  FDKmemclear(totCh, 3 * sizeof(unsigned));
 1185|  1.56k|  FDKmemclear(numCh, 3 * 4 * sizeof(unsigned));
 1186|       |
 1187|       |  /* Analyse PCE: */
 1188|  1.56k|  elHeight[0] = pPce->FrontElementHeightInfo;
 1189|  1.56k|  elIsCpe[0] = pPce->FrontElementIsCpe;
 1190|  1.56k|  elHeight[1] = pPce->SideElementHeightInfo;
 1191|  1.56k|  elIsCpe[1] = pPce->SideElementIsCpe;
 1192|  1.56k|  elHeight[2] = pPce->BackElementHeightInfo;
 1193|  1.56k|  elIsCpe[2] = pPce->BackElementIsCpe;
 1194|       |
 1195|  6.25k|  for (plane = 0; plane <= SPEAKER_PLANE_BOTTOM; plane += 1) {
  ------------------
  |  | 1109|  6.25k|#define SPEAKER_PLANE_BOTTOM 2
  ------------------
  |  Branch (1195:19): [True: 4.69k, False: 1.56k]
  ------------------
 1196|  18.7k|    for (grp = 0; grp < 3; grp += 1) { /* front, side, back */
  ------------------
  |  Branch (1196:19): [True: 14.0k, False: 4.69k]
  ------------------
 1197|  14.0k|      unsigned el;
 1198|  28.7k|      for (el = 0; el < nElements[grp]; el += 1) {
  ------------------
  |  Branch (1198:20): [True: 14.6k, False: 14.0k]
  ------------------
 1199|  14.6k|        if (elHeight[grp][el] == plane) {
  ------------------
  |  Branch (1199:13): [True: 4.87k, False: 9.75k]
  ------------------
 1200|  4.87k|          unsigned elCh = elIsCpe[grp][el] ? 2 : 1;
  ------------------
  |  Branch (1200:27): [True: 1.98k, False: 2.89k]
  ------------------
 1201|  4.87k|          numCh[plane][grp] += elCh;
 1202|  4.87k|          totCh[plane] += elCh;
 1203|  4.87k|        }
 1204|  14.6k|      }
 1205|  14.0k|    }
 1206|  4.69k|    if (plane == SPEAKER_PLANE_NORMAL) {
  ------------------
  |  | 1107|  4.69k|#define SPEAKER_PLANE_NORMAL 0
  ------------------
  |  Branch (1206:9): [True: 1.56k, False: 3.12k]
  ------------------
 1207|  1.56k|      unsigned elCh = pPce->NumLfeChannelElements;
 1208|  1.56k|      numCh[plane][grp] += elCh;
 1209|  1.56k|      totCh[plane] += elCh;
 1210|  1.56k|    }
 1211|  4.69k|  }
 1212|       |  /* Sanity checks: */
 1213|  1.56k|  chIdx = totCh[SPEAKER_PLANE_NORMAL] + totCh[SPEAKER_PLANE_TOP] +
  ------------------
  |  | 1107|  1.56k|#define SPEAKER_PLANE_NORMAL 0
  ------------------
                chIdx = totCh[SPEAKER_PLANE_NORMAL] + totCh[SPEAKER_PLANE_TOP] +
  ------------------
  |  | 1108|  1.56k|#define SPEAKER_PLANE_TOP 1
  ------------------
 1214|  1.56k|          totCh[SPEAKER_PLANE_BOTTOM];
  ------------------
  |  | 1109|  1.56k|#define SPEAKER_PLANE_BOTTOM 2
  ------------------
 1215|  1.56k|  if (chIdx > pceChMapLen) {
  ------------------
  |  Branch (1215:7): [True: 0, False: 1.56k]
  ------------------
 1216|      0|    return -1;
 1217|      0|  }
 1218|       |
 1219|       |  /* Create map: */
 1220|  1.56k|  offset = grp = 0;
 1221|  1.56k|  unsigned grpThresh = numCh[SPEAKER_PLANE_NORMAL][grp];
  ------------------
  |  | 1107|  1.56k|#define SPEAKER_PLANE_NORMAL 0
  ------------------
 1222|  9.16k|  for (chIdx = 0; chIdx < totCh[SPEAKER_PLANE_NORMAL]; chIdx += 1) {
  ------------------
  |  | 1107|  9.16k|#define SPEAKER_PLANE_NORMAL 0
  ------------------
  |  Branch (1222:19): [True: 7.60k, False: 1.56k]
  ------------------
 1223|  11.1k|    while ((chIdx >= grpThresh) && (grp < 3)) {
  ------------------
  |  Branch (1223:12): [True: 3.56k, False: 7.60k]
  |  Branch (1223:36): [True: 3.56k, False: 0]
  ------------------
 1224|  3.56k|      offset += numCh[1][grp] + numCh[2][grp];
 1225|  3.56k|      grp += 1;
 1226|  3.56k|      grpThresh += numCh[SPEAKER_PLANE_NORMAL][grp];
  ------------------
  |  | 1107|  3.56k|#define SPEAKER_PLANE_NORMAL 0
  ------------------
 1227|  3.56k|    }
 1228|  7.60k|    pceChMap[chIdx] = chIdx + offset;
 1229|  7.60k|  }
 1230|  1.56k|  offset = 0;
 1231|  7.82k|  for (grp = 0; grp < 4; grp += 1) { /* front, side, back and lfe */
  ------------------
  |  Branch (1231:17): [True: 6.25k, False: 1.56k]
  ------------------
 1232|  6.25k|    offset += numCh[SPEAKER_PLANE_NORMAL][grp];
  ------------------
  |  | 1107|  6.25k|#define SPEAKER_PLANE_NORMAL 0
  ------------------
 1233|  18.7k|    for (plane = SPEAKER_PLANE_TOP; plane <= SPEAKER_PLANE_BOTTOM; plane += 1) {
  ------------------
  |  | 1108|  6.25k|#define SPEAKER_PLANE_TOP 1
  ------------------
                  for (plane = SPEAKER_PLANE_TOP; plane <= SPEAKER_PLANE_BOTTOM; plane += 1) {
  ------------------
  |  | 1109|  18.7k|#define SPEAKER_PLANE_BOTTOM 2
  ------------------
  |  Branch (1233:37): [True: 12.5k, False: 6.25k]
  ------------------
 1234|  12.5k|      unsigned mapCh;
 1235|  12.5k|      for (mapCh = 0; mapCh < numCh[plane][grp]; mapCh += 1) {
  ------------------
  |  Branch (1235:23): [True: 0, False: 12.5k]
  ------------------
 1236|      0|        pceChMap[chIdx++] = offset;
 1237|      0|        offset += 1;
 1238|      0|      }
 1239|  12.5k|    }
 1240|  6.25k|  }
 1241|  1.56k|  return 0;
 1242|  1.56k|}
_Z30CProgramConfig_GetElementTablePK14CProgramConfigP14MP4_ELEMENT_IDiPh:
 1246|   190k|                                   const INT elListSize, UCHAR *pChMapIdx) {
 1247|   190k|  int i, el = 0;
 1248|       |
 1249|   190k|  FDK_ASSERT(elList != NULL);
  ------------------
  |  |  221|   190k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1249:3): [True: 190k, False: 0]
  ------------------
 1250|   190k|  FDK_ASSERT(pChMapIdx != NULL);
  ------------------
  |  |  221|   190k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1250:3): [True: 190k, False: 0]
  ------------------
 1251|   190k|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|   190k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1251:3): [True: 190k, False: 0]
  ------------------
 1252|       |
 1253|   190k|  *pChMapIdx = 0;
 1254|       |
 1255|   190k|  if ((elListSize <
  ------------------
  |  Branch (1255:7): [True: 194, False: 190k]
  ------------------
 1256|   190k|       pPce->NumFrontChannelElements + pPce->NumSideChannelElements +
 1257|   190k|           pPce->NumBackChannelElements + pPce->NumLfeChannelElements) ||
 1258|   190k|      (pPce->NumChannels == 0)) {
  ------------------
  |  Branch (1258:7): [True: 0, False: 190k]
  ------------------
 1259|    194|    return 0;
 1260|    194|  }
 1261|       |
 1262|   201k|  for (i = 0; i < pPce->NumFrontChannelElements; i += 1) {
  ------------------
  |  Branch (1262:15): [True: 10.2k, False: 190k]
  ------------------
 1263|  10.2k|    elList[el++] = (pPce->FrontElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1263:20): [True: 5.10k, False: 5.16k]
  ------------------
 1264|  10.2k|  }
 1265|       |
 1266|   220k|  for (i = 0; i < pPce->NumSideChannelElements; i += 1) {
  ------------------
  |  Branch (1266:15): [True: 29.3k, False: 190k]
  ------------------
 1267|  29.3k|    elList[el++] = (pPce->SideElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1267:20): [True: 13.4k, False: 15.8k]
  ------------------
 1268|  29.3k|  }
 1269|       |
 1270|   907k|  for (i = 0; i < pPce->NumBackChannelElements; i += 1) {
  ------------------
  |  Branch (1270:15): [True: 717k, False: 190k]
  ------------------
 1271|   717k|    elList[el++] = (pPce->BackElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1271:20): [True: 531k, False: 185k]
  ------------------
 1272|   717k|  }
 1273|       |
 1274|   384k|  for (i = 0; i < pPce->NumLfeChannelElements; i += 1) {
  ------------------
  |  Branch (1274:15): [True: 193k, False: 190k]
  ------------------
 1275|   193k|    elList[el++] = ID_LFE;
 1276|   193k|  }
 1277|       |
 1278|       |  /* Find an corresponding channel configuration if possible */
 1279|   190k|  switch (pPce->NumChannels) {
 1280|  1.20k|    case 1:
  ------------------
  |  Branch (1280:5): [True: 1.20k, False: 189k]
  ------------------
 1281|  1.74k|    case 2:
  ------------------
  |  Branch (1281:5): [True: 539, False: 190k]
  ------------------
 1282|       |      /* One and two channels have no alternatives. */
 1283|  1.74k|      *pChMapIdx = pPce->NumChannels;
 1284|  1.74k|      break;
 1285|    482|    case 3:
  ------------------
  |  Branch (1285:5): [True: 482, False: 190k]
  ------------------
 1286|  1.44k|    case 4:
  ------------------
  |  Branch (1286:5): [True: 958, False: 189k]
  ------------------
 1287|  3.33k|    case 5:
  ------------------
  |  Branch (1287:5): [True: 1.89k, False: 188k]
  ------------------
 1288|  4.38k|    case 6: { /* Test if the number of channels can be used as channel config:
  ------------------
  |  Branch (1288:5): [True: 1.04k, False: 189k]
  ------------------
 1289|       |               */
 1290|  4.38k|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|  4.38k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1291|       |      /* Create a PCE for the config to test ... */
 1292|  4.38k|      CProgramConfig_GetDefault(tmpPce, pPce->NumChannels);
 1293|       |      /* ... and compare it with the given one. */
 1294|  4.38k|      *pChMapIdx = (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE))
  ------------------
  |  Branch (1294:20): [True: 225, False: 4.15k]
  ------------------
 1295|  4.38k|                       ? pPce->NumChannels
 1296|  4.38k|                       : 0;
 1297|       |      /* If compare result is 0 or 1 we can be sure that it is channel
 1298|       |       * config 11. */
 1299|  4.38k|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1300|  4.38k|    } break;
 1301|  1.51k|    case 7: {
  ------------------
  |  Branch (1301:5): [True: 1.51k, False: 189k]
  ------------------
 1302|  1.51k|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|  1.51k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1303|       |      /* Create a PCE for the config to test ... */
 1304|  1.51k|      CProgramConfig_GetDefault(tmpPce, 11);
 1305|       |      /* ... and compare it with the given one. */
 1306|  1.51k|      *pChMapIdx = (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE)) ? 11 : 0;
  ------------------
  |  Branch (1306:20): [True: 105, False: 1.41k]
  ------------------
 1307|       |      /* If compare result is 0 or 1 we can be sure that it is channel
 1308|       |       * config 11. */
 1309|  1.51k|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1310|  1.51k|    } break;
 1311|   182k|    case 8: { /* Try the four possible 7.1ch configurations. One after the
  ------------------
  |  Branch (1311:5): [True: 182k, False: 7.89k]
  ------------------
 1312|       |                 other. */
 1313|   182k|      UCHAR testCfg[4] = {32, 14, 12, 7};
 1314|   182k|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|   182k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1315|   914k|      for (i = 0; i < 4; i += 1) {
  ------------------
  |  Branch (1315:19): [True: 731k, False: 182k]
  ------------------
 1316|       |        /* Create a PCE for the config to test ... */
 1317|   731k|        CProgramConfig_GetDefault(tmpPce, testCfg[i]);
 1318|       |        /* ... and compare it with the given one. */
 1319|   731k|        if (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE)) {
  ------------------
  |  Branch (1319:13): [True: 1.18k, False: 730k]
  ------------------
 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|  1.18k|          *pChMapIdx = (testCfg[i] == 32) ? 12 : testCfg[i];
  ------------------
  |  Branch (1324:24): [True: 712, False: 471]
  ------------------
 1325|  1.18k|        }
 1326|   731k|      }
 1327|   182k|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1328|   182k|    } break;
 1329|    247|    default:
  ------------------
  |  Branch (1329:5): [True: 247, False: 190k]
  ------------------
 1330|       |      /* The PCE does not match any predefined channel configuration. */
 1331|    247|      *pChMapIdx = 0;
 1332|    247|      break;
 1333|   190k|  }
 1334|       |
 1335|   190k|  return el;
 1336|   190k|}
_Z24AudioSpecificConfig_InitP21CSAudioSpecificConfig:
 2301|  1.13M|void AudioSpecificConfig_Init(CSAudioSpecificConfig *asc) {
 2302|  1.13M|  FDKmemclear(asc, sizeof(CSAudioSpecificConfig));
 2303|       |
 2304|       |  /* Init all values that should not be zero. */
 2305|  1.13M|  asc->m_aot = AOT_NONE;
 2306|  1.13M|  asc->m_samplingFrequencyIndex = 0xf;
 2307|  1.13M|  asc->m_epConfig = -1;
 2308|  1.13M|  asc->m_extensionAudioObjectType = AOT_NULL_OBJECT;
 2309|  1.13M|  CProgramConfig_Init(&asc->m_progrConfigElement);
 2310|  1.13M|}
_Z25AudioSpecificConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMiP13CSTpCallBackshh17AUDIO_OBJECT_TYPE:
 2315|  1.13M|    UCHAR configChanged, AUDIO_OBJECT_TYPE m_aot) {
 2316|  1.13M|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 2317|  1.13M|  UINT ascStartAnchor = FDKgetValidBits(bs);
 2318|  1.13M|  int frameLengthFlag = -1;
 2319|       |
 2320|  1.13M|  AudioSpecificConfig_Init(self);
 2321|       |
 2322|  1.13M|  self->configMode = configMode;
 2323|  1.13M|  self->AacConfigChanged = configChanged;
 2324|  1.13M|  self->SbrConfigChanged = configChanged;
 2325|  1.13M|  self->SacConfigChanged = configChanged;
 2326|       |
 2327|  1.13M|  if (m_aot != AOT_NULL_OBJECT) {
  ------------------
  |  Branch (2327:7): [True: 48, False: 1.13M]
  ------------------
 2328|     48|    self->m_aot = m_aot;
 2329|  1.13M|  } else {
 2330|  1.13M|    self->m_aot = getAOT(bs);
 2331|  1.13M|    self->m_samplingFrequency =
 2332|  1.13M|        getSampleRate(bs, &self->m_samplingFrequencyIndex, 4);
 2333|  1.13M|    if (self->m_samplingFrequency <= 0 ||
  ------------------
  |  Branch (2333:9): [True: 3.21k, False: 1.12M]
  ------------------
 2334|  1.12M|        (self->m_samplingFrequency > 96000 && self->m_aot != 39) ||
  ------------------
  |  Branch (2334:10): [True: 3.10k, False: 1.12M]
  |  Branch (2334:47): [True: 1.95k, False: 1.15k]
  ------------------
 2335|  1.12M|        self->m_samplingFrequency > 4 * 96000) {
  ------------------
  |  Branch (2335:9): [True: 293, False: 1.12M]
  ------------------
 2336|  5.45k|      return TRANSPORTDEC_PARSE_ERROR;
 2337|  5.45k|    }
 2338|       |
 2339|  1.12M|    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|  1.12M|    if ((self->m_channelConfiguration == 0) &&
  ------------------
  |  Branch (2346:9): [True: 278k, False: 847k]
  ------------------
 2347|   278k|        ((self->m_aot == AOT_ER_AAC_LC) || (self->m_aot == AOT_ER_AAC_LTP) ||
  ------------------
  |  Branch (2347:10): [True: 200, False: 278k]
  |  Branch (2347:44): [True: 940, False: 277k]
  ------------------
 2348|   277k|         (self->m_aot == AOT_ER_AAC_LD) || (self->m_aot == AOT_ER_AAC_SCAL) ||
  ------------------
  |  Branch (2348:10): [True: 484, False: 276k]
  |  Branch (2348:44): [True: 298, False: 276k]
  ------------------
 2349|   276k|         (self->m_aot == AOT_ER_AAC_ELD))) {
  ------------------
  |  Branch (2349:10): [True: 391, False: 276k]
  ------------------
 2350|  2.31k|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2351|  2.31k|    }
 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|  1.12M|    if ((self->m_channelConfiguration > 2) &&
  ------------------
  |  Branch (2354:9): [True: 577k, False: 546k]
  ------------------
 2355|   577k|        ((self->m_aot == AOT_AAC_SCAL) || (self->m_aot == AOT_ER_AAC_SCAL))) {
  ------------------
  |  Branch (2355:10): [True: 720, False: 576k]
  |  Branch (2355:43): [True: 271, False: 576k]
  ------------------
 2356|    991|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2357|    991|    }
 2358|       |
 2359|       |    /* SBR extension ( explicit non-backwards compatible mode ) */
 2360|  1.12M|    self->m_sbrPresentFlag = 0;
 2361|  1.12M|    self->m_psPresentFlag = 0;
 2362|       |
 2363|  1.12M|    if (self->m_aot == AOT_SBR || self->m_aot == AOT_PS) {
  ------------------
  |  Branch (2363:9): [True: 3.31k, False: 1.11M]
  |  Branch (2363:35): [True: 6.92k, False: 1.11M]
  ------------------
 2364|  10.2k|      self->m_extensionAudioObjectType = AOT_SBR;
 2365|       |
 2366|  10.2k|      self->m_sbrPresentFlag = 1;
 2367|  10.2k|      if (self->m_aot == AOT_PS) {
  ------------------
  |  Branch (2367:11): [True: 6.92k, False: 3.31k]
  ------------------
 2368|  6.92k|        self->m_psPresentFlag = 1;
 2369|  6.92k|      }
 2370|       |
 2371|  10.2k|      self->m_extensionSamplingFrequency =
 2372|  10.2k|          getSampleRate(bs, &self->m_extensionSamplingFrequencyIndex, 4);
 2373|  10.2k|      if (self->m_extensionSamplingFrequency == 0 ||
  ------------------
  |  Branch (2373:11): [True: 1.47k, False: 8.76k]
  ------------------
 2374|  8.76k|          self->m_extensionSamplingFrequency > 96000) {
  ------------------
  |  Branch (2374:11): [True: 1.22k, False: 7.54k]
  ------------------
 2375|  2.69k|        return TRANSPORTDEC_PARSE_ERROR;
 2376|  2.69k|      }
 2377|  7.54k|      self->m_aot = getAOT(bs);
 2378|       |
 2379|  7.54k|      switch (self->m_aot) {
 2380|  3.49k|        case AOT_AAC_LC:
  ------------------
  |  Branch (2380:9): [True: 3.49k, False: 4.04k]
  ------------------
 2381|  3.49k|          break;
 2382|  2.23k|        case AOT_ER_BSAC:
  ------------------
  |  Branch (2382:9): [True: 2.23k, False: 5.30k]
  ------------------
 2383|  2.23k|          break;
 2384|  1.80k|        default:
  ------------------
  |  Branch (2384:9): [True: 1.80k, False: 5.73k]
  ------------------
 2385|  1.80k|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2386|  7.54k|      }
 2387|       |
 2388|  5.73k|      if (self->m_aot == AOT_ER_BSAC) {
  ------------------
  |  Branch (2388:11): [True: 2.23k, False: 3.49k]
  ------------------
 2389|  2.23k|        self->m_extensionChannelConfiguration = FDKreadBits(bs, 4);
 2390|  2.23k|      }
 2391|  1.11M|    } else {
 2392|  1.11M|      self->m_extensionAudioObjectType = AOT_NULL_OBJECT;
 2393|  1.11M|    }
 2394|  1.12M|  }
 2395|       |
 2396|       |  /* Parse whatever specific configs */
 2397|  1.11M|  switch (self->m_aot) {
 2398|   576k|    case AOT_AAC_LC:
  ------------------
  |  Branch (2398:5): [True: 576k, False: 542k]
  ------------------
 2399|   578k|    case AOT_AAC_SCAL:
  ------------------
  |  Branch (2399:5): [True: 2.14k, False: 1.11M]
  ------------------
 2400|   579k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2400:5): [True: 1.15k, False: 1.11M]
  ------------------
 2401|   591k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2401:5): [True: 11.6k, False: 1.10M]
  ------------------
 2402|   644k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2402:5): [True: 53.5k, False: 1.06M]
  ------------------
 2403|   652k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2403:5): [True: 7.53k, False: 1.11M]
  ------------------
 2404|   652k|      if ((ErrorStatus = GaSpecificConfig_Parse(&self->m_sc.m_gaSpecificConfig,
  ------------------
  |  Branch (2404:11): [True: 0, False: 652k]
  ------------------
 2405|   652k|                                                self, bs, ascStartAnchor)) !=
 2406|   652k|          TRANSPORTDEC_OK) {
 2407|      0|        return (ErrorStatus);
 2408|      0|      }
 2409|   652k|      frameLengthFlag = self->m_sc.m_gaSpecificConfig.m_frameLengthFlag;
 2410|   652k|      break;
 2411|  2.72k|    case AOT_MPEGS:
  ------------------
  |  Branch (2411:5): [True: 2.72k, False: 1.11M]
  ------------------
 2412|  2.72k|      if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (2412:11): [True: 2.72k, False: 0]
  ------------------
 2413|  2.72k|        if (cb->cbSsc(cb->cbSscData, bs, self->m_aot, self->m_samplingFrequency,
  ------------------
  |  Branch (2413:13): [True: 2.72k, False: 0]
  ------------------
 2414|  2.72k|                      self->m_samplesPerFrame, self->m_channelConfiguration, 1,
 2415|  2.72k|                      -1, /* nTimeSlots: read from bitstream */
 2416|  2.72k|                      0,  /* don't know the length */
 2417|  2.72k|                      self->configMode, &self->SacConfigChanged)) {
 2418|  2.72k|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2419|  2.72k|        }
 2420|  2.72k|      } else {
 2421|      0|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2422|      0|      }
 2423|      0|      break;
 2424|   195k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2424:5): [True: 195k, False: 922k]
  ------------------
 2425|   195k|      if ((ErrorStatus = EldSpecificConfig_Parse(self, bs, cb)) !=
  ------------------
  |  Branch (2425:11): [True: 45.2k, False: 150k]
  ------------------
 2426|   195k|          TRANSPORTDEC_OK) {
 2427|  45.2k|        return (ErrorStatus);
 2428|  45.2k|      }
 2429|   150k|      frameLengthFlag = self->m_sc.m_eldSpecificConfig.m_frameLengthFlag;
 2430|   150k|      self->m_sbrPresentFlag = self->m_sc.m_eldSpecificConfig.m_sbrPresentFlag;
 2431|   150k|      self->m_extensionSamplingFrequency =
 2432|   150k|          (self->m_sc.m_eldSpecificConfig.m_sbrSamplingRate + 1) *
 2433|   150k|          self->m_samplingFrequency;
 2434|   150k|      break;
 2435|   238k|    case AOT_USAC:
  ------------------
  |  Branch (2435:5): [True: 238k, False: 879k]
  ------------------
 2436|   238k|      if ((ErrorStatus = UsacConfig_Parse(self, bs, cb)) != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2436:11): [True: 57.5k, False: 181k]
  ------------------
 2437|  57.5k|        return (ErrorStatus);
 2438|  57.5k|      }
 2439|   181k|      break;
 2440|       |
 2441|   181k|    default:
  ------------------
  |  Branch (2441:5): [True: 28.6k, False: 1.08M]
  ------------------
 2442|  28.6k|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2443|  1.11M|  }
 2444|       |
 2445|       |  /* Frame length */
 2446|   984k|  switch (self->m_aot) {
 2447|   576k|    case AOT_AAC_LC:
  ------------------
  |  Branch (2447:5): [True: 576k, False: 407k]
  ------------------
 2448|   578k|    case AOT_AAC_SCAL:
  ------------------
  |  Branch (2448:5): [True: 2.14k, False: 981k]
  ------------------
 2449|   579k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2449:5): [True: 1.15k, False: 982k]
  ------------------
 2450|   632k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2450:5): [True: 53.5k, False: 930k]
  ------------------
 2451|   640k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2451:5): [True: 7.53k, False: 976k]
  ------------------
 2452|       |      /*case AOT_USAC:*/
 2453|   640k|      if (!frameLengthFlag)
  ------------------
  |  Branch (2453:11): [True: 262k, False: 378k]
  ------------------
 2454|   262k|        self->m_samplesPerFrame = 1024;
 2455|   378k|      else
 2456|   378k|        self->m_samplesPerFrame = 960;
 2457|   640k|      break;
 2458|  11.6k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2458:5): [True: 11.6k, False: 972k]
  ------------------
 2459|  11.6k|      if (!frameLengthFlag)
  ------------------
  |  Branch (2459:11): [True: 5.21k, False: 6.48k]
  ------------------
 2460|  5.21k|        self->m_samplesPerFrame = 512;
 2461|  6.48k|      else
 2462|  6.48k|        self->m_samplesPerFrame = 480;
 2463|  11.6k|      break;
 2464|   331k|    default:
  ------------------
  |  Branch (2464:5): [True: 331k, False: 652k]
  ------------------
 2465|   331k|      break;
 2466|   984k|  }
 2467|       |
 2468|   984k|  switch (self->m_aot) {
 2469|  1.15k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2469:5): [True: 1.15k, False: 982k]
  ------------------
 2470|  12.8k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2470:5): [True: 11.6k, False: 972k]
  ------------------
 2471|   163k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2471:5): [True: 150k, False: 833k]
  ------------------
 2472|   217k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2472:5): [True: 53.5k, False: 930k]
  ------------------
 2473|   217k|    case AOT_ER_CELP:
  ------------------
  |  Branch (2473:5): [True: 0, False: 984k]
  ------------------
 2474|   217k|    case AOT_ER_HVXC:
  ------------------
  |  Branch (2474:5): [True: 0, False: 984k]
  ------------------
 2475|   224k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2475:5): [True: 7.53k, False: 976k]
  ------------------
 2476|   224k|      self->m_epConfig = FDKreadBits(bs, 2);
 2477|       |
 2478|   224k|      if (self->m_epConfig > 1) {
  ------------------
  |  Branch (2478:11): [True: 5.39k, False: 219k]
  ------------------
 2479|  5.39k|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;  // EPCONFIG;
 2480|  5.39k|      }
 2481|   219k|      break;
 2482|   759k|    default:
  ------------------
  |  Branch (2482:5): [True: 759k, False: 224k]
  ------------------
 2483|   759k|      break;
 2484|   984k|  }
 2485|       |
 2486|   978k|  if (fExplicitBackwardCompatible &&
  ------------------
  |  Branch (2486:7): [True: 9.31k, False: 969k]
  ------------------
 2487|  9.31k|      (self->m_aot == AOT_AAC_LC || self->m_aot == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2487:8): [True: 4.88k, False: 4.42k]
  |  Branch (2487:37): [True: 221, False: 4.20k]
  ------------------
 2488|  6.92k|       self->m_aot == AOT_ER_BSAC)) {
  ------------------
  |  Branch (2488:8): [True: 1.81k, False: 2.38k]
  ------------------
 2489|  6.92k|    ErrorStatus = AudioSpecificConfig_ExtensionParse(self, bs, cb);
 2490|  6.92k|  }
 2491|       |
 2492|       |  /* Copy config() to asc->config[] buffer. */
 2493|   978k|  if ((ErrorStatus == TRANSPORTDEC_OK) && (self->m_aot == AOT_USAC)) {
  ------------------
  |  Branch (2493:7): [True: 978k, False: 199]
  |  Branch (2493:43): [True: 181k, False: 797k]
  ------------------
 2494|   181k|    INT configSize_bits = (INT)FDKgetValidBits(bs) - (INT)ascStartAnchor;
 2495|   181k|    if (StoreConfigAsBitstream(bs, configSize_bits, self->config,
  ------------------
  |  Branch (2495:9): [True: 268, False: 180k]
  ------------------
 2496|   181k|                               TP_USAC_MAX_CONFIG_LEN)) {
  ------------------
  |  |  121|   181k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
 2497|    268|      return TRANSPORTDEC_PARSE_ERROR;
 2498|    268|    }
 2499|   180k|    self->configBits = fAbs(configSize_bits);
 2500|   180k|  }
 2501|       |
 2502|   978k|  return (ErrorStatus);
 2503|   978k|}
tpdec_asc.cpp:_ZL28CProgramConfig_ReadHeightExtP14CProgramConfigP13FDK_BITSTREAMPij:
  206|   248k|                                        const UINT alignmentAnchor) {
  207|   248k|  int err = 0;
  208|   248k|  FDK_CRCINFO crcInfo; /* CRC state info */
  209|   248k|  INT crcReg;
  210|   248k|  FDKcrcInit(&crcInfo, 0x07, 0xFF, 8);
  211|   248k|  crcReg = FDKcrcStartReg(&crcInfo, bs, 0);
  212|   248k|  UINT startAnchor = FDKgetValidBits(bs);
  213|       |
  214|   248k|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|   248k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (214:3): [True: 248k, False: 0]
  ------------------
  215|   248k|  FDK_ASSERT(bs != NULL);
  ------------------
  |  |  221|   248k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 248k, False: 0]
  ------------------
  216|   248k|  FDK_ASSERT(bytesAvailable != NULL);
  ------------------
  |  |  221|   248k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 248k, False: 0]
  ------------------
  217|       |
  218|   248k|  if ((startAnchor >= 24) && (*bytesAvailable >= 3) &&
  ------------------
  |  Branch (218:7): [True: 248k, False: 303]
  |  Branch (218:30): [True: 39.3k, False: 209k]
  ------------------
  219|  39.3k|      (FDKreadBits(bs, 8) == PCE_HEIGHT_EXT_SYNC)) {
  ------------------
  |  |  195|  39.3k|#define PCE_HEIGHT_EXT_SYNC (0xAC)
  ------------------
  |  Branch (219:7): [True: 12.7k, False: 26.5k]
  ------------------
  220|  12.7k|    int i;
  221|       |
  222|  87.1k|    for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (222:17): [True: 74.3k, False: 12.7k]
  ------------------
  223|  74.3k|      if ((pPce->FrontElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (223:11): [True: 25.3k, False: 49.0k]
  ------------------
  224|  74.3k|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|  74.3k|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  225|  25.3k|        err = -2; /* height information is out of the valid range */
  226|  25.3k|      }
  227|  74.3k|    }
  228|  89.2k|    for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (228:17): [True: 76.4k, False: 12.7k]
  ------------------
  229|  76.4k|      if ((pPce->SideElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (229:11): [True: 11.1k, False: 65.2k]
  ------------------
  230|  76.4k|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|  76.4k|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  231|  11.1k|        err = -2; /* height information is out of the valid range */
  232|  11.1k|      }
  233|  76.4k|    }
  234|   100k|    for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (234:17): [True: 87.7k, False: 12.7k]
  ------------------
  235|  87.7k|      if ((pPce->BackElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (235:11): [True: 11.2k, False: 76.5k]
  ------------------
  236|  87.7k|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|  87.7k|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  237|  11.2k|        err = -2; /* height information is out of the valid range */
  238|  11.2k|      }
  239|  87.7k|    }
  240|  12.7k|    FDKbyteAlign(bs, alignmentAnchor);
  241|       |
  242|  12.7k|    FDKcrcEndReg(&crcInfo, bs, crcReg);
  243|  12.7k|    if ((USHORT)FDKreadBits(bs, 8) != FDKcrcGetCRC(&crcInfo)) {
  ------------------
  |  Branch (243:9): [True: 7.20k, False: 5.58k]
  ------------------
  244|       |      /* CRC failed */
  245|  7.20k|      err = -1;
  246|  7.20k|    }
  247|  12.7k|    if (err != 0) {
  ------------------
  |  Branch (247:9): [True: 7.20k, False: 5.58k]
  ------------------
  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|  7.20k|      FDKmemclear(pPce->FrontElementHeightInfo,
  252|  7.20k|                  sizeof(pPce->FrontElementHeightInfo));
  253|  7.20k|      FDKmemclear(pPce->SideElementHeightInfo,
  254|  7.20k|                  sizeof(pPce->SideElementHeightInfo));
  255|  7.20k|      FDKmemclear(pPce->BackElementHeightInfo,
  256|  7.20k|                  sizeof(pPce->BackElementHeightInfo));
  257|  7.20k|    }
  258|   236k|  } else {
  259|       |    /* No valid extension data found -> restore the initial bitbuffer state */
  260|   236k|    FDKpushBack(bs, (INT)startAnchor - (INT)FDKgetValidBits(bs));
  261|   236k|  }
  262|       |
  263|       |  /* Always report the bytes read. */
  264|   248k|  *bytesAvailable -= ((INT)startAnchor - (INT)FDKgetValidBits(bs)) >> 3;
  265|       |
  266|   248k|  return (err);
  267|   248k|}
tpdec_asc.cpp:_ZL20CProgramConfig_CheckP14CProgramConfig:
  278|   248k|static int CProgramConfig_Check(CProgramConfig *pPce) {
  279|   248k|  INT i;
  280|   248k|  INT err = 0;
  281|   248k|  INT numBackChannels[3] = {0};
  282|   248k|  INT numSideChannels[3] = {0};
  283|   248k|  INT numFrontChannels[3] = {0};
  284|   248k|  UCHAR *pCpeFront = pPce->FrontElementIsCpe;
  285|   248k|  UCHAR *pCpeSide = pPce->SideElementIsCpe;
  286|   248k|  UCHAR *pCpeBack = pPce->BackElementIsCpe;
  287|   248k|  UCHAR *pHeight;
  288|       |
  289|   248k|  pHeight = pPce->BackElementHeightInfo;
  290|  1.27M|  for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (290:15): [True: 1.02M, False: 248k]
  ------------------
  291|  1.02M|    numBackChannels[*pHeight] += pPce->BackElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (291:34): [True: 673k, False: 347k]
  ------------------
  292|  1.02M|    pHeight++;
  293|  1.02M|  }
  294|   248k|  pHeight = pPce->SideElementHeightInfo;
  295|   453k|  for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (295:15): [True: 204k, False: 248k]
  ------------------
  296|   204k|    numSideChannels[*pHeight] += pPce->SideElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (296:34): [True: 83.3k, False: 121k]
  ------------------
  297|   204k|    pHeight++;
  298|   204k|  }
  299|   248k|  pHeight = pPce->FrontElementHeightInfo;
  300|   450k|  for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (300:15): [True: 201k, False: 248k]
  ------------------
  301|   201k|    numFrontChannels[*pHeight] += pPce->FrontElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (301:35): [True: 77.3k, False: 124k]
  ------------------
  302|   201k|    pHeight++;
  303|   201k|  }
  304|       |
  305|       |  /* 0 = normal height channels, 1 = top height channels, 2 = bottom height
  306|       |   * channels */
  307|   906k|  for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (307:15): [True: 687k, False: 219k]
  ------------------
  308|       |    /* if number of channels is odd => first element must be a SCE (front center
  309|       |     * channel) */
  310|   687k|    if (numFrontChannels[i] & 1) {
  ------------------
  |  Branch (310:9): [True: 15.4k, False: 672k]
  ------------------
  311|  15.4k|      if (*pCpeFront++ == ID_CPE) {
  ------------------
  |  Branch (311:11): [True: 5.71k, False: 9.73k]
  ------------------
  312|  5.71k|        err = 1;
  313|  5.71k|        goto bail;
  314|  5.71k|      }
  315|  9.73k|      numFrontChannels[i]--;
  316|  9.73k|    }
  317|   722k|    while (numFrontChannels[i] > 0) {
  ------------------
  |  Branch (317:12): [True: 48.8k, False: 674k]
  ------------------
  318|       |      /* must be CPE or paired SCE */
  319|  48.8k|      if (*pCpeFront++ == ID_SCE) {
  ------------------
  |  Branch (319:11): [True: 22.5k, False: 26.2k]
  ------------------
  320|  22.5k|        if (*pCpeFront++ == ID_CPE) {
  ------------------
  |  Branch (320:13): [True: 7.77k, False: 14.8k]
  ------------------
  321|  7.77k|          err = 1;
  322|  7.77k|          goto bail;
  323|  7.77k|        }
  324|  22.5k|      }
  325|  41.0k|      numFrontChannels[i] -= 2;
  326|   674k|    };
  327|       |
  328|       |    /* in case that a top center surround channel (Ts) is transmitted the number
  329|       |     * of channels can be odd */
  330|   674k|    if (i != 1) {
  ------------------
  |  Branch (330:9): [True: 454k, False: 219k]
  ------------------
  331|       |      /* number of channels must be even */
  332|   454k|      if (numSideChannels[i] & 1) {
  ------------------
  |  Branch (332:11): [True: 2.17k, False: 452k]
  ------------------
  333|  2.17k|        err = 1;
  334|  2.17k|        goto bail;
  335|  2.17k|      }
  336|   484k|      while (numSideChannels[i] > 0) {
  ------------------
  |  Branch (336:14): [True: 32.8k, False: 451k]
  ------------------
  337|       |        /* must be CPE or paired SCE */
  338|  32.8k|        if (*pCpeSide++ == ID_SCE) {
  ------------------
  |  Branch (338:13): [True: 13.2k, False: 19.6k]
  ------------------
  339|  13.2k|          if (*pCpeSide++ == ID_CPE) {
  ------------------
  |  Branch (339:15): [True: 860, False: 12.3k]
  ------------------
  340|    860|            err = 1;
  341|    860|            goto bail;
  342|    860|          }
  343|  13.2k|        }
  344|  31.9k|        numSideChannels[i] -= 2;
  345|   451k|      };
  346|   451k|    }
  347|       |
  348|  1.27M|    while (numBackChannels[i] > 1) {
  ------------------
  |  Branch (348:12): [True: 615k, False: 658k]
  ------------------
  349|       |      /* must be CPE or paired SCE */
  350|   615k|      if (*pCpeBack++ == ID_SCE) {
  ------------------
  |  Branch (350:11): [True: 15.2k, False: 600k]
  ------------------
  351|  15.2k|        if (*pCpeBack++ == ID_CPE) {
  ------------------
  |  Branch (351:13): [True: 12.5k, False: 2.70k]
  ------------------
  352|  12.5k|          err = 1;
  353|  12.5k|          goto bail;
  354|  12.5k|        }
  355|  15.2k|      }
  356|   603k|      numBackChannels[i] -= 2;
  357|   658k|    };
  358|       |    /* if number of channels is odd => last element must be a SCE (back center
  359|       |     * channel) */
  360|   658k|    if (numBackChannels[i]) {
  ------------------
  |  Branch (360:9): [True: 208k, False: 449k]
  ------------------
  361|   208k|      if (*pCpeBack++ == ID_CPE) {
  ------------------
  |  Branch (361:11): [True: 727, False: 208k]
  ------------------
  362|    727|        err = 1;
  363|    727|        goto bail;
  364|    727|      }
  365|   208k|    }
  366|   658k|  }
  367|       |
  368|   248k|bail:
  369|       |
  370|   248k|  return err;
  371|   248k|}
tpdec_asc.cpp:_ZL35getImplicitAudioChannelTypeAndIndexP18AUDIO_CHANNEL_TYPEPhjj:
  709|   421k|                                                UINT index) {
  710|   421k|  if (index < 3) {
  ------------------
  |  Branch (710:7): [True: 364k, False: 56.1k]
  ------------------
  711|   364k|    *chType = ACT_FRONT;
  712|   364k|    *chIndex = index;
  713|   364k|  } else {
  714|  56.1k|    switch (channelConfig) {
  715|    180|      case 4: /* SCE, CPE, SCE */
  ------------------
  |  Branch (715:7): [True: 180, False: 56.0k]
  ------------------
  716|    253|      case 5: /* SCE, CPE, CPE */
  ------------------
  |  Branch (716:7): [True: 73, False: 56.1k]
  ------------------
  717|    418|      case 6: /* SCE, CPE, CPE, LFE */
  ------------------
  |  Branch (717:7): [True: 165, False: 56.0k]
  ------------------
  718|    418|        switch (index) {
  ------------------
  |  Branch (718:17): [True: 418, False: 0]
  ------------------
  719|    341|          case 3:
  ------------------
  |  Branch (719:11): [True: 341, False: 77]
  ------------------
  720|    341|          case 4:
  ------------------
  |  Branch (720:11): [True: 0, False: 418]
  ------------------
  721|    341|            *chType = ACT_BACK;
  722|    341|            *chIndex = index - 3;
  723|    341|            break;
  724|     77|          case 5:
  ------------------
  |  Branch (724:11): [True: 77, False: 341]
  ------------------
  725|     77|            *chType = ACT_LFE;
  726|     77|            *chIndex = 0;
  727|     77|            break;
  728|    418|        }
  729|    418|        break;
  730|  17.1k|      case 7: /* SCE,CPE,CPE,CPE,LFE */
  ------------------
  |  Branch (730:7): [True: 17.1k, False: 39.0k]
  ------------------
  731|  17.1k|        switch (index) {
  ------------------
  |  Branch (731:17): [True: 17.1k, False: 0]
  ------------------
  732|  5.74k|          case 3:
  ------------------
  |  Branch (732:11): [True: 5.74k, False: 11.4k]
  ------------------
  733|  5.74k|          case 4:
  ------------------
  |  Branch (733:11): [True: 0, False: 17.1k]
  ------------------
  734|  5.74k|            *chType = ACT_FRONT;
  735|  5.74k|            *chIndex = index;
  736|  5.74k|            break;
  737|  5.72k|          case 5:
  ------------------
  |  Branch (737:11): [True: 5.72k, False: 11.4k]
  ------------------
  738|  5.72k|          case 6:
  ------------------
  |  Branch (738:11): [True: 0, False: 17.1k]
  ------------------
  739|  5.72k|            *chType = ACT_BACK;
  740|  5.72k|            *chIndex = index - 5;
  741|  5.72k|            break;
  742|  5.68k|          case 7:
  ------------------
  |  Branch (742:11): [True: 5.68k, False: 11.4k]
  ------------------
  743|  5.68k|            *chType = ACT_LFE;
  744|  5.68k|            *chIndex = 0;
  745|  5.68k|            break;
  746|  17.1k|        }
  747|  17.1k|        break;
  748|  17.1k|      case 11: /* SCE,CPE,CPE,SCE,LFE */
  ------------------
  |  Branch (748:7): [True: 7.10k, False: 49.0k]
  ------------------
  749|  7.10k|        if (index < 6) {
  ------------------
  |  Branch (749:13): [True: 4.78k, False: 2.31k]
  ------------------
  750|  4.78k|          *chType = ACT_BACK;
  751|  4.78k|          *chIndex = index - 3;
  752|  4.78k|        } else {
  753|  2.31k|          *chType = ACT_LFE;
  754|  2.31k|          *chIndex = 0;
  755|  2.31k|        }
  756|  7.10k|        break;
  757|  3.32k|      case 12: /* SCE,CPE,CPE,CPE,LFE */
  ------------------
  |  Branch (757:7): [True: 3.32k, False: 52.8k]
  ------------------
  758|  3.32k|        if (index < 7) {
  ------------------
  |  Branch (758:13): [True: 2.22k, False: 1.10k]
  ------------------
  759|  2.22k|          *chType = ACT_BACK;
  760|  2.22k|          *chIndex = index - 3;
  761|  2.22k|        } else {
  762|  1.10k|          *chType = ACT_LFE;
  763|  1.10k|          *chIndex = 0;
  764|  1.10k|        }
  765|  3.32k|        break;
  766|  28.1k|      case 14: /* SCE,CPE,CPE,LFE,CPE */
  ------------------
  |  Branch (766:7): [True: 28.1k, False: 28.0k]
  ------------------
  767|  28.1k|        switch (index) {
  ------------------
  |  Branch (767:17): [True: 28.1k, False: 0]
  ------------------
  768|  9.41k|          case 3:
  ------------------
  |  Branch (768:11): [True: 9.41k, False: 18.7k]
  ------------------
  769|  9.41k|          case 4:
  ------------------
  |  Branch (769:11): [True: 0, False: 28.1k]
  ------------------
  770|  9.41k|            *chType = ACT_BACK;
  771|  9.41k|            *chIndex = index - 3;
  772|  9.41k|            break;
  773|  9.40k|          case 5:
  ------------------
  |  Branch (773:11): [True: 9.40k, False: 18.7k]
  ------------------
  774|  9.40k|            *chType = ACT_LFE;
  775|  9.40k|            *chIndex = 0;
  776|  9.40k|            break;
  777|  9.37k|          case 6:
  ------------------
  |  Branch (777:11): [True: 9.37k, False: 18.8k]
  ------------------
  778|  9.37k|          case 7:
  ------------------
  |  Branch (778:11): [True: 0, False: 28.1k]
  ------------------
  779|  9.37k|            *chType = ACT_FRONT_TOP;
  780|  9.37k|            *chIndex = index - 6; /* handle the top layer independently */
  781|  9.37k|            break;
  782|  28.1k|        }
  783|  28.1k|        break;
  784|  28.1k|      default:
  ------------------
  |  Branch (784:7): [True: 0, False: 56.1k]
  ------------------
  785|      0|        *chType = ACT_NONE;
  786|      0|        break;
  787|  56.1k|    }
  788|  56.1k|  }
  789|   421k|}
tpdec_asc.cpp:_ZL6getAOTP13FDK_BITSTREAM:
 1338|  1.14M|static AUDIO_OBJECT_TYPE getAOT(HANDLE_FDK_BITSTREAM bs) {
 1339|  1.14M|  int tmp = 0;
 1340|       |
 1341|  1.14M|  tmp = FDKreadBits(bs, 5);
 1342|  1.14M|  if (tmp == AOT_ESCAPE) {
  ------------------
  |  Branch (1342:7): [True: 443k, False: 698k]
  ------------------
 1343|   443k|    int tmp2 = FDKreadBits(bs, 6);
 1344|   443k|    tmp = 32 + tmp2;
 1345|   443k|  }
 1346|       |
 1347|  1.14M|  return (AUDIO_OBJECT_TYPE)tmp;
 1348|  1.14M|}
tpdec_asc.cpp:_ZL13getSampleRateP13FDK_BITSTREAMPhi:
 1350|  1.40M|static INT getSampleRate(HANDLE_FDK_BITSTREAM bs, UCHAR *index, int nBits) {
 1351|  1.40M|  INT sampleRate;
 1352|  1.40M|  int idx;
 1353|       |
 1354|  1.40M|  idx = FDKreadBits(bs, nBits);
 1355|  1.40M|  if (idx == (1 << nBits) - 1) {
  ------------------
  |  Branch (1355:7): [True: 44.1k, False: 1.36M]
  ------------------
 1356|  44.1k|    if (FDKgetValidBits(bs) < 24) {
  ------------------
  |  Branch (1356:9): [True: 1.34k, False: 42.8k]
  ------------------
 1357|  1.34k|      return 0;
 1358|  1.34k|    }
 1359|  42.8k|    sampleRate = FDKreadBits(bs, 24);
 1360|  1.36M|  } else {
 1361|  1.36M|    sampleRate = SamplingRateTable[idx];
 1362|  1.36M|  }
 1363|       |
 1364|  1.40M|  *index = idx;
 1365|       |
 1366|  1.40M|  return sampleRate;
 1367|  1.40M|}
tpdec_asc.cpp:_ZL22GaSpecificConfig_ParseP18CSGaSpecificConfigP21CSAudioSpecificConfigP13FDK_BITSTREAMj:
 1372|   652k|                                                 UINT ascStartAnchor) {
 1373|   652k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1374|       |
 1375|   652k|  self->m_frameLengthFlag = FDKreadBits(bs, 1);
 1376|       |
 1377|   652k|  self->m_dependsOnCoreCoder = FDKreadBits(bs, 1);
 1378|       |
 1379|   652k|  if (self->m_dependsOnCoreCoder) self->m_coreCoderDelay = FDKreadBits(bs, 14);
  ------------------
  |  Branch (1379:7): [True: 30.6k, False: 621k]
  ------------------
 1380|       |
 1381|   652k|  self->m_extensionFlag = FDKreadBits(bs, 1);
 1382|       |
 1383|   652k|  if (asc->m_channelConfiguration == 0) {
  ------------------
  |  Branch (1383:7): [True: 246k, False: 405k]
  ------------------
 1384|   246k|    CProgramConfig_Read(&asc->m_progrConfigElement, bs, ascStartAnchor);
 1385|   246k|  }
 1386|       |
 1387|   652k|  if ((asc->m_aot == AOT_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_SCAL)) {
  ------------------
  |  Branch (1387:7): [True: 2.14k, False: 649k]
  |  Branch (1387:39): [True: 53.5k, False: 596k]
  ------------------
 1388|  55.6k|    self->m_layer = FDKreadBits(bs, 3);
 1389|  55.6k|  }
 1390|       |
 1391|   652k|  if (self->m_extensionFlag) {
  ------------------
  |  Branch (1391:7): [True: 260k, False: 391k]
  ------------------
 1392|   260k|    if (asc->m_aot == AOT_ER_BSAC) {
  ------------------
  |  Branch (1392:9): [True: 6.21k, False: 254k]
  ------------------
 1393|  6.21k|      self->m_numOfSubFrame = FDKreadBits(bs, 5);
 1394|  6.21k|      self->m_layerLength = FDKreadBits(bs, 11);
 1395|  6.21k|    }
 1396|       |
 1397|   260k|    if ((asc->m_aot == AOT_ER_AAC_LC) || (asc->m_aot == AOT_ER_AAC_LTP) ||
  ------------------
  |  Branch (1397:9): [True: 464, False: 260k]
  |  Branch (1397:42): [True: 0, False: 260k]
  ------------------
 1398|   260k|        (asc->m_aot == AOT_ER_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (1398:9): [True: 36.1k, False: 223k]
  |  Branch (1398:44): [True: 5.45k, False: 218k]
  ------------------
 1399|  42.0k|      asc->m_vcb11Flag = FDKreadBits(bs, 1); /* aacSectionDataResilienceFlag */
 1400|  42.0k|      asc->m_rvlcFlag =
 1401|  42.0k|          FDKreadBits(bs, 1); /* aacScalefactorDataResilienceFlag */
 1402|  42.0k|      asc->m_hcrFlag = FDKreadBits(bs, 1); /* aacSpectralDataResilienceFlag */
 1403|  42.0k|    }
 1404|       |
 1405|   260k|    self->m_extensionFlag3 = FDKreadBits(bs, 1);
 1406|   260k|  }
 1407|   652k|  return (ErrorStatus);
 1408|   652k|}
tpdec_asc.cpp:_ZL23EldSpecificConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 1470|   195k|                                                  CSTpCallBacks *cb) {
 1471|   195k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1472|   195k|  CSEldSpecificConfig *esc = &asc->m_sc.m_eldSpecificConfig;
 1473|   195k|  UINT eldExtType;
 1474|   195k|  int eldExtLen, len, cnt, ldSbrLen = 0, eldExtLenSum, numSbrHeader = 0,
 1475|   195k|                           sbrIndex, eldExtCnt = 0;
 1476|       |
 1477|   195k|  unsigned char downscale_fill_nibble;
 1478|       |
 1479|   195k|  FDKmemclear(esc, sizeof(CSEldSpecificConfig));
 1480|       |
 1481|   195k|  esc->m_frameLengthFlag = FDKreadBits(hBs, 1);
 1482|   195k|  if (esc->m_frameLengthFlag) {
  ------------------
  |  Branch (1482:7): [True: 106k, False: 89.0k]
  ------------------
 1483|   106k|    asc->m_samplesPerFrame = 480;
 1484|   106k|  } else {
 1485|  89.0k|    asc->m_samplesPerFrame = 512;
 1486|  89.0k|  }
 1487|       |
 1488|   195k|  asc->m_vcb11Flag = FDKreadBits(hBs, 1);
 1489|   195k|  asc->m_rvlcFlag = FDKreadBits(hBs, 1);
 1490|   195k|  asc->m_hcrFlag = FDKreadBits(hBs, 1);
 1491|       |
 1492|   195k|  esc->m_sbrPresentFlag = FDKreadBits(hBs, 1);
 1493|       |
 1494|   195k|  if (esc->m_sbrPresentFlag == 1) {
  ------------------
  |  Branch (1494:7): [True: 105k, False: 90.5k]
  ------------------
 1495|   105k|    esc->m_sbrSamplingRate =
 1496|   105k|        FDKreadBits(hBs, 1); /* 0: single rate, 1: dual rate */
 1497|   105k|    esc->m_sbrCrcFlag = FDKreadBits(hBs, 1);
 1498|       |
 1499|   105k|    asc->m_extensionSamplingFrequency = asc->m_samplingFrequency
 1500|   105k|                                        << esc->m_sbrSamplingRate;
 1501|       |
 1502|   105k|    if (cb->cbSbr != NULL) {
  ------------------
  |  Branch (1502:9): [True: 105k, 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|   105k|      switch (asc->m_channelConfiguration) {
 1507|  7.58k|        case 1:
  ------------------
  |  Branch (1507:9): [True: 7.58k, False: 97.7k]
  ------------------
 1508|  24.0k|        case 2:
  ------------------
  |  Branch (1508:9): [True: 16.5k, False: 88.8k]
  ------------------
 1509|  24.0k|          numSbrHeader = 1;
 1510|  24.0k|          break;
 1511|    534|        case 3:
  ------------------
  |  Branch (1511:9): [True: 534, False: 104k]
  ------------------
 1512|    534|          numSbrHeader = 2;
 1513|    534|          break;
 1514|  9.02k|        case 4:
  ------------------
  |  Branch (1514:9): [True: 9.02k, False: 96.3k]
  ------------------
 1515|  9.69k|        case 5:
  ------------------
  |  Branch (1515:9): [True: 670, False: 104k]
  ------------------
 1516|  11.0k|        case 6:
  ------------------
  |  Branch (1516:9): [True: 1.35k, False: 104k]
  ------------------
 1517|  11.0k|          numSbrHeader = 3;
 1518|  11.0k|          break;
 1519|  5.09k|        case 7:
  ------------------
  |  Branch (1519:9): [True: 5.09k, False: 100k]
  ------------------
 1520|  26.9k|        case 11:
  ------------------
  |  Branch (1520:9): [True: 21.8k, False: 83.5k]
  ------------------
 1521|  33.4k|        case 12:
  ------------------
  |  Branch (1521:9): [True: 6.52k, False: 98.8k]
  ------------------
 1522|  69.2k|        case 14:
  ------------------
  |  Branch (1522:9): [True: 35.8k, False: 69.5k]
  ------------------
 1523|  69.2k|          numSbrHeader = 4;
 1524|  69.2k|          break;
 1525|    408|        default:
  ------------------
  |  Branch (1525:9): [True: 408, False: 104k]
  ------------------
 1526|    408|          numSbrHeader = 0;
 1527|    408|          break;
 1528|   105k|      }
 1529|   440k|      for (sbrIndex = 0; sbrIndex < numSbrHeader; sbrIndex++) {
  ------------------
  |  Branch (1529:26): [True: 335k, False: 105k]
  ------------------
 1530|   335k|        ldSbrLen += skipSbrHeader(hBs, 0);
 1531|   335k|      }
 1532|   105k|    } else {
 1533|      0|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1534|      0|    }
 1535|   105k|  }
 1536|   195k|  esc->m_useLdQmfTimeAlign = 0;
 1537|       |
 1538|       |  /* new ELD syntax */
 1539|   195k|  eldExtLenSum = FDKgetValidBits(hBs);
 1540|   195k|  esc->m_downscaledSamplingFrequency = asc->m_samplingFrequency;
 1541|       |  /* parse ExtTypeConfigData */
 1542|   627k|  while (((eldExtType = FDKreadBits(hBs, 4)) != ELDEXT_TERM) &&
  ------------------
  |  Branch (1542:10): [True: 466k, False: 161k]
  ------------------
 1543|   466k|         ((INT)FDKgetValidBits(hBs) >= 0) && (eldExtCnt++ < 15)) {
  ------------------
  |  Branch (1543:10): [True: 464k, False: 1.16k]
  |  Branch (1543:46): [True: 459k, False: 5.39k]
  ------------------
 1544|   459k|    eldExtLen = len = FDKreadBits(hBs, 4);
 1545|   459k|    if (len == 0xf) {
  ------------------
  |  Branch (1545:9): [True: 23.4k, False: 436k]
  ------------------
 1546|  23.4k|      len = FDKreadBits(hBs, 8);
 1547|  23.4k|      eldExtLen += len;
 1548|       |
 1549|  23.4k|      if (len == 0xff) {
  ------------------
  |  Branch (1549:11): [True: 4.30k, False: 19.1k]
  ------------------
 1550|  4.30k|        len = FDKreadBits(hBs, 16);
 1551|  4.30k|        eldExtLen += len;
 1552|  4.30k|      }
 1553|  23.4k|    }
 1554|       |
 1555|   459k|    switch (eldExtType) {
 1556|  92.7k|      case ELDEXT_LDSAC:
  ------------------
  |  Branch (1556:7): [True: 92.7k, False: 366k]
  ------------------
 1557|  92.7k|        esc->m_useLdQmfTimeAlign = 1;
 1558|  92.7k|        if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (1558:13): [True: 92.7k, False: 0]
  ------------------
 1559|  92.7k|          ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbSsc(
 1560|  92.7k|              cb->cbSscData, hBs, asc->m_aot,
 1561|  92.7k|              asc->m_samplingFrequency << esc->m_sbrSamplingRate,
 1562|  92.7k|              asc->m_samplesPerFrame << esc->m_sbrSamplingRate,
 1563|  92.7k|              asc->m_channelConfiguration, 1, /* stereoConfigIndex */
 1564|  92.7k|              -1, /* nTimeSlots: read from bitstream */
 1565|  92.7k|              eldExtLen, asc->configMode, &asc->SacConfigChanged);
 1566|  92.7k|          if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1566:15): [True: 24.4k, False: 68.3k]
  ------------------
 1567|  24.4k|            return TRANSPORTDEC_PARSE_ERROR;
 1568|  24.4k|          }
 1569|  68.3k|          if (esc->m_downscaledSamplingFrequency != asc->m_samplingFrequency) {
  ------------------
  |  Branch (1569:15): [True: 224, False: 68.1k]
  ------------------
 1570|    224|            return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
 1571|       |                                                       mode not allowed */
 1572|    224|          }
 1573|  68.1k|          break;
 1574|  68.3k|        }
 1575|       |
 1576|      0|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|      0|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1577|   340k|      default:
  ------------------
  |  Branch (1577:7): [True: 340k, False: 119k]
  ------------------
 1578|   139M|        for (cnt = 0; cnt < eldExtLen; cnt++) {
  ------------------
  |  Branch (1578:23): [True: 138M, False: 340k]
  ------------------
 1579|   138M|          FDKreadBits(hBs, 8);
 1580|   138M|        }
 1581|   340k|        break;
 1582|       |
 1583|  26.5k|      case ELDEXT_DOWNSCALEINFO:
  ------------------
  |  Branch (1583:7): [True: 26.5k, False: 432k]
  ------------------
 1584|  26.5k|        UCHAR tmpDownscaleFreqIdx;
 1585|  26.5k|        esc->m_downscaledSamplingFrequency =
 1586|  26.5k|            getSampleRate(hBs, &tmpDownscaleFreqIdx, 4);
 1587|  26.5k|        if (esc->m_downscaledSamplingFrequency == 0 ||
  ------------------
  |  Branch (1587:13): [True: 305, False: 26.2k]
  ------------------
 1588|  26.2k|            esc->m_downscaledSamplingFrequency > 96000) {
  ------------------
  |  Branch (1588:13): [True: 342, False: 25.9k]
  ------------------
 1589|    647|          return TRANSPORTDEC_PARSE_ERROR;
 1590|    647|        }
 1591|  25.9k|        downscale_fill_nibble = FDKreadBits(hBs, 4);
 1592|  25.9k|        if (downscale_fill_nibble != 0x0) {
  ------------------
  |  Branch (1592:13): [True: 1.82k, False: 24.0k]
  ------------------
 1593|  1.82k|          return TRANSPORTDEC_PARSE_ERROR;
 1594|  1.82k|        }
 1595|  24.0k|        if (esc->m_useLdQmfTimeAlign == 1) {
  ------------------
  |  Branch (1595:13): [True: 372, False: 23.7k]
  ------------------
 1596|    372|          return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
 1597|       |                                                     mode not allowed */
 1598|    372|        }
 1599|  23.7k|        break;
 1600|   459k|    }
 1601|   459k|  }
 1602|   168k|  if (eldExtType != ELDEXT_TERM) {
  ------------------
  |  Branch (1602:7): [True: 6.56k, False: 161k]
  ------------------
 1603|  6.56k|    return TRANSPORTDEC_PARSE_ERROR;
 1604|  6.56k|  }
 1605|       |
 1606|   161k|  if ((INT)FDKgetValidBits(hBs) < 0) {
  ------------------
  |  Branch (1606:7): [True: 1.16k, False: 160k]
  ------------------
 1607|  1.16k|    return TRANSPORTDEC_PARSE_ERROR;
 1608|  1.16k|  }
 1609|       |
 1610|   160k|  if (esc->m_sbrPresentFlag == 1 && numSbrHeader != 0) {
  ------------------
  |  Branch (1610:7): [True: 97.0k, False: 63.7k]
  |  Branch (1610:37): [True: 96.6k, False: 380]
  ------------------
 1611|  96.6k|    INT dsFactor = 1; /* Downscale factor must be 1 or even for SBR */
 1612|  96.6k|    if (esc->m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1612:9): [True: 96.6k, False: 0]
  ------------------
 1613|  96.6k|      if (asc->m_samplingFrequency % esc->m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1613:11): [True: 319, False: 96.3k]
  ------------------
 1614|    319|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1615|    319|      }
 1616|  96.3k|      dsFactor = asc->m_samplingFrequency / esc->m_downscaledSamplingFrequency;
 1617|  96.3k|      if (dsFactor != 1 && (dsFactor)&1) {
  ------------------
  |  Branch (1617:11): [True: 19.2k, False: 77.1k]
  |  Branch (1617:28): [True: 185, False: 19.0k]
  ------------------
 1618|    185|        return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* SBR needs an even downscale
 1619|       |                                                   factor */
 1620|    185|      }
 1621|  96.1k|      if (dsFactor != 1 && dsFactor != 2 && dsFactor != 4) {
  ------------------
  |  Branch (1621:11): [True: 19.0k, False: 77.1k]
  |  Branch (1621:28): [True: 7.55k, False: 11.4k]
  |  Branch (1621:45): [True: 6.08k, False: 1.46k]
  ------------------
 1622|  6.08k|        dsFactor = 1; /* don't apply dsf for not yet supported even dsfs */
 1623|  6.08k|      }
 1624|  96.1k|      if ((INT)asc->m_samplesPerFrame % dsFactor != 0) {
  ------------------
  |  Branch (1624:11): [True: 0, False: 96.1k]
  ------------------
 1625|      0|        return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* frameSize/dsf must be an
 1626|       |                                                   integer number */
 1627|      0|      }
 1628|  96.1k|    }
 1629|  96.1k|    eldExtLenSum = eldExtLenSum - FDKgetValidBits(hBs);
 1630|  96.1k|    FDKpushBack(hBs, eldExtLenSum + ldSbrLen);
 1631|  96.1k|    if (0 != ld_sbr_header(asc, dsFactor, hBs, cb)) {
  ------------------
  |  Branch (1631:9): [True: 9.54k, False: 86.5k]
  ------------------
 1632|  9.54k|      return TRANSPORTDEC_PARSE_ERROR;
 1633|  9.54k|    }
 1634|  86.5k|    FDKpushFor(hBs, eldExtLenSum);
 1635|  86.5k|  }
 1636|   150k|  return (ErrorStatus);
 1637|   160k|}
tpdec_asc.cpp:_ZL13skipSbrHeaderP13FDK_BITSTREAMi:
 1410|   473k|static INT skipSbrHeader(HANDLE_FDK_BITSTREAM hBs, int isUsac) {
 1411|       |  /* Dummy parse SbrDfltHeader() */
 1412|   473k|  INT dflt_header_extra1, dflt_header_extra2, bitsToSkip = 0;
 1413|       |
 1414|   473k|  if (!isUsac) {
  ------------------
  |  Branch (1414:7): [True: 335k, False: 138k]
  ------------------
 1415|   335k|    bitsToSkip = 6;
 1416|   335k|    FDKpushFor(hBs, 6); /* amp res 1, xover freq 3, reserved 2 */
 1417|   335k|  }
 1418|   473k|  bitsToSkip += 8;
 1419|   473k|  FDKpushFor(hBs, 8); /* start / stop freq */
 1420|   473k|  bitsToSkip += 2;
 1421|   473k|  dflt_header_extra1 = FDKreadBit(hBs);
 1422|   473k|  dflt_header_extra2 = FDKreadBit(hBs);
 1423|   473k|  bitsToSkip += 5 * dflt_header_extra1 + 6 * dflt_header_extra2;
 1424|   473k|  FDKpushFor(hBs, 5 * dflt_header_extra1 + 6 * dflt_header_extra2);
 1425|       |
 1426|   473k|  return bitsToSkip;
 1427|   473k|}
tpdec_asc.cpp:_ZL13ld_sbr_headerP21CSAudioSpecificConfigiP13FDK_BITSTREAMP13CSTpCallBacks:
 1430|  96.1k|                         HANDLE_FDK_BITSTREAM hBs, CSTpCallBacks *cb) {
 1431|  96.1k|  const int channelConfiguration = asc->m_channelConfiguration;
 1432|  96.1k|  int i = 0, j = 0;
 1433|  96.1k|  INT error = 0;
 1434|  96.1k|  MP4_ELEMENT_ID element = ID_NONE;
 1435|       |
 1436|       |  /* check whether the channelConfiguration is defined in
 1437|       |   * channel_configuration_array */
 1438|  96.1k|  if (channelConfiguration < 0 ||
  ------------------
  |  Branch (1438:7): [True: 0, False: 96.1k]
  ------------------
 1439|  96.1k|      channelConfiguration > (INT)(sizeof(channel_configuration_array) /
  ------------------
  |  Branch (1439:7): [True: 0, False: 96.1k]
  ------------------
 1440|  96.1k|                                       sizeof(MP4_ELEMENT_ID **) -
 1441|  96.1k|                                   1)) {
 1442|      0|    return TRANSPORTDEC_PARSE_ERROR;
 1443|      0|  }
 1444|       |
 1445|       |  /* read elements of the passed channel_configuration until there is ID_NONE */
 1446|   453k|  while ((element = channel_configuration_array[channelConfiguration][j]) !=
  ------------------
  |  Branch (1446:10): [True: 367k, False: 86.5k]
  ------------------
 1447|   453k|         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|   367k|    if (element == ID_SCE || element == ID_CPE || element == ID_LFE) {
  ------------------
  |  Branch (1452:9): [True: 101k, False: 265k]
  |  Branch (1452:30): [True: 201k, False: 64.4k]
  |  Branch (1452:51): [True: 64.4k, False: 0]
  ------------------
 1453|   367k|      error |= cb->cbSbr(
 1454|   367k|          cb->cbSbrData, hBs, asc->m_samplingFrequency / dsFactor,
 1455|   367k|          asc->m_extensionSamplingFrequency / dsFactor,
 1456|   367k|          asc->m_samplesPerFrame / dsFactor, AOT_ER_AAC_ELD, element, i++, 0, 0,
 1457|   367k|          asc->configMode, &asc->SbrConfigChanged, dsFactor);
 1458|   367k|      if (error != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1458:11): [True: 9.54k, False: 357k]
  ------------------
 1459|  9.54k|        goto bail;
 1460|  9.54k|      }
 1461|   367k|    }
 1462|   357k|    j++;
 1463|   357k|  }
 1464|  96.1k|bail:
 1465|  96.1k|  return error;
 1466|  96.1k|}
tpdec_asc.cpp:_ZL16UsacConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 2128|   238k|                                           CSTpCallBacks *cb) {
 2129|   238k|  int usacSamplingFrequency, channelConfigurationIndex, coreSbrFrameLengthIndex;
 2130|   238k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
 2131|       |
 2132|       |  /* Start bit position of usacConfig */
 2133|   238k|  INT nbits = (INT)FDKgetValidBits(hBs);
 2134|       |
 2135|   238k|  usacSamplingFrequency = getSampleRate(hBs, &asc->m_samplingFrequencyIndex, 5);
 2136|   238k|  if (usacSamplingFrequency == 0 || usacSamplingFrequency > 96000) {
  ------------------
  |  Branch (2136:7): [True: 845, False: 237k]
  |  Branch (2136:37): [True: 327, False: 237k]
  ------------------
 2137|  1.17k|    return TRANSPORTDEC_PARSE_ERROR;
 2138|  1.17k|  }
 2139|   237k|  asc->m_samplingFrequency = (UINT)usacSamplingFrequency;
 2140|       |
 2141|   237k|  coreSbrFrameLengthIndex = FDKreadBits(hBs, 3);
 2142|   237k|  if (UsacConfig_SetCoreSbrFrameLengthIndex(asc, coreSbrFrameLengthIndex) !=
  ------------------
  |  Branch (2142:7): [True: 1.58k, False: 236k]
  ------------------
 2143|   237k|      TRANSPORTDEC_OK) {
 2144|  1.58k|    return TRANSPORTDEC_PARSE_ERROR;
 2145|  1.58k|  }
 2146|       |
 2147|   236k|  channelConfigurationIndex = FDKreadBits(hBs, 5);
 2148|   236k|  if (channelConfigurationIndex > 2) {
  ------------------
  |  Branch (2148:7): [True: 3.26k, False: 232k]
  ------------------
 2149|  3.26k|    return TRANSPORTDEC_PARSE_ERROR; /* only channelConfigurationIndex = [1,2]
 2150|       |                                        are supported */
 2151|  3.26k|  }
 2152|       |
 2153|   232k|  if (channelConfigurationIndex == 0) {
  ------------------
  |  Branch (2153:7): [True: 1.58k, False: 231k]
  ------------------
 2154|  1.58k|    return TRANSPORTDEC_PARSE_ERROR; /* only channelConfigurationIndex = [1,2]
 2155|       |                                        are supported */
 2156|  1.58k|  }
 2157|   231k|  asc->m_channelConfiguration = channelConfigurationIndex;
 2158|       |
 2159|   231k|  err = UsacRsv60DecoderConfig_Parse(asc, hBs, cb);
 2160|   231k|  if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2160:7): [True: 33.2k, False: 197k]
  ------------------
 2161|  33.2k|    return err;
 2162|  33.2k|  }
 2163|       |
 2164|   197k|  if (FDKreadBits(hBs, 1)) { /* usacConfigExtensionPresent */
  ------------------
  |  Branch (2164:7): [True: 12.1k, False: 185k]
  ------------------
 2165|  12.1k|    err = configExtension(&asc->m_sc.m_usacConfig, hBs, cb);
 2166|  12.1k|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2166:9): [True: 8.25k, False: 3.90k]
  ------------------
 2167|  8.25k|      return err;
 2168|  8.25k|    }
 2169|   185k|  } else if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (2169:14): [True: 185k, False: 0]
  ------------------
 2170|       |    /* no loudnessInfoSet contained. Clear the loudnessInfoSet struct by feeding
 2171|       |     * an empty config extension */
 2172|   185k|    err = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 2173|   185k|        cb->cbUniDrcData, NULL, 0, 1 /* loudnessInfoSet */, 0, 0, asc->m_aot);
 2174|   185k|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2174:9): [True: 0, False: 185k]
  ------------------
 2175|      0|      return err;
 2176|      0|    }
 2177|   185k|  }
 2178|       |
 2179|       |  /* sanity check whether number of channels signaled in UsacDecoderConfig()
 2180|       |     matches the number of channels required by channelConfigurationIndex */
 2181|   189k|  if ((channelConfigurationIndex > 0) &&
  ------------------
  |  Branch (2181:7): [True: 189k, False: 0]
  ------------------
 2182|   189k|      (sc_chan_config_tab[channelConfigurationIndex].nCh !=
  ------------------
  |  Branch (2182:7): [True: 0, False: 189k]
  ------------------
 2183|   189k|       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|   189k|  INT configSize_bits = (INT)FDKgetValidBits(hBs) - nbits;
 2189|   189k|  if (StoreConfigAsBitstream(hBs, configSize_bits,
  ------------------
  |  Branch (2189:7): [True: 8.48k, False: 181k]
  ------------------
 2190|   189k|                             asc->m_sc.m_usacConfig.UsacConfig,
 2191|   189k|                             TP_USAC_MAX_CONFIG_LEN)) {
  ------------------
  |  |  121|   189k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
 2192|  8.48k|    return TRANSPORTDEC_PARSE_ERROR;
 2193|  8.48k|  }
 2194|   181k|  asc->m_sc.m_usacConfig.UsacConfigBits = fAbs(configSize_bits);
 2195|       |
 2196|   181k|  return err;
 2197|   189k|}
tpdec_asc.cpp:_ZL28UsacRsv60DecoderConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMPK13CSTpCallBacks:
 1855|   231k|    const CSTpCallBacks *cb) {
 1856|   231k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1857|   231k|  CSUsacConfig *usc = &asc->m_sc.m_usacConfig;
 1858|   231k|  int i, numberOfElements;
 1859|   231k|  int channelElementIdx =
 1860|   231k|      0; /* index for elements which contain audio channels (sce, cpe, lfe) */
 1861|   231k|  SC_CHANNEL_CONFIG sc_chan_config = {0, 0, 0, 0};
 1862|   231k|  int uniDrcElement =
 1863|   231k|      -1; /* index of uniDrc extension element. -1 if not contained. */
 1864|       |
 1865|   231k|  numberOfElements = (int)escapedValue(hBs, 4, 8, 16) + 1;
 1866|   231k|  usc->m_usacNumElements = numberOfElements;
 1867|   231k|  if (numberOfElements > TP_USAC_MAX_ELEMENTS) {
  ------------------
  |  |  118|   231k|#define TP_USAC_MAX_ELEMENTS ((24) + TP_USAC_MAX_EXT_ELEMENTS)
  |  |  ------------------
  |  |  |  |  116|   231k|#define TP_USAC_MAX_EXT_ELEMENTS ((24))
  |  |  ------------------
  ------------------
  |  Branch (1867:7): [True: 878, False: 230k]
  ------------------
 1868|    878|    return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1869|    878|  }
 1870|   230k|  usc->m_nUsacChannels = 0;
 1871|   230k|  usc->m_channelConfigurationIndex = asc->m_channelConfiguration;
 1872|       |
 1873|   230k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1873:7): [True: 230k, False: 0]
  ------------------
 1874|   230k|    sc_chan_config = sc_chan_config_tab[usc->m_channelConfigurationIndex];
 1875|       |
 1876|   230k|    if (sc_chan_config.nCh > (SCHAR)TP_USAC_MAX_SPEAKERS) {
  ------------------
  |  |  114|   230k|#define TP_USAC_MAX_SPEAKERS (24)
  ------------------
  |  Branch (1876:9): [True: 0, False: 230k]
  ------------------
 1877|      0|      return TRANSPORTDEC_PARSE_ERROR;
 1878|      0|    }
 1879|   230k|  }
 1880|       |
 1881|   755k|  for (i = 0; i < numberOfElements; i++) {
  ------------------
  |  Branch (1881:15): [True: 553k, False: 201k]
  ------------------
 1882|   553k|    MP4_ELEMENT_ID usacElementType = (MP4_ELEMENT_ID)(
 1883|   553k|        FDKreadBits(hBs, 2) | USAC_ID_BIT); /* set USAC_ID_BIT to map
  ------------------
  |  |  417|   553k|#define USAC_ID_BIT 16 /** USAC element IDs start at USAC_ID_BIT */
  ------------------
 1884|       |                                               usacElementType to
 1885|       |                                               MP4_ELEMENT_ID enum */
 1886|   553k|    usc->element[i].usacElementType = usacElementType;
 1887|       |
 1888|       |    /* sanity check: update element counter */
 1889|   553k|    if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1889:9): [True: 553k, False: 0]
  ------------------
 1890|   553k|      switch (usacElementType) {
 1891|  77.2k|        case ID_USAC_SCE:
  ------------------
  |  Branch (1891:9): [True: 77.2k, False: 476k]
  ------------------
 1892|  77.2k|          sc_chan_config.nSCE--;
 1893|  77.2k|          break;
 1894|   146k|        case ID_USAC_CPE:
  ------------------
  |  Branch (1894:9): [True: 146k, False: 406k]
  ------------------
 1895|   146k|          sc_chan_config.nCPE--;
 1896|   146k|          break;
 1897|  3.37k|        case ID_USAC_LFE:
  ------------------
  |  Branch (1897:9): [True: 3.37k, False: 550k]
  ------------------
 1898|  3.37k|          sc_chan_config.nLFE--;
 1899|  3.37k|          break;
 1900|   326k|        default:
  ------------------
  |  Branch (1900:9): [True: 326k, False: 227k]
  ------------------
 1901|   326k|          break;
 1902|   553k|      }
 1903|   553k|      if (usc->m_channelConfigurationIndex) {
  ------------------
  |  Branch (1903:11): [True: 553k, False: 0]
  ------------------
 1904|       |        /* sanity check: no element counter may be smaller zero */
 1905|   553k|        if (sc_chan_config.nCPE < 0 || sc_chan_config.nSCE < 0 ||
  ------------------
  |  Branch (1905:13): [True: 2.66k, False: 550k]
  |  Branch (1905:40): [True: 5.59k, False: 545k]
  ------------------
 1906|   545k|            sc_chan_config.nLFE < 0) {
  ------------------
  |  Branch (1906:13): [True: 3.37k, False: 541k]
  ------------------
 1907|  11.6k|          return TRANSPORTDEC_PARSE_ERROR;
 1908|  11.6k|        }
 1909|   553k|      }
 1910|   553k|    }
 1911|       |
 1912|   541k|    switch (usacElementType) {
 1913|  71.6k|      case ID_USAC_SCE:
  ------------------
  |  Branch (1913:7): [True: 71.6k, False: 470k]
  ------------------
 1914|       |        /* UsacCoreConfig() ISO/IEC FDIS 23003-3  Table 10 */
 1915|  71.6k|        if (FDKreadBit(hBs)) { /* tw_mdct */
  ------------------
  |  Branch (1915:13): [True: 612, False: 71.0k]
  ------------------
 1916|    612|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1917|    612|        }
 1918|  71.0k|        usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1);
 1919|       |        /* end of UsacCoreConfig() */
 1920|  71.0k|        if (usc->m_sbrRatioIndex > 0) {
  ------------------
  |  Branch (1920:13): [True: 34.6k, False: 36.3k]
  ------------------
 1921|  34.6k|          if (cb->cbSbr == NULL) {
  ------------------
  |  Branch (1921:15): [True: 0, False: 34.6k]
  ------------------
 1922|      0|            return TRANSPORTDEC_UNKOWN_ERROR;
 1923|      0|          }
 1924|       |          /* SbrConfig() ISO/IEC FDIS 23003-3  Table 11 */
 1925|  34.6k|          usc->element[i].m_harmonicSBR = FDKreadBit(hBs);
 1926|  34.6k|          usc->element[i].m_interTes = FDKreadBit(hBs);
 1927|  34.6k|          usc->element[i].m_pvc = FDKreadBit(hBs);
 1928|  34.6k|          if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency,
  ------------------
  |  Branch (1928:15): [True: 287, False: 34.3k]
  ------------------
 1929|  34.6k|                        asc->m_extensionSamplingFrequency,
 1930|  34.6k|                        asc->m_samplesPerFrame, asc->m_aot, ID_SCE,
 1931|  34.6k|                        channelElementIdx, usc->element[i].m_harmonicSBR,
 1932|  34.6k|                        usc->element[i].m_stereoConfigIndex, asc->configMode,
 1933|  34.6k|                        &asc->SbrConfigChanged, 1)) {
 1934|    287|            return TRANSPORTDEC_PARSE_ERROR;
 1935|    287|          }
 1936|       |          /* end of SbrConfig() */
 1937|  34.6k|        }
 1938|  70.7k|        usc->m_nUsacChannels += 1;
 1939|  70.7k|        channelElementIdx++;
 1940|  70.7k|        break;
 1941|       |
 1942|   143k|      case ID_USAC_CPE:
  ------------------
  |  Branch (1942:7): [True: 143k, False: 397k]
  ------------------
 1943|       |        /* UsacCoreConfig() ISO/IEC FDIS 23003-3  Table 10 */
 1944|   143k|        if (FDKreadBit(hBs)) { /* tw_mdct */
  ------------------
  |  Branch (1944:13): [True: 278, False: 143k]
  ------------------
 1945|    278|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1946|    278|        }
 1947|   143k|        usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1);
 1948|       |        /* end of UsacCoreConfig() */
 1949|   143k|        if (usc->m_sbrRatioIndex > 0) {
  ------------------
  |  Branch (1949:13): [True: 138k, False: 5.32k]
  ------------------
 1950|   138k|          if (cb->cbSbr == NULL) return TRANSPORTDEC_UNKOWN_ERROR;
  ------------------
  |  Branch (1950:15): [True: 0, False: 138k]
  ------------------
 1951|       |          /* SbrConfig() ISO/IEC FDIS 23003-3 */
 1952|   138k|          usc->element[i].m_harmonicSBR = FDKreadBit(hBs);
 1953|   138k|          usc->element[i].m_interTes = FDKreadBit(hBs);
 1954|   138k|          usc->element[i].m_pvc = FDKreadBit(hBs);
 1955|   138k|          {
 1956|   138k|            INT bitsToSkip = skipSbrHeader(hBs, 1);
 1957|       |            /* read stereoConfigIndex */
 1958|   138k|            usc->element[i].m_stereoConfigIndex = FDKreadBits(hBs, 2);
 1959|       |            /* rewind */
 1960|   138k|            FDKpushBack(hBs, bitsToSkip + 2);
 1961|   138k|          }
 1962|   138k|          {
 1963|   138k|            MP4_ELEMENT_ID el_type =
 1964|   138k|                (usc->element[i].m_stereoConfigIndex == 1 ||
  ------------------
  |  Branch (1964:18): [True: 42.5k, False: 95.6k]
  ------------------
 1965|  95.6k|                 usc->element[i].m_stereoConfigIndex == 2)
  ------------------
  |  Branch (1965:18): [True: 7.76k, False: 87.8k]
  ------------------
 1966|   138k|                    ? ID_SCE
 1967|   138k|                    : ID_CPE;
 1968|   138k|            if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency,
  ------------------
  |  Branch (1968:17): [True: 3.40k, False: 134k]
  ------------------
 1969|   138k|                          asc->m_extensionSamplingFrequency,
 1970|   138k|                          asc->m_samplesPerFrame, asc->m_aot, el_type,
 1971|   138k|                          channelElementIdx, usc->element[i].m_harmonicSBR,
 1972|   138k|                          usc->element[i].m_stereoConfigIndex, asc->configMode,
 1973|   138k|                          &asc->SbrConfigChanged, 1)) {
 1974|  3.40k|              return TRANSPORTDEC_PARSE_ERROR;
 1975|  3.40k|            }
 1976|   138k|          }
 1977|       |          /* end of SbrConfig() */
 1978|       |
 1979|   134k|          usc->element[i].m_stereoConfigIndex =
 1980|   134k|              FDKreadBits(hBs, 2); /* Needed in RM5 syntax */
 1981|       |
 1982|   134k|          if (usc->element[i].m_stereoConfigIndex > 0) {
  ------------------
  |  Branch (1982:15): [True: 79.6k, False: 55.2k]
  ------------------
 1983|  79.6k|            if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (1983:17): [True: 79.6k, False: 0]
  ------------------
 1984|  79.6k|              int samplesPerFrame = asc->m_samplesPerFrame;
 1985|       |
 1986|  79.6k|              if (usc->m_sbrRatioIndex == 1) samplesPerFrame <<= 2;
  ------------------
  |  Branch (1986:19): [True: 16.5k, False: 63.0k]
  ------------------
 1987|  79.6k|              if (usc->m_sbrRatioIndex == 2)
  ------------------
  |  Branch (1987:19): [True: 12.3k, False: 67.2k]
  ------------------
 1988|  12.3k|                samplesPerFrame = (samplesPerFrame * 8) / 3;
 1989|  79.6k|              if (usc->m_sbrRatioIndex == 3) samplesPerFrame <<= 1;
  ------------------
  |  Branch (1989:19): [True: 50.6k, False: 28.9k]
  ------------------
 1990|       |
 1991|       |              /* Mps212Config() ISO/IEC FDIS 23003-3 */
 1992|  79.6k|              if (cb->cbSsc(cb->cbSscData, hBs, asc->m_aot,
  ------------------
  |  Branch (1992:19): [True: 3.93k, False: 75.6k]
  ------------------
 1993|  79.6k|                            asc->m_extensionSamplingFrequency, samplesPerFrame,
 1994|  79.6k|                            1, /* only downmix channels (residual channels are
 1995|       |                                  not counted) */
 1996|  79.6k|                            usc->element[i].m_stereoConfigIndex,
 1997|  79.6k|                            usc->m_coreSbrFrameLengthIndex,
 1998|  79.6k|                            0, /* don't know the length */
 1999|  79.6k|                            asc->configMode, &asc->SacConfigChanged)) {
 2000|  3.93k|                return TRANSPORTDEC_PARSE_ERROR;
 2001|  3.93k|              }
 2002|       |              /* end of Mps212Config() */
 2003|  79.6k|            } else {
 2004|      0|              return TRANSPORTDEC_UNKOWN_ERROR;
 2005|      0|            }
 2006|  79.6k|          }
 2007|   134k|        } else {
 2008|  5.32k|          usc->element[i].m_stereoConfigIndex = 0;
 2009|  5.32k|        }
 2010|   136k|        usc->m_nUsacChannels += 2;
 2011|       |
 2012|   136k|        channelElementIdx++;
 2013|   136k|        break;
 2014|       |
 2015|      0|      case ID_USAC_LFE:
  ------------------
  |  Branch (2015:7): [True: 0, False: 541k]
  ------------------
 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|   326k|      case ID_USAC_EXT:
  ------------------
  |  Branch (2036:7): [True: 326k, False: 215k]
  ------------------
 2037|   326k|        ErrorStatus = extElementConfig(&usc->element[i].extElement, hBs, cb, 0,
 2038|   326k|                                       asc->m_samplesPerFrame, 0, asc->m_aot);
 2039|   326k|        if (usc->element[i].extElement.usacExtElementType ==
  ------------------
  |  Branch (2039:13): [True: 162k, False: 164k]
  ------------------
 2040|   326k|            ID_EXT_ELE_UNI_DRC) {
 2041|   162k|          uniDrcElement = i;
 2042|   162k|        }
 2043|       |
 2044|   326k|        if (ErrorStatus) {
  ------------------
  |  Branch (2044:13): [True: 8.23k, False: 318k]
  ------------------
 2045|  8.23k|          return ErrorStatus;
 2046|  8.23k|        }
 2047|   318k|        break;
 2048|       |
 2049|   318k|      default:
  ------------------
  |  Branch (2049:7): [True: 0, False: 541k]
  ------------------
 2050|       |        /* non USAC-element encountered */
 2051|      0|        return TRANSPORTDEC_PARSE_ERROR;
 2052|   541k|    }
 2053|   541k|  }
 2054|       |
 2055|   201k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2055:7): [True: 201k, False: 0]
  ------------------
 2056|   201k|    if (usc->m_channelConfigurationIndex) {
  ------------------
  |  Branch (2056:9): [True: 201k, False: 0]
  ------------------
 2057|       |      /* sanity check: all element counter must be zero */
 2058|   201k|      if (sc_chan_config.nCPE | sc_chan_config.nSCE | sc_chan_config.nLFE) {
  ------------------
  |  Branch (2058:11): [True: 3.97k, False: 197k]
  ------------------
 2059|  3.97k|        return TRANSPORTDEC_PARSE_ERROR;
 2060|  3.97k|      }
 2061|   201k|    } 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|   201k|  }
 2070|       |
 2071|   197k|  if (uniDrcElement == -1 && cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (2071:7): [True: 184k, False: 13.8k]
  |  Branch (2071:30): [True: 184k, False: 0]
  ------------------
 2072|       |    /* no uniDrcConfig contained. Clear the uniDrcConfig struct by feeding an
 2073|       |     * empty extension element */
 2074|   184k|    int subStreamIndex = 0;
 2075|   184k|    ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 2076|   184k|        cb->cbUniDrcData, NULL, 0, 0 /* uniDrcConfig */, subStreamIndex, 0,
 2077|   184k|        asc->m_aot);
 2078|   184k|    if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2078:9): [True: 0, False: 184k]
  ------------------
 2079|      0|      return ErrorStatus;
 2080|      0|    }
 2081|   184k|  }
 2082|       |
 2083|   197k|  return ErrorStatus;
 2084|   197k|}
tpdec_asc.cpp:_ZL16extElementConfigP22CSUsacExtElementConfigP13FDK_BITSTREAMPK13CSTpCallBackshji17AUDIO_OBJECT_TYPE:
 1694|   326k|                                           const AUDIO_OBJECT_TYPE aot) {
 1695|   326k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1696|       |
 1697|   326k|  UINT usacExtElementType = escapedValue(hBs, 4, 8, 16);
 1698|       |
 1699|       |  /* recurve extension elements which are invalid for USAC */
 1700|   326k|  if (aot == AOT_USAC) {
  ------------------
  |  Branch (1700:7): [True: 326k, False: 0]
  ------------------
 1701|   326k|    switch (usacExtElementType) {
 1702|  42.0k|      case ID_EXT_ELE_FILL:
  ------------------
  |  Branch (1702:7): [True: 42.0k, False: 284k]
  ------------------
 1703|  42.4k|      case ID_EXT_ELE_MPEGS:
  ------------------
  |  Branch (1703:7): [True: 434, False: 325k]
  ------------------
 1704|  50.3k|      case ID_EXT_ELE_SAOC:
  ------------------
  |  Branch (1704:7): [True: 7.85k, False: 318k]
  ------------------
 1705|  58.3k|      case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  Branch (1705:7): [True: 8.06k, False: 318k]
  ------------------
 1706|   220k|      case ID_EXT_ELE_UNI_DRC:
  ------------------
  |  Branch (1706:7): [True: 162k, False: 164k]
  ------------------
 1707|   220k|        break;
 1708|   105k|      default:
  ------------------
  |  Branch (1708:7): [True: 105k, False: 220k]
  ------------------
 1709|   105k|        usacExtElementType = ID_EXT_ELE_UNKNOWN;
 1710|   105k|        break;
 1711|   326k|    }
 1712|   326k|  }
 1713|       |
 1714|   326k|  int usacExtElementConfigLength = escapedValue(hBs, 4, 8, 16);
 1715|   326k|  extElement->usacExtElementConfigLength = (USHORT)usacExtElementConfigLength;
 1716|   326k|  INT bsAnchor;
 1717|       |
 1718|   326k|  if (FDKreadBit(hBs)) /* usacExtElementDefaultLengthPresent */
  ------------------
  |  Branch (1718:7): [True: 8.17k, False: 318k]
  ------------------
 1719|  8.17k|    extElement->usacExtElementDefaultLength = escapedValue(hBs, 8, 16, 0) + 1;
 1720|   318k|  else
 1721|   318k|    extElement->usacExtElementDefaultLength = 0;
 1722|       |
 1723|   326k|  extElement->usacExtElementPayloadFrag = FDKreadBit(hBs);
 1724|       |
 1725|   326k|  bsAnchor = (INT)FDKgetValidBits(hBs);
 1726|       |
 1727|   326k|  switch (usacExtElementType) {
 1728|   105k|    case ID_EXT_ELE_UNKNOWN:
  ------------------
  |  Branch (1728:5): [True: 105k, False: 220k]
  ------------------
 1729|   147k|    case ID_EXT_ELE_FILL:
  ------------------
  |  Branch (1729:5): [True: 42.0k, False: 284k]
  ------------------
 1730|   147k|      break;
 1731|  8.06k|    case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  Branch (1731:5): [True: 8.06k, False: 318k]
  ------------------
 1732|       |      /* No configuration element */
 1733|  8.06k|      extElement->usacExtElementHasAudioPreRoll = 1;
 1734|  8.06k|      break;
 1735|   162k|    case ID_EXT_ELE_UNI_DRC: {
  ------------------
  |  Branch (1735:5): [True: 162k, False: 164k]
  ------------------
 1736|   162k|      if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1736:11): [True: 162k, False: 0]
  ------------------
 1737|   162k|        ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1738|   162k|            cb->cbUniDrcData, hBs, usacExtElementConfigLength,
 1739|   162k|            0, /* uniDrcConfig */
 1740|   162k|            subStreamIndex, 0, aot);
 1741|   162k|        if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1741:13): [True: 0, False: 162k]
  ------------------
 1742|      0|          return ErrorStatus;
 1743|      0|        }
 1744|   162k|      }
 1745|   162k|    } break;
 1746|   162k|    default:
  ------------------
  |  Branch (1746:5): [True: 8.28k, False: 318k]
  ------------------
 1747|  8.28k|      usacExtElementType = ID_EXT_ELE_UNKNOWN;
 1748|  8.28k|      break;
 1749|   326k|  }
 1750|   326k|  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|   326k|  {
 1755|   326k|    INT left_bits = (usacExtElementConfigLength << 3) -
 1756|   326k|                    (bsAnchor - (INT)FDKgetValidBits(hBs));
 1757|   326k|    if (left_bits >= 0) {
  ------------------
  |  Branch (1757:9): [True: 318k, False: 8.23k]
  ------------------
 1758|   318k|      FDKpushFor(hBs, left_bits);
 1759|   318k|    } else {
 1760|       |      /* parsed too many bits */
 1761|  8.23k|      ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
 1762|  8.23k|    }
 1763|   326k|  }
 1764|       |
 1765|   326k|  return ErrorStatus;
 1766|   326k|}
tpdec_asc.cpp:_ZL15configExtensionP12CSUsacConfigP13FDK_BITSTREAMPK13CSTpCallBacks:
 1775|  12.1k|                                          const CSTpCallBacks *cb) {
 1776|  12.1k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1777|       |
 1778|  12.1k|  int numConfigExtensions;
 1779|  12.1k|  UINT usacConfigExtType;
 1780|  12.1k|  int usacConfigExtLength;
 1781|  12.1k|  int loudnessInfoSetIndex =
 1782|  12.1k|      -1; /* index of loudnessInfoSet config extension. -1 if not contained. */
 1783|  12.1k|  int tmp_subStreamIndex = 0;
 1784|  12.1k|  AUDIO_OBJECT_TYPE tmp_aot = AOT_USAC;
 1785|       |
 1786|  12.1k|  numConfigExtensions = (int)escapedValue(hBs, 2, 4, 8) + 1;
 1787|   131k|  for (int confExtIdx = 0; confExtIdx < numConfigExtensions; confExtIdx++) {
  ------------------
  |  Branch (1787:28): [True: 127k, False: 3.90k]
  ------------------
 1788|   127k|    INT nbits;
 1789|   127k|    int loudnessInfoSetConfigExtensionPosition = FDKgetValidBits(hBs);
 1790|   127k|    usacConfigExtType = escapedValue(hBs, 4, 8, 16);
 1791|   127k|    usacConfigExtLength = (int)escapedValue(hBs, 4, 8, 16);
 1792|       |
 1793|       |    /* Start bit position of config extension */
 1794|   127k|    nbits = (INT)FDKgetValidBits(hBs);
 1795|       |
 1796|       |    /* Return an error in case the bitbuffer fill level is too low. */
 1797|   127k|    if (nbits < usacConfigExtLength * 8) {
  ------------------
  |  Branch (1797:9): [True: 3.43k, False: 124k]
  ------------------
 1798|  3.43k|      return TRANSPORTDEC_PARSE_ERROR;
 1799|  3.43k|    }
 1800|       |
 1801|   124k|    switch (usacConfigExtType) {
 1802|  41.3k|      case ID_CONFIG_EXT_FILL:
  ------------------
  |  Branch (1802:7): [True: 41.3k, False: 82.9k]
  ------------------
 1803|  44.1k|        for (int i = 0; i < usacConfigExtLength; i++) {
  ------------------
  |  Branch (1803:25): [True: 4.17k, False: 40.0k]
  ------------------
 1804|  4.17k|          if (FDKreadBits(hBs, 8) != 0xa5) {
  ------------------
  |  Branch (1804:15): [True: 1.33k, False: 2.84k]
  ------------------
 1805|  1.33k|            return TRANSPORTDEC_PARSE_ERROR;
 1806|  1.33k|          }
 1807|  4.17k|        }
 1808|  40.0k|        break;
 1809|  40.0k|      case ID_CONFIG_EXT_LOUDNESS_INFO: {
  ------------------
  |  Branch (1809:7): [True: 12.1k, False: 112k]
  ------------------
 1810|  12.1k|        if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1810:13): [True: 12.1k, False: 0]
  ------------------
 1811|  12.1k|          ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1812|  12.1k|              cb->cbUniDrcData, hBs, usacConfigExtLength,
 1813|  12.1k|              1, /* loudnessInfoSet */
 1814|  12.1k|              tmp_subStreamIndex, loudnessInfoSetConfigExtensionPosition,
 1815|  12.1k|              tmp_aot);
 1816|  12.1k|          if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1816:15): [True: 0, False: 12.1k]
  ------------------
 1817|      0|            return ErrorStatus;
 1818|      0|          }
 1819|  12.1k|          loudnessInfoSetIndex = confExtIdx;
 1820|  12.1k|        }
 1821|  12.1k|      } break;
 1822|  70.8k|      default:
  ------------------
  |  Branch (1822:7): [True: 70.8k, False: 53.4k]
  ------------------
 1823|  70.8k|        break;
 1824|   124k|    }
 1825|       |
 1826|       |    /* Skip remaining bits. If too many bits were parsed, assume error. */
 1827|   122k|    usacConfigExtLength =
 1828|   122k|        8 * usacConfigExtLength - (nbits - (INT)FDKgetValidBits(hBs));
 1829|   122k|    if (usacConfigExtLength < 0) {
  ------------------
  |  Branch (1829:9): [True: 3.49k, False: 119k]
  ------------------
 1830|  3.49k|      return TRANSPORTDEC_PARSE_ERROR;
 1831|  3.49k|    }
 1832|   119k|    FDKpushFor(hBs, usacConfigExtLength);
 1833|   119k|  }
 1834|       |
 1835|  3.90k|  if (loudnessInfoSetIndex == -1 && cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1835:7): [True: 1.69k, False: 2.21k]
  |  Branch (1835:37): [True: 1.69k, False: 0]
  ------------------
 1836|       |    /* no loudnessInfoSet contained. Clear the loudnessInfoSet struct by feeding
 1837|       |     * an empty config extension */
 1838|  1.69k|    ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1839|  1.69k|        cb->cbUniDrcData, NULL, 0, 1 /* loudnessInfoSet */, tmp_subStreamIndex,
 1840|  1.69k|        0, tmp_aot);
 1841|  1.69k|    if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1841:9): [True: 0, False: 1.69k]
  ------------------
 1842|      0|      return ErrorStatus;
 1843|      0|    }
 1844|  1.69k|  }
 1845|       |
 1846|  3.90k|  return ErrorStatus;
 1847|  3.90k|}
tpdec_asc.cpp:_ZL34AudioSpecificConfig_ExtensionParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 2200|  6.92k|    CSAudioSpecificConfig *self, HANDLE_FDK_BITSTREAM bs, CSTpCallBacks *cb) {
 2201|  6.92k|  TP_ASC_EXTENSION_ID lastAscExt, ascExtId = ASCEXT_UNKOWN;
 2202|  6.92k|  INT bitsAvailable = (INT)FDKgetValidBits(bs);
 2203|       |
 2204|  16.7k|  while (bitsAvailable >= 11) {
  ------------------
  |  Branch (2204:10): [True: 12.8k, False: 3.89k]
  ------------------
 2205|  12.8k|    lastAscExt = ascExtId;
 2206|  12.8k|    ascExtId = (TP_ASC_EXTENSION_ID)FDKreadBits(bs, 11);
 2207|  12.8k|    bitsAvailable -= 11;
 2208|       |
 2209|  12.8k|    switch (ascExtId) {
 2210|  3.78k|      case ASCEXT_SBR: /* 0x2b7 */
  ------------------
  |  Branch (2210:7): [True: 3.78k, False: 9.04k]
  ------------------
 2211|  3.78k|        if ((self->m_extensionAudioObjectType != AOT_SBR) &&
  ------------------
  |  Branch (2211:13): [True: 3.58k, False: 202]
  ------------------
 2212|  3.58k|            (bitsAvailable >= 5)) {
  ------------------
  |  Branch (2212:13): [True: 3.29k, False: 287]
  ------------------
 2213|  3.29k|          self->m_extensionAudioObjectType = getAOT(bs);
 2214|       |
 2215|  3.29k|          if ((self->m_extensionAudioObjectType == AOT_SBR) ||
  ------------------
  |  Branch (2215:15): [True: 844, False: 2.45k]
  ------------------
 2216|  2.45k|              (self->m_extensionAudioObjectType ==
  ------------------
  |  Branch (2216:15): [True: 1.29k, False: 1.15k]
  ------------------
 2217|  2.45k|               AOT_ER_BSAC)) { /* Get SBR extension configuration */
 2218|  2.14k|            self->m_sbrPresentFlag = FDKreadBits(bs, 1);
 2219|  2.14k|            if (self->m_aot == AOT_USAC && self->m_sbrPresentFlag > 0 &&
  ------------------
  |  Branch (2219:17): [True: 0, False: 2.14k]
  |  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|  2.14k|            if (self->m_sbrPresentFlag == 1) {
  ------------------
  |  Branch (2224:17): [True: 1.09k, False: 1.04k]
  ------------------
 2225|  1.09k|              self->m_extensionSamplingFrequency = getSampleRate(
 2226|  1.09k|                  bs, &self->m_extensionSamplingFrequencyIndex, 4);
 2227|       |
 2228|  1.09k|              if (self->m_extensionSamplingFrequency == 0 ||
  ------------------
  |  Branch (2228:19): [True: 187, False: 908]
  ------------------
 2229|    908|                  self->m_extensionSamplingFrequency > 96000) {
  ------------------
  |  Branch (2229:19): [True: 12, False: 896]
  ------------------
 2230|    199|                return TRANSPORTDEC_PARSE_ERROR;
 2231|    199|              }
 2232|  1.09k|            }
 2233|  1.94k|            if (self->m_extensionAudioObjectType == AOT_ER_BSAC) {
  ------------------
  |  Branch (2233:17): [True: 1.10k, False: 841]
  ------------------
 2234|  1.10k|              self->m_extensionChannelConfiguration = FDKreadBits(bs, 4);
 2235|  1.10k|            }
 2236|  1.94k|          }
 2237|       |          /* Update counter because of variable length fields (AOT and sampling
 2238|       |           * rate) */
 2239|  3.09k|          bitsAvailable = (INT)FDKgetValidBits(bs);
 2240|  3.09k|        }
 2241|  3.58k|        break;
 2242|  3.58k|      case ASCEXT_PS: /* 0x548 */
  ------------------
  |  Branch (2242:7): [True: 1.52k, False: 11.3k]
  ------------------
 2243|  1.52k|        if ((lastAscExt == ASCEXT_SBR) &&
  ------------------
  |  Branch (2243:13): [True: 1.45k, False: 68]
  ------------------
 2244|  1.45k|            (self->m_extensionAudioObjectType == AOT_SBR) &&
  ------------------
  |  Branch (2244:13): [True: 617, False: 841]
  ------------------
 2245|    617|            (bitsAvailable > 0)) { /* Get PS extension configuration */
  ------------------
  |  Branch (2245:13): [True: 410, False: 207]
  ------------------
 2246|    410|          self->m_psPresentFlag = FDKreadBits(bs, 1);
 2247|    410|          bitsAvailable -= 1;
 2248|    410|        }
 2249|  1.52k|        break;
 2250|    758|      case ASCEXT_MPS: /* 0x76a */
  ------------------
  |  Branch (2250:7): [True: 758, False: 12.0k]
  ------------------
 2251|    758|        if (self->m_extensionAudioObjectType == AOT_MPEGS) break;
  ------------------
  |  Branch (2251:13): [True: 318, False: 440]
  ------------------
 2252|    440|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|    440|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 2253|  2.11k|      case ASCEXT_LDMPS: /* 0x7cc */
  ------------------
  |  Branch (2253:7): [True: 1.67k, False: 11.1k]
  ------------------
 2254|  2.11k|        if ((ascExtId == ASCEXT_LDMPS) &&
  ------------------
  |  Branch (2254:13): [True: 1.67k, False: 440]
  ------------------
 2255|  1.67k|            (self->m_extensionAudioObjectType == AOT_LD_MPEGS))
  ------------------
  |  Branch (2255:13): [True: 208, False: 1.46k]
  ------------------
 2256|    208|          break;
 2257|  1.90k|        if (bitsAvailable >= 1) {
  ------------------
  |  Branch (2257:13): [True: 1.71k, False: 198]
  ------------------
 2258|  1.71k|          bitsAvailable -= 1;
 2259|  1.71k|          if (FDKreadBits(bs, 1)) { /* self->m_mpsPresentFlag */
  ------------------
  |  Branch (2259:15): [True: 1.27k, False: 439]
  ------------------
 2260|  1.27k|            int sscLen = FDKreadBits(bs, 8);
 2261|  1.27k|            bitsAvailable -= 8;
 2262|  1.27k|            if (sscLen == 0xFF) {
  ------------------
  |  Branch (2262:17): [True: 621, False: 650]
  ------------------
 2263|    621|              sscLen += FDKreadBits(bs, 16);
 2264|    621|              bitsAvailable -= 16;
 2265|    621|            }
 2266|  1.27k|            FDKpushFor(bs, sscLen); /* Skip SSC to be able to read the next
 2267|       |                                       extension if there is one. */
 2268|       |
 2269|  1.27k|            bitsAvailable -= sscLen * 8;
 2270|  1.27k|          }
 2271|  1.71k|        }
 2272|  1.90k|        break;
 2273|  2.25k|      case ASCEXT_SAOC:
  ------------------
  |  Branch (2273:7): [True: 2.25k, False: 10.5k]
  ------------------
 2274|  2.25k|        if ((ascExtId == ASCEXT_SAOC) &&
  ------------------
  |  Branch (2274:13): [True: 2.25k, False: 0]
  ------------------
 2275|  2.25k|            (self->m_extensionAudioObjectType == AOT_SAOC))
  ------------------
  |  Branch (2275:13): [True: 300, False: 1.95k]
  ------------------
 2276|    300|          break;
 2277|  1.95k|        if (FDKreadBits(bs, 1)) { /* saocPresent */
  ------------------
  |  Branch (2277:13): [True: 1.75k, False: 202]
  ------------------
 2278|  1.75k|          int saocscLen = FDKreadBits(bs, 8);
 2279|  1.75k|          bitsAvailable -= 8;
 2280|  1.75k|          if (saocscLen == 0xFF) {
  ------------------
  |  Branch (2280:15): [True: 412, False: 1.34k]
  ------------------
 2281|    412|            saocscLen += FDKreadBits(bs, 16);
 2282|    412|            bitsAvailable -= 16;
 2283|    412|          }
 2284|  1.75k|          FDKpushFor(bs, saocscLen);
 2285|  1.75k|          bitsAvailable -= saocscLen * 8;
 2286|  1.75k|        }
 2287|  1.95k|        break;
 2288|  2.83k|      default:
  ------------------
  |  Branch (2288:7): [True: 2.83k, False: 10.0k]
  ------------------
 2289|       |        /* Just ignore anything. */
 2290|  2.83k|        return TRANSPORTDEC_OK;
 2291|  12.8k|    }
 2292|  12.8k|  }
 2293|       |
 2294|  3.89k|  return TRANSPORTDEC_OK;
 2295|  6.92k|}
tpdec_asc.cpp:_ZL22StoreConfigAsBitstreamP13FDK_BITSTREAMiPht:
 1647|   370k|    UCHAR *configTargetBuffer, const USHORT configTargetBufferSize_bytes) {
 1648|   370k|  FDK_BITSTREAM usacConf;
 1649|   370k|  UINT const nBits = fAbs(configSize_bits);
 1650|   370k|  UINT j, tmp;
 1651|       |
 1652|   370k|  if (nBits > 8 * (UINT)configTargetBufferSize_bytes) {
  ------------------
  |  Branch (1652:7): [True: 8.75k, False: 362k]
  ------------------
 1653|  8.75k|    return 1;
 1654|  8.75k|  }
 1655|   362k|  FDKmemclear(configTargetBuffer, configTargetBufferSize_bytes);
 1656|       |
 1657|   362k|  FDKinitBitStream(&usacConf, configTargetBuffer, configTargetBufferSize_bytes,
 1658|   362k|                   nBits, BS_WRITER);
 1659|   362k|  if (configSize_bits < 0) {
  ------------------
  |  Branch (1659:7): [True: 362k, False: 0]
  ------------------
 1660|   362k|    FDKpushBack(hBs, nBits);
 1661|   362k|  }
 1662|  1.25M|  for (j = nBits; j > 31; j -= 32) {
  ------------------
  |  Branch (1662:19): [True: 892k, False: 362k]
  ------------------
 1663|   892k|    tmp = FDKreadBits(hBs, 32);
 1664|   892k|    FDKwriteBits(&usacConf, tmp, 32);
 1665|   892k|  }
 1666|   362k|  if (j > 0) {
  ------------------
  |  Branch (1666:7): [True: 359k, False: 2.46k]
  ------------------
 1667|   359k|    tmp = FDKreadBits(hBs, j);
 1668|   359k|    FDKwriteBits(&usacConf, tmp, j);
 1669|   359k|  }
 1670|   362k|  FDKsyncCache(&usacConf);
 1671|   362k|  if (configSize_bits > 0) {
  ------------------
  |  Branch (1671:7): [True: 0, False: 362k]
  ------------------
 1672|      0|    FDKpushBack(hBs, nBits);
 1673|      0|  }
 1674|       |
 1675|   362k|  return 0;
 1676|   370k|}
tpdec_asc.cpp:_ZL37UsacConfig_SetCoreSbrFrameLengthIndexP21CSAudioSpecificConfigi:
 2088|   237k|    CSAudioSpecificConfig *asc, int coreSbrFrameLengthIndex) {
 2089|   237k|  int sbrRatioIndex_val;
 2090|       |
 2091|   237k|  if (coreSbrFrameLengthIndex > 4) {
  ------------------
  |  Branch (2091:7): [True: 1.58k, False: 236k]
  ------------------
 2092|  1.58k|    return TRANSPORTDEC_PARSE_ERROR; /* reserved values */
 2093|  1.58k|  }
 2094|   236k|  asc->m_sc.m_usacConfig.m_coreSbrFrameLengthIndex = coreSbrFrameLengthIndex;
 2095|   236k|  asc->m_samplesPerFrame = usacFrameLength[coreSbrFrameLengthIndex];
 2096|   236k|  sbrRatioIndex_val = sbrRatioIndex[coreSbrFrameLengthIndex];
 2097|   236k|  asc->m_sc.m_usacConfig.m_sbrRatioIndex = sbrRatioIndex_val;
 2098|       |
 2099|   236k|  if (sbrRatioIndex_val > 0) {
  ------------------
  |  Branch (2099:7): [True: 181k, False: 54.1k]
  ------------------
 2100|   181k|    asc->m_sbrPresentFlag = 1;
 2101|   181k|    asc->m_extensionSamplingFrequency = asc->m_samplingFrequency;
 2102|   181k|    asc->m_extensionSamplingFrequencyIndex = asc->m_samplingFrequencyIndex;
 2103|   181k|    switch (sbrRatioIndex_val) {
 2104|  34.5k|      case 1: /* sbrRatio = 4:1 */
  ------------------
  |  Branch (2104:7): [True: 34.5k, False: 147k]
  ------------------
 2105|  34.5k|        asc->m_samplingFrequency >>= 2;
 2106|  34.5k|        asc->m_samplesPerFrame >>= 2;
 2107|  34.5k|        break;
 2108|  57.7k|      case 2: /* sbrRatio = 8:3 */
  ------------------
  |  Branch (2108:7): [True: 57.7k, False: 124k]
  ------------------
 2109|  57.7k|        asc->m_samplingFrequency = (asc->m_samplingFrequency * 3) / 8;
 2110|  57.7k|        asc->m_samplesPerFrame = (asc->m_samplesPerFrame * 3) / 8;
 2111|  57.7k|        break;
 2112|  89.5k|      case 3: /* sbrRatio = 2:1 */
  ------------------
  |  Branch (2112:7): [True: 89.5k, False: 92.3k]
  ------------------
 2113|  89.5k|        asc->m_samplingFrequency >>= 1;
 2114|  89.5k|        asc->m_samplesPerFrame >>= 1;
 2115|  89.5k|        break;
 2116|      0|      default:
  ------------------
  |  Branch (2116:7): [True: 0, False: 181k]
  ------------------
 2117|      0|        return TRANSPORTDEC_PARSE_ERROR;
 2118|   181k|    }
 2119|   181k|    asc->m_samplingFrequencyIndex =
 2120|   181k|        getSamplingRateIndex(asc->m_samplingFrequency, 4);
 2121|   181k|  }
 2122|       |
 2123|   236k|  return TRANSPORTDEC_OK;
 2124|   236k|}

_Z15CLatmDemux_ReadP13FDK_BITSTREAMP10CLatmDemux14TRANSPORT_TYPEP13CSTpCallBacksP21CSAudioSpecificConfigPii:
  241|   690k|                                   const INT ignoreBufferFullness) {
  242|   690k|  UINT cntBits;
  243|   690k|  UINT cmpBufferFullness;
  244|   690k|  UINT audioMuxLengthBytesLast = 0;
  245|   690k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
  246|       |
  247|   690k|  cntBits = FDKgetValidBits(bs);
  248|       |
  249|   690k|  if ((INT)cntBits < MIN_LATM_HEADERLENGTH) {
  ------------------
  |  |  110|   690k|#define MIN_LATM_HEADERLENGTH 9
  ------------------
  |  Branch (249:7): [True: 236, False: 689k]
  ------------------
  250|    236|    return TRANSPORTDEC_NOT_ENOUGH_BITS;
  251|    236|  }
  252|       |
  253|   689k|  if (TRANSPORTDEC_OK != (ErrorStatus = CLatmDemux_ReadAudioMuxElement(
  ------------------
  |  Branch (253:7): [True: 560k, False: 129k]
  ------------------
  254|   689k|                              bs, pLatmDemux, (tt != TT_MP4_LATM_MCP0),
  255|   689k|                              pTpDecCallbacks, pAsc, pfConfigFound)))
  256|   560k|    return (ErrorStatus);
  257|       |
  258|   129k|  if (!ignoreBufferFullness) {
  ------------------
  |  Branch (258:7): [True: 48.4k, False: 80.5k]
  ------------------
  259|  48.4k|    cmpBufferFullness =
  260|  48.4k|        24 + audioMuxLengthBytesLast * 8 +
  261|  48.4k|        pLatmDemux->m_linfo[0][0].m_bufferFullness *
  262|  48.4k|            pAsc[TPDEC_TRACKINDEX(0, 0)].m_channelConfiguration * 32;
  ------------------
  |  |  107|  48.4k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  263|       |
  264|       |    /* evaluate buffer fullness */
  265|       |
  266|  48.4k|    if (pLatmDemux->m_linfo[0][0].m_bufferFullness != 0xFF) {
  ------------------
  |  Branch (266:9): [True: 47.8k, False: 585]
  ------------------
  267|  47.8k|      if (!pLatmDemux->BufferFullnessAchieved) {
  ------------------
  |  Branch (267:11): [True: 31.7k, False: 16.1k]
  ------------------
  268|  31.7k|        if (cntBits < cmpBufferFullness) {
  ------------------
  |  Branch (268:13): [True: 128, False: 31.5k]
  ------------------
  269|       |          /* condition for start of decoding is not fulfilled */
  270|       |
  271|       |          /* the current frame will not be decoded */
  272|    128|          return TRANSPORTDEC_NOT_ENOUGH_BITS;
  273|  31.5k|        } else {
  274|  31.5k|          pLatmDemux->BufferFullnessAchieved = 1;
  275|  31.5k|        }
  276|  31.7k|      }
  277|  47.8k|    }
  278|  48.4k|  }
  279|       |
  280|   128k|  return (ErrorStatus);
  281|   129k|}
_Z30CLatmDemux_ReadStreamMuxConfigP13FDK_BITSTREAMP10CLatmDemuxP13CSTpCallBacksP21CSAudioSpecificConfigPihh:
  286|  1.17M|    int *pfConfigFound, UCHAR configMode, UCHAR configChanged) {
  287|  1.17M|  CSAudioSpecificConfig ascDummy; /* the actual config is needed for flushing,
  288|       |                                     after that new config can be parsed */
  289|  1.17M|  CSAudioSpecificConfig *pAscDummy;
  290|  1.17M|  pAscDummy = &ascDummy;
  291|  1.17M|  pLatmDemux->usacExplicitCfgChanged = 0;
  292|  1.17M|  LATM_LAYER_INFO *p_linfo = NULL;
  293|  1.17M|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
  294|  1.17M|  UCHAR updateConfig[1 * 1] = {0};
  295|       |
  296|  1.17M|  pLatmDemux->m_AudioMuxVersion = FDKreadBits(bs, 1);
  297|       |
  298|  1.17M|  if (pLatmDemux->m_AudioMuxVersion == 0) {
  ------------------
  |  Branch (298:7): [True: 1.14M, False: 31.0k]
  ------------------
  299|  1.14M|    pLatmDemux->m_AudioMuxVersionA = 0;
  300|  1.14M|  } else {
  301|  31.0k|    pLatmDemux->m_AudioMuxVersionA = FDKreadBits(bs, 1);
  302|  31.0k|  }
  303|       |
  304|  1.17M|  if (pLatmDemux->m_AudioMuxVersionA == 0) {
  ------------------
  |  Branch (304:7): [True: 1.17M, False: 3.99k]
  ------------------
  305|  1.17M|    if (pLatmDemux->m_AudioMuxVersion == 1) {
  ------------------
  |  Branch (305:9): [True: 27.0k, False: 1.14M]
  ------------------
  306|  27.0k|      pLatmDemux->m_taraBufferFullness = CLatmDemux_GetValue(bs);
  307|  27.0k|    }
  308|  1.17M|    pLatmDemux->m_allStreamsSameTimeFraming = FDKreadBits(bs, 1);
  309|  1.17M|    pLatmDemux->m_noSubFrames = FDKreadBits(bs, 6) + 1;
  310|  1.17M|    pLatmDemux->m_numProgram = FDKreadBits(bs, 4) + 1;
  311|       |
  312|  1.17M|    if (pLatmDemux->m_numProgram > LATM_MAX_PROG) {
  ------------------
  |  Branch (312:9): [True: 28.4k, False: 1.14M]
  ------------------
  313|  28.4k|      ErrorStatus = TRANSPORTDEC_UNSUPPORTED_FORMAT;
  314|  28.4k|      goto bail;
  315|  28.4k|    }
  316|       |
  317|  1.14M|    int idCnt = 0;
  318|  2.09M|    for (UINT prog = 0; prog < pLatmDemux->m_numProgram; prog++) {
  ------------------
  |  Branch (318:25): [True: 1.14M, False: 958k]
  ------------------
  319|  1.14M|      pLatmDemux->m_numLayer[prog] = FDKreadBits(bs, 3) + 1;
  320|  1.14M|      if (pLatmDemux->m_numLayer[prog] > LATM_MAX_LAYER) {
  ------------------
  |  Branch (320:11): [True: 9.10k, False: 1.13M]
  ------------------
  321|  9.10k|        ErrorStatus = TRANSPORTDEC_UNSUPPORTED_FORMAT;
  322|  9.10k|        goto bail;
  323|  9.10k|      }
  324|       |
  325|  2.09M|      for (UINT lay = 0; lay < pLatmDemux->m_numLayer[prog]; lay++) {
  ------------------
  |  Branch (325:26): [True: 1.13M, False: 958k]
  ------------------
  326|  1.13M|        int useSameConfig;
  327|  1.13M|        p_linfo = &pLatmDemux->m_linfo[prog][lay];
  328|       |
  329|  1.13M|        p_linfo->m_streamID = idCnt++;
  330|  1.13M|        p_linfo->m_frameLengthInBits = 0;
  331|       |
  332|  1.13M|        if ((prog == 0) && (lay == 0)) {
  ------------------
  |  Branch (332:13): [True: 1.13M, False: 0]
  |  Branch (332:28): [True: 1.13M, False: 0]
  ------------------
  333|  1.13M|          useSameConfig = 0;
  334|  1.13M|        } else {
  335|      0|          useSameConfig = FDKreadBits(bs, 1);
  336|      0|        }
  337|       |
  338|  1.13M|        if (useSameConfig) {
  ------------------
  |  Branch (338:13): [True: 0, False: 1.13M]
  ------------------
  339|      0|          if (lay > 0) {
  ------------------
  |  Branch (339:15): [True: 0, False: 0]
  ------------------
  340|      0|            FDKmemcpy(&pAsc[TPDEC_TRACKINDEX(prog, lay)],
  ------------------
  |  |  107|      0|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  341|      0|                      &pAsc[TPDEC_TRACKINDEX(prog, lay - 1)],
  ------------------
  |  |  107|      0|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  342|      0|                      sizeof(CSAudioSpecificConfig));
  343|      0|          } else {
  344|      0|            ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  345|      0|            goto bail;
  346|      0|          }
  347|  1.13M|        } else {
  348|  1.13M|          UINT usacConfigLengthPrev = 0;
  349|  1.13M|          UCHAR usacConfigPrev[TP_USAC_MAX_CONFIG_LEN];
  350|       |
  351|  1.13M|          if (!(pLatmDemux->applyAsc) &&
  ------------------
  |  Branch (351:15): [True: 111k, False: 1.02M]
  ------------------
  352|   111k|              (pAsc[TPDEC_TRACKINDEX(prog, lay)].m_aot == AOT_USAC)) {
  ------------------
  |  |  107|   111k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (352:15): [True: 38.0k, False: 73.3k]
  ------------------
  353|  38.0k|            usacConfigLengthPrev =
  354|  38.0k|                (UINT)(pAsc[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|  38.0k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  355|  38.0k|                           .m_sc.m_usacConfig.UsacConfigBits +
  356|  38.0k|                       7) >>
  357|  38.0k|                3; /* store previous USAC config length */
  358|  38.0k|            if (usacConfigLengthPrev > TP_USAC_MAX_CONFIG_LEN) {
  ------------------
  |  |  121|  38.0k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
  |  Branch (358:17): [True: 0, False: 38.0k]
  ------------------
  359|      0|              ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  360|      0|              goto bail;
  361|      0|            }
  362|  38.0k|            FDKmemclear(usacConfigPrev, TP_USAC_MAX_CONFIG_LEN);
  ------------------
  |  |  121|  38.0k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
  363|  38.0k|            FDKmemcpy(
  364|  38.0k|                usacConfigPrev,
  365|  38.0k|                &pAsc[TPDEC_TRACKINDEX(prog, lay)].m_sc.m_usacConfig.UsacConfig,
  ------------------
  |  |  107|  38.0k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  366|  38.0k|                usacConfigLengthPrev); /* store previous USAC config */
  367|  38.0k|          }
  368|  1.13M|          if (pLatmDemux->m_AudioMuxVersion == 1) {
  ------------------
  |  Branch (368:15): [True: 18.7k, False: 1.11M]
  ------------------
  369|  18.7k|            FDK_BITSTREAM tmpBs;
  370|  18.7k|            INT ascLen = 0;
  371|  18.7k|            ascLen = CLatmDemux_GetValue(bs);
  372|       |            /* The ascLen could be wrong, so check if validBits<=bufBits*/
  373|  18.7k|            if (ascLen < 0 || ascLen > (INT)FDKgetValidBits(bs)) {
  ------------------
  |  Branch (373:17): [True: 366, False: 18.4k]
  |  Branch (373:31): [True: 736, False: 17.6k]
  ------------------
  374|  1.10k|              ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  375|  1.10k|              goto bail;
  376|  1.10k|            }
  377|  17.6k|            FDKsyncCache(bs);
  378|  17.6k|            tmpBs = *bs;
  379|  17.6k|            tmpBs.hBitBuf.ValidBits = ascLen;
  380|       |
  381|       |            /* Read ASC */
  382|  17.6k|            if (pLatmDemux->applyAsc) {
  ------------------
  |  Branch (382:17): [True: 17.1k, False: 515]
  ------------------
  383|  17.1k|              if (TRANSPORTDEC_OK !=
  ------------------
  |  Branch (383:19): [True: 8.30k, False: 8.84k]
  ------------------
  384|  17.1k|                  (ErrorStatus = AudioSpecificConfig_Parse(
  385|  17.1k|                       &pAsc[TPDEC_TRACKINDEX(prog, lay)], &tmpBs, 1,
  ------------------
  |  |  107|  17.1k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  386|  17.1k|                       pTpDecCallbacks, configMode, configChanged,
  387|  17.1k|                       AOT_NULL_OBJECT)))
  388|  8.30k|                goto bail;
  389|  17.1k|            } else {
  390|    515|              if (TRANSPORTDEC_OK !=
  ------------------
  |  Branch (390:19): [True: 247, False: 268]
  ------------------
  391|    515|                  (ErrorStatus = AudioSpecificConfig_Parse(
  392|    515|                       pAscDummy, &tmpBs, 1, pTpDecCallbacks, configMode,
  393|    515|                       configChanged, AOT_NULL_OBJECT)))
  394|    247|                goto bail;
  395|    515|            }
  396|       |
  397|       |            /* The field p_linfo->m_ascLen could be wrong, so check if */
  398|  9.11k|            if (0 > (INT)FDKgetValidBits(&tmpBs)) {
  ------------------
  |  Branch (398:17): [True: 3.49k, False: 5.62k]
  ------------------
  399|  3.49k|              ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  400|  3.49k|              goto bail;
  401|  3.49k|            }
  402|  5.62k|            FDKpushFor(bs, ascLen); /* position bitstream after ASC */
  403|  1.11M|          } else {
  404|       |            /* Read ASC */
  405|  1.11M|            if (pLatmDemux->applyAsc) {
  ------------------
  |  Branch (405:17): [True: 1.00M, False: 110k]
  ------------------
  406|  1.00M|              if (TRANSPORTDEC_OK != (ErrorStatus = AudioSpecificConfig_Parse(
  ------------------
  |  Branch (406:19): [True: 141k, False: 861k]
  ------------------
  407|  1.00M|                                          &pAsc[TPDEC_TRACKINDEX(prog, lay)],
  ------------------
  |  |  107|  1.00M|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  408|  1.00M|                                          bs, 0, pTpDecCallbacks, configMode,
  409|  1.00M|                                          configChanged, AOT_NULL_OBJECT)))
  410|   141k|                goto bail;
  411|  1.00M|            } else {
  412|   110k|              if (TRANSPORTDEC_OK !=
  ------------------
  |  Branch (412:19): [True: 3.67k, False: 107k]
  ------------------
  413|   110k|                  (ErrorStatus = AudioSpecificConfig_Parse(
  414|   110k|                       pAscDummy, bs, 0, pTpDecCallbacks, configMode,
  415|   110k|                       configChanged, AOT_NULL_OBJECT)))
  416|  3.67k|                goto bail;
  417|   110k|            }
  418|  1.11M|          }
  419|   974k|          if (!pLatmDemux->applyAsc) {
  ------------------
  |  Branch (419:15): [True: 107k, False: 867k]
  ------------------
  420|   107k|            updateConfig[TPDEC_TRACKINDEX(prog, lay)] = 0;
  ------------------
  |  |  107|   107k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  421|   867k|          } else {
  422|   867k|            updateConfig[TPDEC_TRACKINDEX(prog, lay)] = 1;
  ------------------
  |  |  107|   867k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  423|   867k|          }
  424|       |
  425|   974k|          if (!pLatmDemux->applyAsc) {
  ------------------
  |  Branch (425:15): [True: 107k, False: 867k]
  ------------------
  426|   107k|            if (pAscDummy[TPDEC_TRACKINDEX(prog, lay)].m_aot ==
  ------------------
  |  |  107|   107k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (426:17): [True: 37.3k, False: 70.1k]
  ------------------
  427|   107k|                AOT_USAC) { /* flush in case SMC has changed */
  428|  37.3k|              const UINT usacConfigLength =
  429|  37.3k|                  (UINT)(pAscDummy->m_sc.m_usacConfig.UsacConfigBits + 7) >> 3;
  430|  37.3k|              if (usacConfigLength > TP_USAC_MAX_CONFIG_LEN) {
  ------------------
  |  |  121|  37.3k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
  |  Branch (430:19): [True: 0, False: 37.3k]
  ------------------
  431|      0|                ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  432|      0|                goto bail;
  433|      0|              }
  434|  37.3k|              if (usacConfigLength != usacConfigLengthPrev) {
  ------------------
  |  Branch (434:19): [True: 954, False: 36.3k]
  ------------------
  435|    954|                FDKmemclear(&pAsc[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|    954|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  436|    954|                                 .m_sc.m_usacConfig.UsacConfig,
  437|    954|                            TP_USAC_MAX_CONFIG_LEN);
  ------------------
  |  |  121|    954|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
  438|    954|                FDKmemcpy(&pAsc[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|    954|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  439|    954|                               .m_sc.m_usacConfig.UsacConfig,
  440|    954|                          &pAscDummy->m_sc.m_usacConfig.UsacConfig,
  441|    954|                          usacConfigLength); /* store new USAC config */
  442|    954|                pAsc[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|    954|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  443|    954|                    .m_sc.m_usacConfig.UsacConfigBits =
  444|    954|                    pAscDummy->m_sc.m_usacConfig.UsacConfigBits;
  445|    954|                pLatmDemux->usacExplicitCfgChanged = 1;
  446|  36.3k|              } else {
  447|  36.3k|                if (FDKmemcmp(usacConfigPrev,
  ------------------
  |  Branch (447:21): [True: 18.9k, False: 17.4k]
  ------------------
  448|  36.3k|                              pAscDummy->m_sc.m_usacConfig.UsacConfig,
  449|  36.3k|                              usacConfigLengthPrev)) {
  450|  18.9k|                  FDKmemclear(&pAsc[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|  18.9k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  451|  18.9k|                                   .m_sc.m_usacConfig.UsacConfig,
  452|  18.9k|                              TP_USAC_MAX_CONFIG_LEN);
  ------------------
  |  |  121|  18.9k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
  453|  18.9k|                  FDKmemcpy(&pAsc[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|  18.9k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  454|  18.9k|                                 .m_sc.m_usacConfig.UsacConfig,
  455|  18.9k|                            &pAscDummy->m_sc.m_usacConfig.UsacConfig,
  456|  18.9k|                            usacConfigLength); /* store new USAC config */
  457|  18.9k|                  pAsc[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|  18.9k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  458|  18.9k|                      .m_sc.m_usacConfig.UsacConfigBits =
  459|  18.9k|                      pAscDummy->m_sc.m_usacConfig.UsacConfigBits;
  460|  18.9k|                  pLatmDemux->usacExplicitCfgChanged = 1;
  461|  18.9k|                }
  462|  36.3k|              }
  463|       |
  464|  37.3k|              if (pAscDummy[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|  37.3k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (464:19): [True: 37.3k, False: 0]
  ------------------
  465|  37.3k|                      .m_sc.m_usacConfig.m_usacNumElements) {
  466|  37.3k|                if (pAscDummy[TPDEC_TRACKINDEX(prog, lay)]
  ------------------
  |  |  107|  37.3k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (466:21): [True: 994, False: 36.3k]
  ------------------
  467|  37.3k|                        .m_sc.m_usacConfig.element[0]
  468|  37.3k|                        .extElement.usacExtElementHasAudioPreRoll) {
  469|    994|                  pLatmDemux->newCfgHasAudioPreRoll =
  470|    994|                      1; /* if dummy parsed cfg has audioPreRoll we first flush
  471|       |                            before applying new cfg */
  472|    994|                }
  473|  37.3k|              }
  474|  37.3k|            }
  475|   107k|          }
  476|   974k|        }
  477|       |
  478|   974k|        p_linfo->m_frameLengthType = FDKreadBits(bs, 3);
  479|   974k|        switch (p_linfo->m_frameLengthType) {
  480|   927k|          case 0:
  ------------------
  |  Branch (480:11): [True: 927k, False: 47.3k]
  ------------------
  481|   927k|            p_linfo->m_bufferFullness = FDKreadBits(bs, 8);
  482|       |
  483|   927k|            if (!pLatmDemux->m_allStreamsSameTimeFraming) {
  ------------------
  |  Branch (483:17): [True: 405k, False: 522k]
  ------------------
  484|   405k|              if ((lay > 0) &&
  ------------------
  |  Branch (484:19): [True: 0, False: 405k]
  ------------------
  485|      0|                  (pAsc[TPDEC_TRACKINDEX(prog, lay)].m_aot == AOT_AAC_SCAL ||
  ------------------
  |  |  107|      0|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (485:20): [True: 0, False: 0]
  ------------------
  486|      0|                   pAsc[TPDEC_TRACKINDEX(prog, lay)].m_aot ==
  ------------------
  |  |  107|      0|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (486:20): [True: 0, False: 0]
  ------------------
  487|      0|                       AOT_ER_AAC_SCAL) &&
  488|      0|                  (pAsc[TPDEC_TRACKINDEX(prog, lay - 1)].m_aot == AOT_CELP ||
  ------------------
  |  |  107|      0|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (488:20): [True: 0, False: 0]
  ------------------
  489|      0|                   pAsc[TPDEC_TRACKINDEX(prog, lay - 1)].m_aot ==
  ------------------
  |  |  107|      0|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (489:20): [True: 0, False: 0]
  ------------------
  490|      0|                       AOT_ER_CELP)) { /* The layer maybe
  491|       |                                          ignored later so
  492|       |                                          read it anyway: */
  493|      0|                /* coreFrameOffset = */ FDKreadBits(bs, 6);
  494|      0|              }
  495|   405k|            }
  496|   927k|            break;
  497|  31.0k|          case 1:
  ------------------
  |  Branch (497:11): [True: 31.0k, False: 943k]
  ------------------
  498|  31.0k|            p_linfo->m_frameLengthInBits = FDKreadBits(bs, 9);
  499|  31.0k|            break;
  500|  1.05k|          case 3:
  ------------------
  |  Branch (500:11): [True: 1.05k, False: 973k]
  ------------------
  501|  5.25k|          case 4:
  ------------------
  |  Branch (501:11): [True: 4.20k, False: 970k]
  ------------------
  502|  6.50k|          case 5:
  ------------------
  |  Branch (502:11): [True: 1.25k, False: 973k]
  ------------------
  503|       |            /* CELP */
  504|  10.4k|          case 6:
  ------------------
  |  Branch (504:11): [True: 3.90k, False: 970k]
  ------------------
  505|  13.3k|          case 7:
  ------------------
  |  Branch (505:11): [True: 2.97k, False: 971k]
  ------------------
  506|       |            /* HVXC */
  507|  16.2k|          default:
  ------------------
  |  Branch (507:11): [True: 2.88k, False: 971k]
  ------------------
  508|  16.2k|            ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  509|  16.2k|            goto bail;
  510|   974k|        } /* switch framelengthtype*/
  511|       |
  512|   974k|      } /* layer loop */
  513|  1.13M|    }   /* prog loop */
  514|       |
  515|   958k|    pLatmDemux->m_otherDataPresent = FDKreadBits(bs, 1);
  516|   958k|    pLatmDemux->m_otherDataLength = 0;
  517|       |
  518|   958k|    if (pLatmDemux->m_otherDataPresent) {
  ------------------
  |  Branch (518:9): [True: 401k, False: 556k]
  ------------------
  519|   401k|      if (pLatmDemux->m_AudioMuxVersion == 1) {
  ------------------
  |  Branch (519:11): [True: 1.42k, False: 400k]
  ------------------
  520|  1.42k|        pLatmDemux->m_otherDataLength = CLatmDemux_GetValue(bs);
  521|   400k|      } else {
  522|   400k|        int otherDataLenEsc = 0;
  523|   638k|        do {
  524|   638k|          pLatmDemux->m_otherDataLength <<= 8;  // *= 256
  525|   638k|          otherDataLenEsc = FDKreadBits(bs, 1);
  526|   638k|          pLatmDemux->m_otherDataLength += FDKreadBits(bs, 8);
  527|   638k|        } while (otherDataLenEsc);
  ------------------
  |  Branch (527:18): [True: 238k, False: 400k]
  ------------------
  528|   400k|      }
  529|   401k|      if (pLatmDemux->m_audioMuxLengthBytes <
  ------------------
  |  Branch (529:11): [True: 15.1k, False: 386k]
  ------------------
  530|   401k|          (pLatmDemux->m_otherDataLength >> 3)) {
  531|  15.1k|        ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  532|  15.1k|        goto bail;
  533|  15.1k|      }
  534|   401k|    }
  535|       |
  536|   943k|    pLatmDemux->m_crcCheckPresent = FDKreadBits(bs, 1);
  537|       |
  538|   943k|    if (pLatmDemux->m_crcCheckPresent) {
  ------------------
  |  Branch (538:9): [True: 559k, False: 384k]
  ------------------
  539|   559k|      FDKreadBits(bs, 8);
  540|   559k|    }
  541|       |
  542|   943k|  } else {
  543|       |    /* audioMuxVersionA > 0 is reserved for future extensions */
  544|  3.99k|    ErrorStatus = TRANSPORTDEC_UNSUPPORTED_FORMAT;
  545|  3.99k|  }
  546|       |
  547|       |  /* Configure source decoder: */
  548|   947k|  if (ErrorStatus == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (548:7): [True: 943k, False: 3.99k]
  ------------------
  549|   943k|    UINT prog;
  550|  1.86M|    for (prog = 0; prog < pLatmDemux->m_numProgram; prog++) {
  ------------------
  |  Branch (550:20): [True: 943k, False: 918k]
  ------------------
  551|   943k|      UINT lay;
  552|  1.86M|      for (lay = 0; lay < pLatmDemux->m_numLayer[prog]; lay++) {
  ------------------
  |  Branch (552:21): [True: 943k, False: 918k]
  ------------------
  553|   943k|        if (updateConfig[TPDEC_TRACKINDEX(prog, lay)] != 0) {
  ------------------
  |  |  107|   943k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  |  Branch (553:13): [True: 836k, False: 107k]
  ------------------
  554|   836k|          int cbError;
  555|   836k|          cbError = pTpDecCallbacks->cbUpdateConfig(
  556|   836k|              pTpDecCallbacks->cbUpdateConfigData,
  557|   836k|              &pAsc[TPDEC_TRACKINDEX(prog, lay)],
  ------------------
  |  |  107|   836k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  558|   836k|              pAsc[TPDEC_TRACKINDEX(prog, lay)].configMode,
  ------------------
  |  |  107|   836k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  559|   836k|              &pAsc[TPDEC_TRACKINDEX(prog, lay)].AacConfigChanged);
  ------------------
  |  |  107|   836k|#define TPDEC_TRACKINDEX(p, l) (1 * (p) + (l))
  ------------------
  560|   836k|          if (cbError == TRANSPORTDEC_NEED_TO_RESTART) {
  ------------------
  |  Branch (560:15): [True: 0, False: 836k]
  ------------------
  561|      0|            *pfConfigFound = 0;
  562|      0|            ErrorStatus = TRANSPORTDEC_NEED_TO_RESTART;
  563|      0|            goto bail;
  564|      0|          }
  565|   836k|          if (cbError != 0) {
  ------------------
  |  Branch (565:15): [True: 24.4k, False: 811k]
  ------------------
  566|  24.4k|            *pfConfigFound = 0;
  567|  24.4k|            if (lay == 0) {
  ------------------
  |  Branch (567:17): [True: 24.4k, False: 0]
  ------------------
  568|  24.4k|              ErrorStatus = TRANSPORTDEC_SYNC_ERROR;
  569|  24.4k|              goto bail;
  570|  24.4k|            }
  571|   811k|          } else {
  572|   811k|            *pfConfigFound = 1;
  573|   811k|          }
  574|   836k|        } else {
  575|   107k|          *pfConfigFound = 1;
  576|   107k|        }
  577|   943k|      }
  578|   943k|    }
  579|   943k|  }
  580|       |
  581|  1.17M|bail:
  582|  1.17M|  if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (582:7): [True: 255k, False: 918k]
  ------------------
  583|   255k|    UCHAR applyAsc = pLatmDemux->applyAsc;
  584|   255k|    FDKmemclear(pLatmDemux, sizeof(CLatmDemux)); /* reset structure */
  585|   255k|    pLatmDemux->applyAsc = applyAsc;
  586|   918k|  } else {
  587|       |    /* no error and config parsing is finished */
  588|   918k|    if (configMode == AC_CM_ALLOC_MEM) pLatmDemux->applyAsc = 0;
  ------------------
  |  |  337|   918k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (588:9): [True: 398k, False: 519k]
  ------------------
  589|   918k|  }
  590|       |
  591|  1.17M|  return (ErrorStatus);
  592|   947k|}
_Z32CLatmDemux_ReadPayloadLengthInfoP13FDK_BITSTREAMP10CLatmDemux:
  607|   659k|                                                    CLatmDemux *pLatmDemux) {
  608|   659k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
  609|   659k|  int totalPayloadBits = 0;
  610|       |
  611|   659k|  if (pLatmDemux->m_allStreamsSameTimeFraming == 1) {
  ------------------
  |  Branch (611:7): [True: 473k, False: 185k]
  ------------------
  612|   473k|    FDK_ASSERT(pLatmDemux->m_numProgram <= LATM_MAX_PROG);
  ------------------
  |  |  221|   473k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (612:5): [True: 473k, False: 0]
  ------------------
  613|   938k|    for (UINT prog = 0; prog < pLatmDemux->m_numProgram; prog++) {
  ------------------
  |  Branch (613:25): [True: 473k, False: 464k]
  ------------------
  614|   473k|      FDK_ASSERT(pLatmDemux->m_numLayer[prog] <= LATM_MAX_LAYER);
  ------------------
  |  |  221|   473k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (614:7): [True: 473k, False: 0]
  ------------------
  615|   938k|      for (UINT lay = 0; lay < pLatmDemux->m_numLayer[prog]; lay++) {
  ------------------
  |  Branch (615:26): [True: 473k, False: 464k]
  ------------------
  616|   473k|        LATM_LAYER_INFO *p_linfo = &pLatmDemux->m_linfo[prog][lay];
  617|   473k|        int auChunkLengthInfo = 0;
  618|       |
  619|   473k|        switch (p_linfo->m_frameLengthType) {
  620|   466k|          case 0:
  ------------------
  |  Branch (620:11): [True: 466k, False: 7.08k]
  ------------------
  621|   466k|            auChunkLengthInfo = CLatmDemux_ReadAuChunkLengthInfo(bs);
  622|   466k|            if (auChunkLengthInfo >= 0) {
  ------------------
  |  Branch (622:17): [True: 464k, False: 2.55k]
  ------------------
  623|   464k|              p_linfo->m_frameLengthInBits = (UINT)auChunkLengthInfo;
  624|   464k|              totalPayloadBits += p_linfo->m_frameLengthInBits;
  625|   464k|            } else {
  626|  2.55k|              return TRANSPORTDEC_PARSE_ERROR;
  627|  2.55k|            }
  628|   464k|            break;
  629|   464k|          case 3:
  ------------------
  |  Branch (629:11): [True: 0, False: 473k]
  ------------------
  630|      0|          case 5:
  ------------------
  |  Branch (630:11): [True: 0, False: 473k]
  ------------------
  631|      0|          case 7:
  ------------------
  |  Branch (631:11): [True: 0, False: 473k]
  ------------------
  632|  7.08k|          default:
  ------------------
  |  Branch (632:11): [True: 7.08k, False: 466k]
  ------------------
  633|  7.08k|            return TRANSPORTDEC_PARSE_ERROR;  // AAC_DEC_LATM_INVALIDFRAMELENGTHTYPE;
  634|   473k|        }
  635|   473k|      }
  636|   473k|    }
  637|   473k|  } else {
  638|   185k|    ErrorStatus = TRANSPORTDEC_PARSE_ERROR;  // AAC_DEC_LATM_TIMEFRAMING;
  639|   185k|  }
  640|   650k|  if (pLatmDemux->m_audioMuxLengthBytes > (UINT)0 &&
  ------------------
  |  Branch (640:7): [True: 621k, False: 28.3k]
  ------------------
  641|   621k|      totalPayloadBits > (int)pLatmDemux->m_audioMuxLengthBytes * 8) {
  ------------------
  |  Branch (641:7): [True: 82.3k, False: 539k]
  ------------------
  642|  82.3k|    return TRANSPORTDEC_PARSE_ERROR;
  643|  82.3k|  }
  644|       |
  645|   567k|  return (ErrorStatus);
  646|   650k|}
_Z31CLatmDemux_GetFrameLengthInBitsP10CLatmDemuxjj:
  649|   349k|                                     const UINT layer) {
  650|   349k|  UINT nFrameLenBits = 0;
  651|   349k|  if (prog < pLatmDemux->m_numProgram) {
  ------------------
  |  Branch (651:7): [True: 349k, False: 0]
  ------------------
  652|   349k|    if (layer < pLatmDemux->m_numLayer[prog]) {
  ------------------
  |  Branch (652:9): [True: 349k, False: 0]
  ------------------
  653|   349k|      nFrameLenBits = pLatmDemux->m_linfo[prog][layer].m_frameLengthInBits;
  654|   349k|    }
  655|   349k|  }
  656|   349k|  return nFrameLenBits;
  657|   349k|}
_Z34CLatmDemux_GetOtherDataPresentFlagP10CLatmDemux:
  659|  8.99k|UINT CLatmDemux_GetOtherDataPresentFlag(CLatmDemux *pLatmDemux) {
  660|  8.99k|  return pLatmDemux->m_otherDataPresent ? 1 : 0;
  ------------------
  |  Branch (660:10): [True: 3.21k, False: 5.77k]
  ------------------
  661|  8.99k|}
_Z29CLatmDemux_GetOtherDataLengthP10CLatmDemux:
  663|  3.21k|UINT CLatmDemux_GetOtherDataLength(CLatmDemux *pLatmDemux) {
  664|  3.21k|  return pLatmDemux->m_otherDataLength;
  665|  3.21k|}
_Z27CLatmDemux_GetNrOfSubFramesP10CLatmDemux:
  667|   128k|UINT CLatmDemux_GetNrOfSubFrames(CLatmDemux *pLatmDemux) {
  668|   128k|  return pLatmDemux->m_noSubFrames;
  669|   128k|}
_Z24CLatmDemux_GetNrOfLayersP10CLatmDemuxj:
  671|   698k|UINT CLatmDemux_GetNrOfLayers(CLatmDemux *pLatmDemux, const UINT prog) {
  672|   698k|  UINT numLayer = 0;
  673|   698k|  if (prog < pLatmDemux->m_numProgram) {
  ------------------
  |  Branch (673:7): [True: 698k, False: 0]
  ------------------
  674|   698k|    numLayer = pLatmDemux->m_numLayer[prog];
  675|   698k|  }
  676|   698k|  return numLayer;
  677|   698k|}
tpdec_latm.cpp:_ZL30CLatmDemux_ReadAudioMuxElementP13FDK_BITSTREAMP10CLatmDemuxiP13CSTpCallBacksP21CSAudioSpecificConfigPi:
  127|   689k|    int *pfConfigFound) {
  128|   689k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
  129|       |
  130|   689k|  if (m_muxConfigPresent) {
  ------------------
  |  Branch (130:7): [True: 689k, False: 0]
  ------------------
  131|   689k|    pLatmDemux->m_useSameStreamMux = FDKreadBits(bs, 1);
  132|       |
  133|   689k|    if (!pLatmDemux->m_useSameStreamMux) {
  ------------------
  |  Branch (133:9): [True: 654k, False: 35.0k]
  ------------------
  134|   654k|      int i;
  135|   654k|      UCHAR configChanged = 0;
  136|   654k|      UCHAR configMode = 0;
  137|       |
  138|   654k|      FDK_BITSTREAM bsAnchor;
  139|       |
  140|   654k|      FDK_BITSTREAM bsAnchorDummyParse;
  141|       |
  142|   654k|      if (!pLatmDemux->applyAsc) {
  ------------------
  |  Branch (142:11): [True: 112k, False: 542k]
  ------------------
  143|   112k|        bsAnchorDummyParse = *bs;
  144|   112k|        pLatmDemux->newCfgHasAudioPreRoll = 0;
  145|       |        /* do dummy-parsing of ASC to determine if there is an audioPreRoll */
  146|   112k|        configMode |= AC_CM_DET_CFG_CHANGE;
  ------------------
  |  |  334|   112k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  147|   112k|        if (TRANSPORTDEC_OK !=
  ------------------
  |  Branch (147:13): [True: 4.94k, False: 107k]
  ------------------
  148|   112k|            (ErrorStatus = CLatmDemux_ReadStreamMuxConfig(
  149|   112k|                 bs, pLatmDemux, pTpDecCallbacks, pAsc, pfConfigFound,
  150|   112k|                 configMode, configChanged))) {
  151|  4.94k|          goto bail;
  152|  4.94k|        }
  153|       |
  154|       |        /* Allow flushing only when audioPreroll functionality is enabled in
  155|       |         * current and new config otherwise the new config can be applied
  156|       |         * immediately. */
  157|   107k|        if (pAsc->m_sc.m_usacConfig.element[0]
  ------------------
  |  Branch (157:13): [True: 1.02k, False: 106k]
  ------------------
  158|   107k|                .extElement.usacExtElementHasAudioPreRoll &&
  159|  1.02k|            pLatmDemux->newCfgHasAudioPreRoll) {
  ------------------
  |  Branch (159:13): [True: 689, False: 335]
  ------------------
  160|    689|          pLatmDemux->newCfgHasAudioPreRoll = 0;
  161|       |          /* with audioPreRoll we must flush before applying new cfg */
  162|    689|          pLatmDemux->applyAsc = 0;
  163|   106k|        } else {
  164|   106k|          *bs = bsAnchorDummyParse;
  165|   106k|          pLatmDemux->applyAsc = 1; /* apply new config immediate */
  166|   106k|        }
  167|   107k|      }
  168|       |
  169|   649k|      if (pLatmDemux->applyAsc) {
  ------------------
  |  Branch (169:11): [True: 649k, False: 689]
  ------------------
  170|  1.46M|        for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (170:21): [True: 1.06M, False: 398k]
  ------------------
  171|  1.06M|          configMode = 0;
  172|       |
  173|  1.06M|          if (i == 0) {
  ------------------
  |  Branch (173:15): [True: 649k, False: 412k]
  ------------------
  174|   649k|            configMode |= AC_CM_DET_CFG_CHANGE;
  ------------------
  |  |  334|   649k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  175|   649k|            bsAnchor = *bs;
  176|   649k|          } else {
  177|   412k|            configMode |= AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|   412k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  178|   412k|            *bs = bsAnchor;
  179|   412k|          }
  180|       |
  181|  1.06M|          if (TRANSPORTDEC_OK !=
  ------------------
  |  Branch (181:15): [True: 250k, False: 811k]
  ------------------
  182|  1.06M|              (ErrorStatus = CLatmDemux_ReadStreamMuxConfig(
  183|  1.06M|                   bs, pLatmDemux, pTpDecCallbacks, pAsc, pfConfigFound,
  184|  1.06M|                   configMode, configChanged))) {
  185|   250k|            goto bail;
  186|   250k|          }
  187|       |
  188|   811k|          if (ErrorStatus == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (188:15): [True: 811k, False: 0]
  ------------------
  189|   811k|            if ((i == 0) && (pAsc->AacConfigChanged || pAsc->SbrConfigChanged ||
  ------------------
  |  Branch (189:17): [True: 412k, False: 398k]
  |  Branch (189:30): [True: 307k, False: 105k]
  |  Branch (189:56): [True: 4.54k, False: 101k]
  ------------------
  190|   311k|                             pAsc->SacConfigChanged)) {
  ------------------
  |  Branch (190:30): [True: 0, False: 101k]
  ------------------
  191|   311k|              int errC;
  192|       |
  193|   311k|              configChanged = 1;
  194|   311k|              errC = pTpDecCallbacks->cbFreeMem(pTpDecCallbacks->cbFreeMemData,
  195|   311k|                                                pAsc);
  196|   311k|              if (errC != 0) {
  ------------------
  |  Branch (196:19): [True: 0, False: 311k]
  ------------------
  197|      0|                ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
  198|      0|                goto bail;
  199|      0|              }
  200|   311k|            }
  201|   811k|          }
  202|   811k|        }
  203|   649k|      }
  204|   649k|    }
  205|   689k|  }
  206|       |
  207|       |  /* If there was no configuration read, its not possible to parse
  208|       |   * PayloadLengthInfo below. */
  209|   434k|  if (!*pfConfigFound) {
  ------------------
  |  Branch (209:7): [True: 30.6k, False: 403k]
  ------------------
  210|  30.6k|    ErrorStatus = TRANSPORTDEC_SYNC_ERROR;
  211|  30.6k|    goto bail;
  212|  30.6k|  }
  213|       |
  214|   403k|  if (pLatmDemux->m_AudioMuxVersionA == 0) {
  ------------------
  |  Branch (214:7): [True: 403k, False: 0]
  ------------------
  215|       |    /* Do only once per call, because parsing and decoding is done in-line. */
  216|   403k|    if (TRANSPORTDEC_OK !=
  ------------------
  |  Branch (216:9): [True: 274k, False: 129k]
  ------------------
  217|   403k|        (ErrorStatus = CLatmDemux_ReadPayloadLengthInfo(bs, pLatmDemux))) {
  218|   274k|      *pfConfigFound = 0;
  219|   274k|      goto bail;
  220|   274k|    }
  221|   403k|  } else {
  222|       |    /* audioMuxVersionA > 0 is reserved for future extensions */
  223|      0|    ErrorStatus = TRANSPORTDEC_UNSUPPORTED_FORMAT;
  224|      0|    *pfConfigFound = 0;
  225|      0|    goto bail;
  226|      0|  }
  227|       |
  228|   689k|bail:
  229|   689k|  if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (229:7): [True: 560k, False: 129k]
  ------------------
  230|   560k|    pLatmDemux->applyAsc = 1;
  231|   560k|  }
  232|       |
  233|   689k|  return (ErrorStatus);
  234|   403k|}
tpdec_latm.cpp:_ZL19CLatmDemux_GetValueP13FDK_BITSTREAM:
  109|  47.2k|static UINT CLatmDemux_GetValue(HANDLE_FDK_BITSTREAM bs) {
  110|  47.2k|  UCHAR bytesForValue = 0, tmp = 0;
  111|  47.2k|  int value = 0;
  112|       |
  113|  47.2k|  bytesForValue = (UCHAR)FDKreadBits(bs, 2);
  114|       |
  115|   148k|  for (UINT i = 0; i <= bytesForValue; i++) {
  ------------------
  |  Branch (115:20): [True: 100k, False: 47.2k]
  ------------------
  116|   100k|    value <<= 8;
  117|   100k|    tmp = (UCHAR)FDKreadBits(bs, 8);
  118|   100k|    value += tmp;
  119|   100k|  }
  120|       |
  121|  47.2k|  return value;
  122|  47.2k|}
tpdec_latm.cpp:_ZL32CLatmDemux_ReadAuChunkLengthInfoP13FDK_BITSTREAM:
  594|   466k|static int CLatmDemux_ReadAuChunkLengthInfo(HANDLE_FDK_BITSTREAM bs) {
  595|   466k|  int len = 0, tmp = 255;
  596|   466k|  int validBytes = (int)FDKgetValidBits(bs) >> 3;
  597|       |
  598|   997k|  while (tmp == 255 && validBytes-- > 0) {
  ------------------
  |  Branch (598:10): [True: 533k, False: 464k]
  |  Branch (598:24): [True: 530k, False: 2.55k]
  ------------------
  599|   530k|    tmp = (int)FDKreadBits(bs, 8);
  600|   530k|    len += tmp;
  601|   530k|  }
  602|       |
  603|   466k|  return ((tmp == 255) ? -1 : (len << 3));
  ------------------
  |  Branch (603:11): [True: 2.55k, False: 464k]
  ------------------
  604|   466k|}

_Z17transportDec_Open14TRANSPORT_TYPEjj:
  192|  21.8k|                                      const UINT flags, const UINT nrOfLayers) {
  193|  21.8k|  HANDLE_TRANSPORTDEC hInput;
  194|       |
  195|  21.8k|  hInput = GetRam_TransportDecoder(0);
  196|  21.8k|  if (hInput == NULL) {
  ------------------
  |  Branch (196:7): [True: 0, False: 21.8k]
  ------------------
  197|      0|    return NULL;
  198|      0|  }
  199|       |
  200|       |  /* Init transportDec struct. */
  201|  21.8k|  hInput->transportFmt = transportFmt;
  202|       |
  203|  21.8k|  switch (transportFmt) {
  204|      0|    case TT_MP4_ADIF:
  ------------------
  |  Branch (204:5): [True: 0, False: 21.8k]
  ------------------
  205|      0|      break;
  206|       |
  207|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (207:5): [True: 0, False: 21.8k]
  ------------------
  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: 21.8k]
  ------------------
  218|      0|      drmRead_CrcInit(&hInput->parser.drm);
  219|      0|      break;
  220|       |
  221|      0|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (221:5): [True: 0, False: 21.8k]
  ------------------
  222|      0|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (222:5): [True: 0, False: 21.8k]
  ------------------
  223|      0|      hInput->parser.latm.usacExplicitCfgChanged = 0;
  224|      0|      hInput->parser.latm.applyAsc = 1;
  225|      0|      break;
  226|  21.8k|    case TT_MP4_LOAS:
  ------------------
  |  Branch (226:5): [True: 21.8k, False: 0]
  ------------------
  227|  21.8k|      hInput->parser.latm.usacExplicitCfgChanged = 0;
  228|  21.8k|      hInput->parser.latm.applyAsc = 1;
  229|  21.8k|      break;
  230|      0|    case TT_MP4_RAW:
  ------------------
  |  Branch (230:5): [True: 0, False: 21.8k]
  ------------------
  231|      0|      break;
  232|       |
  233|      0|    default:
  ------------------
  |  Branch (233:5): [True: 0, False: 21.8k]
  ------------------
  234|      0|      FreeRam_TransportDecoder(&hInput);
  235|      0|      hInput = NULL;
  236|      0|      break;
  237|  21.8k|  }
  238|       |
  239|  21.8k|  if (hInput != NULL) {
  ------------------
  |  Branch (239:7): [True: 21.8k, False: 0]
  ------------------
  240|       |    /* Create bitstream */
  241|  21.8k|    {
  242|  21.8k|      hInput->bsBuffer = GetRam_TransportDecoderBuffer(0);
  243|  21.8k|      if (hInput->bsBuffer == NULL) {
  ------------------
  |  Branch (243:11): [True: 0, False: 21.8k]
  ------------------
  244|      0|        transportDec_Close(&hInput);
  245|      0|        return NULL;
  246|      0|      }
  247|  21.8k|      if (nrOfLayers > 1) {
  ------------------
  |  Branch (247:11): [True: 0, False: 21.8k]
  ------------------
  248|      0|        transportDec_Close(&hInput);
  249|      0|        return NULL;
  250|      0|      }
  251|  43.7k|      for (UINT i = 0; i < nrOfLayers; i++) {
  ------------------
  |  Branch (251:24): [True: 21.8k, False: 21.8k]
  ------------------
  252|  21.8k|        FDKinitBitStream(&hInput->bitStream[i], hInput->bsBuffer, (8192 * 4), 0,
  253|  21.8k|                         BS_READER);
  254|  21.8k|      }
  255|  21.8k|    }
  256|      0|    hInput->burstPeriod = 0;
  257|  21.8k|  }
  258|       |
  259|  21.8k|  return hInput;
  260|  21.8k|}
_Z25transportDec_InBandConfigP12TRANSPORTDECPhjhS1_jS1_:
  374|    100|                                             UCHAR *implicitExplicitCfgDiff) {
  375|    100|  int errC;
  376|    100|  FDK_BITSTREAM bs;
  377|    100|  HANDLE_FDK_BITSTREAM hBs = &bs;
  378|    100|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
  379|    100|  int fConfigFound = 0;
  380|    100|  UCHAR configMode = AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|    100|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  381|    100|  *implicitExplicitCfgDiff = 0;
  382|       |
  383|    100|  FDK_ASSERT(hTp->asc->m_aot == AOT_USAC);
  ------------------
  |  |  221|    100|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (383:3): [True: 100, False: 0]
  ------------------
  384|       |
  385|    100|  FDKinitBitStream(hBs, newConfig, TP_USAC_MAX_CONFIG_LEN, newConfigLength << 3,
  ------------------
  |  |  121|    100|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
  386|    100|                   BS_READER);
  387|       |
  388|    100|  if ((hTp->ctrlCFGChange[layer].flushStatus == TPDEC_FLUSH_OFF) &&
  ------------------
  |  Branch (388:7): [True: 76, False: 24]
  ------------------
  389|     76|      (hTp->ctrlCFGChange[layer].buildUpStatus !=
  ------------------
  |  Branch (389:7): [True: 76, False: 0]
  ------------------
  390|     76|       TPDEC_RSV60_BUILD_UP_IDLE_IN_BAND)) {
  391|     76|    if (hTp->asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (391:9): [True: 76, False: 0]
  ------------------
  392|     76|      if ((UINT)(hTp->asc->m_sc.m_usacConfig.UsacConfigBits + 7) >> 3 ==
  ------------------
  |  Branch (392:11): [True: 52, False: 24]
  ------------------
  393|     76|          newConfigLength) {
  394|     52|        if (0 == FDKmemcmp(newConfig, hTp->asc->m_sc.m_usacConfig.UsacConfig,
  ------------------
  |  Branch (394:13): [True: 34, False: 18]
  ------------------
  395|     52|                           newConfigLength)) {
  396|     34|          if (hTp->parser.latm.usacExplicitCfgChanged) { /* configChange from
  ------------------
  |  Branch (396:15): [True: 25, False: 9]
  ------------------
  397|       |                                                            LOAS/LATM parser */
  398|     25|            hTp->parser.latm.usacExplicitCfgChanged = 0;
  399|     25|            hTp->ctrlCFGChange[layer].flushCnt = 0;
  400|     25|            hTp->ctrlCFGChange[layer].flushStatus =
  401|     25|                TPDEC_USAC_DASH_IPF_FLUSH_ON;
  402|     25|            hTp->ctrlCFGChange[layer].buildUpCnt = 0;
  403|     25|            hTp->ctrlCFGChange[layer].buildUpStatus = TPDEC_BUILD_UP_OFF;
  404|     25|          } else {
  405|      9|            *configChanged = 0;
  406|      9|            return err;
  407|      9|          }
  408|     34|        } else {
  409|     18|          *implicitExplicitCfgDiff = 1;
  410|     18|        }
  411|     52|      } else {
  412|     24|        *implicitExplicitCfgDiff = 1;
  413|     24|      }
  414|       |      /* ISO/IEC 23003-3:2012/FDAM 3:2016(E) Annex F.2: explicit and implicit
  415|       |       * config shall be identical. */
  416|     67|      if (*implicitExplicitCfgDiff) {
  ------------------
  |  Branch (416:11): [True: 42, False: 25]
  ------------------
  417|     42|        switch (hTp->transportFmt) {
  418|      0|          case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (418:11): [True: 0, False: 42]
  ------------------
  419|      0|          case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (419:11): [True: 0, False: 42]
  ------------------
  420|     42|          case TT_MP4_LOAS:
  ------------------
  |  Branch (420:11): [True: 42, False: 0]
  ------------------
  421|       |            /* reset decoder to initial state to achieve definite behavior after
  422|       |             * error in config */
  423|     42|            hTp->callbacks.cbFreeMem(hTp->callbacks.cbFreeMemData,
  424|     42|                                     &hTp->asc[layer]);
  425|     42|            hTp->parser.latm.usacExplicitCfgChanged = 0;
  426|     42|            hTp->parser.latm.applyAsc = 1;
  427|     42|            err = TRANSPORTDEC_PARSE_ERROR;
  428|     42|            goto bail;
  429|      0|          default:
  ------------------
  |  Branch (429:11): [True: 0, False: 42]
  ------------------
  430|      0|            break;
  431|     42|        }
  432|     42|      }
  433|     67|    }
  434|     76|  }
  435|       |
  436|     49|  {
  437|     49|    if ((hTp->ctrlCFGChange[layer].flushStatus == TPDEC_FLUSH_OFF) &&
  ------------------
  |  Branch (437:9): [True: 0, False: 49]
  ------------------
  438|      0|        (hTp->ctrlCFGChange[layer].buildUpStatus !=
  ------------------
  |  Branch (438:9): [True: 0, False: 0]
  ------------------
  439|      0|         TPDEC_RSV60_BUILD_UP_IDLE_IN_BAND)) {
  440|      0|      hTp->ctrlCFGChange[layer].flushCnt = 0;
  441|      0|      hTp->ctrlCFGChange[layer].buildUpCnt = 0;
  442|      0|      hTp->ctrlCFGChange[layer].buildUpStatus = TPDEC_BUILD_UP_OFF;
  443|      0|      if (hTp->asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (443:11): [True: 0, False: 0]
  ------------------
  444|      0|        hTp->ctrlCFGChange[layer].flushStatus = TPDEC_USAC_DASH_IPF_FLUSH_ON;
  445|      0|      }
  446|      0|    }
  447|       |
  448|     49|    if ((hTp->ctrlCFGChange[layer].flushStatus ==
  ------------------
  |  Branch (448:9): [True: 0, False: 49]
  ------------------
  449|     49|         TPDEC_RSV60_DASH_IPF_ATSC_FLUSH_ON) ||
  450|     49|        (hTp->ctrlCFGChange[layer].flushStatus ==
  ------------------
  |  Branch (450:9): [True: 49, False: 0]
  ------------------
  451|     49|         TPDEC_USAC_DASH_IPF_FLUSH_ON)) {
  452|     49|      SCHAR counter = 0;
  453|     49|      if (hTp->asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (453:11): [True: 49, False: 0]
  ------------------
  454|     49|        counter = TPDEC_USAC_NUM_CONFIG_CHANGE_FRAMES;
  ------------------
  |  |  125|     49|  (1) /* Number of frames for config change in USAC */
  ------------------
  455|     49|      }
  456|     49|      if (hTp->ctrlCFGChange[layer].flushCnt >= counter) {
  ------------------
  |  Branch (456:11): [True: 24, False: 25]
  ------------------
  457|     24|        hTp->ctrlCFGChange[layer].flushCnt = 0;
  458|     24|        hTp->ctrlCFGChange[layer].flushStatus = TPDEC_FLUSH_OFF;
  459|     24|        hTp->ctrlCFGChange[layer].forceCfgChange = 0;
  460|     24|        if (hTp->asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (460:13): [True: 24, False: 0]
  ------------------
  461|     24|          hTp->ctrlCFGChange[layer].buildUpCnt =
  462|     24|              TPDEC_USAC_NUM_CONFIG_CHANGE_FRAMES - 1;
  ------------------
  |  |  125|     24|  (1) /* Number of frames for config change in USAC */
  ------------------
  463|     24|          hTp->ctrlCFGChange[layer].buildUpStatus = TPDEC_USAC_BUILD_UP_ON;
  464|     24|        }
  465|     24|      }
  466|       |
  467|       |      /* Activate flush mode. After that continue with build up mode in core */
  468|     49|      if (hTp->callbacks.cbCtrlCFGChange(hTp->callbacks.cbCtrlCFGChangeData,
  ------------------
  |  Branch (468:11): [True: 0, False: 49]
  ------------------
  469|     49|                                         &hTp->ctrlCFGChange[layer]) != 0) {
  470|      0|        err = TRANSPORTDEC_PARSE_ERROR;
  471|      0|      }
  472|       |
  473|     49|      if ((hTp->ctrlCFGChange[layer].flushStatus ==
  ------------------
  |  Branch (473:11): [True: 0, False: 49]
  ------------------
  474|     49|           TPDEC_RSV60_DASH_IPF_ATSC_FLUSH_ON) ||
  475|     49|          (hTp->ctrlCFGChange[layer].flushStatus ==
  ------------------
  |  Branch (475:11): [True: 25, False: 24]
  ------------------
  476|     49|           TPDEC_USAC_DASH_IPF_FLUSH_ON)) {
  477|     25|        hTp->ctrlCFGChange[layer].flushCnt++;
  478|     25|        return err;
  479|     25|      }
  480|     49|    }
  481|       |
  482|     24|    if (hTp->asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (482:9): [True: 24, False: 0]
  ------------------
  483|     24|      fConfigFound = 1;
  484|       |
  485|     24|      if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (485:11): [True: 24, False: 0]
  ------------------
  486|     24|        *configChanged = 0;
  487|     24|        configMode = AC_CM_DET_CFG_CHANGE;
  ------------------
  |  |  334|     24|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  488|       |
  489|     72|        for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (489:25): [True: 48, False: 24]
  ------------------
  490|     48|          if (i > 0) {
  ------------------
  |  Branch (490:15): [True: 24, False: 24]
  ------------------
  491|     24|            FDKpushBack(hBs,
  492|     24|                        (INT)newConfigLength * 8 - (INT)FDKgetValidBits(hBs));
  493|     24|            configMode = AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|     24|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  494|     24|          }
  495|       |          /* config transport decoder */
  496|     48|          err = AudioSpecificConfig_Parse(
  497|     48|              &hTp->asc[(1 * 1)], hBs, 0, &hTp->callbacks, configMode,
  498|     48|              *configChanged, hTp->asc[layer].m_aot);
  499|     48|          if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (499:15): [True: 48, False: 0]
  ------------------
  500|     48|            hTp->asc[layer] = hTp->asc[(1 * 1)];
  501|     48|            errC = hTp->callbacks.cbUpdateConfig(
  502|     48|                hTp->callbacks.cbUpdateConfigData, &hTp->asc[layer],
  503|     48|                hTp->asc[layer].configMode, &hTp->asc[layer].AacConfigChanged);
  504|     48|            if (errC != 0) {
  ------------------
  |  Branch (504:17): [True: 0, False: 48]
  ------------------
  505|      0|              err = TRANSPORTDEC_PARSE_ERROR;
  506|      0|            }
  507|     48|          }
  508|       |
  509|     48|          if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (509:15): [True: 48, False: 0]
  ------------------
  510|     48|            if ((i == 0) && (hTp->asc[layer].AacConfigChanged ||
  ------------------
  |  Branch (510:17): [True: 24, False: 24]
  |  Branch (510:30): [True: 5, False: 19]
  ------------------
  511|     19|                             hTp->asc[layer].SbrConfigChanged ||
  ------------------
  |  Branch (511:30): [True: 1, False: 18]
  ------------------
  512|     18|                             hTp->asc[layer].SacConfigChanged)) {
  ------------------
  |  Branch (512:30): [True: 0, False: 18]
  ------------------
  513|      6|              *configChanged = 1;
  514|      6|              errC = hTp->callbacks.cbFreeMem(hTp->callbacks.cbFreeMemData,
  515|      6|                                              &hTp->asc[layer]);
  516|      6|              if (errC != 0) {
  ------------------
  |  Branch (516:19): [True: 0, False: 6]
  ------------------
  517|      0|                err = TRANSPORTDEC_PARSE_ERROR;
  518|      0|              }
  519|      6|            }
  520|     48|          }
  521|       |
  522|       |          /* if an error is detected terminate config parsing to avoid that an
  523|       |           * invalid config is accepted in the second pass */
  524|     48|          if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (524:15): [True: 0, False: 48]
  ------------------
  525|      0|            break;
  526|      0|          }
  527|     48|        }
  528|     24|      }
  529|     24|    }
  530|       |
  531|     66|  bail:
  532|       |    /* save new config */
  533|     66|    if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (533:9): [True: 24, False: 42]
  ------------------
  534|     24|      if (hTp->asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (534:11): [True: 24, False: 0]
  ------------------
  535|     24|        hTp->asc->m_sc.m_usacConfig.UsacConfigBits = newConfigLength << 3;
  536|     24|        FDKmemcpy(hTp->asc->m_sc.m_usacConfig.UsacConfig, newConfig,
  537|     24|                  newConfigLength);
  538|       |        /* in case of USAC reset transportDecoder variables here because
  539|       |         * otherwise without IPF they are not reset */
  540|     24|        hTp->ctrlCFGChange[layer].flushCnt = 0;
  541|     24|        hTp->ctrlCFGChange[layer].flushStatus = TPDEC_FLUSH_OFF;
  542|     24|        hTp->ctrlCFGChange[layer].buildUpCnt = 0;
  543|     24|        hTp->ctrlCFGChange[layer].buildUpStatus = TPDEC_BUILD_UP_OFF;
  544|     24|      }
  545|     42|    } else {
  546|     42|      hTp->numberOfRawDataBlocks = 0;
  547|       |
  548|       |      /* If parsing error while config found, clear ctrlCFGChange-struct */
  549|     42|      hTp->ctrlCFGChange[layer].flushCnt = 0;
  550|     42|      hTp->ctrlCFGChange[layer].flushStatus = TPDEC_FLUSH_OFF;
  551|     42|      hTp->ctrlCFGChange[layer].buildUpCnt = 0;
  552|     42|      hTp->ctrlCFGChange[layer].buildUpStatus = TPDEC_BUILD_UP_OFF;
  553|     42|      hTp->ctrlCFGChange[layer].cfgChanged = 0;
  554|     42|      hTp->ctrlCFGChange[layer].contentChanged = 0;
  555|     42|      hTp->ctrlCFGChange[layer].forceCfgChange = 0;
  556|       |
  557|     42|      hTp->callbacks.cbCtrlCFGChange(hTp->callbacks.cbCtrlCFGChangeData,
  558|     42|                                     &hTp->ctrlCFGChange[layer]);
  559|     42|    }
  560|     66|  }
  561|       |
  562|     66|  if (err == TRANSPORTDEC_OK && fConfigFound) {
  ------------------
  |  Branch (562:7): [True: 24, False: 42]
  |  Branch (562:33): [True: 24, False: 0]
  ------------------
  563|     24|    hTp->flags |= TPDEC_CONFIG_FOUND;
  ------------------
  |  |  178|     24|#define TPDEC_CONFIG_FOUND 32
  ------------------
  564|     24|  }
  565|       |
  566|     66|  return err;
  567|     24|}
_Z32transportDec_RegisterAscCallbackP12TRANSPORTDECPFiPvPK21CSAudioSpecificConfighPhES1_:
  571|  21.8k|                                     void *user_data) {
  572|  21.8k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (572:7): [True: 0, False: 21.8k]
  ------------------
  573|      0|    return -1;
  574|      0|  }
  575|  21.8k|  hTpDec->callbacks.cbUpdateConfig = cbUpdateConfig;
  576|  21.8k|  hTpDec->callbacks.cbUpdateConfigData = user_data;
  577|  21.8k|  return 0;
  578|  21.8k|}
_Z36transportDec_RegisterFreeMemCallbackP12TRANSPORTDECPFiPvPK21CSAudioSpecificConfigES1_:
  582|  21.8k|                                         void *user_data) {
  583|  21.8k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (583:7): [True: 0, False: 21.8k]
  ------------------
  584|      0|    return -1;
  585|      0|  }
  586|  21.8k|  hTpDec->callbacks.cbFreeMem = cbFreeMem;
  587|  21.8k|  hTpDec->callbacks.cbFreeMemData = user_data;
  588|  21.8k|  return 0;
  589|  21.8k|}
_Z42transportDec_RegisterCtrlCFGChangeCallbackP12TRANSPORTDECPFiPvPK14CCtrlCFGChangeES1_:
  593|  21.8k|    void *user_data) {
  594|  21.8k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (594:7): [True: 0, False: 21.8k]
  ------------------
  595|      0|    return -1;
  596|      0|  }
  597|  21.8k|  hTpDec->callbacks.cbCtrlCFGChange = cbCtrlCFGChange;
  598|  21.8k|  hTpDec->callbacks.cbCtrlCFGChangeData = user_data;
  599|  21.8k|  return 0;
  600|  21.8k|}
_Z32transportDec_RegisterSscCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAM17AUDIO_OBJECT_TYPEiiiiiihPhES1_:
  603|  21.8k|                                     const cbSsc_t cbSsc, void *user_data) {
  604|  21.8k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (604:7): [True: 0, False: 21.8k]
  ------------------
  605|      0|    return -1;
  606|      0|  }
  607|  21.8k|  hTpDec->callbacks.cbSsc = cbSsc;
  608|  21.8k|  hTpDec->callbacks.cbSscData = user_data;
  609|  21.8k|  return 0;
  610|  21.8k|}
_Z32transportDec_RegisterSbrCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAMiii17AUDIO_OBJECT_TYPE14MP4_ELEMENT_IDihhhPhiES1_:
  613|  21.8k|                                     const cbSbr_t cbSbr, void *user_data) {
  614|  21.8k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (614:7): [True: 0, False: 21.8k]
  ------------------
  615|      0|    return -1;
  616|      0|  }
  617|  21.8k|  hTpDec->callbacks.cbSbr = cbSbr;
  618|  21.8k|  hTpDec->callbacks.cbSbrData = user_data;
  619|  21.8k|  return 0;
  620|  21.8k|}
_Z41transportDec_RegisterUniDrcConfigCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAMiiii17AUDIO_OBJECT_TYPEES1_Pj:
  635|  21.8k|                                              UINT *pLoudnessInfoSetPosition) {
  636|  21.8k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (636:7): [True: 0, False: 21.8k]
  ------------------
  637|      0|    return -1;
  638|      0|  }
  639|       |
  640|  21.8k|  hTpDec->callbacks.cbUniDrc = cbUniDrc;
  641|  21.8k|  hTpDec->callbacks.cbUniDrcData = user_data;
  642|       |
  643|  21.8k|  hTpDec->pLoudnessInfoSetPosition = pLoudnessInfoSetPosition;
  644|  21.8k|  return 0;
  645|  21.8k|}
_Z21transportDec_FillDataP12TRANSPORTDECPhjPji:
  649|  22.8k|                                         UINT *pBytesValid, const INT layer) {
  650|  22.8k|  HANDLE_FDK_BITSTREAM hBs;
  651|       |
  652|  22.8k|  if ((hTp == NULL) || (layer >= 1)) {
  ------------------
  |  Branch (652:7): [True: 0, False: 22.8k]
  |  Branch (652:24): [True: 0, False: 22.8k]
  ------------------
  653|      0|    return TRANSPORTDEC_INVALID_PARAMETER;
  654|      0|  }
  655|       |
  656|       |  /* set bitbuffer shortcut */
  657|  22.8k|  hBs = &hTp->bitStream[layer];
  658|       |
  659|  22.8k|  if (TT_IS_PACKET(hTp->transportFmt)) {
  ------------------
  |  |  153|  22.8k|  (((x) == TT_MP4_RAW) || ((x) == TT_DRM) || ((x) == TT_MP4_LATM_MCP0) || \
  |  |  ------------------
  |  |  |  Branch (153:4): [True: 0, False: 22.8k]
  |  |  |  Branch (153:27): [True: 0, False: 22.8k]
  |  |  |  Branch (153:46): [True: 0, False: 22.8k]
  |  |  ------------------
  |  |  154|  22.8k|   ((x) == TT_MP4_LATM_MCP1))
  |  |  ------------------
  |  |  |  Branch (154:4): [True: 0, False: 22.8k]
  |  |  ------------------
  ------------------
  660|      0|    if (hTp->numberOfRawDataBlocks == 0) {
  ------------------
  |  Branch (660:9): [True: 0, False: 0]
  ------------------
  661|      0|      FDKresetBitbuffer(hBs);
  662|      0|      FDKfeedBuffer(hBs, pBuffer, bufferSize, pBytesValid);
  663|      0|      if (*pBytesValid != 0) {
  ------------------
  |  Branch (663:11): [True: 0, False: 0]
  ------------------
  664|      0|        return TRANSPORTDEC_TOO_MANY_BITS;
  665|      0|      }
  666|      0|    }
  667|  22.8k|  } else {
  668|       |    /* ... else feed bitbuffer with new stream data (append). */
  669|       |
  670|  22.8k|    if (*pBytesValid == 0) {
  ------------------
  |  Branch (670:9): [True: 0, False: 22.8k]
  ------------------
  671|       |      /* nothing to do */
  672|      0|      return TRANSPORTDEC_OK;
  673|  22.8k|    } else {
  674|  22.8k|      const int bytesValid = *pBytesValid;
  675|  22.8k|      FDKfeedBuffer(hBs, pBuffer, bufferSize, pBytesValid);
  676|       |
  677|  22.8k|      if (hTp->numberOfRawDataBlocks > 0) {
  ------------------
  |  Branch (677:11): [True: 1, False: 22.8k]
  ------------------
  678|      1|        hTp->globalFramePos += (bytesValid - *pBytesValid) * 8;
  679|      1|        hTp->accessUnitAnchor[layer] = FDKgetValidBits(hBs);
  680|      1|      }
  681|  22.8k|    }
  682|  22.8k|  }
  683|       |
  684|  22.8k|  return TRANSPORTDEC_OK;
  685|  22.8k|}
_Z25transportDec_GetBitstreamP12TRANSPORTDECj:
  688|  1.07M|                                               const UINT layer) {
  689|  1.07M|  return &hTp->bitStream[layer];
  690|  1.07M|}
_Z22transportDec_GetFormatP12TRANSPORTDEC:
  692|    184|TRANSPORT_TYPE transportDec_GetFormat(const HANDLE_TRANSPORTDEC hTp) {
  693|    184|  return hTp->transportFmt;
  694|    184|}
_Z30transportDec_GetBufferFullnessP12TRANSPORTDEC:
  696|  15.8k|INT transportDec_GetBufferFullness(const HANDLE_TRANSPORTDEC hTp) {
  697|  15.8k|  INT bufferFullness = -1;
  698|       |
  699|  15.8k|  switch (hTp->transportFmt) {
  700|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (700:5): [True: 0, False: 15.8k]
  ------------------
  701|      0|      if (hTp->parser.adts.bs.adts_fullness != 0x7ff) {
  ------------------
  |  Branch (701:11): [True: 0, False: 0]
  ------------------
  702|      0|        bufferFullness = hTp->parser.adts.bs.frame_length * 8 +
  703|      0|                         hTp->parser.adts.bs.adts_fullness * 32 *
  704|      0|                             getNumberOfEffectiveChannels(
  705|      0|                                 hTp->parser.adts.bs.channel_config);
  706|      0|      }
  707|      0|      break;
  708|  15.8k|    case TT_MP4_LOAS:
  ------------------
  |  Branch (708:5): [True: 15.8k, False: 0]
  ------------------
  709|  15.8k|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (709:5): [True: 0, False: 15.8k]
  ------------------
  710|  15.8k|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (710:5): [True: 0, False: 15.8k]
  ------------------
  711|  15.8k|      if (hTp->parser.latm.m_linfo[0][0].m_bufferFullness != 0xff) {
  ------------------
  |  Branch (711:11): [True: 15.5k, False: 310]
  ------------------
  712|  15.5k|        bufferFullness = hTp->parser.latm.m_linfo[0][0].m_bufferFullness;
  713|  15.5k|      }
  714|  15.8k|      break;
  715|      0|    default:
  ------------------
  |  Branch (715:5): [True: 0, False: 15.8k]
  ------------------
  716|      0|      break;
  717|  15.8k|  }
  718|       |
  719|  15.8k|  return bufferFullness;
  720|  15.8k|}
_Z27transportDec_ReadAccessUnitP12TRANSPORTDECj:
 1459|   363k|                                               const UINT layer) {
 1460|   363k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
 1461|   363k|  HANDLE_FDK_BITSTREAM hBs;
 1462|       |
 1463|   363k|  if (!hTp) {
  ------------------
  |  Branch (1463:7): [True: 0, False: 363k]
  ------------------
 1464|      0|    return TRANSPORTDEC_INVALID_PARAMETER;
 1465|      0|  }
 1466|       |
 1467|   363k|  hBs = &hTp->bitStream[layer];
 1468|       |
 1469|   363k|  if ((INT)FDKgetValidBits(hBs) <= 0) {
  ------------------
  |  Branch (1469:7): [True: 258, False: 363k]
  ------------------
 1470|       |    /* This is only relevant for RAW and ADIF cases.
 1471|       |     * For streaming formats err will get overwritten. */
 1472|    258|    err = TRANSPORTDEC_NOT_ENOUGH_BITS;
 1473|    258|    hTp->numberOfRawDataBlocks = 0;
 1474|    258|  }
 1475|       |
 1476|   363k|  switch (hTp->transportFmt) {
 1477|      0|    case TT_MP4_ADIF:
  ------------------
  |  Branch (1477:5): [True: 0, False: 363k]
  ------------------
 1478|       |      /* Read header if not already done */
 1479|      0|      if (!(hTp->flags & TPDEC_CONFIG_FOUND)) {
  ------------------
  |  |  178|      0|#define TPDEC_CONFIG_FOUND 32
  ------------------
  |  Branch (1479:11): [True: 0, False: 0]
  ------------------
 1480|      0|        int i;
 1481|      0|        CProgramConfig *pce;
 1482|      0|        INT bsStart = FDKgetValidBits(hBs);
 1483|      0|        UCHAR configChanged = 0;
 1484|      0|        UCHAR configMode = AC_CM_DET_CFG_CHANGE;
  ------------------
  |  |  334|      0|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
 1485|       |
 1486|      0|        for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1486:21): [True: 0, False: 0]
  ------------------
 1487|      0|          if (i > 0) {
  ------------------
  |  Branch (1487:15): [True: 0, False: 0]
  ------------------
 1488|      0|            FDKpushBack(hBs, bsStart - (INT)FDKgetValidBits(hBs));
 1489|      0|            configMode = AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|      0|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
 1490|      0|          }
 1491|       |
 1492|      0|          AudioSpecificConfig_Init(&hTp->asc[0]);
 1493|      0|          pce = &hTp->asc[0].m_progrConfigElement;
 1494|      0|          err = adifRead_DecodeHeader(&hTp->parser.adif, pce, hBs);
 1495|      0|          if (err) goto bail;
  ------------------
  |  Branch (1495:15): [True: 0, False: 0]
  ------------------
 1496|       |
 1497|       |          /* Map adif header to ASC */
 1498|      0|          hTp->asc[0].m_aot = (AUDIO_OBJECT_TYPE)(pce->Profile + 1);
 1499|      0|          hTp->asc[0].m_samplingFrequencyIndex = pce->SamplingFrequencyIndex;
 1500|      0|          hTp->asc[0].m_samplingFrequency =
 1501|      0|              SamplingRateTable[pce->SamplingFrequencyIndex];
 1502|      0|          hTp->asc[0].m_channelConfiguration = 0;
 1503|      0|          hTp->asc[0].m_samplesPerFrame = 1024;
 1504|      0|          hTp->avgBitRate = hTp->parser.adif.BitRate;
 1505|       |
 1506|       |          /* Call callback to decoder. */
 1507|      0|          {
 1508|      0|            int errC;
 1509|       |
 1510|      0|            errC = hTp->callbacks.cbUpdateConfig(
 1511|      0|                hTp->callbacks.cbUpdateConfigData, &hTp->asc[0], configMode,
 1512|      0|                &configChanged);
 1513|      0|            if (errC == 0) {
  ------------------
  |  Branch (1513:17): [True: 0, False: 0]
  ------------------
 1514|      0|              hTp->flags |= TPDEC_CONFIG_FOUND;
  ------------------
  |  |  178|      0|#define TPDEC_CONFIG_FOUND 32
  ------------------
 1515|      0|            } else {
 1516|      0|              err = TRANSPORTDEC_PARSE_ERROR;
 1517|      0|              goto bail;
 1518|      0|            }
 1519|      0|          }
 1520|       |
 1521|      0|          if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1521:15): [True: 0, False: 0]
  ------------------
 1522|      0|            if ((i == 0) && configChanged) {
  ------------------
  |  Branch (1522:17): [True: 0, False: 0]
  |  Branch (1522:29): [True: 0, False: 0]
  ------------------
 1523|      0|              int errC;
 1524|      0|              errC = hTp->callbacks.cbFreeMem(hTp->callbacks.cbFreeMemData,
 1525|      0|                                              &hTp->asc[0]);
 1526|      0|              if (errC != 0) {
  ------------------
  |  Branch (1526:19): [True: 0, False: 0]
  ------------------
 1527|      0|                err = TRANSPORTDEC_PARSE_ERROR;
 1528|      0|              }
 1529|      0|            }
 1530|      0|          }
 1531|      0|        }
 1532|      0|      }
 1533|      0|      hTp->auLength[layer] = -1; /* Access Unit data length is unknown. */
 1534|      0|      break;
 1535|       |
 1536|      0|    case TT_MP4_RAW:
  ------------------
  |  Branch (1536:5): [True: 0, False: 363k]
  ------------------
 1537|      0|    case TT_DRM:
  ------------------
  |  Branch (1537:5): [True: 0, False: 363k]
  ------------------
 1538|       |      /* One Access Unit was filled into buffer.
 1539|       |         So get the length out of the buffer. */
 1540|      0|      hTp->auLength[layer] = FDKgetValidBits(hBs);
 1541|      0|      hTp->flags |= TPDEC_SYNCOK;
  ------------------
  |  |  173|      0|#define TPDEC_SYNCOK 1
  ------------------
 1542|      0|      break;
 1543|       |
 1544|      0|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (1544:5): [True: 0, False: 363k]
  ------------------
 1545|      0|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (1545:5): [True: 0, False: 363k]
  ------------------
 1546|      0|      if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1546:11): [True: 0, False: 0]
  ------------------
 1547|      0|        int fConfigFound = hTp->flags & TPDEC_CONFIG_FOUND;
  ------------------
  |  |  178|      0|#define TPDEC_CONFIG_FOUND 32
  ------------------
 1548|      0|        err = transportDec_readHeader(hTp, hBs, 0, 1, &hTp->auLength[layer],
 1549|      0|                                      NULL, NULL, &fConfigFound, NULL);
 1550|      0|        if (fConfigFound) {
  ------------------
  |  Branch (1550:13): [True: 0, False: 0]
  ------------------
 1551|      0|          hTp->flags |= TPDEC_CONFIG_FOUND;
  ------------------
  |  |  178|      0|#define TPDEC_CONFIG_FOUND 32
  ------------------
 1552|      0|        }
 1553|      0|      }
 1554|      0|      break;
 1555|       |
 1556|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (1556:5): [True: 0, False: 363k]
  ------------------
 1557|   363k|    case TT_MP4_LOAS:
  ------------------
  |  Branch (1557:5): [True: 363k, False: 0]
  ------------------
 1558|   363k|      err = transportDec_readStream(hTp, layer);
 1559|   363k|      break;
 1560|       |
 1561|      0|    default:
  ------------------
  |  Branch (1561:5): [True: 0, False: 363k]
  ------------------
 1562|      0|      err = TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1563|      0|      break;
 1564|   363k|  }
 1565|       |
 1566|   363k|  if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1566:7): [True: 349k, False: 14.0k]
  ------------------
 1567|   349k|    hTp->accessUnitAnchor[layer] = FDKgetValidBits(hBs);
 1568|   349k|  } else {
 1569|  14.0k|    hTp->accessUnitAnchor[layer] = 0;
 1570|  14.0k|  }
 1571|       |
 1572|   363k|bail:
 1573|   363k|  return err;
 1574|   363k|}
_Z31transportDec_GetAuBitsRemainingP12TRANSPORTDECj:
 1591|   771k|                                    const UINT layer) {
 1592|   771k|  INT bits;
 1593|       |
 1594|   771k|  if (hTp->accessUnitAnchor[layer] > 0 && hTp->auLength[layer] > 0) {
  ------------------
  |  Branch (1594:7): [True: 771k, False: 410]
  |  Branch (1594:43): [True: 253k, False: 518k]
  ------------------
 1595|   253k|    bits = (INT)FDKgetValidBits(&hTp->bitStream[layer]);
 1596|   253k|    if (bits >= 0) {
  ------------------
  |  Branch (1596:9): [True: 249k, False: 3.68k]
  ------------------
 1597|   249k|      bits = hTp->auLength[layer] - ((INT)hTp->accessUnitAnchor[layer] - bits);
 1598|   249k|    }
 1599|   518k|  } else {
 1600|   518k|    bits = FDKgetValidBits(&hTp->bitStream[layer]);
 1601|   518k|  }
 1602|       |
 1603|   771k|  return bits;
 1604|   771k|}
_Z27transportDec_GetAuBitsTotalP12TRANSPORTDECj:
 1607|   351k|                                const UINT layer) {
 1608|   351k|  return hTp->auLength[layer];
 1609|   351k|}
_Z38transportDec_GetMissingAccessUnitCountPiP12TRANSPORTDEC:
 1612|  6.38k|    INT *pNAccessUnits, HANDLE_TRANSPORTDEC hTp) {
 1613|  6.38k|  *pNAccessUnits = hTp->missingAccessUnits;
 1614|       |
 1615|  6.38k|  return TRANSPORTDEC_OK;
 1616|  6.38k|}
_Z26transportDec_EndAccessUnitP12TRANSPORTDEC:
 1619|   349k|TRANSPORTDEC_ERROR transportDec_EndAccessUnit(HANDLE_TRANSPORTDEC hTp) {
 1620|   349k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
 1621|       |
 1622|   349k|  switch (hTp->transportFmt) {
 1623|   349k|    case TT_MP4_LOAS:
  ------------------
  |  Branch (1623:5): [True: 349k, False: 0]
  ------------------
 1624|   349k|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (1624:5): [True: 0, False: 349k]
  ------------------
 1625|   349k|    case TT_MP4_LATM_MCP1: {
  ------------------
  |  Branch (1625:5): [True: 0, False: 349k]
  ------------------
 1626|   349k|      HANDLE_FDK_BITSTREAM hBs = &hTp->bitStream[0];
 1627|   349k|      if (hTp->numberOfRawDataBlocks == 0) {
  ------------------
  |  Branch (1627:11): [True: 8.99k, False: 340k]
  ------------------
 1628|       |        /* Read other data if available. */
 1629|  8.99k|        if (CLatmDemux_GetOtherDataPresentFlag(&hTp->parser.latm)) {
  ------------------
  |  Branch (1629:13): [True: 3.21k, False: 5.77k]
  ------------------
 1630|  3.21k|          int otherDataLen = CLatmDemux_GetOtherDataLength(&hTp->parser.latm);
 1631|       |
 1632|  3.21k|          if ((INT)FDKgetValidBits(hBs) >= otherDataLen) {
  ------------------
  |  Branch (1632:15): [True: 3.18k, False: 33]
  ------------------
 1633|  3.18k|            FDKpushFor(hBs, otherDataLen);
 1634|  3.18k|          } else {
 1635|       |            /* Do byte align at the end of AudioMuxElement. */
 1636|     33|            if (hTp->numberOfRawDataBlocks == 0) {
  ------------------
  |  Branch (1636:17): [True: 33, False: 0]
  ------------------
 1637|     33|              FDKbyteAlign(hBs, hTp->globalFramePos);
 1638|     33|            }
 1639|     33|            return TRANSPORTDEC_NOT_ENOUGH_BITS;
 1640|     33|          }
 1641|  3.21k|        }
 1642|   340k|      } else {
 1643|       |        /* If bit buffer has not more bits but hTp->numberOfRawDataBlocks > 0
 1644|       |           then too many bits were read and obviously no more RawDataBlocks can
 1645|       |           be read. Set numberOfRawDataBlocks to zero to attempt a new sync
 1646|       |           attempt. */
 1647|   340k|        if ((INT)FDKgetValidBits(hBs) <= 0) {
  ------------------
  |  Branch (1647:13): [True: 82.1k, False: 258k]
  ------------------
 1648|  82.1k|          hTp->numberOfRawDataBlocks = 0;
 1649|  82.1k|        }
 1650|   340k|      }
 1651|   349k|    } break;
 1652|   349k|    default:
  ------------------
  |  Branch (1652:5): [True: 0, False: 349k]
  ------------------
 1653|      0|      break;
 1654|   349k|  }
 1655|       |
 1656|   349k|  err = transportDec_AdjustEndOfAccessUnit(hTp);
 1657|       |
 1658|   349k|  switch (hTp->transportFmt) {
 1659|   349k|    default:
  ------------------
  |  Branch (1659:5): [True: 349k, False: 0]
  ------------------
 1660|   349k|      break;
 1661|   349k|  }
 1662|       |
 1663|   349k|  return err;
 1664|   349k|}
_Z18transportDec_ClosePP12TRANSPORTDEC:
 1754|  21.8k|void transportDec_Close(HANDLE_TRANSPORTDEC *phTp) {
 1755|  21.8k|  if (phTp != NULL) {
  ------------------
  |  Branch (1755:7): [True: 21.8k, False: 0]
  ------------------
 1756|  21.8k|    if (*phTp != NULL) {
  ------------------
  |  Branch (1756:9): [True: 21.8k, False: 0]
  ------------------
 1757|  21.8k|      FreeRam_TransportDecoderBuffer(&(*phTp)->bsBuffer);
 1758|  21.8k|      FreeRam_TransportDecoder(phTp);
 1759|  21.8k|    }
 1760|  21.8k|  }
 1761|  21.8k|}
_Z24transportDec_CrcStartRegP12TRANSPORTDECi:
 1794|  43.2k|int transportDec_CrcStartReg(HANDLE_TRANSPORTDEC pTp, INT mBits) {
 1795|  43.2k|  switch (pTp->transportFmt) {
 1796|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (1796:5): [True: 0, False: 43.2k]
  ------------------
 1797|      0|      return adtsRead_CrcStartReg(&pTp->parser.adts, &pTp->bitStream[0], mBits);
 1798|      0|    case TT_DRM:
  ------------------
  |  Branch (1798:5): [True: 0, False: 43.2k]
  ------------------
 1799|      0|      return drmRead_CrcStartReg(&pTp->parser.drm, &pTp->bitStream[0], mBits);
 1800|  43.2k|    default:
  ------------------
  |  Branch (1800:5): [True: 43.2k, False: 0]
  ------------------
 1801|  43.2k|      return -1;
 1802|  43.2k|  }
 1803|  43.2k|}
_Z22transportDec_CrcEndRegP12TRANSPORTDECi:
 1805|  42.7k|void transportDec_CrcEndReg(HANDLE_TRANSPORTDEC pTp, INT reg) {
 1806|  42.7k|  switch (pTp->transportFmt) {
 1807|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (1807:5): [True: 0, False: 42.7k]
  ------------------
 1808|      0|      adtsRead_CrcEndReg(&pTp->parser.adts, &pTp->bitStream[0], reg);
 1809|      0|      break;
 1810|      0|    case TT_DRM:
  ------------------
  |  Branch (1810:5): [True: 0, False: 42.7k]
  ------------------
 1811|      0|      drmRead_CrcEndReg(&pTp->parser.drm, &pTp->bitStream[0], reg);
 1812|      0|      break;
 1813|  42.7k|    default:
  ------------------
  |  Branch (1813:5): [True: 42.7k, False: 0]
  ------------------
 1814|  42.7k|      break;
 1815|  42.7k|  }
 1816|  42.7k|}
_Z21transportDec_CrcCheckP12TRANSPORTDEC:
 1818|   351k|TRANSPORTDEC_ERROR transportDec_CrcCheck(HANDLE_TRANSPORTDEC pTp) {
 1819|   351k|  switch (pTp->transportFmt) {
 1820|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (1820:5): [True: 0, False: 351k]
  ------------------
 1821|      0|      if ((pTp->parser.adts.bs.num_raw_blocks > 0) &&
  ------------------
  |  Branch (1821:11): [True: 0, False: 0]
  ------------------
 1822|      0|          (pTp->parser.adts.bs.protection_absent == 0)) {
  ------------------
  |  Branch (1822:11): [True: 0, False: 0]
  ------------------
 1823|      0|        transportDec_AdjustEndOfAccessUnit(pTp);
 1824|      0|      }
 1825|      0|      return adtsRead_CrcCheck(&pTp->parser.adts);
 1826|      0|    case TT_DRM:
  ------------------
  |  Branch (1826:5): [True: 0, False: 351k]
  ------------------
 1827|      0|      return drmRead_CrcCheck(&pTp->parser.drm);
 1828|   351k|    default:
  ------------------
  |  Branch (1828:5): [True: 351k, False: 0]
  ------------------
 1829|   351k|      return TRANSPORTDEC_OK;
 1830|   351k|  }
 1831|   351k|}
tpdec_lib.cpp:_ZL23transportDec_readHeaderP12TRANSPORTDECP13FDK_BITSTREAMiiPiS3_S3_S3_S3_:
  875|   945k|    int *pHeaderBits) {
  876|   945k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
  877|   945k|  int rawDataBlockLength = *pRawDataBlockLength;
  878|   945k|  int fTraverseMoreFrames =
  879|   945k|      (pfTraverseMoreFrames != NULL) ? *pfTraverseMoreFrames : 0;
  ------------------
  |  Branch (879:7): [True: 945k, False: 0]
  ------------------
  880|   945k|  int syncLayerFrameBits =
  881|   945k|      (pSyncLayerFrameBits != NULL) ? *pSyncLayerFrameBits : 0;
  ------------------
  |  Branch (881:7): [True: 945k, False: 0]
  ------------------
  882|   945k|  int fConfigFound = (pfConfigFound != NULL) ? *pfConfigFound : 0;
  ------------------
  |  Branch (882:22): [True: 945k, False: 0]
  ------------------
  883|   945k|  int startPos;
  884|       |
  885|   945k|  startPos = (INT)FDKgetValidBits(hBs);
  886|       |
  887|   945k|  switch (hTp->transportFmt) {
  888|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (888:5): [True: 0, False: 945k]
  ------------------
  889|      0|      if (hTp->numberOfRawDataBlocks <= 0) {
  ------------------
  |  Branch (889:11): [True: 0, False: 0]
  ------------------
  890|      0|        int i, errC;
  891|       |
  892|      0|        hTp->globalFramePos = FDKgetValidBits(hBs);
  893|       |
  894|      0|        UCHAR configChanged = 0;
  895|      0|        UCHAR configMode = AC_CM_DET_CFG_CHANGE;
  ------------------
  |  |  334|      0|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  896|       |
  897|      0|        for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (897:21): [True: 0, False: 0]
  ------------------
  898|      0|          if (i > 0) {
  ------------------
  |  Branch (898:15): [True: 0, False: 0]
  ------------------
  899|      0|            FDKpushBack(hBs,
  900|      0|                        (INT)hTp->globalFramePos - (INT)FDKgetValidBits(hBs));
  901|      0|            configMode = AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|      0|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  902|      0|          }
  903|       |
  904|       |          /* Parse ADTS header */
  905|      0|          err = adtsRead_DecodeHeader(&hTp->parser.adts, &hTp->asc[0], hBs,
  906|      0|                                      ignoreBufferFullness);
  907|      0|          if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (907:15): [True: 0, False: 0]
  ------------------
  908|      0|            if (err != TRANSPORTDEC_NOT_ENOUGH_BITS) {
  ------------------
  |  Branch (908:17): [True: 0, False: 0]
  ------------------
  909|      0|              err = TRANSPORTDEC_SYNC_ERROR;
  910|      0|            }
  911|      0|          } else {
  912|      0|            errC = hTp->callbacks.cbUpdateConfig(
  913|      0|                hTp->callbacks.cbUpdateConfigData, &hTp->asc[0], configMode,
  914|      0|                &configChanged);
  915|      0|            if (errC != 0) {
  ------------------
  |  Branch (915:17): [True: 0, False: 0]
  ------------------
  916|      0|              if (errC == TRANSPORTDEC_NEED_TO_RESTART) {
  ------------------
  |  Branch (916:19): [True: 0, False: 0]
  ------------------
  917|      0|                err = TRANSPORTDEC_NEED_TO_RESTART;
  918|      0|                goto bail;
  919|      0|              } else {
  920|      0|                err = TRANSPORTDEC_SYNC_ERROR;
  921|      0|              }
  922|      0|            } else {
  923|      0|              fConfigFound = 1;
  924|      0|              hTp->numberOfRawDataBlocks =
  925|      0|                  hTp->parser.adts.bs.num_raw_blocks + 1;
  926|      0|            }
  927|      0|          }
  928|       |
  929|      0|          if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (929:15): [True: 0, False: 0]
  ------------------
  930|      0|            if ((i == 0) && configChanged) {
  ------------------
  |  Branch (930:17): [True: 0, False: 0]
  |  Branch (930:29): [True: 0, False: 0]
  ------------------
  931|      0|              errC = hTp->callbacks.cbFreeMem(hTp->callbacks.cbFreeMemData,
  932|      0|                                              &hTp->asc[0]);
  933|      0|              if (errC != 0) {
  ------------------
  |  Branch (933:19): [True: 0, False: 0]
  ------------------
  934|      0|                err = TRANSPORTDEC_PARSE_ERROR;
  935|      0|              }
  936|      0|            }
  937|      0|          }
  938|       |          /* if an error is detected terminate config parsing to avoid that an
  939|       |           * invalid config is accepted in the second pass */
  940|      0|          if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (940:15): [True: 0, False: 0]
  ------------------
  941|      0|            break;
  942|      0|          }
  943|      0|        }
  944|      0|      } else {
  945|       |        /* Reset CRC because the next bits are the beginning of a
  946|       |         * raw_data_block() */
  947|      0|        FDKcrcReset(&hTp->parser.adts.crcInfo);
  948|      0|        hTp->parser.adts.bs.num_pce_bits = 0;
  949|      0|      }
  950|      0|      if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (950:11): [True: 0, False: 0]
  ------------------
  951|      0|        hTp->numberOfRawDataBlocks--;
  952|      0|        rawDataBlockLength = adtsRead_GetRawDataBlockLength(
  953|      0|            &hTp->parser.adts,
  954|      0|            (hTp->parser.adts.bs.num_raw_blocks - hTp->numberOfRawDataBlocks));
  955|      0|        if (rawDataBlockLength <= 0) {
  ------------------
  |  Branch (955:13): [True: 0, False: 0]
  ------------------
  956|       |          /* No further frame traversal possible. */
  957|      0|          fTraverseMoreFrames = 0;
  958|      0|        }
  959|      0|        syncLayerFrameBits = (hTp->parser.adts.bs.frame_length << 3) -
  960|      0|                             (startPos - (INT)FDKgetValidBits(hBs)) -
  961|      0|                             syncLength;
  962|      0|        if (syncLayerFrameBits <= 0) {
  ------------------
  |  Branch (962:13): [True: 0, False: 0]
  ------------------
  963|      0|          err = TRANSPORTDEC_SYNC_ERROR;
  964|      0|        }
  965|      0|      } else {
  966|      0|        hTp->numberOfRawDataBlocks = 0;
  967|      0|      }
  968|      0|      break;
  969|   945k|    case TT_MP4_LOAS:
  ------------------
  |  Branch (969:5): [True: 945k, False: 0]
  ------------------
  970|   945k|      if (hTp->numberOfRawDataBlocks <= 0) {
  ------------------
  |  Branch (970:11): [True: 690k, False: 255k]
  ------------------
  971|   690k|        syncLayerFrameBits = (INT)FDKreadBits(hBs, 13);
  972|   690k|        hTp->parser.latm.m_audioMuxLengthBytes = syncLayerFrameBits;
  973|   690k|        syncLayerFrameBits <<= 3;
  974|   690k|      }
  975|   945k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|   945k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  976|   945k|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (976:5): [True: 0, False: 945k]
  ------------------
  977|   945k|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (977:5): [True: 0, False: 945k]
  ------------------
  978|   945k|      if (hTp->numberOfRawDataBlocks <= 0) {
  ------------------
  |  Branch (978:11): [True: 690k, False: 255k]
  ------------------
  979|   690k|        hTp->globalFramePos = FDKgetValidBits(hBs);
  980|       |
  981|   690k|        err = CLatmDemux_Read(hBs, &hTp->parser.latm, hTp->transportFmt,
  982|   690k|                              &hTp->callbacks, hTp->asc, &fConfigFound,
  983|   690k|                              ignoreBufferFullness);
  984|       |
  985|   690k|        if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (985:13): [True: 561k, False: 128k]
  ------------------
  986|   561k|          if ((err != TRANSPORTDEC_NOT_ENOUGH_BITS) &&
  ------------------
  |  Branch (986:15): [True: 560k, False: 364]
  ------------------
  987|   560k|              !TPDEC_IS_FATAL_ERROR(err)) {
  ------------------
  |  |  151|   560k|  (((err >= tpdec_fatal_error_start) && (err <= tpdec_fatal_error_end)) ? 1 : 0)
  |  |  ------------------
  |  |  |  Branch (151:5): [True: 505k, False: 55.0k]
  |  |  |  Branch (151:41): [True: 0, False: 505k]
  |  |  ------------------
  ------------------
  |  Branch (987:15): [True: 560k, False: 0]
  ------------------
  988|   560k|            err = TRANSPORTDEC_SYNC_ERROR;
  989|   560k|          }
  990|   561k|        } else {
  991|   128k|          hTp->numberOfRawDataBlocks =
  992|   128k|              CLatmDemux_GetNrOfSubFrames(&hTp->parser.latm);
  993|   128k|          if (hTp->transportFmt == TT_MP4_LOAS) {
  ------------------
  |  Branch (993:15): [True: 128k, False: 0]
  ------------------
  994|   128k|            syncLayerFrameBits -= startPos - (INT)FDKgetValidBits(hBs) - (13);
  995|   128k|            if (syncLayerFrameBits <= 0) {
  ------------------
  |  Branch (995:17): [True: 32.4k, False: 96.5k]
  ------------------
  996|  32.4k|              err = TRANSPORTDEC_SYNC_ERROR;
  997|  32.4k|            }
  998|   128k|          }
  999|   128k|        }
 1000|   690k|      } else {
 1001|   255k|        err = CLatmDemux_ReadPayloadLengthInfo(hBs, &hTp->parser.latm);
 1002|   255k|        if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1002:13): [True: 2.76k, False: 252k]
  ------------------
 1003|  2.76k|          err = TRANSPORTDEC_SYNC_ERROR;
 1004|  2.76k|        }
 1005|   255k|      }
 1006|   945k|      if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1006:11): [True: 349k, False: 596k]
  ------------------
 1007|   349k|        int layer;
 1008|   349k|        rawDataBlockLength = 0;
 1009|   349k|        for (layer = 0;
 1010|   698k|             layer < (int)CLatmDemux_GetNrOfLayers(&hTp->parser.latm, 0);
  ------------------
  |  Branch (1010:14): [True: 349k, False: 349k]
  ------------------
 1011|   349k|             layer += 1) {
 1012|   349k|          rawDataBlockLength +=
 1013|   349k|              CLatmDemux_GetFrameLengthInBits(&hTp->parser.latm, 0, layer);
 1014|   349k|        }
 1015|   349k|        hTp->numberOfRawDataBlocks--;
 1016|   596k|      } else {
 1017|   596k|        hTp->numberOfRawDataBlocks = 0;
 1018|   596k|      }
 1019|   945k|      break;
 1020|      0|    default: { syncLayerFrameBits = 0; } break;
  ------------------
  |  Branch (1020:5): [True: 0, False: 945k]
  ------------------
 1021|   945k|  }
 1022|       |
 1023|   945k|bail:
 1024|       |
 1025|   945k|  *pRawDataBlockLength = rawDataBlockLength;
 1026|       |
 1027|   945k|  if (pHeaderBits != NULL) {
  ------------------
  |  Branch (1027:7): [True: 945k, False: 0]
  ------------------
 1028|   945k|    *pHeaderBits += startPos - (INT)FDKgetValidBits(hBs);
 1029|   945k|  }
 1030|       |
 1031|  1.89M|  for (int i = 0; i < (1 * 1); i++) {
  ------------------
  |  Branch (1031:19): [True: 945k, False: 945k]
  ------------------
 1032|       |    /* If parsing error while config found, clear ctrlCFGChange-struct */
 1033|   945k|    if (hTp->ctrlCFGChange[i].cfgChanged && err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1033:9): [True: 0, False: 945k]
  |  Branch (1033:45): [True: 0, False: 0]
  ------------------
 1034|      0|      hTp->numberOfRawDataBlocks = 0;
 1035|      0|      hTp->ctrlCFGChange[i].flushCnt = 0;
 1036|      0|      hTp->ctrlCFGChange[i].flushStatus = TPDEC_FLUSH_OFF;
 1037|      0|      hTp->ctrlCFGChange[i].buildUpCnt = 0;
 1038|      0|      hTp->ctrlCFGChange[i].buildUpStatus = TPDEC_BUILD_UP_OFF;
 1039|      0|      hTp->ctrlCFGChange[i].cfgChanged = 0;
 1040|      0|      hTp->ctrlCFGChange[i].contentChanged = 0;
 1041|      0|      hTp->ctrlCFGChange[i].forceCfgChange = 0;
 1042|       |
 1043|      0|      hTp->callbacks.cbCtrlCFGChange(hTp->callbacks.cbCtrlCFGChangeData,
 1044|      0|                                     &hTp->ctrlCFGChange[i]);
 1045|      0|    }
 1046|   945k|  }
 1047|       |
 1048|   945k|  if (pfConfigFound != NULL) {
  ------------------
  |  Branch (1048:7): [True: 945k, False: 0]
  ------------------
 1049|   945k|    *pfConfigFound = fConfigFound;
 1050|   945k|  }
 1051|       |
 1052|   945k|  if (pfTraverseMoreFrames != NULL) {
  ------------------
  |  Branch (1052:7): [True: 945k, False: 0]
  ------------------
 1053|   945k|    *pfTraverseMoreFrames = fTraverseMoreFrames;
 1054|   945k|  }
 1055|   945k|  if (pSyncLayerFrameBits != NULL) {
  ------------------
  |  Branch (1055:7): [True: 945k, False: 0]
  ------------------
 1056|   945k|    *pSyncLayerFrameBits = syncLayerFrameBits;
 1057|   945k|  }
 1058|       |
 1059|   945k|  return err;
 1060|   945k|}
tpdec_lib.cpp:_ZL23transportDec_readStreamP12TRANSPORTDECj:
 1358|   363k|                                                  const UINT layer) {
 1359|   363k|  TRANSPORTDEC_ERROR error = TRANSPORTDEC_OK;
 1360|   363k|  HANDLE_FDK_BITSTREAM hBs = &hTp->bitStream[layer];
 1361|       |
 1362|   363k|  INT headerBits;
 1363|   363k|  INT bitDistance, bfDelta;
 1364|       |
 1365|       |  /* Obtain distance to next synch word */
 1366|   363k|  bitDistance = (INT)FDKgetValidBits(hBs);
 1367|   363k|  error = synchronization(hTp, &headerBits);
 1368|   363k|  bitDistance -= (INT)FDKgetValidBits(hBs);
 1369|       |
 1370|   363k|  FDK_ASSERT(bitDistance >= 0);
  ------------------
  |  |  221|   363k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1370:3): [True: 363k, False: 0]
  ------------------
 1371|       |
 1372|   363k|  INT nAU = -1;
 1373|       |
 1374|   363k|  if (error == TRANSPORTDEC_SYNC_ERROR ||
  ------------------
  |  Branch (1374:7): [True: 6.38k, False: 356k]
  ------------------
 1375|   356k|      (hTp->flags & TPDEC_LOST_FRAMES_PENDING)) {
  ------------------
  |  |  177|   356k|#define TPDEC_LOST_FRAMES_PENDING 16
  ------------------
  |  Branch (1375:7): [True: 0, False: 356k]
  ------------------
 1376|       |    /* Check if estimating lost access units is feasible. */
 1377|  6.38k|    if (hTp->avgBitRate > 0 && hTp->asc[0].m_samplesPerFrame > 0 &&
  ------------------
  |  Branch (1377:9): [True: 0, False: 6.38k]
  |  Branch (1377:32): [True: 0, False: 0]
  ------------------
 1378|      0|        hTp->asc[0].m_samplingFrequency > 0) {
  ------------------
  |  Branch (1378:9): [True: 0, False: 0]
  ------------------
 1379|      0|      if (error == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1379:11): [True: 0, False: 0]
  ------------------
 1380|      0|        int aj;
 1381|       |
 1382|      0|        aj = transportDec_GetBufferFullness(hTp);
 1383|      0|        if (aj > 0) {
  ------------------
  |  Branch (1383:13): [True: 0, False: 0]
  ------------------
 1384|      0|          bfDelta = aj;
 1385|      0|        } else {
 1386|      0|          bfDelta = 0;
 1387|      0|        }
 1388|       |        /* sync was ok: last of a series of bad access units. */
 1389|      0|        hTp->flags &= ~TPDEC_LOST_FRAMES_PENDING;
  ------------------
  |  |  177|      0|#define TPDEC_LOST_FRAMES_PENDING 16
  ------------------
 1390|       |        /* Add up bitDistance until end of the current frame. Later we substract
 1391|       |           this frame from the grand total, since this current successfully
 1392|       |           synchronized frame should not be skipped of course; but it must be
 1393|       |           accounted into the bufferfulness math. */
 1394|      0|        bitDistance += hTp->auLength[0];
 1395|      0|      } else {
 1396|      0|        if (!(hTp->flags & TPDEC_LOST_FRAMES_PENDING)) {
  ------------------
  |  |  177|      0|#define TPDEC_LOST_FRAMES_PENDING 16
  ------------------
  |  Branch (1396:13): [True: 0, False: 0]
  ------------------
 1397|       |          /* sync not ok: one of many bad access units. */
 1398|      0|          hTp->flags |= TPDEC_LOST_FRAMES_PENDING;
  ------------------
  |  |  177|      0|#define TPDEC_LOST_FRAMES_PENDING 16
  ------------------
 1399|      0|          bfDelta = -(INT)hTp->lastValidBufferFullness;
 1400|      0|        } else {
 1401|      0|          bfDelta = 0;
 1402|      0|        }
 1403|      0|      }
 1404|       |
 1405|      0|      {
 1406|      0|        int num, denom;
 1407|       |
 1408|       |        /* Obtain estimate of number of lost frames */
 1409|      0|        num = (INT)hTp->asc[0].m_samplingFrequency * (bfDelta + bitDistance) +
 1410|      0|              hTp->remainder;
 1411|      0|        denom = hTp->avgBitRate * hTp->asc[0].m_samplesPerFrame;
 1412|      0|        if (num > 0) {
  ------------------
  |  Branch (1412:13): [True: 0, False: 0]
  ------------------
 1413|      0|          nAU = num / denom;
 1414|      0|          hTp->remainder = num % denom;
 1415|      0|        } else {
 1416|      0|          hTp->remainder = num;
 1417|      0|        }
 1418|       |
 1419|      0|        if (error == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1419:13): [True: 0, False: 0]
  ------------------
 1420|       |          /* Final adjustment of remainder, taken -1 into account because
 1421|       |             current frame should not be skipped, thus substract -1 or do
 1422|       |             nothing instead of +1-1 accordingly. */
 1423|      0|          if ((denom - hTp->remainder) >= hTp->remainder) {
  ------------------
  |  Branch (1423:15): [True: 0, False: 0]
  ------------------
 1424|      0|            nAU--;
 1425|      0|          }
 1426|       |
 1427|      0|          if (nAU < 0) {
  ------------------
  |  Branch (1427:15): [True: 0, False: 0]
  ------------------
 1428|       |            /* There was one frame too much concealed, so unfortunately we will
 1429|       |             * have to skip one good frame. */
 1430|      0|            transportDec_EndAccessUnit(hTp);
 1431|      0|            error = synchronization(hTp, &headerBits);
 1432|      0|            nAU = -1;
 1433|      0|          }
 1434|      0|          hTp->remainder = 0;
 1435|       |          /* Enforce last missed frames to be concealed. */
 1436|      0|          if (nAU > 0) {
  ------------------
  |  Branch (1436:15): [True: 0, False: 0]
  ------------------
 1437|      0|            FDKpushBack(hBs, headerBits);
 1438|      0|          }
 1439|      0|        }
 1440|      0|      }
 1441|      0|    }
 1442|  6.38k|  }
 1443|       |
 1444|       |  /* Be sure that lost frames are handled correctly. This is necessary due to
 1445|       |     some sync error sequences where later it turns out that there is not enough
 1446|       |     data, but the bits upto the sync word are discarded, thus causing a value
 1447|       |     of nAU > 0 */
 1448|   363k|  if (nAU > 0) {
  ------------------
  |  Branch (1448:7): [True: 0, False: 363k]
  ------------------
 1449|      0|    error = TRANSPORTDEC_SYNC_ERROR;
 1450|      0|  }
 1451|       |
 1452|   363k|  hTp->missingAccessUnits = nAU;
 1453|       |
 1454|   363k|  return error;
 1455|   363k|}
tpdec_lib.cpp:_ZL15synchronizationP12TRANSPORTDECPi:
 1066|   363k|                                          INT *pHeaderBits) {
 1067|   363k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK, errFirstFrame = TRANSPORTDEC_OK;
 1068|   363k|  HANDLE_FDK_BITSTREAM hBs = &hTp->bitStream[0];
 1069|       |
 1070|   363k|  INT syncLayerFrameBits = 0; /* Length of sync layer frame (i.e. LOAS) */
 1071|   363k|  INT rawDataBlockLength = 0, rawDataBlockLengthPrevious;
 1072|   363k|  INT totalBits;
 1073|   363k|  INT headerBits = 0, headerBitsFirstFrame = 0, headerBitsPrevious;
 1074|   363k|  INT numFramesTraversed = 0, fTraverseMoreFrames,
 1075|   363k|      fConfigFound = (hTp->flags & TPDEC_CONFIG_FOUND), startPosFirstFrame = -1;
  ------------------
  |  |  178|   363k|#define TPDEC_CONFIG_FOUND 32
  ------------------
 1076|   363k|  INT numRawDataBlocksFirstFrame = 0, numRawDataBlocksPrevious,
 1077|   363k|      globalFramePosFirstFrame = 0, rawDataBlockLengthFirstFrame = 0;
 1078|   363k|  INT ignoreBufferFullness =
 1079|   363k|      hTp->flags &
 1080|   363k|      (TPDEC_LOST_FRAMES_PENDING | TPDEC_IGNORE_BUFFERFULLNESS | TPDEC_SYNCOK);
  ------------------
  |  |  177|   363k|#define TPDEC_LOST_FRAMES_PENDING 16
  ------------------
                    (TPDEC_LOST_FRAMES_PENDING | TPDEC_IGNORE_BUFFERFULLNESS | TPDEC_SYNCOK);
  ------------------
  |  |  175|   363k|#define TPDEC_IGNORE_BUFFERFULLNESS 4
  ------------------
                    (TPDEC_LOST_FRAMES_PENDING | TPDEC_IGNORE_BUFFERFULLNESS | TPDEC_SYNCOK);
  ------------------
  |  |  173|   363k|#define TPDEC_SYNCOK 1
  ------------------
 1081|   363k|  UINT endTpFrameBitsPrevious = 0;
 1082|       |
 1083|       |  /* Synch parameters */
 1084|   363k|  INT syncLength; /* Length of sync word in bits */
 1085|   363k|  UINT syncWord;  /* Sync word to be found */
 1086|   363k|  UINT syncMask;  /* Mask for sync word (for adding one bit, so comprising one
 1087|       |                     bit less) */
 1088|   363k|  C_ALLOC_SCRATCH_START(contextFirstFrame, transportdec_parser_t, 1);
  ------------------
  |  |  324|   363k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1089|       |
 1090|   363k|  totalBits = (INT)FDKgetValidBits(hBs);
 1091|       |
 1092|   363k|  if (totalBits <= 0) {
  ------------------
  |  Branch (1092:7): [True: 258, False: 363k]
  ------------------
 1093|    258|    err = TRANSPORTDEC_NOT_ENOUGH_BITS;
 1094|    258|    goto bail;
 1095|    258|  }
 1096|       |
 1097|   363k|  fTraverseMoreFrames =
 1098|   363k|      (hTp->flags & (TPDEC_MINIMIZE_DELAY | TPDEC_EARLY_CONFIG)) &&
  ------------------
  |  |  174|   363k|#define TPDEC_MINIMIZE_DELAY 2
  ------------------
                    (hTp->flags & (TPDEC_MINIMIZE_DELAY | TPDEC_EARLY_CONFIG)) &&
  ------------------
  |  |  176|   363k|#define TPDEC_EARLY_CONFIG 8
  ------------------
  |  Branch (1098:7): [True: 0, False: 363k]
  ------------------
 1099|      0|      !(hTp->flags & TPDEC_SYNCOK);
  ------------------
  |  |  173|      0|#define TPDEC_SYNCOK 1
  ------------------
  |  Branch (1099:7): [True: 0, False: 0]
  ------------------
 1100|       |
 1101|       |  /* Set transport specific sync parameters */
 1102|   363k|  switch (hTp->transportFmt) {
 1103|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (1103:5): [True: 0, False: 363k]
  ------------------
 1104|      0|      syncWord = ADTS_SYNCWORD;
  ------------------
  |  |  108|      0|#define ADTS_SYNCWORD (0xfff)
  ------------------
 1105|      0|      syncLength = ADTS_SYNCLENGTH;
  ------------------
  |  |  109|      0|#define ADTS_SYNCLENGTH (12)         /* in bits */
  ------------------
 1106|      0|      break;
 1107|   363k|    case TT_MP4_LOAS:
  ------------------
  |  Branch (1107:5): [True: 363k, False: 0]
  ------------------
 1108|   363k|      syncWord = 0x2B7;
 1109|   363k|      syncLength = 11;
 1110|   363k|      break;
 1111|      0|    default:
  ------------------
  |  Branch (1111:5): [True: 0, False: 363k]
  ------------------
 1112|      0|      syncWord = 0;
 1113|      0|      syncLength = 0;
 1114|      0|      break;
 1115|   363k|  }
 1116|       |
 1117|   363k|  syncMask = (1 << syncLength) - 1;
 1118|       |
 1119|   955k|  do {
 1120|   955k|    INT bitsAvail = 0;   /* Bits available in bitstream buffer    */
 1121|   955k|    INT checkLengthBits; /* Helper to check remaining bits and buffer boundaries
 1122|       |                          */
 1123|   955k|    UINT synch;          /* Current sync word read from bitstream */
 1124|       |
 1125|   955k|    headerBitsPrevious = headerBits;
 1126|       |
 1127|   955k|    bitsAvail = (INT)FDKgetValidBits(hBs);
 1128|       |
 1129|   955k|    if (hTp->numberOfRawDataBlocks == 0) {
  ------------------
  |  Branch (1129:9): [True: 699k, False: 255k]
  ------------------
 1130|       |      /* search synchword */
 1131|       |
 1132|   699k|      FDK_ASSERT((bitsAvail % TPDEC_SYNCSKIP) == 0);
  ------------------
  |  |  221|   699k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1132:7): [True: 699k, False: 0]
  ------------------
 1133|       |
 1134|   699k|      if ((bitsAvail - syncLength) < TPDEC_SYNCSKIP) {
  ------------------
  |  | 1063|   699k|#define TPDEC_SYNCSKIP 8
  ------------------
  |  Branch (1134:11): [True: 3.39k, False: 696k]
  ------------------
 1135|  3.39k|        err = TRANSPORTDEC_NOT_ENOUGH_BITS;
 1136|  3.39k|        headerBits = 0;
 1137|   696k|      } else {
 1138|   696k|        synch = FDKreadBits(hBs, syncLength);
 1139|       |
 1140|   696k|        if (!(hTp->flags & TPDEC_SYNCOK)) {
  ------------------
  |  |  173|   696k|#define TPDEC_SYNCOK 1
  ------------------
  |  Branch (1140:13): [True: 611k, False: 84.2k]
  ------------------
 1141|  22.2M|          for (; (bitsAvail - syncLength) >= TPDEC_SYNCSKIP;
  ------------------
  |  | 1063|  22.2M|#define TPDEC_SYNCSKIP 8
  ------------------
  |  Branch (1141:18): [True: 22.2M, False: 3.23k]
  ------------------
 1142|  22.2M|               bitsAvail -= TPDEC_SYNCSKIP) {
  ------------------
  |  | 1063|  21.6M|#define TPDEC_SYNCSKIP 8
  ------------------
 1143|  22.2M|            if (synch == syncWord) {
  ------------------
  |  Branch (1143:17): [True: 608k, False: 21.6M]
  ------------------
 1144|   608k|              break;
 1145|   608k|            }
 1146|  21.6M|            synch = ((synch << TPDEC_SYNCSKIP) & syncMask) |
  ------------------
  |  | 1063|  21.6M|#define TPDEC_SYNCSKIP 8
  ------------------
 1147|  21.6M|                    FDKreadBits(hBs, TPDEC_SYNCSKIP);
  ------------------
  |  | 1063|  21.6M|#define TPDEC_SYNCSKIP 8
  ------------------
 1148|  21.6M|          }
 1149|   611k|        }
 1150|   696k|        if (synch != syncWord) {
  ------------------
  |  Branch (1150:13): [True: 6.06k, False: 690k]
  ------------------
 1151|       |          /* No correct syncword found. */
 1152|  6.06k|          err = TRANSPORTDEC_SYNC_ERROR;
 1153|   690k|        } else {
 1154|   690k|          err = TRANSPORTDEC_OK;
 1155|   690k|        }
 1156|   696k|        headerBits = syncLength;
 1157|   696k|      }
 1158|   699k|    } else {
 1159|   255k|      headerBits = 0;
 1160|   255k|    }
 1161|       |
 1162|       |    /* Save previous raw data block data */
 1163|   955k|    rawDataBlockLengthPrevious = rawDataBlockLength;
 1164|   955k|    numRawDataBlocksPrevious = hTp->numberOfRawDataBlocks;
 1165|       |
 1166|       |    /* Parse transport header (raw data block granularity) */
 1167|       |
 1168|   955k|    if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1168:9): [True: 945k, False: 9.45k]
  ------------------
 1169|   945k|      err = transportDec_readHeader(hTp, hBs, syncLength, ignoreBufferFullness,
 1170|   945k|                                    &rawDataBlockLength, &fTraverseMoreFrames,
 1171|   945k|                                    &syncLayerFrameBits, &fConfigFound,
 1172|   945k|                                    &headerBits);
 1173|   945k|      if (headerBits > bitsAvail) {
  ------------------
  |  Branch (1173:11): [True: 23.2k, False: 922k]
  ------------------
 1174|  23.2k|        err = (headerBits < (INT)hBs->hBitBuf.bufBits)
  ------------------
  |  Branch (1174:15): [True: 3.48k, False: 19.7k]
  ------------------
 1175|  23.2k|                  ? TRANSPORTDEC_NOT_ENOUGH_BITS
 1176|  23.2k|                  : TRANSPORTDEC_SYNC_ERROR;
 1177|  23.2k|      }
 1178|   945k|      if (TPDEC_IS_FATAL_ERROR(err)) {
  ------------------
  |  |  151|   945k|  (((err >= tpdec_fatal_error_start) && (err <= tpdec_fatal_error_end)) ? 1 : 0)
  |  |  ------------------
  |  |  |  Branch (151:3): [True: 0, False: 945k]
  |  |  |  Branch (151:5): [True: 0, False: 945k]
  |  |  |  Branch (151:41): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1179|       |        /* Rewind - TPDEC_SYNCSKIP, in order to look for a synch one bit ahead
 1180|       |         * next time. Ensure that the bit amount lands at a multiple of
 1181|       |         * TPDEC_SYNCSKIP. */
 1182|      0|        FDKpushBiDirectional(
 1183|      0|            hBs, -headerBits + TPDEC_SYNCSKIP + (bitsAvail % TPDEC_SYNCSKIP));
  ------------------
  |  | 1063|      0|#define TPDEC_SYNCSKIP 8
  ------------------
                          hBs, -headerBits + TPDEC_SYNCSKIP + (bitsAvail % TPDEC_SYNCSKIP));
  ------------------
  |  | 1063|      0|#define TPDEC_SYNCSKIP 8
  ------------------
 1184|       |
 1185|      0|        goto bail;
 1186|      0|      }
 1187|   945k|    }
 1188|       |
 1189|   955k|    bitsAvail -= headerBits;
 1190|       |
 1191|   955k|    checkLengthBits = syncLayerFrameBits;
 1192|       |
 1193|       |    /* Check if the whole frame would fit the bitstream buffer */
 1194|   955k|    if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1194:9): [True: 349k, False: 605k]
  ------------------
 1195|   349k|      if ((checkLengthBits + headerBits) > (((8192 * 4) << 3) - 7)) {
  ------------------
  |  Branch (1195:11): [True: 0, False: 349k]
  ------------------
 1196|       |        /* We assume that the size of the transport bit buffer has been
 1197|       |           chosen to meet all system requirements, thus this condition
 1198|       |           is considered a synchronisation error. */
 1199|      0|        err = TRANSPORTDEC_SYNC_ERROR;
 1200|   349k|      } else {
 1201|   349k|        if (bitsAvail < checkLengthBits) {
  ------------------
  |  Branch (1201:13): [True: 228, False: 349k]
  ------------------
 1202|    228|          err = TRANSPORTDEC_NOT_ENOUGH_BITS;
 1203|    228|        }
 1204|   349k|      }
 1205|   349k|    }
 1206|       |
 1207|   955k|    if (err == TRANSPORTDEC_NOT_ENOUGH_BITS) {
  ------------------
  |  Branch (1207:9): [True: 7.39k, False: 947k]
  ------------------
 1208|  7.39k|      break;
 1209|  7.39k|    }
 1210|       |
 1211|   947k|    if (err == TRANSPORTDEC_SYNC_ERROR) {
  ------------------
  |  Branch (1211:9): [True: 598k, False: 349k]
  ------------------
 1212|   598k|      int bits;
 1213|       |
 1214|       |      /* Enforce re-sync of transport headers. */
 1215|   598k|      hTp->numberOfRawDataBlocks = 0;
 1216|       |
 1217|       |      /* Ensure that the bit amount lands at a multiple of TPDEC_SYNCSKIP */
 1218|   598k|      bits = (bitsAvail + headerBits) % TPDEC_SYNCSKIP;
  ------------------
  |  | 1063|   598k|#define TPDEC_SYNCSKIP 8
  ------------------
 1219|       |      /* Rewind - TPDEC_SYNCSKIP, in order to look for a synch one bit ahead
 1220|       |       * next time. */
 1221|   598k|      FDKpushBiDirectional(hBs, -(headerBits - TPDEC_SYNCSKIP) + bits);
  ------------------
  |  | 1063|   598k|#define TPDEC_SYNCSKIP 8
  ------------------
 1222|   598k|      headerBits = 0;
 1223|   598k|    }
 1224|       |
 1225|       |    /* Frame traversal */
 1226|   947k|    if (fTraverseMoreFrames) {
  ------------------
  |  Branch (1226:9): [True: 0, False: 947k]
  ------------------
 1227|       |      /* Save parser context for early config discovery "rewind all frames" */
 1228|      0|      if ((hTp->flags & TPDEC_EARLY_CONFIG) &&
  ------------------
  |  |  176|      0|#define TPDEC_EARLY_CONFIG 8
  ------------------
  |  Branch (1228:11): [True: 0, False: 0]
  ------------------
 1229|      0|          !(hTp->flags & TPDEC_MINIMIZE_DELAY)) {
  ------------------
  |  |  174|      0|#define TPDEC_MINIMIZE_DELAY 2
  ------------------
  |  Branch (1229:11): [True: 0, False: 0]
  ------------------
 1230|       |        /* ignore buffer fullness if just traversing additional frames for ECD
 1231|       |         */
 1232|      0|        ignoreBufferFullness = 1;
 1233|       |
 1234|       |        /* Save context in order to return later */
 1235|      0|        if (err == TRANSPORTDEC_OK && startPosFirstFrame == -1) {
  ------------------
  |  Branch (1235:13): [True: 0, False: 0]
  |  Branch (1235:39): [True: 0, False: 0]
  ------------------
 1236|      0|          startPosFirstFrame = FDKgetValidBits(hBs);
 1237|      0|          numRawDataBlocksFirstFrame = hTp->numberOfRawDataBlocks;
 1238|      0|          globalFramePosFirstFrame = hTp->globalFramePos;
 1239|      0|          rawDataBlockLengthFirstFrame = rawDataBlockLength;
 1240|      0|          headerBitsFirstFrame = headerBits;
 1241|      0|          errFirstFrame = err;
 1242|      0|          FDKmemcpy(contextFirstFrame, &hTp->parser,
 1243|      0|                    sizeof(transportdec_parser_t));
 1244|      0|        }
 1245|       |
 1246|       |        /* Break when config was found or it is not possible anymore to find a
 1247|       |         * config */
 1248|      0|        if (startPosFirstFrame != -1 &&
  ------------------
  |  Branch (1248:13): [True: 0, False: 0]
  ------------------
 1249|      0|            (fConfigFound || err != TRANSPORTDEC_OK)) {
  ------------------
  |  Branch (1249:14): [True: 0, False: 0]
  |  Branch (1249:30): [True: 0, False: 0]
  ------------------
 1250|       |          /* In case of ECD and sync error, do not rewind anywhere. */
 1251|      0|          if (err == TRANSPORTDEC_SYNC_ERROR) {
  ------------------
  |  Branch (1251:15): [True: 0, False: 0]
  ------------------
 1252|      0|            startPosFirstFrame = -1;
 1253|      0|            fConfigFound = 0;
 1254|      0|            numFramesTraversed = 0;
 1255|      0|          }
 1256|      0|          break;
 1257|      0|        }
 1258|      0|      }
 1259|       |
 1260|      0|      if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1260:11): [True: 0, False: 0]
  ------------------
 1261|      0|        FDKpushFor(hBs, rawDataBlockLength);
 1262|      0|        numFramesTraversed++;
 1263|      0|        endTpFrameBitsPrevious = (INT)FDKgetValidBits(hBs);
 1264|       |        /* Ignore error here itentionally. */
 1265|      0|        transportDec_AdjustEndOfAccessUnit(hTp);
 1266|      0|        endTpFrameBitsPrevious -= FDKgetValidBits(hBs);
 1267|      0|      }
 1268|      0|    }
 1269|   947k|  } while (fTraverseMoreFrames ||
  ------------------
  |  Branch (1269:12): [True: 0, False: 947k]
  ------------------
 1270|   947k|           (err == TRANSPORTDEC_SYNC_ERROR && !(hTp->flags & TPDEC_SYNCOK)));
  ------------------
  |  |  173|   598k|#define TPDEC_SYNCOK 1
  ------------------
  |  Branch (1270:13): [True: 598k, False: 349k]
  |  Branch (1270:47): [True: 592k, False: 6.38k]
  ------------------
 1271|       |
 1272|       |  /* Restore context in case of ECD frame traversal */
 1273|   363k|  if (startPosFirstFrame != -1 && (fConfigFound || err != TRANSPORTDEC_OK)) {
  ------------------
  |  Branch (1273:7): [True: 0, False: 363k]
  |  Branch (1273:36): [True: 0, False: 0]
  |  Branch (1273:52): [True: 0, False: 0]
  ------------------
 1274|      0|    FDKpushBiDirectional(hBs, FDKgetValidBits(hBs) - startPosFirstFrame);
 1275|      0|    FDKmemcpy(&hTp->parser, contextFirstFrame, sizeof(transportdec_parser_t));
 1276|      0|    hTp->numberOfRawDataBlocks = numRawDataBlocksFirstFrame;
 1277|      0|    hTp->globalFramePos = globalFramePosFirstFrame;
 1278|      0|    rawDataBlockLength = rawDataBlockLengthFirstFrame;
 1279|      0|    headerBits = headerBitsFirstFrame;
 1280|      0|    err = errFirstFrame;
 1281|      0|    numFramesTraversed = 0;
 1282|      0|  }
 1283|       |
 1284|       |  /* Additional burst data mode buffer fullness check. */
 1285|   363k|  if (!(hTp->flags & (TPDEC_LOST_FRAMES_PENDING | TPDEC_IGNORE_BUFFERFULLNESS |
  ------------------
  |  |  177|   363k|#define TPDEC_LOST_FRAMES_PENDING 16
  ------------------
                if (!(hTp->flags & (TPDEC_LOST_FRAMES_PENDING | TPDEC_IGNORE_BUFFERFULLNESS |
  ------------------
  |  |  175|   363k|#define TPDEC_IGNORE_BUFFERFULLNESS 4
  ------------------
  |  Branch (1285:7): [True: 22.8k, False: 340k]
  ------------------
 1286|   363k|                      TPDEC_SYNCOK)) &&
  ------------------
  |  |  173|   363k|#define TPDEC_SYNCOK 1
  ------------------
 1287|  22.8k|      err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1287:7): [True: 15.8k, False: 6.94k]
  ------------------
 1288|  15.8k|    err =
 1289|  15.8k|        additionalHoldOffNeeded(hTp, transportDec_GetBufferFullness(hTp),
 1290|  15.8k|                                (INT)FDKgetValidBits(hBs) - syncLayerFrameBits);
 1291|  15.8k|    if (err == TRANSPORTDEC_NOT_ENOUGH_BITS) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 15.8k]
  ------------------
 1292|      0|      hTp->holdOffFrames++;
 1293|      0|    }
 1294|  15.8k|  }
 1295|       |
 1296|       |  /* Rewind for retry because of not enough bits */
 1297|   363k|  if (err == TRANSPORTDEC_NOT_ENOUGH_BITS) {
  ------------------
  |  Branch (1297:7): [True: 7.39k, False: 355k]
  ------------------
 1298|  7.39k|    FDKpushBack(hBs, headerBits);
 1299|  7.39k|    hTp->numberOfRawDataBlocks = numRawDataBlocksPrevious;
 1300|  7.39k|    headerBits = 0;
 1301|  7.39k|    rawDataBlockLength = rawDataBlockLengthPrevious;
 1302|   355k|  } else {
 1303|       |    /* reset hold off frame counter */
 1304|   355k|    hTp->holdOffFrames = 0;
 1305|   355k|  }
 1306|       |
 1307|       |  /* Return to last good frame in case of frame traversal but not ECD. */
 1308|   363k|  if (numFramesTraversed > 0) {
  ------------------
  |  Branch (1308:7): [True: 0, False: 363k]
  ------------------
 1309|      0|    FDKpushBack(hBs, rawDataBlockLengthPrevious + endTpFrameBitsPrevious);
 1310|      0|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1310:9): [True: 0, False: 0]
  ------------------
 1311|      0|      hTp->numberOfRawDataBlocks = numRawDataBlocksPrevious;
 1312|      0|      headerBits = headerBitsPrevious;
 1313|      0|      rawDataBlockLength = rawDataBlockLengthPrevious;
 1314|      0|    }
 1315|      0|    err = TRANSPORTDEC_OK;
 1316|      0|  }
 1317|       |
 1318|   363k|bail:
 1319|   363k|  hTp->auLength[0] = rawDataBlockLength;
 1320|       |
 1321|       |  /* Detect pointless TRANSPORTDEC_NOT_ENOUGH_BITS error case, where the bit
 1322|       |     buffer is already full, or no new burst packet fits. Recover by advancing
 1323|       |     the bit buffer. */
 1324|   363k|  if ((totalBits > 0) && (TRANSPORTDEC_NOT_ENOUGH_BITS == err) &&
  ------------------
  |  Branch (1324:7): [True: 363k, False: 258]
  |  Branch (1324:26): [True: 7.39k, False: 355k]
  ------------------
 1325|  7.39k|      (FDKgetValidBits(hBs) >=
  ------------------
  |  Branch (1325:7): [True: 0, False: 7.39k]
  ------------------
 1326|  7.39k|       (((8192 * 4) * 8 - ((hTp->avgBitRate * hTp->burstPeriod) / 1000)) -
 1327|  7.39k|        7))) {
 1328|      0|    FDKpushFor(hBs, TPDEC_SYNCSKIP);
  ------------------
  |  | 1063|      0|#define TPDEC_SYNCSKIP 8
  ------------------
 1329|      0|    err = TRANSPORTDEC_SYNC_ERROR;
 1330|      0|  }
 1331|       |
 1332|   363k|  if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1332:7): [True: 349k, False: 14.0k]
  ------------------
 1333|   349k|    hTp->flags |= TPDEC_SYNCOK;
  ------------------
  |  |  173|   349k|#define TPDEC_SYNCOK 1
  ------------------
 1334|   349k|  }
 1335|       |
 1336|   363k|  if (fConfigFound) {
  ------------------
  |  Branch (1336:7): [True: 356k, False: 6.42k]
  ------------------
 1337|   356k|    hTp->flags |= TPDEC_CONFIG_FOUND;
  ------------------
  |  |  178|   356k|#define TPDEC_CONFIG_FOUND 32
  ------------------
 1338|   356k|  }
 1339|       |
 1340|   363k|  if (pHeaderBits != NULL) {
  ------------------
  |  Branch (1340:7): [True: 363k, False: 0]
  ------------------
 1341|   363k|    *pHeaderBits = headerBits;
 1342|   363k|  }
 1343|       |
 1344|   363k|  if (err == TRANSPORTDEC_SYNC_ERROR) {
  ------------------
  |  Branch (1344:7): [True: 6.38k, False: 356k]
  ------------------
 1345|  6.38k|    hTp->flags &= ~TPDEC_SYNCOK;
  ------------------
  |  |  173|  6.38k|#define TPDEC_SYNCOK 1
  ------------------
 1346|  6.38k|  }
 1347|       |
 1348|   363k|  C_ALLOC_SCRATCH_END(contextFirstFrame, transportdec_parser_t, 1);
 1349|       |
 1350|   363k|  return err;
 1351|   363k|}
tpdec_lib.cpp:_ZL23additionalHoldOffNeededP12TRANSPORTDECii:
  822|  15.8k|                                                  INT bitsAvail) {
  823|  15.8k|  INT checkLengthBits, avgBitsPerFrame;
  824|  15.8k|  INT maxAU; /* maximum number of frames per Master Frame */
  825|  15.8k|  INT samplesPerFrame = hTp->asc->m_samplesPerFrame;
  826|  15.8k|  INT samplingFrequency = (INT)hTp->asc->m_samplingFrequency;
  827|       |
  828|  15.8k|  if ((hTp->avgBitRate == 0) || (hTp->burstPeriod == 0)) {
  ------------------
  |  Branch (828:7): [True: 15.8k, False: 0]
  |  Branch (828:33): [True: 0, False: 0]
  ------------------
  829|  15.8k|    return TRANSPORTDEC_OK;
  830|  15.8k|  }
  831|      0|  if ((samplesPerFrame == 0) || (samplingFrequency == 0)) {
  ------------------
  |  Branch (831:7): [True: 0, False: 0]
  |  Branch (831:33): [True: 0, False: 0]
  ------------------
  832|      0|    return TRANSPORTDEC_NOT_ENOUGH_BITS;
  833|      0|  }
  834|       |
  835|       |  /* One Master Frame is sent every hTp->burstPeriod ms */
  836|      0|  maxAU = hTp->burstPeriod * samplingFrequency + (samplesPerFrame * 1000 - 1);
  837|      0|  maxAU = maxAU / (samplesPerFrame * 1000);
  838|       |  /* Subtract number of frames which were already held off. */
  839|      0|  maxAU -= hTp->holdOffFrames;
  840|       |
  841|      0|  avgBitsPerFrame = hTp->avgBitRate * samplesPerFrame + (samplingFrequency - 1);
  842|      0|  avgBitsPerFrame = avgBitsPerFrame / samplingFrequency;
  843|       |
  844|       |  /* Consider worst case of bufferFullness quantization. */
  845|      0|  switch (hTp->transportFmt) {
  846|      0|    case TT_MP4_ADIF:
  ------------------
  |  Branch (846:5): [True: 0, False: 0]
  ------------------
  847|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (847:5): [True: 0, False: 0]
  ------------------
  848|      0|    case TT_MP4_LOAS:
  ------------------
  |  Branch (848:5): [True: 0, False: 0]
  ------------------
  849|      0|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (849:5): [True: 0, False: 0]
  ------------------
  850|      0|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (850:5): [True: 0, False: 0]
  ------------------
  851|      0|      bufferFullness += 31;
  852|      0|      break;
  853|      0|    default: /* added to avoid compiler warning */
  ------------------
  |  Branch (853:5): [True: 0, False: 0]
  ------------------
  854|      0|      break; /* added to avoid compiler warning */
  855|      0|  }
  856|       |
  857|      0|  checkLengthBits = bufferFullness + (maxAU - 1) * avgBitsPerFrame;
  858|       |
  859|       |  /* Check if buffer is big enough to fullfill buffer fullness condition */
  860|      0|  if ((checkLengthBits /*+headerBits*/) > (((8192 * 4) << 3) - 7)) {
  ------------------
  |  Branch (860:7): [True: 0, False: 0]
  ------------------
  861|      0|    return TRANSPORTDEC_SYNC_ERROR;
  862|      0|  }
  863|       |
  864|      0|  if (bitsAvail < checkLengthBits) {
  ------------------
  |  Branch (864:7): [True: 0, False: 0]
  ------------------
  865|      0|    return TRANSPORTDEC_NOT_ENOUGH_BITS;
  866|      0|  } else {
  867|      0|    return TRANSPORTDEC_OK;
  868|      0|  }
  869|      0|}
tpdec_lib.cpp:_ZL34transportDec_AdjustEndOfAccessUnitP12TRANSPORTDEC:
  728|   349k|    HANDLE_TRANSPORTDEC hTp) {
  729|   349k|  HANDLE_FDK_BITSTREAM hBs = &hTp->bitStream[0];
  730|   349k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
  731|       |
  732|   349k|  switch (hTp->transportFmt) {
  733|      0|    case TT_MP4_ADIF:
  ------------------
  |  Branch (733:5): [True: 0, False: 349k]
  ------------------
  734|       |      /* Do byte align at the end of raw_data_block() because UsacFrame() is not
  735|       |       * byte aligned. */
  736|      0|      FDKbyteAlign(hBs, hTp->accessUnitAnchor[0]);
  737|      0|      break;
  738|   349k|    case TT_MP4_LOAS:
  ------------------
  |  Branch (738:5): [True: 349k, False: 0]
  ------------------
  739|   349k|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (739:5): [True: 0, False: 349k]
  ------------------
  740|   349k|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (740:5): [True: 0, False: 349k]
  ------------------
  741|   349k|      if (hTp->numberOfRawDataBlocks == 0) {
  ------------------
  |  Branch (741:11): [True: 91.1k, False: 258k]
  ------------------
  742|       |        /* Do byte align at the end of AudioMuxElement. */
  743|  91.1k|        FDKbyteAlign(hBs, hTp->globalFramePos);
  744|       |
  745|       |        /* Check global frame length */
  746|  91.1k|        if (hTp->transportFmt == TT_MP4_LOAS &&
  ------------------
  |  Branch (746:13): [True: 91.1k, False: 0]
  ------------------
  747|  91.1k|            hTp->parser.latm.m_audioMuxLengthBytes > 0) {
  ------------------
  |  Branch (747:13): [True: 91.1k, False: 0]
  ------------------
  748|  91.1k|          int loasOffset;
  749|       |
  750|  91.1k|          loasOffset = ((INT)hTp->parser.latm.m_audioMuxLengthBytes * 8 +
  751|  91.1k|                        (INT)FDKgetValidBits(hBs)) -
  752|  91.1k|                       (INT)hTp->globalFramePos;
  753|  91.1k|          if (loasOffset != 0) {
  ------------------
  |  Branch (753:15): [True: 90.5k, False: 634]
  ------------------
  754|  90.5k|            FDKpushBiDirectional(hBs, loasOffset);
  755|       |            /* For ELD and other payloads there is an unknown amount of padding,
  756|       |               so ignore unread bits, but throw an error only if too many bits
  757|       |               where read. */
  758|  90.5k|            if (loasOffset < 0) {
  ------------------
  |  Branch (758:17): [True: 90.4k, False: 82]
  ------------------
  759|  90.4k|              err = TRANSPORTDEC_PARSE_ERROR;
  760|  90.4k|            }
  761|  90.5k|          }
  762|  91.1k|        }
  763|  91.1k|      }
  764|   349k|      break;
  765|       |
  766|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (766:5): [True: 0, False: 349k]
  ------------------
  767|      0|      if (hTp->parser.adts.bs.protection_absent == 0) {
  ------------------
  |  Branch (767:11): [True: 0, False: 0]
  ------------------
  768|      0|        int offset;
  769|       |
  770|       |        /* Calculate offset to end of AU */
  771|      0|        offset = hTp->parser.adts
  772|      0|                     .rawDataBlockDist[hTp->parser.adts.bs.num_raw_blocks -
  773|      0|                                       hTp->numberOfRawDataBlocks]
  774|      0|                 << 3;
  775|       |        /* CAUTION: The PCE (if available) is declared to be a part of the
  776|       |         * header! */
  777|      0|        offset -= (INT)hTp->accessUnitAnchor[0] - (INT)FDKgetValidBits(hBs) +
  778|      0|                  16 + hTp->parser.adts.bs.num_pce_bits;
  779|      0|        FDKpushBiDirectional(hBs, offset);
  780|      0|      }
  781|      0|      if (hTp->parser.adts.bs.num_raw_blocks > 0 &&
  ------------------
  |  Branch (781:11): [True: 0, False: 0]
  ------------------
  782|      0|          hTp->parser.adts.bs.protection_absent == 0) {
  ------------------
  |  Branch (782:11): [True: 0, False: 0]
  ------------------
  783|       |        /* Note this CRC read currently happens twice because of
  784|       |         * transportDec_CrcCheck() */
  785|      0|        hTp->parser.adts.crcReadValue = FDKreadBits(hBs, 16);
  786|      0|      }
  787|      0|      if (hTp->numberOfRawDataBlocks == 0) {
  ------------------
  |  Branch (787:11): [True: 0, False: 0]
  ------------------
  788|       |        /* Check global frame length */
  789|      0|        if (hTp->parser.adts.bs.protection_absent == 0) {
  ------------------
  |  Branch (789:13): [True: 0, False: 0]
  ------------------
  790|      0|          int offset;
  791|       |
  792|      0|          offset = (hTp->parser.adts.bs.frame_length * 8 - ADTS_SYNCLENGTH +
  ------------------
  |  |  109|      0|#define ADTS_SYNCLENGTH (12)         /* in bits */
  ------------------
  793|      0|                    (INT)FDKgetValidBits(hBs)) -
  794|      0|                   (INT)hTp->globalFramePos;
  795|      0|          if (offset != 0) {
  ------------------
  |  Branch (795:15): [True: 0, False: 0]
  ------------------
  796|      0|            FDKpushBiDirectional(hBs, offset);
  797|      0|          }
  798|      0|        }
  799|      0|      }
  800|      0|      break;
  801|       |
  802|      0|    default:
  ------------------
  |  Branch (802:5): [True: 0, False: 349k]
  ------------------
  803|      0|      break;
  804|   349k|  }
  805|       |
  806|   349k|  return err;
  807|   349k|}

_Z17pcmLimiter_Createjjijj:
  114|  21.8k|                               UINT maxSampleRate) {
  115|  21.8k|  TDLimiterPtr limiter = NULL;
  116|  21.8k|  unsigned int attack, release;
  117|  21.8k|  FIXP_DBL attackConst, releaseConst, exponent;
  118|  21.8k|  INT e_ans;
  119|       |
  120|       |  /* calc attack and release time in samples */
  121|  21.8k|  attack = (unsigned int)(maxAttackMs * maxSampleRate / 1000);
  122|  21.8k|  release = (unsigned int)(releaseMs * maxSampleRate / 1000);
  123|       |
  124|       |  /* alloc limiter struct */
  125|  21.8k|  limiter = (TDLimiterPtr)FDKcalloc(1, sizeof(struct TDLimiter));
  126|  21.8k|  if (!limiter) return NULL;
  ------------------
  |  Branch (126:7): [True: 0, False: 21.8k]
  ------------------
  127|       |
  128|       |  /* alloc max and delay buffers */
  129|  21.8k|  limiter->maxBuf = (FIXP_DBL*)FDKcalloc(attack + 1, sizeof(FIXP_DBL));
  130|  21.8k|  limiter->delayBuf =
  131|  21.8k|      (FIXP_DBL*)FDKcalloc(attack * maxChannels, sizeof(FIXP_DBL));
  132|       |
  133|  21.8k|  if (!limiter->maxBuf || !limiter->delayBuf) {
  ------------------
  |  Branch (133:7): [True: 0, False: 21.8k]
  |  Branch (133:27): [True: 0, False: 21.8k]
  ------------------
  134|      0|    pcmLimiter_Destroy(limiter);
  135|      0|    return NULL;
  136|      0|  }
  137|       |
  138|       |  /* attackConst = pow(0.1, 1.0 / (attack + 1)) */
  139|  21.8k|  exponent = invFixp(attack + 1);
  140|  21.8k|  attackConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|  attackConst = scaleValue(attackConst, e_ans);
  142|       |
  143|       |  /* releaseConst  = (float)pow(0.1, 1.0 / (release + 1)) */
  144|  21.8k|  exponent = invFixp(release + 1);
  145|  21.8k|  releaseConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|  releaseConst = scaleValue(releaseConst, e_ans);
  147|       |
  148|       |  /* init parameters */
  149|  21.8k|  limiter->attackMs = maxAttackMs;
  150|  21.8k|  limiter->maxAttackMs = maxAttackMs;
  151|  21.8k|  limiter->releaseMs = releaseMs;
  152|  21.8k|  limiter->attack = attack;
  153|  21.8k|  limiter->attackConst = attackConst;
  154|  21.8k|  limiter->releaseConst = releaseConst;
  155|  21.8k|  limiter->threshold = threshold;
  156|  21.8k|  limiter->channels = maxChannels;
  157|  21.8k|  limiter->maxChannels = maxChannels;
  158|  21.8k|  limiter->sampleRate = maxSampleRate;
  159|  21.8k|  limiter->maxSampleRate = maxSampleRate;
  160|       |
  161|  21.8k|  pcmLimiter_Reset(limiter);
  162|       |
  163|  21.8k|  return limiter;
  164|  21.8k|}
_Z16pcmLimiter_ApplyP9TDLimiterPiPsS1_ij:
  169|   263k|                                 const INT scaling, const UINT nSamples) {
  170|   263k|  unsigned int i, j;
  171|   263k|  FIXP_DBL tmp2;
  172|   263k|  FIXP_DBL tmp, old, gain, additionalGain = 0;
  173|   263k|  FIXP_DBL minGain = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|   263k|  (FIXP_DBL)(                                                                \
  |  |  193|   263k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 263k, Folded]
  |  |  ------------------
  |  |  194|   263k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   263k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   263k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 263k]
  |  |  ------------------
  |  |  195|   263k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   263k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   263k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   263k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   263k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   263k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   263k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|   263k|  UINT additionalGainAvailable = 1;
  175|       |
  176|   263k|  if (limiter == NULL) return TDLIMIT_INVALID_HANDLE;
  ------------------
  |  Branch (176:7): [True: 0, False: 263k]
  ------------------
  177|       |
  178|   263k|  {
  179|   263k|    unsigned int channels = limiter->channels;
  180|   263k|    unsigned int attack = limiter->attack;
  181|   263k|    FIXP_DBL attackConst = limiter->attackConst;
  182|   263k|    FIXP_DBL releaseConst = limiter->releaseConst;
  183|   263k|    FIXP_DBL threshold = limiter->threshold >> scaling;
  184|       |
  185|   263k|    FIXP_DBL max = limiter->max;
  186|   263k|    FIXP_DBL* maxBuf = limiter->maxBuf;
  187|   263k|    unsigned int maxBufIdx = limiter->maxBufIdx;
  188|   263k|    FIXP_DBL cor = limiter->cor;
  189|   263k|    FIXP_DBL* delayBuf = limiter->delayBuf;
  190|   263k|    unsigned int delayBufIdx = limiter->delayBufIdx;
  191|       |
  192|   263k|    FIXP_DBL smoothState0 = limiter->smoothState0;
  193|       |
  194|   263k|    if (limiter->scaling != scaling) {
  ------------------
  |  Branch (194:9): [True: 10.7k, False: 253k]
  ------------------
  195|  10.7k|      scaleValuesSaturate(delayBuf, attack * channels,
  196|  10.7k|                          limiter->scaling - scaling);
  197|  10.7k|      scaleValuesSaturate(maxBuf, attack + 1, limiter->scaling - scaling);
  198|  10.7k|      max = scaleValueSaturate(max, limiter->scaling - scaling);
  199|  10.7k|      limiter->scaling = scaling;
  200|  10.7k|    }
  201|       |
  202|   263k|    if (pGainPerSample == NULL) {
  ------------------
  |  Branch (202:9): [True: 253k, False: 10.2k]
  ------------------
  203|   253k|      additionalGainAvailable = 0;
  204|   253k|    }
  205|       |
  206|   532M|    for (i = 0; i < nSamples; i++) {
  ------------------
  |  Branch (206:17): [True: 532M, False: 263k]
  ------------------
  207|       |      /* get maximum absolute sample value of all channels, including the
  208|       |       * additional gain. */
  209|   532M|      tmp = (FIXP_DBL)0;
  210|  1.51G|      for (j = 0; j < channels; j++) {
  ------------------
  |  Branch (210:19): [True: 977M, False: 532M]
  ------------------
  211|   977M|        tmp2 = PCM_LIM2FIXP_DBL(samplesIn[j]);
  ------------------
  |  |  149|   977M|#define PCM_LIM2FIXP_DBL(x) (x)
  ------------------
  212|   977M|        tmp2 =
  213|   977M|            (tmp2 == (FIXP_DBL)MINVAL_DBL) ? (FIXP_DBL)MAXVAL_DBL : fAbs(tmp2);
  ------------------
  |  |  158|   977M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
                          (tmp2 == (FIXP_DBL)MINVAL_DBL) ? (FIXP_DBL)MAXVAL_DBL : fAbs(tmp2);
  ------------------
  |  |  156|  13.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (213:13): [True: 13.8k, False: 977M]
  ------------------
  214|   977M|        tmp = fMax(tmp, tmp2);
  215|   977M|      }
  216|       |
  217|   532M|      if (additionalGainAvailable) {
  ------------------
  |  Branch (217:11): [True: 18.1M, False: 514M]
  ------------------
  218|  18.1M|        additionalGain = pGainPerSample[i];
  219|  18.1M|        tmp = fMult(tmp, additionalGain);
  220|  18.1M|      }
  221|       |
  222|       |      /* set threshold as lower border to save calculations in running maximum
  223|       |       * algorithm */
  224|   532M|      tmp = fMax(tmp, threshold);
  225|       |
  226|       |      /* running maximum */
  227|   532M|      old = maxBuf[maxBufIdx];
  228|   532M|      maxBuf[maxBufIdx] = tmp;
  229|       |
  230|   532M|      if (tmp >= max) {
  ------------------
  |  Branch (230:11): [True: 356M, False: 175M]
  ------------------
  231|       |        /* new sample is greater than old maximum, so it is the new maximum */
  232|   356M|        max = tmp;
  233|   356M|      } else if (old < max) {
  ------------------
  |  Branch (233:18): [True: 166M, False: 9.24M]
  ------------------
  234|       |        /* maximum does not change, as the sample, which has left the window was
  235|       |           not the maximum */
  236|   166M|      } else {
  237|       |        /* the old maximum has left the window, we have to search the complete
  238|       |           buffer for the new max */
  239|  9.24M|        max = maxBuf[0];
  240|  1.69G|        for (j = 1; j <= attack; j++) {
  ------------------
  |  Branch (240:21): [True: 1.68G, False: 9.24M]
  ------------------
  241|  1.68G|          max = fMax(max, maxBuf[j]);
  242|  1.68G|        }
  243|  9.24M|      }
  244|   532M|      maxBufIdx++;
  245|   532M|      if (maxBufIdx >= attack + 1) maxBufIdx = 0;
  ------------------
  |  Branch (245:11): [True: 4.17M, False: 528M]
  ------------------
  246|       |
  247|       |      /* calc gain */
  248|       |      /* gain is downscaled by one, so that gain = 1.0 can be represented */
  249|   532M|      if (max > threshold) {
  ------------------
  |  Branch (249:11): [True: 182M, False: 349M]
  ------------------
  250|   182M|        gain = fDivNorm(threshold, max) >> 1;
  251|   349M|      } else {
  252|   349M|        gain = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|   349M|  (FIXP_DBL)(                                                                \
  |  |  193|   349M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 349M, Folded]
  |  |  ------------------
  |  |  194|   349M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   349M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   349M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 349M]
  |  |  ------------------
  |  |  195|   349M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   349M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   349M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   349M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   349M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   349M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   349M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  253|   349M|      }
  254|       |
  255|       |      /* gain smoothing, method: TDL_EXPONENTIAL */
  256|       |      /* first order IIR filter with attack correction to avoid overshoots */
  257|       |
  258|       |      /* correct the 'aiming' value of the exponential attack to avoid the
  259|       |       * remaining overshoot */
  260|   532M|      if (gain < smoothState0) {
  ------------------
  |  Branch (260:11): [True: 62.9M, False: 469M]
  ------------------
  261|  62.9M|        cor = fMin(cor,
  262|  62.9M|                   fMultDiv2((gain - fMultDiv2(FL2FXCONST_SGL(0.1f * (1 << 1)),
  ------------------
  |  |  180|  62.9M|  (FIXP_SGL)(                                                                \
  |  |  181|  62.9M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 62.9M, Folded]
  |  |  ------------------
  |  |  182|  62.9M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  62.9M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  62.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 62.9M]
  |  |  ------------------
  |  |  183|  62.9M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  62.9M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  62.9M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  62.9M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  62.9M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  62.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  62.9M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  263|  62.9M|                                               smoothState0)),
  264|  62.9M|                             FL2FXCONST_SGL(1.11111111f / (1 << 1)))
  ------------------
  |  |  180|  62.9M|  (FIXP_SGL)(                                                                \
  |  |  181|  62.9M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 62.9M, Folded]
  |  |  ------------------
  |  |  182|  62.9M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  62.9M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  62.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 62.9M]
  |  |  ------------------
  |  |  183|  62.9M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  62.9M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  62.9M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  62.9M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  62.9M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  62.9M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  62.9M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  265|  62.9M|                       << 2);
  266|   469M|      } else {
  267|   469M|        cor = gain;
  268|   469M|      }
  269|       |
  270|       |      /* smoothing filter */
  271|   532M|      if (cor < smoothState0) {
  ------------------
  |  Branch (271:11): [True: 62.9M, False: 469M]
  ------------------
  272|  62.9M|        smoothState0 =
  273|  62.9M|            fMult(attackConst, (smoothState0 - cor)) + cor; /* attack */
  274|  62.9M|        smoothState0 = fMax(smoothState0, gain); /* avoid overshooting target */
  275|   469M|      } else {
  276|       |        /* sign inversion twice to round towards +infinity,
  277|       |           so that gain can converge to 1.0 again,
  278|       |           for bit-identical output when limiter is not active */
  279|   469M|        smoothState0 =
  280|   469M|            -fMult(releaseConst, -(smoothState0 - cor)) + cor; /* release */
  281|   469M|      }
  282|       |
  283|   532M|      gain = smoothState0;
  284|       |
  285|   532M|      FIXP_DBL* p_delayBuf = &delayBuf[delayBufIdx * channels + 0];
  286|   532M|      if (gain < FL2FXCONST_DBL(1.0f / (1 << 1))) {
  ------------------
  |  |  192|   532M|  (FIXP_DBL)(                                                                \
  |  |  193|   532M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 532M, Folded]
  |  |  ------------------
  |  |  194|   532M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   532M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   532M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 532M]
  |  |  ------------------
  |  |  195|   532M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   532M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   532M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   532M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   532M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   532M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   532M|          : ((((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 (286:11): [True: 277M, False: 255M]
  ------------------
  287|   277M|        gain <<= 1;
  288|       |        /* lookahead delay, apply gain */
  289|   824M|        for (j = 0; j < channels; j++) {
  ------------------
  |  Branch (289:21): [True: 547M, False: 277M]
  ------------------
  290|   547M|          tmp = p_delayBuf[j];
  291|       |
  292|   547M|          if (additionalGainAvailable) {
  ------------------
  |  Branch (292:15): [True: 673k, False: 546M]
  ------------------
  293|   673k|            p_delayBuf[j] = fMult((FIXP_PCM_LIM)samplesIn[j], additionalGain);
  294|   546M|          } else {
  295|   546M|            p_delayBuf[j] = PCM_LIM2FIXP_DBL(samplesIn[j]);
  ------------------
  |  |  149|   546M|#define PCM_LIM2FIXP_DBL(x) (x)
  ------------------
  296|   546M|          }
  297|       |
  298|       |          /* Apply gain to delayed signal */
  299|   547M|          tmp = fMultDiv2(tmp, gain);
  300|       |#if (SAMPLE_BITS == DFRACT_BITS)
  301|       |          samplesOut[j] = (INT_PCM)FX_DBL2FX_PCM(
  302|       |              (FIXP_DBL)SATURATE_LEFT_SHIFT(tmp, scaling + 1, DFRACT_BITS));
  303|       |#else
  304|   547M|          samplesOut[j] = (INT_PCM)FX_DBL2FX_PCM((FIXP_DBL)SATURATE_LEFT_SHIFT(
  ------------------
  |  |  129|   547M|#define FX_DBL2FX_PCM(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  220|  2.18G|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   547M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   547M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [True: 5.81k, False: 547M]
  |  |  |  |  |  Branch (220:41): [True: 137k, False: 547M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|   547M|              tmp + ((FIXP_DBL)0x8000 >> (scaling + 1)), scaling + 1,
  306|   547M|              DFRACT_BITS));
  307|   547M|#endif
  308|   547M|        }
  309|   277M|        gain >>= 1;
  310|   277M|      } else {
  311|       |        /* lookahead delay, apply gain=1.0f */
  312|   685M|        for (j = 0; j < channels; j++) {
  ------------------
  |  Branch (312:21): [True: 430M, False: 255M]
  ------------------
  313|   430M|          tmp = p_delayBuf[j];
  314|   430M|          if (additionalGainAvailable) {
  ------------------
  |  Branch (314:15): [True: 36.5M, False: 393M]
  ------------------
  315|  36.5M|            p_delayBuf[j] = fMult((FIXP_PCM_LIM)samplesIn[j], additionalGain);
  316|   393M|          } else {
  317|   393M|            p_delayBuf[j] = PCM_LIM2FIXP_DBL(samplesIn[j]);
  ------------------
  |  |  149|   393M|#define PCM_LIM2FIXP_DBL(x) (x)
  ------------------
  318|   393M|          }
  319|       |
  320|       |#if (SAMPLE_BITS == DFRACT_BITS)
  321|       |          samplesOut[j] = (INT_PCM)FX_DBL2FX_PCM(
  322|       |              (FIXP_DBL)SATURATE_LEFT_SHIFT(tmp, scaling, DFRACT_BITS));
  323|       |#else
  324|   430M|          samplesOut[j] = (INT_PCM)FX_DBL2FX_PCM((FIXP_DBL)SATURATE_LEFT_SHIFT(
  ------------------
  |  |  129|   430M|#define FX_DBL2FX_PCM(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  220|  1.72G|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   430M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   430M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [True: 219, False: 430M]
  |  |  |  |  |  Branch (220:41): [True: 188, False: 430M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  325|   430M|              (tmp >> 1) + ((FIXP_DBL)0x8000 >> (scaling + 1)), scaling + 1,
  326|   430M|              DFRACT_BITS));
  327|   430M|#endif
  328|   430M|        }
  329|   255M|      }
  330|       |
  331|   532M|      delayBufIdx++;
  332|   532M|      if (delayBufIdx >= attack) {
  ------------------
  |  Branch (332:11): [True: 4.24M, False: 528M]
  ------------------
  333|  4.24M|        delayBufIdx = 0;
  334|  4.24M|      }
  335|       |
  336|       |      /* save minimum gain factor */
  337|   532M|      if (gain < minGain) {
  ------------------
  |  Branch (337:11): [True: 34.7M, False: 497M]
  ------------------
  338|  34.7M|        minGain = gain;
  339|  34.7M|      }
  340|       |
  341|       |      /* advance sample pointer by <channel> samples */
  342|   532M|      samplesIn += channels;
  343|   532M|      samplesOut += channels;
  344|   532M|    }
  345|       |
  346|   263k|    limiter->max = max;
  347|   263k|    limiter->maxBufIdx = maxBufIdx;
  348|   263k|    limiter->cor = cor;
  349|   263k|    limiter->delayBufIdx = delayBufIdx;
  350|       |
  351|   263k|    limiter->smoothState0 = smoothState0;
  352|       |
  353|   263k|    limiter->minGain = minGain;
  354|       |
  355|   263k|    return TDLIMIT_OK;
  356|   263k|  }
  357|   263k|}
_Z23pcmLimiter_SetThresholdP9TDLimiteri:
  361|  68.7k|                                        FIXP_DBL threshold) {
  362|  68.7k|  if (limiter == NULL) return TDLIMIT_INVALID_HANDLE;
  ------------------
  |  Branch (362:7): [True: 0, False: 68.7k]
  ------------------
  363|       |
  364|  68.7k|  limiter->threshold = threshold;
  365|       |
  366|  68.7k|  return TDLIMIT_OK;
  367|  68.7k|}
pcmLimiter_Reset:
  370|  21.8k|TDLIMITER_ERROR pcmLimiter_Reset(TDLimiterPtr limiter) {
  371|  21.8k|  if (limiter != NULL) {
  ------------------
  |  Branch (371:7): [True: 21.8k, False: 0]
  ------------------
  372|  21.8k|    limiter->maxBufIdx = 0;
  373|  21.8k|    limiter->delayBufIdx = 0;
  374|  21.8k|    limiter->max = (FIXP_DBL)0;
  375|  21.8k|    limiter->cor = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|    limiter->smoothState0 = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|    limiter->minGain = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  21.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  194|  21.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8k]
  |  |  ------------------
  |  |  195|  21.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8k|          : ((((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|  21.8k|    limiter->scaling = 0;
  379|       |
  380|  21.8k|    FDKmemset(limiter->maxBuf, 0, (limiter->attack + 1) * sizeof(FIXP_DBL));
  381|  21.8k|    FDKmemset(limiter->delayBuf, 0,
  382|  21.8k|              limiter->attack * limiter->channels * sizeof(FIXP_DBL));
  383|  21.8k|  } else {
  384|      0|    return TDLIMIT_INVALID_HANDLE;
  385|      0|  }
  386|       |
  387|  21.8k|  return TDLIMIT_OK;
  388|  21.8k|}
pcmLimiter_Destroy:
  391|  21.8k|TDLIMITER_ERROR pcmLimiter_Destroy(TDLimiterPtr limiter) {
  392|  21.8k|  if (limiter != NULL) {
  ------------------
  |  Branch (392:7): [True: 21.8k, False: 0]
  ------------------
  393|  21.8k|    FDKfree(limiter->maxBuf);
  394|  21.8k|    FDKfree(limiter->delayBuf);
  395|       |
  396|  21.8k|    FDKfree(limiter);
  397|  21.8k|  } else {
  398|      0|    return TDLIMIT_INVALID_HANDLE;
  399|      0|  }
  400|  21.8k|  return TDLIMIT_OK;
  401|  21.8k|}
pcmLimiter_GetDelay:
  404|   263k|unsigned int pcmLimiter_GetDelay(TDLimiterPtr limiter) {
  405|   263k|  FDK_ASSERT(limiter != NULL);
  ------------------
  |  |  221|   263k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (405:3): [True: 263k, False: 0]
  ------------------
  406|   263k|  return limiter->attack;
  407|   263k|}
pcmLimiter_SetNChannels:
  427|   263k|                                        unsigned int nChannels) {
  428|   263k|  if (limiter == NULL) return TDLIMIT_INVALID_HANDLE;
  ------------------
  |  Branch (428:7): [True: 0, False: 263k]
  ------------------
  429|       |
  430|   263k|  if (nChannels > limiter->maxChannels) return TDLIMIT_INVALID_PARAMETER;
  ------------------
  |  Branch (430:7): [True: 0, False: 263k]
  ------------------
  431|       |
  432|   263k|  limiter->channels = nChannels;
  433|       |  // pcmLimiter_Reset(limiter);
  434|       |
  435|   263k|  return TDLIMIT_OK;
  436|   263k|}
pcmLimiter_SetSampleRate:
  440|   263k|                                         UINT sampleRate) {
  441|   263k|  unsigned int attack, release;
  442|   263k|  FIXP_DBL attackConst, releaseConst, exponent;
  443|   263k|  INT e_ans;
  444|       |
  445|   263k|  if (limiter == NULL) return TDLIMIT_INVALID_HANDLE;
  ------------------
  |  Branch (445:7): [True: 0, False: 263k]
  ------------------
  446|       |
  447|   263k|  if (sampleRate > limiter->maxSampleRate) return TDLIMIT_INVALID_PARAMETER;
  ------------------
  |  Branch (447:7): [True: 7.82k, False: 256k]
  ------------------
  448|       |
  449|       |  /* update attack and release time in samples */
  450|   256k|  attack = (unsigned int)(limiter->attackMs * sampleRate / 1000);
  451|   256k|  release = (unsigned int)(limiter->releaseMs * sampleRate / 1000);
  452|       |
  453|       |  /* attackConst = pow(0.1, 1.0 / (attack + 1)) */
  454|   256k|  exponent = invFixp(attack + 1);
  455|   256k|  attackConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|   256k|  (FIXP_DBL)(                                                                \
  |  |  193|   256k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 256k, Folded]
  |  |  ------------------
  |  |  194|   256k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   256k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   256k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 256k]
  |  |  ------------------
  |  |  195|   256k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   256k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   256k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   256k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   256k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   256k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   256k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  456|   256k|  attackConst = scaleValue(attackConst, e_ans);
  457|       |
  458|       |  /* releaseConst  = (float)pow(0.1, 1.0 / (release + 1)) */
  459|   256k|  exponent = invFixp(release + 1);
  460|   256k|  releaseConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|   256k|  (FIXP_DBL)(                                                                \
  |  |  193|   256k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 256k, Folded]
  |  |  ------------------
  |  |  194|   256k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   256k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   256k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 256k]
  |  |  ------------------
  |  |  195|   256k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   256k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   256k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   256k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   256k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   256k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   256k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  461|   256k|  releaseConst = scaleValue(releaseConst, e_ans);
  462|       |
  463|   256k|  limiter->attack = attack;
  464|   256k|  limiter->attackConst = attackConst;
  465|   256k|  limiter->releaseConst = releaseConst;
  466|   256k|  limiter->sampleRate = sampleRate;
  467|       |
  468|       |  /* reset */
  469|       |  // pcmLimiter_Reset(limiter);
  470|       |
  471|   256k|  return TDLIMIT_OK;
  472|   263k|}
pcmLimiter_SetAttack:
  476|  68.7k|                                     unsigned int attackMs) {
  477|  68.7k|  unsigned int attack;
  478|  68.7k|  FIXP_DBL attackConst, exponent;
  479|  68.7k|  INT e_ans;
  480|       |
  481|  68.7k|  if (limiter == NULL) return TDLIMIT_INVALID_HANDLE;
  ------------------
  |  Branch (481:7): [True: 0, False: 68.7k]
  ------------------
  482|       |
  483|  68.7k|  if (attackMs > limiter->maxAttackMs) return TDLIMIT_INVALID_PARAMETER;
  ------------------
  |  Branch (483:7): [True: 0, False: 68.7k]
  ------------------
  484|       |
  485|       |  /* calculate attack time in samples */
  486|  68.7k|  attack = (unsigned int)(attackMs * limiter->sampleRate / 1000);
  487|       |
  488|       |  /* attackConst = pow(0.1, 1.0 / (attack + 1)) */
  489|  68.7k|  exponent = invFixp(attack + 1);
  490|  68.7k|  attackConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  68.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  68.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 68.7k, Folded]
  |  |  ------------------
  |  |  194|  68.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  68.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  68.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 68.7k]
  |  |  ------------------
  |  |  195|  68.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  68.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  68.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  68.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  68.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  68.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  68.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|  68.7k|  attackConst = scaleValue(attackConst, e_ans);
  492|       |
  493|  68.7k|  limiter->attack = attack;
  494|  68.7k|  limiter->attackConst = attackConst;
  495|  68.7k|  limiter->attackMs = attackMs;
  496|       |
  497|  68.7k|  return TDLIMIT_OK;
  498|  68.7k|}

_Z14FDK_interleavePKiPijjj:
  111|  21.8k|                    const UINT length) {
  112|  22.8M|  for (UINT sample = 0; sample < length; sample++) {
  ------------------
  |  Branch (112:25): [True: 22.8M, False: 21.8k]
  ------------------
  113|  22.8M|    const FIXP_DBL *In = &pIn[sample];
  114|  75.2M|    for (UINT ch = 0; ch < channels; ch++) {
  ------------------
  |  Branch (114:23): [True: 52.3M, False: 22.8M]
  ------------------
  115|  52.3M|      *pOut++ = (LONG)In[0];
  116|  52.3M|      In += frameSize;
  117|  52.3M|    }
  118|  22.8M|  }
  119|  21.8k|}
_Z14FDK_interleavePKsPsjjj:
  135|  6.33k|                    const UINT length) {
  136|  3.06M|  for (UINT sample = 0; sample < length; sample++) {
  ------------------
  |  Branch (136:25): [True: 3.05M, False: 6.33k]
  ------------------
  137|  3.05M|    const FIXP_SGL *In = &pIn[sample];
  138|  21.1M|    for (UINT ch = 0; ch < channels; ch++) {
  ------------------
  |  Branch (138:23): [True: 18.1M, False: 3.05M]
  ------------------
  139|  18.1M|      *pOut++ = (SHORT)In[0];
  140|  18.1M|      In += frameSize;
  141|  18.1M|    }
  142|  3.05M|  }
  143|  6.33k|}
_Z16FDK_deinterleavePKiPijjj:
  160|  1.27k|                      const UINT length) {
  161|  3.81k|  for (UINT ch = 0; ch < channels; ch++) {
  ------------------
  |  Branch (161:21): [True: 2.54k, False: 1.27k]
  ------------------
  162|  2.54k|    LONG *pOut = _pOut + length * ch;
  ------------------
  |  |  181|  2.54k|#define LONG INT
  ------------------
  163|  2.54k|    const LONG *In = &pIn[ch];
  164|  5.22M|    for (UINT sample = 0; sample < frameSize; sample++) {
  ------------------
  |  Branch (164:27): [True: 5.22M, False: 2.54k]
  ------------------
  165|  5.22M|      *pOut++ = In[0];
  166|  5.22M|      In += channels;
  167|  5.22M|    }
  168|  2.54k|  }
  169|  1.27k|}

pcmDmx_Open:
 1622|  21.8k|PCMDMX_ERROR pcmDmx_Open(HANDLE_PCM_DOWNMIX *pSelf) {
 1623|  21.8k|  HANDLE_PCM_DOWNMIX self;
 1624|       |
 1625|  21.8k|  if (pSelf == NULL) {
  ------------------
  |  Branch (1625:7): [True: 0, False: 21.8k]
  ------------------
 1626|      0|    return (PCMDMX_INVALID_HANDLE);
 1627|      0|  }
 1628|       |
 1629|  21.8k|  *pSelf = NULL;
 1630|       |
 1631|  21.8k|  self = (HANDLE_PCM_DOWNMIX)GetPcmDmxInstance(0);
 1632|  21.8k|  if (self == NULL) {
  ------------------
  |  Branch (1632:7): [True: 0, False: 21.8k]
  ------------------
 1633|      0|    return (PCMDMX_OUT_OF_MEMORY);
 1634|      0|  }
 1635|       |
 1636|       |  /* Reset the full instance */
 1637|  21.8k|  pcmDmx_Reset(self, PCMDMX_RESET_FULL);
  ------------------
  |  |  325|  21.8k|#define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  323|  21.8k|#define PCMDMX_RESET_PARAMS (1)
  |  |  ------------------
  |  |               #define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  324|  21.8k|#define PCMDMX_RESET_BS_DATA (2)
  |  |  ------------------
  ------------------
 1638|       |
 1639|  21.8k|  *pSelf = self;
 1640|       |
 1641|  21.8k|  return (PCMDMX_OK);
 1642|  21.8k|}
pcmDmx_Reset:
 1649|  1.99M|PCMDMX_ERROR pcmDmx_Reset(HANDLE_PCM_DOWNMIX self, UINT flags) {
 1650|  1.99M|  if (self == NULL) {
  ------------------
  |  Branch (1650:7): [True: 0, False: 1.99M]
  ------------------
 1651|      0|    return (PCMDMX_INVALID_HANDLE);
 1652|      0|  }
 1653|       |
 1654|  1.99M|  if (flags & PCMDMX_RESET_PARAMS) {
  ------------------
  |  |  323|  1.99M|#define PCMDMX_RESET_PARAMS (1)
  ------------------
  |  Branch (1654:7): [True: 21.8k, False: 1.97M]
  ------------------
 1655|  21.8k|    PCM_DMX_USER_PARAMS *pParams = &self->userParams;
 1656|       |
 1657|  21.8k|    pParams->dualChannelMode = STEREO_MODE;
 1658|  21.8k|    pParams->pseudoSurrMode = NEVER_DO_PS_DMX;
 1659|  21.8k|    pParams->numOutChannelsMax = (6);
 1660|  21.8k|    pParams->numOutChannelsMin = (0);
 1661|  21.8k|    pParams->frameDelay = 0;
 1662|  21.8k|    pParams->expiryFrame = (0);
 1663|       |
 1664|  21.8k|    self->applyProcessing = 0;
 1665|  21.8k|  }
 1666|       |
 1667|  1.99M|  if (flags & PCMDMX_RESET_BS_DATA) {
  ------------------
  |  |  324|  1.99M|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
  |  Branch (1667:7): [True: 1.99M, False: 0]
  ------------------
 1668|  1.99M|    int slot;
 1669|       |    /* Init all slots with a default set */
 1670|  5.97M|    for (slot = 0; slot <= (1); slot += 1) {
  ------------------
  |  Branch (1670:20): [True: 3.98M, False: 1.99M]
  ------------------
 1671|  3.98M|      FDKmemcpy(&self->bsMetaData[slot], &dfltMetaData,
 1672|  3.98M|                sizeof(DMX_BS_META_DATA));
 1673|  3.98M|    }
 1674|  1.99M|  }
 1675|       |
 1676|  1.99M|  return (PCMDMX_OK);
 1677|  1.99M|}
pcmDmx_SetParam:
 1686|   848k|                             const INT value) {
 1687|   848k|  switch (param) {
 1688|      0|    case DMX_PROFILE_SETTING:
  ------------------
  |  Branch (1688:5): [True: 0, False: 848k]
  ------------------
 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|   811k|    case DMX_BS_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (1702:5): [True: 811k, False: 36.5k]
  ------------------
 1703|   811k|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1703:11): [True: 0, False: 811k]
  ------------------
 1704|   811k|      self->userParams.expiryFrame = (value > 0) ? (UINT)value : 0;
  ------------------
  |  Branch (1704:38): [True: 0, False: 811k]
  ------------------
 1705|   811k|      break;
 1706|       |
 1707|  36.5k|    case DMX_BS_DATA_DELAY:
  ------------------
  |  Branch (1707:5): [True: 36.5k, False: 811k]
  ------------------
 1708|  36.5k|      if ((value > (1)) || (value < 0)) {
  ------------------
  |  Branch (1708:11): [True: 0, False: 36.5k]
  |  Branch (1708:28): [True: 0, False: 36.5k]
  ------------------
 1709|      0|        return (PCMDMX_UNABLE_TO_SET_PARAM);
 1710|      0|      }
 1711|  36.5k|      if (self == NULL) {
  ------------------
  |  Branch (1711:11): [True: 0, False: 36.5k]
  ------------------
 1712|      0|        return (PCMDMX_INVALID_HANDLE);
 1713|      0|      }
 1714|  36.5k|      self->userParams.frameDelay = (UCHAR)value;
 1715|  36.5k|      break;
 1716|       |
 1717|      0|    case MIN_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1717:5): [True: 0, False: 848k]
  ------------------
 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: 848k]
  ------------------
 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: 848k]
  ------------------
 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: 848k]
  ------------------
 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: 848k]
  ------------------
 1796|      0|      return (PCMDMX_UNKNOWN_PARAM);
 1797|   848k|  }
 1798|       |
 1799|   848k|  return (PCMDMX_OK);
 1800|   848k|}
pcmDmx_GetParam:
 1809|   382k|                             INT *const pValue) {
 1810|   382k|  PCM_DMX_USER_PARAMS *pUsrParams;
 1811|       |
 1812|   382k|  if ((self == NULL) || (pValue == NULL)) {
  ------------------
  |  Branch (1812:7): [True: 0, False: 382k]
  |  Branch (1812:25): [True: 0, False: 382k]
  ------------------
 1813|      0|    return (PCMDMX_INVALID_HANDLE);
 1814|      0|  }
 1815|   382k|  pUsrParams = &self->userParams;
 1816|       |
 1817|   382k|  switch (param) {
 1818|      0|    case DMX_PROFILE_SETTING:
  ------------------
  |  Branch (1818:5): [True: 0, False: 382k]
  ------------------
 1819|      0|      *pValue = (INT)pUsrParams->dmxProfile;
 1820|      0|      break;
 1821|      0|    case DMX_BS_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (1821:5): [True: 0, False: 382k]
  ------------------
 1822|      0|      *pValue = (INT)pUsrParams->expiryFrame;
 1823|      0|      break;
 1824|      0|    case DMX_BS_DATA_DELAY:
  ------------------
  |  Branch (1824:5): [True: 0, False: 382k]
  ------------------
 1825|      0|      *pValue = (INT)pUsrParams->frameDelay;
 1826|      0|      break;
 1827|   141k|    case MIN_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1827:5): [True: 141k, False: 241k]
  ------------------
 1828|   141k|      *pValue = (INT)pUsrParams->numOutChannelsMin;
 1829|   141k|      break;
 1830|   241k|    case MAX_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1830:5): [True: 241k, False: 141k]
  ------------------
 1831|   241k|      *pValue = (INT)pUsrParams->numOutChannelsMax;
 1832|   241k|      break;
 1833|      0|    case DMX_DUAL_CHANNEL_MODE:
  ------------------
  |  Branch (1833:5): [True: 0, False: 382k]
  ------------------
 1834|      0|      *pValue = (INT)pUsrParams->dualChannelMode;
 1835|      0|      break;
 1836|      0|    case DMX_PSEUDO_SURROUND_MODE:
  ------------------
  |  Branch (1836:5): [True: 0, False: 382k]
  ------------------
 1837|      0|      *pValue = (INT)pUsrParams->pseudoSurrMode;
 1838|      0|      break;
 1839|      0|    default:
  ------------------
  |  Branch (1839:5): [True: 0, False: 382k]
  ------------------
 1840|      0|      return (PCMDMX_UNKNOWN_PARAM);
 1841|   382k|  }
 1842|       |
 1843|   382k|  return (PCMDMX_OK);
 1844|   382k|}
pcmDmx_Parse:
 1850|  17.0k|                          UINT ancDataBits, int isMpeg2) {
 1851|  17.0k|  PCMDMX_ERROR errorStatus = PCMDMX_OK;
 1852|       |
 1853|  17.0k|#define MAX_DSE_ANC_BYTES (16)    /* 15 bytes */
 1854|  17.0k|#define ANC_DATA_SYNC_BYTE (0xBC) /* ancillary data sync byte. */
 1855|       |
 1856|  17.0k|  DMX_BS_META_DATA *pBsMetaData;
 1857|       |
 1858|  17.0k|  int skip4Dmx = 0, skip4Ext = 0;
 1859|  17.0k|  int dmxLvlAvail = 0, extDataAvail = 0;
 1860|  17.0k|  UINT foundNewData = 0;
 1861|  17.0k|  UINT minAncBits = ((isMpeg2) ? 5 : 3) * 8;
  ------------------
  |  Branch (1861:22): [True: 0, False: 17.0k]
  ------------------
 1862|       |
 1863|  17.0k|  if ((self == NULL) || (hBs == NULL)) {
  ------------------
  |  Branch (1863:7): [True: 0, False: 17.0k]
  |  Branch (1863:25): [True: 0, False: 17.0k]
  ------------------
 1864|      0|    return (PCMDMX_INVALID_HANDLE);
 1865|      0|  }
 1866|       |
 1867|       |  /* sanity checks */
 1868|  17.0k|  if ((ancDataBits < minAncBits) || (ancDataBits > FDKgetValidBits(hBs))) {
  ------------------
  |  Branch (1868:7): [True: 6.83k, False: 10.1k]
  |  Branch (1868:37): [True: 65, False: 10.1k]
  ------------------
 1869|  6.90k|    return (PCMDMX_CORRUPT_ANC_DATA);
 1870|  6.90k|  }
 1871|       |
 1872|  10.1k|  pBsMetaData = &self->bsMetaData[0];
 1873|       |
 1874|  10.1k|  if (isMpeg2) {
  ------------------
  |  Branch (1874:7): [True: 0, False: 10.1k]
  ------------------
 1875|       |    /* skip DVD ancillary data */
 1876|      0|    FDKpushFor(hBs, 16);
 1877|      0|  }
 1878|       |
 1879|       |  /* check sync word */
 1880|  10.1k|  if (FDKreadBits(hBs, 8) != ANC_DATA_SYNC_BYTE) {
  ------------------
  |  | 1854|  10.1k|#define ANC_DATA_SYNC_BYTE (0xBC) /* ancillary data sync byte. */
  ------------------
  |  Branch (1880:7): [True: 803, False: 9.31k]
  ------------------
 1881|    803|    return (PCMDMX_CORRUPT_ANC_DATA);
 1882|    803|  }
 1883|       |
 1884|       |  /* skip MPEG audio type and Dolby surround mode */
 1885|  9.31k|  FDKpushFor(hBs, 4);
 1886|       |
 1887|  9.31k|  if (isMpeg2) {
  ------------------
  |  Branch (1887:7): [True: 0, False: 9.31k]
  ------------------
 1888|      0|    /* int numAncBytes = */ FDKreadBits(hBs, 4);
 1889|       |    /* advanced dynamic range control */
 1890|      0|    if (FDKreadBit(hBs)) skip4Dmx += 24;
  ------------------
  |  Branch (1890:9): [True: 0, False: 0]
  ------------------
 1891|       |    /* dialog normalization */
 1892|      0|    if (FDKreadBit(hBs)) skip4Dmx += 8;
  ------------------
  |  Branch (1892:9): [True: 0, False: 0]
  ------------------
 1893|       |    /* reproduction_level */
 1894|      0|    if (FDKreadBit(hBs)) skip4Dmx += 8;
  ------------------
  |  Branch (1894:9): [True: 0, False: 0]
  ------------------
 1895|  9.31k|  } else {
 1896|  9.31k|    FDKpushFor(hBs, 2); /* drc presentation mode */
 1897|  9.31k|    pBsMetaData->pseudoSurround = (SCHAR)FDKreadBit(hBs);
 1898|  9.31k|    FDKpushFor(hBs, 4); /* reserved bits */
 1899|  9.31k|  }
 1900|       |
 1901|       |  /* downmixing levels MPEGx status */
 1902|  9.31k|  dmxLvlAvail = FDKreadBit(hBs);
 1903|       |
 1904|  9.31k|  if (isMpeg2) {
  ------------------
  |  Branch (1904:7): [True: 0, False: 9.31k]
  ------------------
 1905|       |    /* scale factor CRC status */
 1906|      0|    if (FDKreadBit(hBs)) skip4Ext += 16;
  ------------------
  |  Branch (1906:9): [True: 0, False: 0]
  ------------------
 1907|  9.31k|  } else {
 1908|       |    /* ancillary data extension status */
 1909|  9.31k|    extDataAvail = FDKreadBit(hBs);
 1910|  9.31k|  }
 1911|       |
 1912|       |  /* audio coding and compression status */
 1913|  9.31k|  if (FDKreadBit(hBs)) skip4Ext += 16;
  ------------------
  |  Branch (1913:7): [True: 1.73k, False: 7.58k]
  ------------------
 1914|       |  /* coarse grain timecode status */
 1915|  9.31k|  if (FDKreadBit(hBs)) skip4Ext += 16;
  ------------------
  |  Branch (1915:7): [True: 4.84k, False: 4.47k]
  ------------------
 1916|       |  /* fine grain timecode status */
 1917|  9.31k|  if (FDKreadBit(hBs)) skip4Ext += 16;
  ------------------
  |  Branch (1917:7): [True: 5.23k, False: 4.08k]
  ------------------
 1918|       |
 1919|       |  /* skip the useless data to get to the DMX levels */
 1920|  9.31k|  FDKpushFor(hBs, skip4Dmx);
 1921|       |
 1922|       |  /* downmix_levels_MPEGX */
 1923|  9.31k|  if (dmxLvlAvail) {
  ------------------
  |  Branch (1923:7): [True: 8.39k, False: 923]
  ------------------
 1924|  8.39k|    if (FDKreadBit(hBs)) { /* center_mix_level_on */
  ------------------
  |  Branch (1924:9): [True: 8.02k, False: 373]
  ------------------
 1925|  8.02k|      pBsMetaData->cLevIdx = (UCHAR)FDKreadBits(hBs, 3);
 1926|  8.02k|      foundNewData |= TYPE_DSE_CLEV_DATA;
  ------------------
  |  |  328|  8.02k|#define TYPE_DSE_CLEV_DATA (0x02)
  ------------------
 1927|  8.02k|    } else {
 1928|    373|      FDKreadBits(hBs, 3);
 1929|    373|    }
 1930|  8.39k|    if (FDKreadBit(hBs)) { /* surround_mix_level_on */
  ------------------
  |  Branch (1930:9): [True: 3.79k, False: 4.60k]
  ------------------
 1931|  3.79k|      pBsMetaData->sLevIdx = (UCHAR)FDKreadBits(hBs, 3);
 1932|  3.79k|      foundNewData |= TYPE_DSE_SLEV_DATA;
  ------------------
  |  |  329|  3.79k|#define TYPE_DSE_SLEV_DATA (0x04)
  ------------------
 1933|  4.60k|    } else {
 1934|  4.60k|      FDKreadBits(hBs, 3);
 1935|  4.60k|    }
 1936|  8.39k|  }
 1937|       |
 1938|       |  /* skip the useless data to get to the ancillary data extension */
 1939|  9.31k|  FDKpushFor(hBs, skip4Ext);
 1940|       |
 1941|       |  /* anc data extension (MPEG-4 only) */
 1942|  9.31k|  if (extDataAvail) {
  ------------------
  |  Branch (1942:7): [True: 8.70k, False: 608]
  ------------------
 1943|  8.70k|    int extDmxLvlSt, extDmxGainSt, extDmxLfeSt;
 1944|       |
 1945|  8.70k|    FDKreadBit(hBs); /* reserved bit */
 1946|  8.70k|    extDmxLvlSt = FDKreadBit(hBs);
 1947|  8.70k|    extDmxGainSt = FDKreadBit(hBs);
 1948|  8.70k|    extDmxLfeSt = FDKreadBit(hBs);
 1949|  8.70k|    FDKreadBits(hBs, 4); /* reserved bits */
 1950|       |
 1951|  8.70k|    if (extDmxLvlSt) {
  ------------------
  |  Branch (1951:9): [True: 975, False: 7.73k]
  ------------------
 1952|    975|      pBsMetaData->dmixIdxA = (UCHAR)FDKreadBits(hBs, 3);
 1953|    975|      pBsMetaData->dmixIdxB = (UCHAR)FDKreadBits(hBs, 3);
 1954|    975|      FDKreadBits(hBs, 2); /* reserved bits */
 1955|    975|      foundNewData |= TYPE_DSE_DMIX_AB_DATA;
  ------------------
  |  |  330|    975|#define TYPE_DSE_DMIX_AB_DATA (0x08)
  ------------------
 1956|    975|    }
 1957|  8.70k|    if (extDmxGainSt) {
  ------------------
  |  Branch (1957:9): [True: 1.80k, False: 6.90k]
  ------------------
 1958|  1.80k|      pBsMetaData->dmxGainIdx5 = (UCHAR)FDKreadBits(hBs, 7);
 1959|  1.80k|      FDKreadBit(hBs); /* reserved bit */
 1960|  1.80k|      pBsMetaData->dmxGainIdx2 = (UCHAR)FDKreadBits(hBs, 7);
 1961|  1.80k|      FDKreadBit(hBs); /* reserved bit */
 1962|  1.80k|      foundNewData |= TYPE_DSE_DMX_GAIN_DATA;
  ------------------
  |  |  332|  1.80k|#define TYPE_DSE_DMX_GAIN_DATA (0x20)
  ------------------
 1963|  1.80k|    }
 1964|  8.70k|    if (extDmxLfeSt) {
  ------------------
  |  Branch (1964:9): [True: 2.00k, False: 6.70k]
  ------------------
 1965|  2.00k|      pBsMetaData->dmixIdxLfe = (UCHAR)FDKreadBits(hBs, 4);
 1966|  2.00k|      FDKreadBits(hBs, 4); /* reserved bits */
 1967|  2.00k|      foundNewData |= TYPE_DSE_DMIX_LFE_DATA;
  ------------------
  |  |  331|  2.00k|#define TYPE_DSE_DMIX_LFE_DATA (0x10)
  ------------------
 1968|  2.00k|    }
 1969|  8.70k|  }
 1970|       |
 1971|       |  /* final sanity check on the amount of read data */
 1972|  9.31k|  if ((INT)FDKgetValidBits(hBs) < 0) {
  ------------------
  |  Branch (1972:7): [True: 61, False: 9.25k]
  ------------------
 1973|     61|    errorStatus = PCMDMX_CORRUPT_ANC_DATA;
 1974|     61|  }
 1975|       |
 1976|  9.31k|  if ((errorStatus == PCMDMX_OK) && (foundNewData != 0)) {
  ------------------
  |  Branch (1976:7): [True: 9.25k, False: 61]
  |  Branch (1976:37): [True: 8.60k, False: 652]
  ------------------
 1977|       |    /* announce new data */
 1978|  8.60k|    pBsMetaData->typeFlags |= foundNewData;
 1979|       |    /* reset expiry counter */
 1980|  8.60k|    pBsMetaData->expiryCount = 0;
 1981|  8.60k|  }
 1982|       |
 1983|  9.31k|  return (errorStatus);
 1984|  10.1k|}
pcmDmx_SetMatrixMixdownFromPce:
 2022|   190k|                                            int pseudoSurroundEnable) {
 2023|   190k|  if (self == NULL) {
  ------------------
  |  Branch (2023:7): [True: 0, False: 190k]
  ------------------
 2024|      0|    return (PCMDMX_INVALID_HANDLE);
 2025|      0|  }
 2026|       |
 2027|   190k|  {
 2028|   190k|    DMX_BS_META_DATA *pBsMetaData = &self->bsMetaData[0];
 2029|       |
 2030|   190k|    if (matrixMixdownPresent) {
  ------------------
  |  Branch (2030:9): [True: 5.61k, False: 185k]
  ------------------
 2031|  5.61k|      pBsMetaData->pseudoSurround = (pseudoSurroundEnable) ? 1 : 0;
  ------------------
  |  Branch (2031:37): [True: 2.43k, False: 3.18k]
  ------------------
 2032|  5.61k|      pBsMetaData->matrixMixdownIdx = matrixMixdownIdx & 0x03;
 2033|  5.61k|      pBsMetaData->typeFlags |= TYPE_PCE_DATA;
  ------------------
  |  |  327|  5.61k|#define TYPE_PCE_DATA (0x01)
  ------------------
 2034|       |      /* Reset expiry counter */
 2035|  5.61k|      pBsMetaData->expiryCount = 0;
 2036|  5.61k|    }
 2037|   190k|  }
 2038|       |
 2039|   190k|  return (PCMDMX_OK);
 2040|   190k|}
pcmDmx_ApplyFrame:
 2066|   347k|                               INT *pDmxOutScale) {
 2067|   347k|  PCM_DMX_USER_PARAMS *pParam = NULL;
 2068|   347k|  PCMDMX_ERROR errorStatus = PCMDMX_OK;
 2069|   347k|  DUAL_CHANNEL_MODE dualChannelMode;
 2070|   347k|  PCM_DMX_CHANNEL_MODE inChMode;
 2071|   347k|  PCM_DMX_CHANNEL_MODE outChMode;
 2072|   347k|  INT devNull; /* Just a dummy to avoid a lot of branches in the code */
 2073|   347k|  int numOutChannels, numInChannels;
 2074|   347k|  int inStride, outStride, offset;
 2075|   347k|  int dmxMaxScale, dmxScale;
 2076|   347k|  int slot;
 2077|   347k|  UCHAR inOffsetTable[(8)];
 2078|       |
 2079|   347k|  DMX_BS_META_DATA bsMetaData;
 2080|       |
 2081|   347k|  if ((self == NULL) || (nChannels == NULL) || (channelType == NULL) ||
  ------------------
  |  Branch (2081:7): [True: 0, False: 347k]
  |  Branch (2081:25): [True: 0, False: 347k]
  |  Branch (2081:48): [True: 0, False: 347k]
  ------------------
 2082|   347k|      (channelIndices == NULL) || (!FDK_chMapDescr_isValid(mapDescr))) {
  ------------------
  |  Branch (2082:7): [True: 0, False: 347k]
  |  Branch (2082:35): [True: 0, False: 347k]
  ------------------
 2083|      0|    return (PCMDMX_INVALID_HANDLE);
 2084|      0|  }
 2085|       |
 2086|       |  /* Init the output scaling */
 2087|   347k|  dmxScale = 0;
 2088|   347k|  if (pDmxOutScale != NULL) {
  ------------------
  |  Branch (2088:7): [True: 347k, False: 0]
  ------------------
 2089|       |    /* Avoid final scaling internally and hand it to the outside world. */
 2090|   347k|    *pDmxOutScale = 0;
 2091|   347k|    dmxMaxScale = (3);
 2092|   347k|  } else {
 2093|       |    /* Apply the scaling internally. */
 2094|      0|    pDmxOutScale = &devNull; /* redirect to temporal stack memory */
 2095|      0|    dmxMaxScale = 0;
 2096|      0|  }
 2097|       |
 2098|   347k|  pParam = &self->userParams;
 2099|   347k|  numInChannels = *nChannels;
 2100|       |
 2101|       |  /* Perform some input sanity checks */
 2102|   347k|  if (pPcmBuf == NULL) {
  ------------------
  |  Branch (2102:7): [True: 0, False: 347k]
  ------------------
 2103|      0|    return (PCMDMX_INVALID_ARGUMENT);
 2104|      0|  }
 2105|   347k|  if (frameSize == 0) {
  ------------------
  |  Branch (2105:7): [True: 0, False: 347k]
  ------------------
 2106|      0|    return (PCMDMX_INVALID_ARGUMENT);
 2107|      0|  }
 2108|   347k|  if (numInChannels == 0) {
  ------------------
  |  Branch (2108:7): [True: 0, False: 347k]
  ------------------
 2109|      0|    return (PCMDMX_INVALID_ARGUMENT);
 2110|      0|  }
 2111|   347k|  if (numInChannels > (8)) {
  ------------------
  |  Branch (2111:7): [True: 0, False: 347k]
  ------------------
 2112|      0|    return (PCMDMX_INVALID_CH_CONFIG);
 2113|      0|  }
 2114|       |
 2115|       |  /* Check on misconfiguration */
 2116|   347k|  FDK_ASSERT((pParam->numOutChannelsMax <= 0) ||
  ------------------
  |  |  221|   347k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2116:3): [True: 0, False: 347k]
  |  Branch (2116:3): [True: 347k, False: 0]
  |  Branch (2116:3): [True: 347k, False: 0]
  ------------------
 2117|   347k|             (pParam->numOutChannelsMax >= pParam->numOutChannelsMin));
 2118|       |
 2119|       |  /* Determine if the module has to do processing */
 2120|   347k|  if ((self->applyProcessing == 0) &&
  ------------------
  |  Branch (2120:7): [True: 347k, False: 0]
  ------------------
 2121|   347k|      ((pParam->numOutChannelsMax <= 0) ||
  ------------------
  |  Branch (2121:8): [True: 0, False: 347k]
  ------------------
 2122|   347k|       (pParam->numOutChannelsMax >= numInChannels)) &&
  ------------------
  |  Branch (2122:8): [True: 328k, False: 18.6k]
  ------------------
 2123|   328k|      (pParam->numOutChannelsMin <= numInChannels)) {
  ------------------
  |  Branch (2123:7): [True: 328k, False: 0]
  ------------------
 2124|       |    /* Nothing to do */
 2125|   328k|    return (errorStatus);
 2126|   328k|  }
 2127|       |
 2128|       |  /* Determine the number of output channels */
 2129|  18.6k|  if ((pParam->numOutChannelsMax > 0) &&
  ------------------
  |  Branch (2129:7): [True: 18.6k, False: 0]
  ------------------
 2130|  18.6k|      (numInChannels > pParam->numOutChannelsMax)) {
  ------------------
  |  Branch (2130:7): [True: 18.6k, False: 0]
  ------------------
 2131|  18.6k|    numOutChannels = pParam->numOutChannelsMax;
 2132|  18.6k|  } else if (numInChannels < pParam->numOutChannelsMin) {
  ------------------
  |  Branch (2132:14): [True: 0, False: 0]
  ------------------
 2133|      0|    numOutChannels = pParam->numOutChannelsMin;
 2134|      0|  } else {
 2135|      0|    numOutChannels = numInChannels;
 2136|      0|  }
 2137|       |
 2138|       |  /* Check I/O buffer size */
 2139|  18.6k|  if ((UINT)pcmBufSize < (UINT)numOutChannels * frameSize) {
  ------------------
  |  Branch (2139:7): [True: 0, False: 18.6k]
  ------------------
 2140|      0|    return (PCMDMX_OUTPUT_BUFFER_TOO_SMALL);
 2141|      0|  }
 2142|       |
 2143|  18.6k|  dualChannelMode = pParam->dualChannelMode;
 2144|       |
 2145|       |  /* Analyse input channel configuration and get channel offset
 2146|       |   * table that can be accessed with the fixed channel labels. */
 2147|  18.6k|  errorStatus = getChannelMode(numInChannels, channelType, channelIndices,
 2148|  18.6k|                               inOffsetTable, &inChMode);
 2149|  18.6k|  if (PCMDMX_IS_FATAL_ERROR(errorStatus) || (inChMode == CH_MODE_UNDEFINED)) {
  ------------------
  |  |  180|  37.3k|  ((((err) >= pcm_dmx_fatal_error_start) && \
  |  |  ------------------
  |  |  |  Branch (180:3): [True: 0, False: 18.6k]
  |  |  |  Branch (180:5): [True: 2, False: 18.6k]
  |  |  ------------------
  |  |  181|  18.6k|    ((err) <= pcm_dmx_fatal_error_end))     \
  |  |  ------------------
  |  |  |  Branch (181:5): [True: 0, False: 2]
  |  |  ------------------
  |  |  182|  37.3k|       ? 1                                  \
  |  |  183|  37.3k|       : 0)
  ------------------
  |  Branch (2149:45): [True: 0, False: 18.6k]
  ------------------
 2150|       |    /* We don't need to restore because the channel
 2151|       |       configuration has not been changed. Just exit. */
 2152|      0|    return (PCMDMX_INVALID_CH_CONFIG);
 2153|      0|  }
 2154|       |
 2155|       |  /* Set input stride and offset */
 2156|  18.6k|  if (fInterleaved) {
  ------------------
  |  Branch (2156:7): [True: 12.1k, False: 6.50k]
  ------------------
 2157|  12.1k|    inStride = numInChannels;
 2158|  12.1k|    offset = 1; /* Channel specific offset factor */
 2159|  12.1k|  } else {
 2160|  6.50k|    inStride = 1;
 2161|  6.50k|    offset = frameSize; /* Channel specific offset factor */
 2162|  6.50k|  }
 2163|       |
 2164|       |  /* Reset downmix meta data if necessary */
 2165|  18.6k|  if ((pParam->expiryFrame > 0) &&
  ------------------
  |  Branch (2165:7): [True: 0, False: 18.6k]
  ------------------
 2166|      0|      (++self->bsMetaData[0].expiryCount >
  ------------------
  |  Branch (2166:7): [True: 0, False: 0]
  ------------------
 2167|      0|       pParam
 2168|      0|           ->expiryFrame)) { /* The metadata read from bitstream is too old. */
 2169|      0|#ifdef FDK_ASSERT_ENABLE
 2170|      0|    PCMDMX_ERROR err = pcmDmx_Reset(self, PCMDMX_RESET_BS_DATA);
  ------------------
  |  |  324|      0|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
 2171|      0|    FDK_ASSERT(err == PCMDMX_OK);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2171:5): [True: 0, False: 0]
  ------------------
 2172|       |#else
 2173|       |    pcmDmx_Reset(self, PCMDMX_RESET_BS_DATA);
 2174|       |#endif
 2175|      0|  }
 2176|  18.6k|  FDKmemcpy(&bsMetaData, &self->bsMetaData[pParam->frameDelay],
 2177|  18.6k|            sizeof(DMX_BS_META_DATA));
 2178|       |  /* Maintain delay line */
 2179|  19.0k|  for (slot = pParam->frameDelay; slot > 0; slot -= 1) {
  ------------------
  |  Branch (2179:35): [True: 378, False: 18.6k]
  ------------------
 2180|    378|    FDKmemcpy(&self->bsMetaData[slot], &self->bsMetaData[slot - 1],
 2181|    378|              sizeof(DMX_BS_META_DATA));
 2182|    378|  }
 2183|       |
 2184|       |  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 2185|       |   * - - - - - - - - - - - - - - - - - - */
 2186|  18.6k|  if (numInChannels > numOutChannels) { /* Apply downmix */
  ------------------
  |  Branch (2186:7): [True: 18.6k, False: 0]
  ------------------
 2187|  18.6k|    DMX_PCM *pInPcm[(8)] = {NULL};
  ------------------
  |  |  296|  18.6k|#define DMX_PCM FIXP_DBL
  ------------------
 2188|  18.6k|    DMX_PCM *pOutPcm[(8)] = {NULL};
  ------------------
  |  |  296|  18.6k|#define DMX_PCM FIXP_DBL
  ------------------
 2189|  18.6k|    FIXP_DMX mixFactors[(8)][(8)];
  ------------------
  |  |  121|  18.6k|#define FIXP_DMX FIXP_SGL
  ------------------
 2190|  18.6k|    UCHAR outOffsetTable[(8)];
 2191|  18.6k|    UINT sample;
 2192|  18.6k|    int chCfg = 0;
 2193|  18.6k|    int bypScale = 0;
 2194|       |
 2195|  18.6k|    if (numInChannels > SIX_CHANNEL) {
  ------------------
  |  |  175|  18.6k|#define SIX_CHANNEL (6)
  ------------------
  |  Branch (2195:9): [True: 18.6k, False: 0]
  ------------------
 2196|  18.6k|      AUDIO_CHANNEL_TYPE multiPurposeChType[2];
 2197|       |
 2198|       |      /* Get the type of the multipurpose channels */
 2199|  18.6k|      multiPurposeChType[0] =
 2200|  18.6k|          channelType[inOffsetTable[LEFT_MULTIPRPS_CHANNEL]];
  ------------------
  |  |  151|  18.6k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 2201|  18.6k|      multiPurposeChType[1] =
 2202|  18.6k|          channelType[inOffsetTable[RIGHT_MULTIPRPS_CHANNEL]];
  ------------------
  |  |  152|  18.6k|#define RIGHT_MULTIPRPS_CHANNEL (7) /* Right multipurpose channel */
  ------------------
 2203|       |
 2204|       |      /* Check if the input configuration is one defined in the standard. */
 2205|  18.6k|      switch (inChMode) {
 2206|  15.1k|        case CH_MODE_5_0_2_1: /* chCfg 7 || 14 */
  ------------------
  |  Branch (2206:9): [True: 15.1k, False: 3.51k]
  ------------------
 2207|       |          /* Further analyse the input config to distinguish the two
 2208|       |           * CH_MODE_5_0_2_1 configs. */
 2209|  15.1k|          if ((multiPurposeChType[0] == ACT_FRONT_TOP) &&
  ------------------
  |  Branch (2209:15): [True: 9.43k, False: 5.73k]
  ------------------
 2210|  9.43k|              (multiPurposeChType[1] == ACT_FRONT_TOP)) {
  ------------------
  |  Branch (2210:15): [True: 9.43k, False: 0]
  ------------------
 2211|  9.43k|            chCfg = 14;
 2212|  9.43k|          } else {
 2213|  5.73k|            chCfg = 7;
 2214|  5.73k|          }
 2215|  15.1k|          break;
 2216|  2.39k|        case CH_MODE_3_0_3_1: /* chCfg 11 */
  ------------------
  |  Branch (2216:9): [True: 2.39k, False: 16.2k]
  ------------------
 2217|  2.39k|          chCfg = 11;
 2218|  2.39k|          break;
 2219|  1.11k|        case CH_MODE_3_0_4_1: /* chCfg 12 */
  ------------------
  |  Branch (2219:9): [True: 1.11k, False: 17.5k]
  ------------------
 2220|  1.11k|          chCfg = 12;
 2221|  1.11k|          break;
 2222|      4|        default:
  ------------------
  |  Branch (2222:9): [True: 4, False: 18.6k]
  ------------------
 2223|      4|          chCfg = 0; /* Not a known config */
 2224|      4|          break;
 2225|  18.6k|      }
 2226|  18.6k|    }
 2227|       |
 2228|       |    /* Set this stages output stride and channel mode: */
 2229|  18.6k|    outStride = (fInterleaved) ? numOutChannels : 1;
  ------------------
  |  Branch (2229:17): [True: 12.1k, False: 6.50k]
  ------------------
 2230|  18.6k|    outChMode = outChModeTable[numOutChannels];
 2231|  18.6k|    FDK_ASSERT(outChMode != CH_MODE_UNDEFINED);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2231:5): [True: 18.6k, False: 0]
  ------------------
 2232|       |
 2233|       |    /* Get channel description and channel mapping for the desired output
 2234|       |     * configuration. */
 2235|  18.6k|    getChannelDescription(outChMode, mapDescr, channelType, channelIndices,
 2236|  18.6k|                          outOffsetTable);
 2237|       |    /* Now there is no way back because we modified the channel configuration!
 2238|       |     */
 2239|       |
 2240|       |    /* Create the DMX matrix */
 2241|  18.6k|    errorStatus =
 2242|  18.6k|        getMixFactors((chCfg > 0) ? 1 : 0,
  ------------------
  |  Branch (2242:23): [True: 18.6k, False: 4]
  ------------------
 2243|  18.6k|                      (chCfg > 0) ? (PCM_DMX_CHANNEL_MODE)chCfg : inChMode,
  ------------------
  |  Branch (2243:23): [True: 18.6k, False: 4]
  ------------------
 2244|  18.6k|                      outChMode, pParam, &bsMetaData, mixFactors, &dmxScale);
 2245|       |    /* No fatal errors can occur here. The function is designed to always return
 2246|       |       a valid matrix. The error code is used to signal configurations and
 2247|       |       matrices that are not conform to any standard. */
 2248|       |
 2249|       |    /* Determine the final scaling */
 2250|  18.6k|    bypScale = fMin(dmxMaxScale, dmxScale);
 2251|  18.6k|    *pDmxOutScale += bypScale;
 2252|  18.6k|    dmxScale -= bypScale;
 2253|       |
 2254|  18.6k|    { /* Set channel pointer for input. Remove empty cols. */
 2255|  18.6k|      int inCh, outCh, map[(8)];
 2256|  18.6k|      int ch = 0;
 2257|   168k|      for (inCh = 0; inCh < (8); inCh += 1) {
  ------------------
  |  Branch (2257:22): [True: 149k, False: 18.6k]
  ------------------
 2258|   149k|        if (inOffsetTable[inCh] < (UCHAR)numInChannels) {
  ------------------
  |  Branch (2258:13): [True: 147k, False: 2.40k]
  ------------------
 2259|   147k|          pInPcm[ch] = &pPcmBuf[inOffsetTable[inCh] * offset];
 2260|   147k|          map[ch++] = inCh;
 2261|   147k|        }
 2262|   149k|      }
 2263|  21.0k|      for (; ch < (8); ch += 1) {
  ------------------
  |  Branch (2263:14): [True: 2.40k, False: 18.6k]
  ------------------
 2264|  2.40k|        map[ch] = ch;
 2265|  2.40k|      }
 2266|       |
 2267|       |      /* Remove unused cols from factor matrix */
 2268|   165k|      for (inCh = 0; inCh < numInChannels; inCh += 1) {
  ------------------
  |  Branch (2268:22): [True: 147k, False: 18.6k]
  ------------------
 2269|   147k|        if (inCh != map[inCh]) {
  ------------------
  |  Branch (2269:13): [True: 16, False: 147k]
  ------------------
 2270|    144|          for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (2270:27): [True: 128, False: 16]
  ------------------
 2271|    128|            mixFactors[outCh][inCh] = mixFactors[outCh][map[inCh]];
 2272|    128|          }
 2273|     16|        }
 2274|   147k|      }
 2275|       |
 2276|       |      /* Set channel pointer for output. Remove empty cols. */
 2277|  18.6k|      ch = 0;
 2278|   168k|      for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (2278:23): [True: 149k, False: 18.6k]
  ------------------
 2279|   149k|        if (outOffsetTable[outCh] < (UCHAR)numOutChannels) {
  ------------------
  |  Branch (2279:13): [True: 112k, False: 37.3k]
  ------------------
 2280|   112k|          pOutPcm[ch] = &pPcmBuf[outOffsetTable[outCh] * offset];
 2281|   112k|          map[ch++] = outCh;
 2282|   112k|        }
 2283|   149k|      }
 2284|  56.0k|      for (; ch < (8); ch += 1) {
  ------------------
  |  Branch (2284:14): [True: 37.3k, False: 18.6k]
  ------------------
 2285|  37.3k|        map[ch] = ch;
 2286|  37.3k|      }
 2287|       |
 2288|       |      /* Remove unused rows from factor matrix */
 2289|   130k|      for (outCh = 0; outCh < numOutChannels; outCh += 1) {
  ------------------
  |  Branch (2289:23): [True: 112k, False: 18.6k]
  ------------------
 2290|   112k|        if (outCh != map[outCh]) {
  ------------------
  |  Branch (2290:13): [True: 0, False: 112k]
  ------------------
 2291|      0|          FDKmemcpy(&mixFactors[outCh], &mixFactors[map[outCh]],
 2292|      0|                    (8) * sizeof(FIXP_DMX));
 2293|      0|        }
 2294|   112k|      }
 2295|  18.6k|    }
 2296|       |
 2297|       |    /* Sample processing loop */
 2298|  14.5M|    for (sample = 0; sample < frameSize; sample++) {
  ------------------
  |  Branch (2298:22): [True: 14.5M, False: 18.6k]
  ------------------
 2299|  14.5M|      DMX_PCM tIn[(8)] = {0};
  ------------------
  |  |  296|  14.5M|#define DMX_PCM FIXP_DBL
  ------------------
 2300|  14.5M|      FIXP_DBL tOut[(8)] = {(FIXP_DBL)0};
 2301|  14.5M|      int inCh, outCh;
 2302|       |
 2303|       |      /* Preload all input samples */
 2304|   128M|      for (inCh = 0; inCh < numInChannels; inCh += 1) {
  ------------------
  |  Branch (2304:22): [True: 114M, False: 14.5M]
  ------------------
 2305|   114M|        if (pInPcm[inCh] != NULL) {
  ------------------
  |  Branch (2305:13): [True: 114M, False: 1.98k]
  ------------------
 2306|   114M|          tIn[inCh] = *pInPcm[inCh];
 2307|   114M|          pInPcm[inCh] += inStride;
 2308|   114M|        } else {
 2309|  1.98k|          tIn[inCh] = (DMX_PCM)0;
 2310|  1.98k|        }
 2311|   114M|      }
 2312|       |      /* Apply downmix coefficients to input samples and accumulate for output
 2313|       |       */
 2314|   101M|      for (outCh = 0; outCh < numOutChannels; outCh += 1) {
  ------------------
  |  Branch (2314:23): [True: 87.0M, False: 14.5M]
  ------------------
 2315|   772M|        for (inCh = 0; inCh < numInChannels; inCh += 1) {
  ------------------
  |  Branch (2315:24): [True: 685M, False: 87.0M]
  ------------------
 2316|   685M|          tOut[outCh] += fMult((DMX_PCMF)tIn[inCh], mixFactors[outCh][inCh]);
 2317|   685M|        }
 2318|  87.0M|        FDK_ASSERT(pOutPcm[outCh] >= pPcmBuf);
  ------------------
  |  |  221|  87.0M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2318:9): [True: 87.0M, False: 0]
  ------------------
 2319|  87.0M|        FDK_ASSERT(pOutPcm[outCh] < &pPcmBuf[pcmBufSize]);
  ------------------
  |  |  221|  87.0M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2319:9): [True: 87.0M, False: 0]
  ------------------
 2320|       |        /* Write sample */
 2321|  87.0M|        *pOutPcm[outCh] = (DMX_PCM)SATURATE_SHIFT(
  ------------------
  |  |  260|  87.0M|  (((scale) < 0) ? SATURATE_LEFT_SHIFT((src), -(scale), (dBits)) \
  |  |  ------------------
  |  |  |  |  251|  1.11M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (251:4): [True: 8.97k, False: 1.10M]
  |  |  |  |  ------------------
  |  |  |  |  252|  1.11M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  |  |  253|  1.11M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (253:10): [True: 9.13k, False: 1.09M]
  |  |  |  |  ------------------
  |  |  |  |  254|  1.10M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  |  |  255|  1.10M|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  |  |  |  Branch (260:4): [True: 1.11M, False: 85.9M]
  |  |  ------------------
  |  |  261|  87.0M|                 : SATURATE_RIGHT_SHIFT((src), (scale), (dBits)))
  |  |  ------------------
  |  |  |  |  242|  85.9M|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (242:4): [True: 0, False: 85.9M]
  |  |  |  |  ------------------
  |  |  |  |  243|  85.9M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  |  |  244|  85.9M|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:10): [True: 0, False: 85.9M]
  |  |  |  |  ------------------
  |  |  |  |  245|  85.9M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  |  |  246|  85.9M|             : ((LONG)(src) >> (scale)))
  |  |  ------------------
  ------------------
 2322|  87.0M|            tOut[outCh], DFRACT_BITS - DMX_PCM_BITS - dmxScale, DMX_PCM_BITS);
 2323|  87.0M|        pOutPcm[outCh] += outStride;
 2324|  87.0M|      }
 2325|  14.5M|    }
 2326|       |
 2327|       |    /* Update the number of output channels */
 2328|  18.6k|    *nChannels = numOutChannels;
 2329|       |
 2330|  18.6k|  } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 2331|       |       - - - - - - - - - - - - - - - - - - */
 2332|      0|  else if (numInChannels < numOutChannels) { /* Apply rudimentary upmix */
  ------------------
  |  Branch (2332:12): [True: 0, False: 0]
  ------------------
 2333|       |    /* Set up channel pointer */
 2334|      0|    UCHAR outOffsetTable[(8)];
 2335|       |
 2336|       |    /* FIRST STAGE
 2337|       |         Create a stereo/dual channel signal */
 2338|      0|    if (numInChannels == ONE_CHANNEL) {
  ------------------
  |  |  173|      0|#define ONE_CHANNEL (1)
  ------------------
  |  Branch (2338:9): [True: 0, False: 0]
  ------------------
 2339|      0|      DMX_PCM *pInPcm[(8)];
  ------------------
  |  |  296|      0|#define DMX_PCM FIXP_DBL
  ------------------
 2340|      0|      DMX_PCM *pOutLF, *pOutRF;
  ------------------
  |  |  296|      0|#define DMX_PCM FIXP_DBL
  ------------------
 2341|      0|      UINT sample;
 2342|       |
 2343|       |      /* Set this stages output stride and channel mode: */
 2344|      0|      outStride = (fInterleaved) ? TWO_CHANNEL : 1;
  ------------------
  |  |  174|      0|#define TWO_CHANNEL (2)
  ------------------
  |  Branch (2344:19): [True: 0, False: 0]
  ------------------
 2345|      0|      outChMode = outChModeTable[TWO_CHANNEL];
  ------------------
  |  |  174|      0|#define TWO_CHANNEL (2)
  ------------------
 2346|       |
 2347|       |      /* Get channel description and channel mapping for this
 2348|       |       * stages number of output channels (always STEREO). */
 2349|      0|      getChannelDescription(outChMode, mapDescr, channelType, channelIndices,
 2350|      0|                            outOffsetTable);
 2351|       |      /* Now there is no way back because we modified the channel configuration!
 2352|       |       */
 2353|       |
 2354|       |      /* Set input channel pointer. The first channel is always at index 0. */
 2355|      0|      pInPcm[CENTER_FRONT_CHANNEL] =
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 2356|      0|          &pPcmBuf[(frameSize - 1) *
 2357|      0|                   inStride]; /* Considering input mapping could lead to a
 2358|       |                                 invalid pointer here if the channel is not
 2359|       |                                 declared to be a front channel. */
 2360|       |
 2361|       |      /* Set output channel pointer (for this stage). */
 2362|      0|      pOutLF = &pPcmBuf[outOffsetTable[LEFT_FRONT_CHANNEL] * offset +
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 2363|      0|                        (frameSize - 1) * outStride];
 2364|      0|      pOutRF = &pPcmBuf[outOffsetTable[RIGHT_FRONT_CHANNEL] * offset +
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 2365|      0|                        (frameSize - 1) * outStride];
 2366|       |
 2367|       |      /* 1/0 input: */
 2368|      0|      for (sample = 0; sample < frameSize; sample++) {
  ------------------
  |  Branch (2368:24): [True: 0, False: 0]
  ------------------
 2369|       |        /* L' = C;  R' = C; */
 2370|      0|        *pOutLF = *pOutRF = *pInPcm[CENTER_FRONT_CHANNEL];
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 2371|       |
 2372|      0|        pInPcm[CENTER_FRONT_CHANNEL] -= inStride;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 2373|      0|        pOutLF -= outStride;
 2374|      0|        pOutRF -= outStride;
 2375|      0|      }
 2376|       |
 2377|       |      /* Prepare for next stage: */
 2378|      0|      inStride = outStride;
 2379|      0|      inChMode = outChMode;
 2380|      0|      FDKmemcpy(inOffsetTable, outOffsetTable, (8) * sizeof(UCHAR));
 2381|      0|    }
 2382|       |
 2383|       |    /* SECOND STAGE
 2384|       |         Extend with zero channels to achieved the desired number of output
 2385|       |       channels. */
 2386|      0|    if (numOutChannels > TWO_CHANNEL) {
  ------------------
  |  |  174|      0|#define TWO_CHANNEL (2)
  ------------------
  |  Branch (2386:9): [True: 0, False: 0]
  ------------------
 2387|      0|      DMX_PCM *pIn[(8)] = {NULL};
  ------------------
  |  |  296|      0|#define DMX_PCM FIXP_DBL
  ------------------
 2388|      0|      DMX_PCM *pOut[(8)] = {NULL};
  ------------------
  |  |  296|      0|#define DMX_PCM FIXP_DBL
  ------------------
 2389|      0|      UINT sample;
 2390|      0|      AUDIO_CHANNEL_TYPE inChTypes[(8)];
 2391|      0|      UCHAR inChIndices[(8)];
 2392|      0|      UCHAR numChPerGrp[2][(4)];
 2393|      0|      int nContentCh = 0; /* Number of channels with content */
 2394|      0|      int nEmptyCh = 0;   /* Number of channels with content */
 2395|      0|      int ch, chGrp, isCompatible = 1;
 2396|       |
 2397|       |      /* Do not change the signalling which is the channel types and indices.
 2398|       |         Just reorder and add channels. So first save the input signalling. */
 2399|      0|      FDKmemcpy(inChTypes, channelType,
 2400|      0|                numInChannels * sizeof(AUDIO_CHANNEL_TYPE));
 2401|      0|      FDKmemclear(inChTypes + numInChannels,
 2402|      0|                  ((8) - numInChannels) * sizeof(AUDIO_CHANNEL_TYPE));
 2403|      0|      FDKmemcpy(inChIndices, channelIndices, numInChannels * sizeof(UCHAR));
 2404|      0|      FDKmemclear(inChIndices + numInChannels,
 2405|      0|                  ((8) - numInChannels) * sizeof(UCHAR));
 2406|       |
 2407|       |      /* Set this stages output stride and channel mode: */
 2408|      0|      outStride = (fInterleaved) ? numOutChannels : 1;
  ------------------
  |  Branch (2408:19): [True: 0, False: 0]
  ------------------
 2409|      0|      outChMode = outChModeTable[numOutChannels];
 2410|      0|      FDK_ASSERT(outChMode != CH_MODE_UNDEFINED);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2410:7): [True: 0, False: 0]
  ------------------
 2411|       |
 2412|       |      /* Check if input channel config can be easily mapped to the desired
 2413|       |       * output config. */
 2414|      0|      for (chGrp = 0; chGrp < (4); chGrp += 1) {
  ------------------
  |  Branch (2414:23): [True: 0, False: 0]
  ------------------
 2415|      0|        numChPerGrp[IN][chGrp] = (inChMode >> (chGrp * 4)) & 0xF;
  ------------------
  |  |  117|      0|#define IN 0
  ------------------
 2416|      0|        numChPerGrp[OUT][chGrp] = (outChMode >> (chGrp * 4)) & 0xF;
  ------------------
  |  |  118|      0|#define OUT 1
  ------------------
 2417|       |
 2418|      0|        if (numChPerGrp[IN][chGrp] > numChPerGrp[OUT][chGrp]) {
  ------------------
  |  |  117|      0|#define IN 0
  ------------------
                      if (numChPerGrp[IN][chGrp] > numChPerGrp[OUT][chGrp]) {
  ------------------
  |  |  118|      0|#define OUT 1
  ------------------
  |  Branch (2418:13): [True: 0, False: 0]
  ------------------
 2419|      0|          isCompatible = 0;
 2420|      0|          break;
 2421|      0|        }
 2422|      0|      }
 2423|       |
 2424|      0|      if (isCompatible) {
  ------------------
  |  Branch (2424:11): [True: 0, False: 0]
  ------------------
 2425|       |        /* Get new channel description and channel
 2426|       |         * mapping for the desired output channel mode. */
 2427|      0|        getChannelDescription(outChMode, mapDescr, channelType, channelIndices,
 2428|      0|                              outOffsetTable);
 2429|       |        /* If the input config has a back center channel but the output
 2430|       |           config has not, copy it to left and right (if available). */
 2431|      0|        if ((numChPerGrp[IN][CH_GROUP_REAR] % 2) &&
  ------------------
  |  |  117|      0|#define IN 0
  ------------------
                      if ((numChPerGrp[IN][CH_GROUP_REAR] % 2) &&
  ------------------
  |  |  133|      0|#define CH_GROUP_REAR (2)
  ------------------
  |  Branch (2431:13): [True: 0, False: 0]
  ------------------
 2432|      0|            !(numChPerGrp[OUT][CH_GROUP_REAR] % 2)) {
  ------------------
  |  |  118|      0|#define OUT 1
  ------------------
                          !(numChPerGrp[OUT][CH_GROUP_REAR] % 2)) {
  ------------------
  |  |  133|      0|#define CH_GROUP_REAR (2)
  ------------------
  |  Branch (2432:13): [True: 0, False: 0]
  ------------------
 2433|      0|          if (numChPerGrp[IN][CH_GROUP_REAR] == 1) {
  ------------------
  |  |  117|      0|#define IN 0
  ------------------
                        if (numChPerGrp[IN][CH_GROUP_REAR] == 1) {
  ------------------
  |  |  133|      0|#define CH_GROUP_REAR (2)
  ------------------
  |  Branch (2433:15): [True: 0, False: 0]
  ------------------
 2434|      0|            inOffsetTable[RIGHT_REAR_CHANNEL] =
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 2435|      0|                inOffsetTable[LEFT_REAR_CHANNEL];
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 2436|      0|          } else if (numChPerGrp[IN][CH_GROUP_REAR] == 3) {
  ------------------
  |  |  117|      0|#define IN 0
  ------------------
                        } else if (numChPerGrp[IN][CH_GROUP_REAR] == 3) {
  ------------------
  |  |  133|      0|#define CH_GROUP_REAR (2)
  ------------------
  |  Branch (2436:22): [True: 0, False: 0]
  ------------------
 2437|      0|            inOffsetTable[RIGHT_MULTIPRPS_CHANNEL] =
  ------------------
  |  |  152|      0|#define RIGHT_MULTIPRPS_CHANNEL (7) /* Right multipurpose channel */
  ------------------
 2438|      0|                inOffsetTable[LEFT_MULTIPRPS_CHANNEL];
  ------------------
  |  |  151|      0|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 2439|      0|          }
 2440|      0|        }
 2441|      0|      } else {
 2442|       |        /* Just copy and extend the original config */
 2443|      0|        FDKmemcpy(outOffsetTable, inOffsetTable, (8) * sizeof(UCHAR));
 2444|      0|      }
 2445|       |
 2446|       |      /* Set I/O channel pointer.
 2447|       |         Note: The following assignment algorithm clears the channel offset
 2448|       |         tables. Thus they can not be used afterwards. */
 2449|      0|      for (ch = 0; ch < (8); ch += 1) {
  ------------------
  |  Branch (2449:20): [True: 0, False: 0]
  ------------------
 2450|      0|        if ((outOffsetTable[ch] < 255) &&
  ------------------
  |  Branch (2450:13): [True: 0, False: 0]
  ------------------
 2451|      0|            (inOffsetTable[ch] < 255)) { /* Set I/O pointer: */
  ------------------
  |  Branch (2451:13): [True: 0, False: 0]
  ------------------
 2452|      0|          pIn[nContentCh] =
 2453|      0|              &pPcmBuf[inOffsetTable[ch] * offset + (frameSize - 1) * inStride];
 2454|      0|          pOut[nContentCh] = &pPcmBuf[outOffsetTable[ch] * offset +
 2455|      0|                                      (frameSize - 1) * outStride];
 2456|       |          /* Update signalling */
 2457|      0|          channelType[outOffsetTable[ch]] = inChTypes[inOffsetTable[ch]];
 2458|      0|          channelIndices[outOffsetTable[ch]] = inChIndices[inOffsetTable[ch]];
 2459|      0|          inOffsetTable[ch] = 255;
 2460|      0|          outOffsetTable[ch] = 255;
 2461|      0|          nContentCh += 1;
 2462|      0|        }
 2463|      0|      }
 2464|      0|      if (isCompatible) {
  ------------------
  |  Branch (2464:11): [True: 0, False: 0]
  ------------------
 2465|       |        /* Assign the remaining input channels.
 2466|       |           This is just a safety appliance. We should never need it. */
 2467|      0|        for (ch = 0; ch < (8); ch += 1) {
  ------------------
  |  Branch (2467:22): [True: 0, False: 0]
  ------------------
 2468|      0|          if (inOffsetTable[ch] < 255) {
  ------------------
  |  Branch (2468:15): [True: 0, False: 0]
  ------------------
 2469|      0|            int outCh;
 2470|      0|            for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (2470:29): [True: 0, False: 0]
  ------------------
 2471|      0|              if (outOffsetTable[outCh] < 255) {
  ------------------
  |  Branch (2471:19): [True: 0, False: 0]
  ------------------
 2472|      0|                break;
 2473|      0|              }
 2474|      0|            }
 2475|      0|            if (outCh >= (8)) {
  ------------------
  |  Branch (2475:17): [True: 0, False: 0]
  ------------------
 2476|      0|              FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2476:15): [Folded, False: 0]
  ------------------
 2477|      0|              break;
 2478|      0|            }
 2479|       |            /* Set I/O pointer: */
 2480|      0|            pIn[nContentCh] = &pPcmBuf[inOffsetTable[ch] * offset +
 2481|      0|                                       (frameSize - 1) * inStride];
 2482|      0|            pOut[nContentCh] = &pPcmBuf[outOffsetTable[outCh] * offset +
 2483|      0|                                        (frameSize - 1) * outStride];
 2484|       |            /* Update signalling */
 2485|      0|            FDK_ASSERT(inOffsetTable[outCh] < numInChannels);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2485:13): [True: 0, False: 0]
  ------------------
 2486|      0|            FDK_ASSERT(outOffsetTable[outCh] < numOutChannels);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2486:13): [True: 0, False: 0]
  ------------------
 2487|      0|            channelType[outOffsetTable[outCh]] = inChTypes[inOffsetTable[ch]];
 2488|      0|            channelIndices[outOffsetTable[outCh]] =
 2489|      0|                inChIndices[inOffsetTable[ch]];
 2490|      0|            inOffsetTable[ch] = 255;
 2491|      0|            outOffsetTable[outCh] = 255;
 2492|      0|            nContentCh += 1;
 2493|      0|          }
 2494|      0|        }
 2495|       |        /* Set the remaining output channel pointer */
 2496|      0|        for (ch = 0; ch < (8); ch += 1) {
  ------------------
  |  Branch (2496:22): [True: 0, False: 0]
  ------------------
 2497|      0|          if (outOffsetTable[ch] < 255) {
  ------------------
  |  Branch (2497:15): [True: 0, False: 0]
  ------------------
 2498|      0|            pOut[nContentCh + nEmptyCh] = &pPcmBuf[outOffsetTable[ch] * offset +
 2499|      0|                                                   (frameSize - 1) * outStride];
 2500|       |            /* Expand output signalling */
 2501|      0|            channelType[outOffsetTable[ch]] = ACT_NONE;
 2502|      0|            channelIndices[outOffsetTable[ch]] = (UCHAR)nEmptyCh;
 2503|      0|            outOffsetTable[ch] = 255;
 2504|      0|            nEmptyCh += 1;
 2505|      0|          }
 2506|      0|        }
 2507|      0|      } else {
 2508|       |        /* Set the remaining output channel pointer */
 2509|      0|        for (ch = nContentCh; ch < numOutChannels; ch += 1) {
  ------------------
  |  Branch (2509:31): [True: 0, False: 0]
  ------------------
 2510|      0|          pOut[ch] = &pPcmBuf[ch * offset + (frameSize - 1) * outStride];
 2511|       |          /* Expand output signalling */
 2512|      0|          channelType[ch] = ACT_NONE;
 2513|      0|          channelIndices[ch] = (UCHAR)nEmptyCh;
 2514|      0|          nEmptyCh += 1;
 2515|      0|        }
 2516|      0|      }
 2517|       |
 2518|       |      /* First copy the channels that have signal */
 2519|      0|      for (sample = 0; sample < frameSize; sample += 1) {
  ------------------
  |  Branch (2519:24): [True: 0, False: 0]
  ------------------
 2520|      0|        DMX_PCM tIn[(8)];
  ------------------
  |  |  296|      0|#define DMX_PCM FIXP_DBL
  ------------------
 2521|       |        /* Read all channel samples */
 2522|      0|        for (ch = 0; ch < nContentCh; ch += 1) {
  ------------------
  |  Branch (2522:22): [True: 0, False: 0]
  ------------------
 2523|      0|          tIn[ch] = *pIn[ch];
 2524|      0|          pIn[ch] -= inStride;
 2525|      0|        }
 2526|       |        /* Write all channel samples */
 2527|      0|        for (ch = 0; ch < nContentCh; ch += 1) {
  ------------------
  |  Branch (2527:22): [True: 0, False: 0]
  ------------------
 2528|      0|          *pOut[ch] = tIn[ch];
 2529|      0|          pOut[ch] -= outStride;
 2530|      0|        }
 2531|      0|      }
 2532|       |
 2533|       |      /* Clear all the other channels */
 2534|      0|      for (sample = 0; sample < frameSize; sample++) {
  ------------------
  |  Branch (2534:24): [True: 0, False: 0]
  ------------------
 2535|      0|        for (ch = nContentCh; ch < numOutChannels; ch += 1) {
  ------------------
  |  Branch (2535:31): [True: 0, False: 0]
  ------------------
 2536|      0|          *pOut[ch] = (DMX_PCM)0;
 2537|      0|          pOut[ch] -= outStride;
 2538|      0|        }
 2539|      0|      }
 2540|      0|    }
 2541|       |
 2542|       |    /* update the number of output channels */
 2543|      0|    *nChannels = numOutChannels;
 2544|      0|  } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 2545|       |       - - - - - - - - - - - - - - - - - - */
 2546|      0|  else if (numInChannels == numOutChannels) {
  ------------------
  |  Branch (2546:12): [True: 0, False: 0]
  ------------------
 2547|       |    /* Don't need to change the channel description here */
 2548|       |
 2549|      0|    switch (numInChannels) {
 2550|      0|      case 2: { /* Set up channel pointer */
  ------------------
  |  Branch (2550:7): [True: 0, False: 0]
  ------------------
 2551|      0|        DMX_PCM *pInPcm[(8)];
  ------------------
  |  |  296|      0|#define DMX_PCM FIXP_DBL
  ------------------
 2552|      0|        DMX_PCM *pOutL, *pOutR;
  ------------------
  |  |  296|      0|#define DMX_PCM FIXP_DBL
  ------------------
 2553|      0|        FIXP_DMX flev;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 2554|       |
 2555|      0|        UINT sample;
 2556|       |
 2557|      0|        if (fInterleaved) {
  ------------------
  |  Branch (2557:13): [True: 0, False: 0]
  ------------------
 2558|      0|          inStride = numInChannels;
 2559|      0|          outStride =
 2560|      0|              2; /* fixed !!! (below stereo is donwmixed to mono if required */
 2561|      0|          offset = 1; /* Channel specific offset factor */
 2562|      0|        } else {
 2563|      0|          inStride = 1;
 2564|      0|          outStride = 1;
 2565|      0|          offset = frameSize; /* Channel specific offset factor */
 2566|      0|        }
 2567|       |
 2568|       |        /* Set input channel pointer */
 2569|      0|        pInPcm[LEFT_FRONT_CHANNEL] =
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 2570|      0|            &pPcmBuf[inOffsetTable[LEFT_FRONT_CHANNEL] * offset];
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 2571|      0|        pInPcm[RIGHT_FRONT_CHANNEL] =
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 2572|      0|            &pPcmBuf[inOffsetTable[RIGHT_FRONT_CHANNEL] * offset];
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 2573|       |
 2574|       |        /* Set output channel pointer (same as input) */
 2575|      0|        pOutL = pInPcm[LEFT_FRONT_CHANNEL];
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 2576|      0|        pOutR = pInPcm[RIGHT_FRONT_CHANNEL];
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 2577|       |
 2578|       |        /* Set downmix levels: */
 2579|      0|        flev = FL2FXCONST_DMX(0.70710678f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2580|       |        /* 2/0 input: */
 2581|      0|        switch (dualChannelMode) {
 2582|      0|          case CH1_MODE: /* L' = 0.707 * Ch1;  R' = 0.707 * Ch1 */
  ------------------
  |  Branch (2582:11): [True: 0, False: 0]
  ------------------
 2583|      0|            for (sample = 0; sample < frameSize; sample++) {
  ------------------
  |  Branch (2583:30): [True: 0, False: 0]
  ------------------
 2584|      0|              *pOutL = *pOutR = (DMX_PCM)SATURATE_RIGHT_SHIFT(
  ------------------
  |  |  242|      0|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  ------------------
  |  |  |  Branch (242:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  243|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  244|      0|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  ------------------
  |  |  |  Branch (244:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  245|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  246|      0|             : ((LONG)(src) >> (scale)))
  ------------------
 2585|      0|                  fMult((DMX_PCMF)*pInPcm[LEFT_FRONT_CHANNEL], flev),
 2586|      0|                  DFRACT_BITS - DMX_PCM_BITS, DMX_PCM_BITS);
 2587|       |
 2588|      0|              pInPcm[LEFT_FRONT_CHANNEL] += inStride;
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 2589|      0|              pOutL += outStride;
 2590|      0|              pOutR += outStride;
 2591|      0|            }
 2592|      0|            break;
 2593|      0|          case CH2_MODE: /* L' = 0.707 * Ch2;  R' = 0.707 * Ch2 */
  ------------------
  |  Branch (2593:11): [True: 0, False: 0]
  ------------------
 2594|      0|            for (sample = 0; sample < frameSize; sample++) {
  ------------------
  |  Branch (2594:30): [True: 0, False: 0]
  ------------------
 2595|      0|              *pOutL = *pOutR = (DMX_PCM)SATURATE_RIGHT_SHIFT(
  ------------------
  |  |  242|      0|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  ------------------
  |  |  |  Branch (242:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  243|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  244|      0|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  ------------------
  |  |  |  Branch (244:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  245|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  246|      0|             : ((LONG)(src) >> (scale)))
  ------------------
 2596|      0|                  fMult((DMX_PCMF)*pInPcm[RIGHT_FRONT_CHANNEL], flev),
 2597|      0|                  DFRACT_BITS - DMX_PCM_BITS, DMX_PCM_BITS);
 2598|       |
 2599|      0|              pInPcm[RIGHT_FRONT_CHANNEL] += inStride;
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 2600|      0|              pOutL += outStride;
 2601|      0|              pOutR += outStride;
 2602|      0|            }
 2603|      0|            break;
 2604|      0|          case MIXED_MODE: /* L' = 0.5*Ch1 + 0.5*Ch2;  R' = 0.5*Ch1 + 0.5*Ch2 */
  ------------------
  |  Branch (2604:11): [True: 0, False: 0]
  ------------------
 2605|      0|            for (sample = 0; sample < frameSize; sample++) {
  ------------------
  |  Branch (2605:30): [True: 0, False: 0]
  ------------------
 2606|      0|              *pOutL = *pOutR = (*pInPcm[LEFT_FRONT_CHANNEL] >> 1) +
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 2607|      0|                                (*pInPcm[RIGHT_FRONT_CHANNEL] >> 1);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 2608|       |
 2609|      0|              pInPcm[LEFT_FRONT_CHANNEL] += inStride;
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 2610|      0|              pInPcm[RIGHT_FRONT_CHANNEL] += inStride;
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 2611|      0|              pOutL += outStride;
 2612|      0|              pOutR += outStride;
 2613|      0|            }
 2614|      0|            break;
 2615|      0|          default:
  ------------------
  |  Branch (2615:11): [True: 0, False: 0]
  ------------------
 2616|      0|          case STEREO_MODE:
  ------------------
  |  Branch (2616:11): [True: 0, False: 0]
  ------------------
 2617|       |            /* nothing to do */
 2618|      0|            break;
 2619|      0|        }
 2620|      0|      } break;
 2621|       |
 2622|      0|      default:
  ------------------
  |  Branch (2622:7): [True: 0, False: 0]
  ------------------
 2623|       |        /* nothing to do */
 2624|      0|        break;
 2625|      0|    }
 2626|      0|  }
 2627|       |
 2628|  18.6k|  return (errorStatus);
 2629|  18.6k|}
pcmDmx_Close:
 2635|  21.8k|PCMDMX_ERROR pcmDmx_Close(HANDLE_PCM_DOWNMIX *pSelf) {
 2636|  21.8k|  if (pSelf == NULL) {
  ------------------
  |  Branch (2636:7): [True: 0, False: 21.8k]
  ------------------
 2637|      0|    return (PCMDMX_INVALID_HANDLE);
 2638|      0|  }
 2639|       |
 2640|  21.8k|  FreePcmDmxInstance(pSelf);
 2641|  21.8k|  *pSelf = NULL;
 2642|       |
 2643|  21.8k|  return (PCMDMX_OK);
 2644|  21.8k|}
pcmdmx_lib.cpp:_ZL14getChannelModejPK18AUDIO_CHANNEL_TYPEPhS2_P20PCM_DMX_CHANNEL_MODE:
  552|  18.6k|) {
  553|  18.6k|  UCHAR numCh[(3)][(4)];
  554|  18.6k|  UCHAR mapped[(8)];
  555|  18.6k|  PCM_DMX_SPEAKER_POSITION spkrPos[(8)];
  556|  18.6k|  PCMDMX_ERROR err = PCMDMX_OK;
  557|  18.6k|  unsigned ch, numMappedInChs = 0;
  558|  18.6k|  unsigned startSlot;
  559|  18.6k|  unsigned stopSlot = LOW_FREQUENCY_CHANNEL;
  ------------------
  |  |  150|  18.6k|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
  560|       |
  561|  18.6k|  FDK_ASSERT(channelType != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (561:3): [True: 18.6k, False: 0]
  ------------------
  562|  18.6k|  FDK_ASSERT(channelIndices != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (562:3): [True: 18.6k, False: 0]
  ------------------
  563|  18.6k|  FDK_ASSERT(offsetTable != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (563:3): [True: 18.6k, False: 0]
  ------------------
  564|  18.6k|  FDK_ASSERT(chMode != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (564:3): [True: 18.6k, False: 0]
  ------------------
  565|       |
  566|       |  /* For details see ISO/IEC 13818-7:2005(E), 8.5.3 Channel configuration */
  567|  18.6k|  FDKmemclear(numCh, (3) * (4) * sizeof(UCHAR));
  568|  18.6k|  FDKmemclear(mapped, (8) * sizeof(UCHAR));
  569|  18.6k|  FDKmemclear(spkrPos, (8) * sizeof(PCM_DMX_SPEAKER_POSITION));
  570|       |  /* Init output */
  571|  18.6k|  FDKmemset(offsetTable, 255, (8) * sizeof(UCHAR));
  572|  18.6k|  *chMode = CH_MODE_UNDEFINED;
  573|       |
  574|       |  /* Determine how many channels are assigned to each channels each group: */
  575|   165k|  for (ch = 0; ch < numChannels; ch += 1) {
  ------------------
  |  Branch (575:16): [True: 147k, False: 18.6k]
  ------------------
  576|   147k|    unsigned chGrp = fMax(
  577|   147k|        (channelType[ch] & 0x0F) - 1,
  578|   147k|        0); /* Assign all undefined channels (ACT_NONE) to front channels. */
  579|   147k|    numCh[channelType[ch] >> 4][chGrp] += 1;
  580|   147k|  }
  581|       |
  582|  18.6k|  {
  583|  18.6k|    int chGrp;
  584|       |    /* Sanity check on the indices */
  585|  93.4k|    for (chGrp = 0; chGrp < (4); chGrp += 1) {
  ------------------
  |  Branch (585:21): [True: 74.7k, False: 18.6k]
  ------------------
  586|  74.7k|      int plane;
  587|   299k|      for (plane = 0; plane < (3); plane += 1) {
  ------------------
  |  Branch (587:23): [True: 224k, False: 74.7k]
  ------------------
  588|   224k|        if (numCh[plane][chGrp] == 0) continue;
  ------------------
  |  Branch (588:13): [True: 158k, False: 65.4k]
  ------------------
  589|  65.4k|        AUDIO_CHANNEL_TYPE aChType =
  590|  65.4k|            (AUDIO_CHANNEL_TYPE)((plane << 4) | ((chGrp + 1) & 0xF));
  591|  65.4k|        if (!validateIndices(numChannels, numCh[plane][chGrp], aChType,
  ------------------
  |  Branch (591:13): [True: 2, False: 65.4k]
  ------------------
  592|  65.4k|                             channelType, channelIndices)) {
  593|      2|          unsigned idxCnt = 0;
  594|     16|          for (ch = 0; ch < numChannels; ch += 1) {
  ------------------
  |  Branch (594:24): [True: 14, False: 2]
  ------------------
  595|     14|            if (channelType[ch] == aChType) {
  ------------------
  |  Branch (595:17): [True: 9, False: 5]
  ------------------
  596|      9|              channelIndices[ch] = idxCnt++;
  597|      9|            }
  598|     14|          }
  599|      2|          err = PCMDMX_INVALID_CH_CONFIG;
  600|      2|        }
  601|  65.4k|      }
  602|  74.7k|    }
  603|  18.6k|  }
  604|       |  /* Mapping HEAT 1:
  605|       |   *   Determine the speaker position of each input channel and map it to a
  606|       |   * internal slot if it matches exactly (with zero distance). */
  607|   165k|  for (ch = 0; ch < numChannels; ch += 1) {
  ------------------
  |  Branch (607:16): [True: 147k, False: 18.6k]
  ------------------
  608|   147k|    UINT mapDist = (unsigned)-1;
  609|   147k|    unsigned mapCh, mapPos = (unsigned)-1;
  610|   147k|    unsigned chGrp = fMax(
  611|   147k|        (channelType[ch] & 0x0F) - 1,
  612|   147k|        0); /* Assign all undefined channels (ACT_NONE) to front channels. */
  613|       |
  614|   147k|    spkrPos[ch] = getSpeakerPos(channelType[ch], channelIndices[ch],
  615|   147k|                                numCh[channelType[ch] >> 4][chGrp]);
  616|       |
  617|  1.02M|    for (mapCh = 0; mapCh <= stopSlot; mapCh += 1) {
  ------------------
  |  Branch (617:21): [True: 882k, False: 147k]
  ------------------
  618|   882k|      if (offsetTable[mapCh] == 255) {
  ------------------
  |  Branch (618:11): [True: 480k, False: 402k]
  ------------------
  619|   480k|        UINT dist = getSpeakerDistance(spkrPos[ch], spkrSlotPos[mapCh]);
  620|   480k|        if (dist < mapDist) {
  ------------------
  |  Branch (620:13): [True: 237k, False: 242k]
  ------------------
  621|   237k|          mapPos = mapCh;
  622|   237k|          mapDist = dist;
  623|   237k|        }
  624|   480k|      }
  625|   882k|    }
  626|   147k|    if (mapDist <= PCMDMX_THRESHOLD_MAP_HEAT_1) {
  ------------------
  |  |  179|   147k|#define PCMDMX_THRESHOLD_MAP_HEAT_1 (0) /* Store only exact matches */
  ------------------
  |  Branch (626:9): [True: 76.9k, False: 70.1k]
  ------------------
  627|  76.9k|      offsetTable[mapPos] = (UCHAR)ch;
  628|  76.9k|      mapped[ch] = 1;
  629|  76.9k|      numMappedInChs += 1;
  630|  76.9k|    }
  631|   147k|  }
  632|       |
  633|       |  /* Mapping HEAT 2:
  634|       |   *   Go through the unmapped input channels and assign them to the internal
  635|       |   * slots that matches best (least distance). But assign center channels to
  636|       |   * center slots only. */
  637|  18.6k|  startSlot =
  638|  18.6k|      ((numCh[CH_PLAIN_NORMAL][CH_GROUP_FRONT] & 0x1) || (numChannels >= (8)))
  ------------------
  |  |  137|  18.6k|#define CH_PLAIN_NORMAL (0)
  ------------------
                    ((numCh[CH_PLAIN_NORMAL][CH_GROUP_FRONT] & 0x1) || (numChannels >= (8)))
  ------------------
  |  |  131|  18.6k|#define CH_GROUP_FRONT (0)
  ------------------
  |  Branch (638:8): [True: 18.6k, False: 2]
  |  Branch (638:58): [True: 0, False: 2]
  ------------------
  639|  18.6k|          ? 0
  640|  18.6k|          : 1;
  641|   165k|  for (ch = 0; ch < (unsigned)numChannels; ch += 1) {
  ------------------
  |  Branch (641:16): [True: 147k, False: 18.6k]
  ------------------
  642|   147k|    if (!mapped[ch]) {
  ------------------
  |  Branch (642:9): [True: 70.1k, False: 76.9k]
  ------------------
  643|  70.1k|      UINT mapDist = (unsigned)-1;
  644|  70.1k|      unsigned mapCh, mapPos = (unsigned)-1;
  645|       |
  646|   490k|      for (mapCh = startSlot; mapCh <= stopSlot; mapCh += 1) {
  ------------------
  |  Branch (646:31): [True: 420k, False: 70.1k]
  ------------------
  647|   420k|        if (offsetTable[mapCh] == 255) {
  ------------------
  |  Branch (647:13): [True: 52.7k, False: 367k]
  ------------------
  648|  52.7k|          UINT dist = getSpeakerDistance(spkrPos[ch], spkrSlotPos[mapCh]);
  649|  52.7k|          if (dist < mapDist) {
  ------------------
  |  Branch (649:15): [True: 35.1k, False: 17.5k]
  ------------------
  650|  35.1k|            mapPos = mapCh;
  651|  35.1k|            mapDist = dist;
  652|  35.1k|          }
  653|  52.7k|        }
  654|   420k|      }
  655|  70.1k|      if ((mapPos <= stopSlot) && (mapDist < PCMDMX_THRESHOLD_MAP_HEAT_2) &&
  ------------------
  |  |  180|  35.1k|#define PCMDMX_THRESHOLD_MAP_HEAT_2 (20)
  ------------------
  |  Branch (655:11): [True: 35.1k, False: 34.9k]
  |  Branch (655:35): [True: 35.1k, False: 12]
  ------------------
  656|  35.1k|          (((spkrPos[ch].x != 0) && (spkrSlotPos[mapPos].x != 0)) /* XOR */
  ------------------
  |  Branch (656:13): [True: 35.1k, False: 0]
  |  Branch (656:37): [True: 35.1k, False: 0]
  ------------------
  657|      0|           || ((spkrPos[ch].x == 0) &&
  ------------------
  |  Branch (657:16): [True: 0, False: 0]
  ------------------
  658|      0|               (spkrSlotPos[mapPos].x ==
  ------------------
  |  Branch (658:16): [True: 0, False: 0]
  ------------------
  659|  35.1k|                0)))) { /* Assign center channels to center slots only. */
  660|  35.1k|        offsetTable[mapPos] = (UCHAR)ch;
  661|  35.1k|        mapped[ch] = 1;
  662|  35.1k|        numMappedInChs += 1;
  663|  35.1k|      }
  664|  70.1k|    }
  665|   147k|  }
  666|       |
  667|       |  /* Mapping HEAT 3:
  668|       |   *   Assign the rest by searching for the nearest input channel for each
  669|       |   * internal slot. */
  670|   165k|  for (ch = startSlot; (ch < (8)) && (numMappedInChs < numChannels); ch += 1) {
  ------------------
  |  Branch (670:24): [True: 147k, False: 18.6k]
  |  Branch (670:38): [True: 147k, False: 0]
  ------------------
  671|   147k|    if (offsetTable[ch] == 255) {
  ------------------
  |  Branch (671:9): [True: 34.9k, False: 112k]
  ------------------
  672|  34.9k|      UINT mapDist = (unsigned)-1;
  673|  34.9k|      unsigned mapCh, mapPos = (unsigned)-1;
  674|       |
  675|   312k|      for (mapCh = 0; mapCh < (unsigned)numChannels; mapCh += 1) {
  ------------------
  |  Branch (675:23): [True: 277k, False: 34.9k]
  ------------------
  676|   277k|        if (!mapped[mapCh]) {
  ------------------
  |  Branch (676:13): [True: 51.2k, False: 226k]
  ------------------
  677|  51.2k|          UINT dist = getSpeakerDistance(spkrPos[mapCh], spkrSlotPos[ch]);
  678|  51.2k|          if (dist < mapDist) {
  ------------------
  |  Branch (678:15): [True: 34.9k, False: 16.3k]
  ------------------
  679|  34.9k|            mapPos = mapCh;
  680|  34.9k|            mapDist = dist;
  681|  34.9k|          }
  682|  51.2k|        }
  683|   277k|      }
  684|  34.9k|      if (mapDist < PCMDMX_THRESHOLD_MAP_HEAT_3) {
  ------------------
  |  |  182|  34.9k|  (256) /* Do not assign normal channels to LFE */
  ------------------
  |  Branch (684:11): [True: 34.9k, False: 4]
  ------------------
  685|  34.9k|        offsetTable[ch] = (UCHAR)mapPos;
  686|  34.9k|        mapped[mapPos] = 1;
  687|  34.9k|        numMappedInChs += 1;
  688|  34.9k|        if ((spkrPos[mapPos].x == 0) && (spkrSlotPos[ch].x != 0) &&
  ------------------
  |  Branch (688:13): [True: 2.39k, False: 32.5k]
  |  Branch (688:41): [True: 2.39k, False: 0]
  ------------------
  689|  2.39k|            (numChannels <
  ------------------
  |  Branch (689:13): [True: 2.39k, False: 0]
  ------------------
  690|  2.39k|             (8))) { /* Skip the paired slot if we assigned a center channel. */
  691|  2.39k|          ch += 1;
  692|  2.39k|        }
  693|  34.9k|      }
  694|  34.9k|    }
  695|   147k|  }
  696|       |
  697|       |  /* Finaly compose the channel mode */
  698|  93.4k|  for (ch = 0; ch < (4); ch += 1) {
  ------------------
  |  Branch (698:16): [True: 74.7k, False: 18.6k]
  ------------------
  699|  74.7k|    int plane, numChInGrp = 0;
  700|   299k|    for (plane = 0; plane < (3); plane += 1) {
  ------------------
  |  Branch (700:21): [True: 224k, False: 74.7k]
  ------------------
  701|   224k|      numChInGrp += numCh[plane][ch];
  702|   224k|    }
  703|  74.7k|    *chMode = (PCM_DMX_CHANNEL_MODE)(*chMode | (numChInGrp << (ch * 4)));
  704|  74.7k|  }
  705|       |
  706|  18.6k|  return err;
  707|  18.6k|}
pcmdmx_lib.cpp:_ZL15validateIndicesjj18AUDIO_CHANNEL_TYPEPKS_PKh:
  512|  65.4k|                            const UCHAR channelIndices[]) {
  513|   212k|  for (UINT reqValue = 0; reqValue < numChannelsPlaneAndGrp; reqValue++) {
  ------------------
  |  Branch (513:27): [True: 147k, False: 65.4k]
  ------------------
  514|   147k|    int found = FALSE;
  ------------------
  |  |  115|   147k|#define FALSE 0
  ------------------
  515|  1.30M|    for (UINT i = 0; i < numChannels; i++) {
  ------------------
  |  Branch (515:22): [True: 1.15M, False: 147k]
  ------------------
  516|  1.15M|      if (channelType[i] == aChType) {
  ------------------
  |  Branch (516:11): [True: 416k, False: 743k]
  ------------------
  517|   416k|        if (channelIndices[i] == reqValue) {
  ------------------
  |  Branch (517:13): [True: 147k, False: 269k]
  ------------------
  518|   147k|          if (found == TRUE) {
  ------------------
  |  |  116|   147k|#define TRUE 1
  ------------------
  |  Branch (518:15): [True: 1, False: 147k]
  ------------------
  519|      1|            return 0; /* Found channel index a second time */
  520|   147k|          } else {
  521|   147k|            found = TRUE; /* Found channel index */
  ------------------
  |  |  116|   147k|#define TRUE 1
  ------------------
  522|   147k|          }
  523|   147k|        }
  524|   416k|      }
  525|  1.15M|    }
  526|   147k|    if (found == FALSE) {
  ------------------
  |  |  115|   147k|#define FALSE 0
  ------------------
  |  Branch (526:9): [True: 1, False: 147k]
  ------------------
  527|      1|      return 0; /* Did not find channel index */
  528|      1|    }
  529|   147k|  }
  530|  65.4k|  return 1; /* Successfully validated channel indices */
  531|  65.4k|}
pcmdmx_lib.cpp:_ZL13getSpeakerPos18AUDIO_CHANNEL_TYPEhh:
  399|   147k|                                              UCHAR chIndex, UCHAR numChInGrp) {
  400|   147k|#define PCMDMX_SPKR_POS_X_MAX_WIDTH (3)
  401|   147k|#define PCMDMX_SPKR_POS_Y_SPREAD (2)
  402|   147k|#define PCMDMX_SPKR_POS_Z_SPREAD (2)
  403|       |
  404|   147k|  PCM_DMX_SPEAKER_POSITION spkrPos = {0, 0, 0};
  405|   147k|  AUDIO_CHANNEL_TYPE chGrp = (AUDIO_CHANNEL_TYPE)(chType & 0x0F);
  406|   147k|  unsigned fHasCenter = numChInGrp & 0x1;
  407|   147k|  unsigned chGrpWidth = numChInGrp >> 1;
  408|   147k|  unsigned fIsCenter = 0;
  409|   147k|  unsigned fIsLfe = (chType == ACT_LFE) ? 1 : 0;
  ------------------
  |  Branch (409:21): [True: 18.6k, False: 128k]
  ------------------
  410|   147k|  int offset = 0;
  411|       |
  412|   147k|  FDK_ASSERT(chIndex < numChInGrp);
  ------------------
  |  |  221|   147k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (412:3): [True: 147k, False: 0]
  ------------------
  413|       |
  414|   147k|  if ((chGrp == ACT_FRONT) && fHasCenter) {
  ------------------
  |  Branch (414:7): [True: 86.4k, False: 60.6k]
  |  Branch (414:31): [True: 67.5k, False: 18.8k]
  ------------------
  415|  67.5k|    if (chIndex == 0) fIsCenter = 1;
  ------------------
  |  Branch (415:9): [True: 18.6k, False: 48.8k]
  ------------------
  416|  67.5k|    chIndex = (UCHAR)fMax(0, chIndex - 1);
  417|  79.5k|  } else if (fHasCenter && (chIndex == numChInGrp - 1)) {
  ------------------
  |  Branch (417:14): [True: 25.8k, False: 53.6k]
  |  Branch (417:28): [True: 21.0k, False: 4.80k]
  ------------------
  418|  21.0k|    fIsCenter = 1;
  419|  21.0k|  }
  420|       |  /* now all even indices are left (-) */
  421|   147k|  if (!fIsCenter) {
  ------------------
  |  Branch (421:7): [True: 107k, False: 39.7k]
  ------------------
  422|   107k|    offset = chIndex >> 1;
  423|   107k|    if ((chGrp > ACT_FRONT) && (chType != ACT_SIDE) && !fIsLfe) {
  ------------------
  |  Branch (423:9): [True: 39.6k, False: 67.7k]
  |  Branch (423:32): [True: 39.6k, False: 2]
  |  Branch (423:56): [True: 39.6k, False: 0]
  ------------------
  424|       |      /* the higher the index the lower the distance to the center position */
  425|  39.6k|      offset = chGrpWidth - fHasCenter - offset;
  426|  39.6k|    }
  427|   107k|    if ((chIndex & 0x1) == 0) { /* even */
  ------------------
  |  Branch (427:9): [True: 53.6k, False: 53.6k]
  ------------------
  428|  53.6k|      offset = -(offset + 1);
  429|  53.6k|    } else {
  430|  53.6k|      offset += 1;
  431|  53.6k|    }
  432|   107k|  }
  433|       |  /* apply the offset */
  434|   147k|  if (chType == ACT_SIDE) {
  ------------------
  |  Branch (434:7): [True: 2, False: 147k]
  ------------------
  435|      2|    spkrPos.x = (offset < 0) ? -PCMDMX_SPKR_POS_X_MAX_WIDTH
  ------------------
  |  |  400|      1|#define PCMDMX_SPKR_POS_X_MAX_WIDTH (3)
  ------------------
  |  Branch (435:17): [True: 1, False: 1]
  ------------------
  436|      2|                             : PCMDMX_SPKR_POS_X_MAX_WIDTH;
  ------------------
  |  |  400|      3|#define PCMDMX_SPKR_POS_X_MAX_WIDTH (3)
  ------------------
  437|      2|    spkrPos.y = /* 1x */ PCMDMX_SPKR_POS_Y_SPREAD + (SCHAR)fAbs(offset) - 1;
  ------------------
  |  |  401|      2|#define PCMDMX_SPKR_POS_Y_SPREAD (2)
  ------------------
  438|      2|    spkrPos.z = 0;
  439|   147k|  } else {
  440|   147k|    unsigned spread =
  441|   147k|        ((chGrpWidth == 1) && (!fIsLfe)) ? PCMDMX_SPKR_POS_X_MAX_WIDTH - 1 : 1;
  ------------------
  |  |  400|  95.2k|#define PCMDMX_SPKR_POS_X_MAX_WIDTH (3)
  ------------------
  |  Branch (441:10): [True: 95.2k, False: 51.8k]
  |  Branch (441:31): [True: 95.2k, False: 0]
  ------------------
  442|   147k|    spkrPos.x = (SCHAR)offset * (SCHAR)spread;
  443|   147k|    if (fIsLfe) {
  ------------------
  |  Branch (443:9): [True: 18.6k, False: 128k]
  ------------------
  444|  18.6k|      spkrPos.y = 0;
  445|  18.6k|      spkrPos.z = SP_Z_LFE;
  ------------------
  |  |  187|  18.6k|#define SP_Z_LFE (-18)
  ------------------
  446|   128k|    } else {
  447|   128k|      spkrPos.y = (SCHAR)fMax((SCHAR)chGrp - 1, 0) * PCMDMX_SPKR_POS_Y_SPREAD;
  ------------------
  |  |  401|   128k|#define PCMDMX_SPKR_POS_Y_SPREAD (2)
  ------------------
  448|   128k|      spkrPos.z = (SCHAR)chType >> 4;
  449|   128k|      if (spkrPos.z == 2) { /* ACT_BOTTOM */
  ------------------
  |  Branch (449:11): [True: 0, False: 128k]
  ------------------
  450|      0|        spkrPos.z = -1;
  451|      0|      }
  452|   128k|      spkrPos.z *= PCMDMX_SPKR_POS_Z_SPREAD;
  ------------------
  |  |  402|   128k|#define PCMDMX_SPKR_POS_Z_SPREAD (2)
  ------------------
  453|   128k|    }
  454|   147k|  }
  455|   147k|  return spkrPos;
  456|   147k|}
pcmdmx_lib.cpp:_ZL18getSpeakerDistance24PCM_DMX_SPEAKER_POSITIONS_:
  388|   584k|                               PCM_DMX_SPEAKER_POSITION posB) {
  389|   584k|  PCM_DMX_SPEAKER_POSITION diff;
  390|       |
  391|   584k|  diff.x = posA.x - posB.x;
  392|   584k|  diff.y = posA.y - posB.y;
  393|   584k|  diff.z = posA.z - posB.z;
  394|       |
  395|   584k|  return ((diff.x * diff.x) + (diff.y * diff.y) + (diff.z * diff.z));
  396|   584k|}
pcmdmx_lib.cpp:_ZL21getChannelDescription20PCM_DMX_CHANNEL_MODEPK19FDK_channelMapDescrP18AUDIO_CHANNEL_TYPEPhS5_:
  728|  18.6k|) {
  729|  18.6k|  int grpIdx, plainIdx, numPlains = 1, numTotalChannels = 0;
  730|  18.6k|  int chCfg, ch = 0;
  731|       |
  732|  18.6k|  FDK_ASSERT(channelType != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (732:3): [True: 18.6k, False: 0]
  ------------------
  733|  18.6k|  FDK_ASSERT(channelIndices != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (733:3): [True: 18.6k, False: 0]
  ------------------
  734|  18.6k|  FDK_ASSERT(mapDescr != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (734:3): [True: 18.6k, False: 0]
  ------------------
  735|  18.6k|  FDK_ASSERT(offsetTable != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (735:3): [True: 18.6k, False: 0]
  ------------------
  736|       |
  737|       |  /* Init output arrays */
  738|  18.6k|  FDKmemclear(channelType, (8) * sizeof(AUDIO_CHANNEL_TYPE));
  739|  18.6k|  FDKmemclear(channelIndices, (8) * sizeof(UCHAR));
  740|  18.6k|  FDKmemset(offsetTable, 255, (8) * sizeof(UCHAR));
  741|       |
  742|       |  /* Summerize to get the total number of channels */
  743|  93.4k|  for (grpIdx = 0; grpIdx < (4); grpIdx += 1) {
  ------------------
  |  Branch (743:20): [True: 74.7k, False: 18.6k]
  ------------------
  744|  74.7k|    numTotalChannels += (chMode >> (grpIdx * 4)) & 0xF;
  745|  74.7k|  }
  746|       |
  747|       |  /* Get the appropriate channel map */
  748|  18.6k|  switch (chMode) {
  749|      0|    case CH_MODE_1_0_0_0:
  ------------------
  |  Branch (749:5): [True: 0, False: 18.6k]
  ------------------
  750|      0|    case CH_MODE_2_0_0_0:
  ------------------
  |  Branch (750:5): [True: 0, False: 18.6k]
  ------------------
  751|      0|    case CH_MODE_3_0_0_0:
  ------------------
  |  Branch (751:5): [True: 0, False: 18.6k]
  ------------------
  752|      0|    case CH_MODE_3_0_1_0:
  ------------------
  |  Branch (752:5): [True: 0, False: 18.6k]
  ------------------
  753|      0|    case CH_MODE_3_0_2_0:
  ------------------
  |  Branch (753:5): [True: 0, False: 18.6k]
  ------------------
  754|  18.6k|    case CH_MODE_3_0_2_1:
  ------------------
  |  Branch (754:5): [True: 18.6k, False: 0]
  ------------------
  755|  18.6k|      chCfg = numTotalChannels;
  756|  18.6k|      break;
  757|      0|    case CH_MODE_3_0_3_1:
  ------------------
  |  Branch (757:5): [True: 0, False: 18.6k]
  ------------------
  758|      0|      chCfg = 11;
  759|      0|      break;
  760|      0|    case CH_MODE_3_0_4_1:
  ------------------
  |  Branch (760:5): [True: 0, False: 18.6k]
  ------------------
  761|      0|      chCfg = 12;
  762|      0|      break;
  763|      0|    case CH_MODE_5_0_2_1:
  ------------------
  |  Branch (763:5): [True: 0, False: 18.6k]
  ------------------
  764|      0|      chCfg = 7;
  765|      0|      break;
  766|      0|    default:
  ------------------
  |  Branch (766:5): [True: 0, False: 18.6k]
  ------------------
  767|       |      /* fallback */
  768|      0|      chCfg = 0;
  769|      0|      break;
  770|  18.6k|  }
  771|       |
  772|       |  /* Compose channel offset table */
  773|       |
  774|  37.3k|  for (plainIdx = 0; plainIdx < numPlains; plainIdx += 1) {
  ------------------
  |  Branch (774:22): [True: 18.6k, False: 18.6k]
  ------------------
  775|  18.6k|    PCM_DMX_CHANNEL_MODE plainChMode;
  776|  18.6k|    UCHAR numChInGrp[(4)];
  777|       |
  778|  18.6k|    plainChMode = getChMode4Plain(plainIdx, chMode, chCfg);
  779|       |
  780|       |    /* Extract the number of channels per group */
  781|  18.6k|    numChInGrp[CH_GROUP_FRONT] = plainChMode & 0xF;
  ------------------
  |  |  131|  18.6k|#define CH_GROUP_FRONT (0)
  ------------------
  782|  18.6k|    numChInGrp[CH_GROUP_SIDE] = (plainChMode >> 4) & 0xF;
  ------------------
  |  |  132|  18.6k|#define CH_GROUP_SIDE (1)
  ------------------
  783|  18.6k|    numChInGrp[CH_GROUP_REAR] = (plainChMode >> 8) & 0xF;
  ------------------
  |  |  133|  18.6k|#define CH_GROUP_REAR (2)
  ------------------
  784|  18.6k|    numChInGrp[CH_GROUP_LFE] = (plainChMode >> 12) & 0xF;
  ------------------
  |  |  134|  18.6k|#define CH_GROUP_LFE (3)
  ------------------
  785|       |
  786|       |    /* Non-symmetric channels */
  787|  18.6k|    if ((numChInGrp[CH_GROUP_FRONT] & 0x1) && (plainIdx == CH_PLAIN_NORMAL)) {
  ------------------
  |  |  131|  18.6k|#define CH_GROUP_FRONT (0)
  ------------------
                  if ((numChInGrp[CH_GROUP_FRONT] & 0x1) && (plainIdx == CH_PLAIN_NORMAL)) {
  ------------------
  |  |  137|  18.6k|#define CH_PLAIN_NORMAL (0)
  ------------------
  |  Branch (787:9): [True: 18.6k, False: 0]
  |  Branch (787:47): [True: 18.6k, False: 0]
  ------------------
  788|       |      /* Odd number of front channels -> we have a center channel.
  789|       |         In MPEG-4 the center has the index 0. */
  790|  18.6k|      int mappedIdx = FDK_chMapDescr_getMapValue(mapDescr, (UCHAR)ch, chCfg);
  791|  18.6k|      offsetTable[CENTER_FRONT_CHANNEL] = (UCHAR)mappedIdx;
  ------------------
  |  |  144|  18.6k|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
  792|  18.6k|      channelType[mappedIdx] = ACT_FRONT;
  793|  18.6k|      channelIndices[mappedIdx] = 0;
  794|  18.6k|      ch += 1;
  795|  18.6k|    }
  796|       |
  797|  93.4k|    for (grpIdx = 0; grpIdx < (4); grpIdx += 1) {
  ------------------
  |  Branch (797:22): [True: 74.7k, False: 18.6k]
  ------------------
  798|  74.7k|      AUDIO_CHANNEL_TYPE type = ACT_NONE;
  799|  74.7k|      int chMapPos = 0, maxChannels = 0;
  800|  74.7k|      int chIdx = 0; /* Index of channel within the specific group */
  801|       |
  802|  74.7k|      switch (grpIdx) {
  803|  18.6k|        case CH_GROUP_FRONT:
  ------------------
  |  |  131|  18.6k|#define CH_GROUP_FRONT (0)
  ------------------
  |  Branch (803:9): [True: 18.6k, False: 56.0k]
  ------------------
  804|  18.6k|          type = (AUDIO_CHANNEL_TYPE)((plainIdx << 4) | ACT_FRONT);
  805|  18.6k|          switch (plainIdx) {
  806|  18.6k|            default:
  ------------------
  |  Branch (806:13): [True: 18.6k, False: 0]
  ------------------
  807|  18.6k|              chMapPos = LEFT_FRONT_CHANNEL;
  ------------------
  |  |  145|  18.6k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
  808|  18.6k|              chIdx = numChInGrp[grpIdx] & 0x1;
  809|  18.6k|              break;
  810|  18.6k|          }
  811|  18.6k|          maxChannels = 3;
  812|  18.6k|          break;
  813|  18.6k|        case CH_GROUP_SIDE:
  ------------------
  |  |  132|  18.6k|#define CH_GROUP_SIDE (1)
  ------------------
  |  Branch (813:9): [True: 18.6k, False: 56.0k]
  ------------------
  814|       |          /* Always map side channels to the multipurpose group. */
  815|  18.6k|          type = (AUDIO_CHANNEL_TYPE)((plainIdx << 4) | ACT_SIDE);
  816|  18.6k|          if (plainIdx == CH_PLAIN_TOP) {
  ------------------
  |  |  138|  18.6k|#define CH_PLAIN_TOP (1)
  ------------------
  |  Branch (816:15): [True: 0, False: 18.6k]
  ------------------
  817|      0|            chMapPos = LEFT_SIDE_CHANNEL_TOP;
  ------------------
  |  |  161|      0|#define LEFT_SIDE_CHANNEL_TOP (14)       /* Lvss */
  ------------------
  818|      0|            maxChannels = 3;
  819|  18.6k|          } else {
  820|  18.6k|            chMapPos = LEFT_MULTIPRPS_CHANNEL;
  ------------------
  |  |  151|  18.6k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
  821|  18.6k|            maxChannels = 2;
  822|  18.6k|          }
  823|  18.6k|          break;
  824|  18.6k|        case CH_GROUP_REAR:
  ------------------
  |  |  133|  18.6k|#define CH_GROUP_REAR (2)
  ------------------
  |  Branch (824:9): [True: 18.6k, False: 56.0k]
  ------------------
  825|  18.6k|          type = (AUDIO_CHANNEL_TYPE)((plainIdx << 4) | ACT_BACK);
  826|  18.6k|          if (plainIdx == CH_PLAIN_TOP) {
  ------------------
  |  |  138|  18.6k|#define CH_PLAIN_TOP (1)
  ------------------
  |  Branch (826:15): [True: 0, False: 18.6k]
  ------------------
  827|      0|            chMapPos = LEFT_REAR_CHANNEL_TOP;
  ------------------
  |  |  164|      0|#define LEFT_REAR_CHANNEL_TOP (17)       /* Lvr  */
  ------------------
  828|      0|            maxChannels = 3;
  829|  18.6k|          } else {
  830|  18.6k|            chMapPos = LEFT_REAR_CHANNEL;
  ------------------
  |  |  148|  18.6k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
  831|  18.6k|            maxChannels = 2;
  832|  18.6k|          }
  833|  18.6k|          break;
  834|  18.6k|        case CH_GROUP_LFE:
  ------------------
  |  |  134|  18.6k|#define CH_GROUP_LFE (3)
  ------------------
  |  Branch (834:9): [True: 18.6k, False: 56.0k]
  ------------------
  835|  18.6k|          if (plainIdx == CH_PLAIN_NORMAL) {
  ------------------
  |  |  137|  18.6k|#define CH_PLAIN_NORMAL (0)
  ------------------
  |  Branch (835:15): [True: 18.6k, False: 0]
  ------------------
  836|  18.6k|            type = ACT_LFE;
  837|  18.6k|            chMapPos = LOW_FREQUENCY_CHANNEL;
  ------------------
  |  |  150|  18.6k|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
  838|  18.6k|            maxChannels = 1;
  839|  18.6k|          }
  840|  18.6k|          break;
  841|      0|        default:
  ------------------
  |  Branch (841:9): [True: 0, False: 74.7k]
  ------------------
  842|      0|          break;
  843|  74.7k|      }
  844|       |
  845|       |      /* Map all channels in this group */
  846|   168k|      for (; chIdx < numChInGrp[grpIdx]; chIdx += 1) {
  ------------------
  |  Branch (846:14): [True: 93.4k, False: 74.7k]
  ------------------
  847|  93.4k|        int mappedIdx = FDK_chMapDescr_getMapValue(mapDescr, (UCHAR)ch, chCfg);
  848|  93.4k|        if ((chIdx == maxChannels) || (offsetTable[chMapPos] < 255)) {
  ------------------
  |  Branch (848:13): [True: 0, False: 93.4k]
  |  Branch (848:39): [True: 0, False: 93.4k]
  ------------------
  849|       |          /* No space left in this channel group! */
  850|      0|          if (offsetTable[LEFT_MULTIPRPS_CHANNEL] ==
  ------------------
  |  |  151|      0|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
  |  Branch (850:15): [True: 0, False: 0]
  ------------------
  851|      0|              255) { /* Use the multipurpose group: */
  852|      0|            chMapPos = LEFT_MULTIPRPS_CHANNEL;
  ------------------
  |  |  151|      0|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
  853|      0|          } else {
  854|      0|            FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (854:13): [Folded, False: 0]
  ------------------
  855|      0|          }
  856|      0|        }
  857|  93.4k|        offsetTable[chMapPos] = (UCHAR)mappedIdx;
  858|  93.4k|        channelType[mappedIdx] = type;
  859|  93.4k|        channelIndices[mappedIdx] = (UCHAR)chIdx;
  860|  93.4k|        chMapPos += 1;
  861|  93.4k|        ch += 1;
  862|  93.4k|      }
  863|  74.7k|    }
  864|  18.6k|  }
  865|  18.6k|}
pcmdmx_lib.cpp:_ZL15getChMode4Plaini20PCM_DMX_CHANNEL_MODEi:
  470|  18.6k|    const int chCfg) {
  471|  18.6k|  PCM_DMX_CHANNEL_MODE plainChMode = totChMode;
  472|       |
  473|  18.6k|  switch (totChMode) {
  474|      0|    case CH_MODE_5_0_2_1:
  ------------------
  |  Branch (474:5): [True: 0, False: 18.6k]
  ------------------
  475|      0|      if (chCfg == 14) {
  ------------------
  |  Branch (475:11): [True: 0, False: 0]
  ------------------
  476|      0|        switch (plainIndex) {
  477|      0|          case CH_PLAIN_BOTTOM:
  ------------------
  |  |  139|      0|#define CH_PLAIN_BOTTOM (2)
  ------------------
  |  Branch (477:11): [True: 0, False: 0]
  ------------------
  478|      0|            plainChMode = (PCM_DMX_CHANNEL_MODE)0x0000;
  479|      0|            break;
  480|      0|          case CH_PLAIN_TOP:
  ------------------
  |  |  138|      0|#define CH_PLAIN_TOP (1)
  ------------------
  |  Branch (480:11): [True: 0, False: 0]
  ------------------
  481|      0|            plainChMode = CH_MODE_2_0_0_0;
  482|      0|            break;
  483|      0|          case CH_PLAIN_NORMAL:
  ------------------
  |  |  137|      0|#define CH_PLAIN_NORMAL (0)
  ------------------
  |  Branch (483:11): [True: 0, False: 0]
  ------------------
  484|      0|          default:
  ------------------
  |  Branch (484:11): [True: 0, False: 0]
  ------------------
  485|      0|            plainChMode = CH_MODE_3_0_2_1;
  486|      0|            break;
  487|      0|        }
  488|      0|      }
  489|      0|      break;
  490|  18.6k|    default:
  ------------------
  |  Branch (490:5): [True: 18.6k, False: 0]
  ------------------
  491|  18.6k|      break;
  492|  18.6k|  }
  493|       |
  494|  18.6k|  return plainChMode;
  495|  18.6k|}
pcmdmx_lib.cpp:_ZL13getMixFactorsh20PCM_DMX_CHANNEL_MODES_PK19PCM_DMX_USER_PARAMSPK16DMX_BS_META_DATAPA8_sPi:
  990|  18.6k|                                  INT *pOutScale) {
  991|  18.6k|  PCMDMX_ERROR err = PCMDMX_OK;
  992|  18.6k|  INT mixScales[(8)][(8)];
  993|  18.6k|  INT maxScale = 0;
  994|  18.6k|  int numInChannel;
  995|  18.6k|  int numOutChannel;
  996|  18.6k|  int dmxMethod;
  997|  18.6k|  unsigned int outCh, inChCfg = 0;
  998|  18.6k|  unsigned int valid[(8)] = {0};
  999|       |
 1000|  18.6k|  FDK_ASSERT(pMetaData != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1000:3): [True: 18.6k, False: 0]
  ------------------
 1001|  18.6k|  FDK_ASSERT(mixFactors != NULL);
  ------------------
  |  |  221|  18.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1001:3): [True: 18.6k, False: 0]
  ------------------
 1002|       |  /* Check on a supported output configuration.
 1003|       |     Add new one only after extensive testing! */
 1004|  18.6k|  if (!((outChMode == CH_MODE_1_0_0_0) || (outChMode == CH_MODE_2_0_0_0) ||
  ------------------
  |  Branch (1004:9): [True: 0, False: 18.6k]
  |  Branch (1004:43): [True: 0, False: 18.6k]
  ------------------
 1005|  18.6k|        (outChMode == CH_MODE_3_0_2_1) || (outChMode == CH_MODE_3_0_4_1) ||
  ------------------
  |  Branch (1005:9): [True: 18.6k, False: 0]
  |  Branch (1005:43): [True: 0, False: 0]
  ------------------
 1006|      0|        (outChMode == CH_MODE_5_0_2_1))) {
  ------------------
  |  Branch (1006:9): [True: 0, False: 0]
  ------------------
 1007|      0|    FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1007:5): [Folded, False: 0]
  ------------------
 1008|      0|  }
 1009|       |
 1010|  18.6k|  if (inModeIsCfg) {
  ------------------
  |  Branch (1010:7): [True: 18.6k, False: 4]
  ------------------
 1011|       |    /* Convert channel config to channel mode: */
 1012|  18.6k|    inChCfg = (unsigned int)inChMode;
 1013|  18.6k|    switch (inChCfg) {
 1014|      0|      case 1:
  ------------------
  |  Branch (1014:7): [True: 0, False: 18.6k]
  ------------------
 1015|      0|      case 2:
  ------------------
  |  Branch (1015:7): [True: 0, False: 18.6k]
  ------------------
 1016|      0|      case 3:
  ------------------
  |  Branch (1016:7): [True: 0, False: 18.6k]
  ------------------
 1017|      0|      case 4:
  ------------------
  |  Branch (1017:7): [True: 0, False: 18.6k]
  ------------------
 1018|      0|      case 5:
  ------------------
  |  Branch (1018:7): [True: 0, False: 18.6k]
  ------------------
 1019|      0|      case 6:
  ------------------
  |  Branch (1019:7): [True: 0, False: 18.6k]
  ------------------
 1020|      0|        inChMode = outChModeTable[inChCfg];
 1021|      0|        break;
 1022|  2.39k|      case 11:
  ------------------
  |  Branch (1022:7): [True: 2.39k, False: 16.2k]
  ------------------
 1023|  2.39k|        inChMode = CH_MODE_3_0_3_1;
 1024|  2.39k|        break;
 1025|  1.11k|      case 12:
  ------------------
  |  Branch (1025:7): [True: 1.11k, False: 17.5k]
  ------------------
 1026|  1.11k|        inChMode = CH_MODE_3_0_4_1;
 1027|  1.11k|        break;
 1028|  5.73k|      case 7:
  ------------------
  |  Branch (1028:7): [True: 5.73k, False: 12.9k]
  ------------------
 1029|  15.1k|      case 14:
  ------------------
  |  Branch (1029:7): [True: 9.43k, False: 9.25k]
  ------------------
 1030|  15.1k|        inChMode = CH_MODE_5_0_2_1;
 1031|  15.1k|        break;
 1032|      0|      default:
  ------------------
  |  Branch (1032:7): [True: 0, False: 18.6k]
  ------------------
 1033|      0|        FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1033:9): [Folded, False: 0]
  ------------------
 1034|  18.6k|    }
 1035|  18.6k|  }
 1036|       |
 1037|       |  /* Extract the total number of input channels */
 1038|  18.6k|  numInChannel = (inChMode & 0xF) + ((inChMode >> 4) & 0xF) +
 1039|  18.6k|                 ((inChMode >> 8) & 0xF) + ((inChMode >> 12) & 0xF);
 1040|       |  /* Extract the total number of output channels */
 1041|  18.6k|  numOutChannel = (outChMode & 0xF) + ((outChMode >> 4) & 0xF) +
 1042|  18.6k|                  ((outChMode >> 8) & 0xF) + ((outChMode >> 12) & 0xF);
 1043|       |
 1044|       |  /* MPEG ammendment 4 aka ETSI metadata and fallback mode: */
 1045|       |
 1046|       |  /* Create identity DMX matrix: */
 1047|   168k|  for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (1047:19): [True: 149k, False: 18.6k]
  ------------------
 1048|   149k|    dmxInitChannel(mixFactors, mixScales, outCh);
 1049|   149k|  }
 1050|  18.6k|  if (((inChMode >> 12) & 0xF) == 0) {
  ------------------
  |  Branch (1050:7): [True: 4, False: 18.6k]
  ------------------
 1051|       |    /* Clear empty or wrongly mapped input channel */
 1052|      4|    dmxClearChannel(mixFactors, mixScales, LOW_FREQUENCY_CHANNEL);
  ------------------
  |  |  150|      4|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1053|      4|  }
 1054|       |
 1055|       |  /* FIRST STAGE: */
 1056|  18.6k|  if (numInChannel > SIX_CHANNEL) { /* Always use MPEG equations either with
  ------------------
  |  |  175|  18.6k|#define SIX_CHANNEL (6)
  ------------------
  |  Branch (1056:7): [True: 18.6k, False: 0]
  ------------------
 1057|       |                                       meta data or with default values. */
 1058|  18.6k|    FIXP_DMX dMixFactA, dMixFactB;
  ------------------
  |  |  121|  18.6k|#define FIXP_DMX FIXP_SGL
  ------------------
 1059|  18.6k|    INT dMixScaleA, dMixScaleB;
 1060|  18.6k|    int isValidCfg = TRUE;
  ------------------
  |  |  116|  18.6k|#define TRUE 1
  ------------------
 1061|       |
 1062|       |    /* Get factors from meta data */
 1063|  18.6k|    dMixFactA = abMixLvlValueTab[pMetaData->dmixIdxA];
 1064|  18.6k|    dMixScaleA = (pMetaData->dmixIdxA == 0) ? 1 : 0;
  ------------------
  |  Branch (1064:18): [True: 99, False: 18.5k]
  ------------------
 1065|  18.6k|    dMixFactB = abMixLvlValueTab[pMetaData->dmixIdxB];
 1066|  18.6k|    dMixScaleB = (pMetaData->dmixIdxB == 0) ? 1 : 0;
  ------------------
  |  Branch (1066:18): [True: 36, False: 18.6k]
  ------------------
 1067|       |
 1068|       |    /* Check if input is in the list of supported configurations */
 1069|  18.6k|    switch (inChMode) {
 1070|      0|      case CH_MODE_3_2_1_1: /* chCfg 11 but with side channels */
  ------------------
  |  Branch (1070:7): [True: 0, False: 18.6k]
  ------------------
 1071|      0|      case CH_MODE_3_2_1_0:
  ------------------
  |  Branch (1071:7): [True: 0, False: 18.6k]
  ------------------
 1072|      0|        isValidCfg = FALSE;
  ------------------
  |  |  115|      0|#define FALSE 0
  ------------------
 1073|      0|        err = PCMDMX_INVALID_MODE;
 1074|      0|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|      0|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1075|  2.39k|      case CH_MODE_3_0_3_1: /* chCfg 11 */
  ------------------
  |  Branch (1075:7): [True: 2.39k, False: 16.2k]
  ------------------
 1076|       |        /* 6.1ch:  C' = C;  L' = L;  R' = R;  LFE' = LFE;
 1077|       |                   Ls' = Ls*dmix_a_idx + Cs*dmix_b_idx;
 1078|       |                   Rs' = Rs*dmix_a_idx + Cs*dmix_b_idx; */
 1079|  2.39k|        dmxClearChannel(
 1080|  2.39k|            mixFactors, mixScales,
 1081|  2.39k|            RIGHT_MULTIPRPS_CHANNEL); /* clear empty input channel */
  ------------------
  |  |  152|  2.39k|#define RIGHT_MULTIPRPS_CHANNEL (7) /* Right multipurpose channel */
  ------------------
 1082|  2.39k|        dmxSetChannel(mixFactors, mixScales, LEFT_REAR_CHANNEL,
  ------------------
  |  |  148|  2.39k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1083|  2.39k|                      LEFT_REAR_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  148|  2.39k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1084|  2.39k|        dmxSetChannel(mixFactors, mixScales, LEFT_REAR_CHANNEL,
  ------------------
  |  |  148|  2.39k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1085|  2.39k|                      LEFT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  151|  2.39k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 1086|  2.39k|        dmxSetChannel(mixFactors, mixScales, RIGHT_REAR_CHANNEL,
  ------------------
  |  |  149|  2.39k|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1087|  2.39k|                      RIGHT_REAR_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  149|  2.39k|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1088|  2.39k|        dmxSetChannel(mixFactors, mixScales, RIGHT_REAR_CHANNEL,
  ------------------
  |  |  149|  2.39k|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1089|  2.39k|                      LEFT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  151|  2.39k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 1090|  2.39k|        break;
 1091|  1.11k|      case CH_MODE_3_0_4_1: /* chCfg 12 */
  ------------------
  |  Branch (1091:7): [True: 1.11k, False: 17.5k]
  ------------------
 1092|       |        /* 7.1ch Surround Back:  C' = C;  L' = L;  R' = R;  LFE' = LFE;
 1093|       |                                 Ls' = Ls*dmix_a_idx + Lsr*dmix_b_idx;
 1094|       |                                 Rs' = Rs*dmix_a_idx + Rsr*dmix_b_idx; */
 1095|  1.11k|        dmxSetChannel(mixFactors, mixScales, LEFT_REAR_CHANNEL,
  ------------------
  |  |  148|  1.11k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1096|  1.11k|                      LEFT_REAR_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  148|  1.11k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1097|  1.11k|        dmxSetChannel(mixFactors, mixScales, LEFT_REAR_CHANNEL,
  ------------------
  |  |  148|  1.11k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1098|  1.11k|                      LEFT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  151|  1.11k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 1099|  1.11k|        dmxSetChannel(mixFactors, mixScales, RIGHT_REAR_CHANNEL,
  ------------------
  |  |  149|  1.11k|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1100|  1.11k|                      RIGHT_REAR_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  149|  1.11k|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1101|  1.11k|        dmxSetChannel(mixFactors, mixScales, RIGHT_REAR_CHANNEL,
  ------------------
  |  |  149|  1.11k|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1102|  1.11k|                      RIGHT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  152|  1.11k|#define RIGHT_MULTIPRPS_CHANNEL (7) /* Right multipurpose channel */
  ------------------
 1103|  1.11k|        break;
 1104|      0|      case CH_MODE_5_0_1_0:
  ------------------
  |  Branch (1104:7): [True: 0, False: 18.6k]
  ------------------
 1105|      0|      case CH_MODE_5_0_1_1:
  ------------------
  |  Branch (1105:7): [True: 0, False: 18.6k]
  ------------------
 1106|      0|        dmxClearChannel(mixFactors, mixScales,
 1107|      0|                        RIGHT_REAR_CHANNEL); /* clear empty input channel */
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1108|      0|        dmxSetChannel(mixFactors, mixScales, RIGHT_REAR_CHANNEL,
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1109|      0|                      LEFT_REAR_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
                                    LEFT_REAR_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1110|      0|        dmxSetChannel(mixFactors, mixScales, LEFT_REAR_CHANNEL,
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1111|      0|                      LEFT_REAR_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
                                    LEFT_REAR_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1112|      0|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|      0|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1113|      0|      case CH_MODE_5_2_1_0:
  ------------------
  |  Branch (1113:7): [True: 0, False: 18.6k]
  ------------------
 1114|      0|        isValidCfg = FALSE;
  ------------------
  |  |  115|      0|#define FALSE 0
  ------------------
 1115|      0|        err = PCMDMX_INVALID_MODE;
 1116|      0|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|      0|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1117|  15.1k|      case CH_MODE_5_0_2_1: /* chCfg 7 || 14 */
  ------------------
  |  Branch (1117:7): [True: 15.1k, False: 3.51k]
  ------------------
 1118|  15.1k|        if (inChCfg == 14) {
  ------------------
  |  Branch (1118:13): [True: 9.43k, False: 5.73k]
  ------------------
 1119|       |          /* 7.1ch Front Height:  C' = C;  Ls' = Ls;  Rs' = Rs;  LFE' = LFE;
 1120|       |                                  L' = L*dmix_a_idx + Lv*dmix_b_idx;
 1121|       |                                  R' = R*dmix_a_idx + Rv*dmix_b_idx; */
 1122|  9.43k|          dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|  9.43k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1123|  9.43k|                        LEFT_FRONT_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  145|  9.43k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1124|  9.43k|          dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|  9.43k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1125|  9.43k|                        LEFT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  151|  9.43k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 1126|  9.43k|          dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|  9.43k|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1127|  9.43k|                        RIGHT_FRONT_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  146|  9.43k|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1128|  9.43k|          dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|  9.43k|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1129|  9.43k|                        RIGHT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  152|  9.43k|#define RIGHT_MULTIPRPS_CHANNEL (7) /* Right multipurpose channel */
  ------------------
 1130|  9.43k|        } else {
 1131|       |          /* 7.1ch Front:  Ls' = Ls;  Rs' = Rs;  LFE' = LFE;
 1132|       |                           C' = C + (Lc+Rc)*dmix_a_idx;
 1133|       |                           L' = L + Lc*dmix_b_idx;
 1134|       |                           R' = R + Rc*dmix_b_idx; */
 1135|  5.73k|          dmxSetChannel(mixFactors, mixScales, CENTER_FRONT_CHANNEL,
  ------------------
  |  |  144|  5.73k|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1136|  5.73k|                        LEFT_MULTIPRPS_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  151|  5.73k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 1137|  5.73k|          dmxSetChannel(mixFactors, mixScales, CENTER_FRONT_CHANNEL,
  ------------------
  |  |  144|  5.73k|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1138|  5.73k|                        RIGHT_MULTIPRPS_CHANNEL, dMixFactA, dMixScaleA);
  ------------------
  |  |  152|  5.73k|#define RIGHT_MULTIPRPS_CHANNEL (7) /* Right multipurpose channel */
  ------------------
 1139|  5.73k|          dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|  5.73k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1140|  5.73k|                        LEFT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  151|  5.73k|#define LEFT_MULTIPRPS_CHANNEL (6)  /* Left multipurpose channel */
  ------------------
 1141|  5.73k|          dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|  5.73k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1142|  5.73k|                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  145|  5.73k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                      LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  124|  5.73k|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|  5.73k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  5.73k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 5.73k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  5.73k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  5.73k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  5.73k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 5.73k]
  |  |  |  |  ------------------
  |  |  |  |  183|  5.73k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  5.73k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  5.73k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  5.73k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  5.73k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  5.73k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  5.73k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1143|  5.73k|          dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|  5.73k|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1144|  5.73k|                        RIGHT_MULTIPRPS_CHANNEL, dMixFactB, dMixScaleB);
  ------------------
  |  |  152|  5.73k|#define RIGHT_MULTIPRPS_CHANNEL (7) /* Right multipurpose channel */
  ------------------
 1145|  5.73k|          dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|  5.73k|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1146|  5.73k|                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  146|  5.73k|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                      RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 1);
  ------------------
  |  |  124|  5.73k|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|  5.73k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  5.73k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 5.73k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  5.73k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  5.73k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  5.73k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 5.73k]
  |  |  |  |  ------------------
  |  |  |  |  183|  5.73k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  5.73k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  5.73k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  5.73k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  5.73k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  5.73k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  5.73k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1147|  5.73k|        }
 1148|  15.1k|        break;
 1149|      4|      default:
  ------------------
  |  Branch (1149:7): [True: 4, False: 18.6k]
  ------------------
 1150|       |        /* Nothing to do. Just use the identity matrix. */
 1151|      4|        isValidCfg = FALSE;
  ------------------
  |  |  115|      4|#define FALSE 0
  ------------------
 1152|      4|        err = PCMDMX_INVALID_MODE;
 1153|      4|        break;
 1154|  18.6k|    }
 1155|       |
 1156|       |    /* Add additional DMX gain */
 1157|  18.6k|    if ((isValidCfg == TRUE) &&
  ------------------
  |  |  116|  18.6k|#define TRUE 1
  ------------------
  |  Branch (1157:9): [True: 18.6k, False: 4]
  ------------------
 1158|  18.6k|        (pMetaData->dmxGainIdx5 != 0)) { /* Apply DMX gain 5 */
  ------------------
  |  Branch (1158:9): [True: 438, False: 18.2k]
  ------------------
 1159|    438|      FIXP_DMX dmxGain;
  ------------------
  |  |  121|    438|#define FIXP_DMX FIXP_SGL
  ------------------
 1160|    438|      INT dmxScale;
 1161|    438|      INT sign = (pMetaData->dmxGainIdx5 & 0x40) ? -1 : 1;
  ------------------
  |  Branch (1161:18): [True: 290, False: 148]
  ------------------
 1162|    438|      INT val = pMetaData->dmxGainIdx5 & 0x3F;
 1163|       |
 1164|       |      /* 10^(dmx_gain_5/80) */
 1165|    438|      dmxGain = FX_DBL2FX_DMX(
  ------------------
  |  |  123|    438|#define FX_DBL2FX_DMX(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  220|  3.50k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    438|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    438|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 438]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 438, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 438]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 438, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1166|    438|          fLdPow(FL2FXCONST_DBL(0.830482023721841f), 2, /* log2(10) */
 1167|    438|                 (FIXP_DBL)(sign * val * (LONG)FL2FXCONST_DBL(0.0125f)), 0,
 1168|    438|                 &dmxScale));
 1169|       |      /* Currently only positive scale factors supported! */
 1170|    438|      if (dmxScale < 0) {
  ------------------
  |  Branch (1170:11): [True: 232, False: 206]
  ------------------
 1171|    232|        dmxGain >>= -dmxScale;
 1172|    232|        dmxScale = 0;
 1173|    232|      }
 1174|       |
 1175|    438|      dmxSetChannel(mixFactors, mixScales, CENTER_FRONT_CHANNEL,
  ------------------
  |  |  144|    438|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1176|    438|                    CENTER_FRONT_CHANNEL, dmxGain, dmxScale);
  ------------------
  |  |  144|    438|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1177|    438|      dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|    438|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1178|    438|                    LEFT_FRONT_CHANNEL, dmxGain, dmxScale);
  ------------------
  |  |  145|    438|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1179|    438|      dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|    438|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1180|    438|                    RIGHT_FRONT_CHANNEL, dmxGain, dmxScale);
  ------------------
  |  |  146|    438|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1181|    438|      dmxSetChannel(mixFactors, mixScales, LEFT_REAR_CHANNEL, LEFT_REAR_CHANNEL,
  ------------------
  |  |  148|    438|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
                    dmxSetChannel(mixFactors, mixScales, LEFT_REAR_CHANNEL, LEFT_REAR_CHANNEL,
  ------------------
  |  |  148|    438|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1182|    438|                    dmxGain, dmxScale);
 1183|    438|      dmxSetChannel(mixFactors, mixScales, RIGHT_REAR_CHANNEL,
  ------------------
  |  |  149|    438|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1184|    438|                    RIGHT_REAR_CHANNEL, dmxGain, dmxScale);
  ------------------
  |  |  149|    438|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1185|    438|      dmxSetChannel(mixFactors, mixScales, LOW_FREQUENCY_CHANNEL,
  ------------------
  |  |  150|    438|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1186|    438|                    LOW_FREQUENCY_CHANNEL, dmxGain, dmxScale);
  ------------------
  |  |  150|    438|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1187|    438|    }
 1188|       |
 1189|       |    /* Mark the output channels */
 1190|  18.6k|    valid[CENTER_FRONT_CHANNEL] = 1;
  ------------------
  |  |  144|  18.6k|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1191|  18.6k|    valid[LEFT_FRONT_CHANNEL] = 1;
  ------------------
  |  |  145|  18.6k|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1192|  18.6k|    valid[RIGHT_FRONT_CHANNEL] = 1;
  ------------------
  |  |  146|  18.6k|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1193|  18.6k|    valid[LEFT_REAR_CHANNEL] = 1;
  ------------------
  |  |  148|  18.6k|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1194|  18.6k|    valid[RIGHT_REAR_CHANNEL] = 1;
  ------------------
  |  |  149|  18.6k|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1195|  18.6k|    valid[LOW_FREQUENCY_CHANNEL] = 1;
  ------------------
  |  |  150|  18.6k|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1196|       |
 1197|       |    /* Update channel mode for the next stage */
 1198|  18.6k|    inChMode = CH_MODE_3_0_2_1;
 1199|  18.6k|  }
 1200|       |
 1201|       |    /* For the X (> 6) to 6 channel downmix we had no choice.
 1202|       |       To mix from 6 to 2 (or 1) channel(s) we have several possibilities (MPEG
 1203|       |       DSE | MPEG PCE | ITU | ARIB | DLB). Use profile and the metadata
 1204|       |       available flags to determine which equation to use: */
 1205|       |
 1206|  18.6k|#define DMX_METHOD_MPEG_AMD4 1
 1207|  18.6k|#define DMX_METHOD_MPEG_LEGACY 2
 1208|  18.6k|#define DMX_METHOD_ARIB_JAPAN 4
 1209|  18.6k|#define DMX_METHOD_ITU_RECOM 8
 1210|  18.6k|#define DMX_METHOD_CUSTOM 16
 1211|       |
 1212|  18.6k|  dmxMethod = DMX_METHOD_MPEG_AMD4; /* default */
  ------------------
  |  | 1206|  18.6k|#define DMX_METHOD_MPEG_AMD4 1
  ------------------
 1213|       |
 1214|  18.6k|  if ((pParams->dmxProfile == DMX_PRFL_FORCE_MATRIX_MIX) &&
  ------------------
  |  Branch (1214:7): [True: 0, False: 18.6k]
  ------------------
 1215|      0|      (pMetaData->typeFlags & TYPE_PCE_DATA)) {
  ------------------
  |  |  327|      0|#define TYPE_PCE_DATA (0x01)
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|    dmxMethod = DMX_METHOD_MPEG_LEGACY;
  ------------------
  |  | 1207|      0|#define DMX_METHOD_MPEG_LEGACY 2
  ------------------
 1217|  18.6k|  } else if (!(pMetaData->typeFlags &
  ------------------
  |  Branch (1217:14): [True: 18.2k, False: 440]
  ------------------
 1218|  18.6k|               (TYPE_DSE_CLEV_DATA | TYPE_DSE_SLEV_DATA))) {
  ------------------
  |  |  328|  18.6k|#define TYPE_DSE_CLEV_DATA (0x02)
  ------------------
                             (TYPE_DSE_CLEV_DATA | TYPE_DSE_SLEV_DATA))) {
  ------------------
  |  |  329|  18.6k|#define TYPE_DSE_SLEV_DATA (0x04)
  ------------------
 1219|  18.2k|    switch (pParams->dmxProfile) {
 1220|      0|      default:
  ------------------
  |  Branch (1220:7): [True: 0, False: 18.2k]
  ------------------
 1221|  18.2k|      case DMX_PRFL_STANDARD:
  ------------------
  |  Branch (1221:7): [True: 18.2k, False: 0]
  ------------------
 1222|       |        /* dmxMethod = DMX_METHOD_MPEG_AMD4; */
 1223|  18.2k|        break;
 1224|      0|      case DMX_PRFL_MATRIX_MIX:
  ------------------
  |  Branch (1224:7): [True: 0, False: 18.2k]
  ------------------
 1225|      0|      case DMX_PRFL_FORCE_MATRIX_MIX:
  ------------------
  |  Branch (1225:7): [True: 0, False: 18.2k]
  ------------------
 1226|      0|        if (pMetaData->typeFlags & TYPE_PCE_DATA) {
  ------------------
  |  |  327|      0|#define TYPE_PCE_DATA (0x01)
  ------------------
  |  Branch (1226:13): [True: 0, False: 0]
  ------------------
 1227|      0|          dmxMethod = DMX_METHOD_MPEG_LEGACY;
  ------------------
  |  | 1207|      0|#define DMX_METHOD_MPEG_LEGACY 2
  ------------------
 1228|      0|        }
 1229|      0|        break;
 1230|      0|      case DMX_PRFL_ARIB_JAPAN:
  ------------------
  |  Branch (1230:7): [True: 0, False: 18.2k]
  ------------------
 1231|      0|        dmxMethod = DMX_METHOD_ARIB_JAPAN;
  ------------------
  |  | 1208|      0|#define DMX_METHOD_ARIB_JAPAN 4
  ------------------
 1232|      0|        break;
 1233|  18.2k|    }
 1234|  18.2k|  }
 1235|       |
 1236|       |  /* SECOND STAGE: */
 1237|  18.6k|  if (numOutChannel <= TWO_CHANNEL) {
  ------------------
  |  |  174|  18.6k|#define TWO_CHANNEL (2)
  ------------------
  |  Branch (1237:7): [True: 0, False: 18.6k]
  ------------------
 1238|       |    /* Create DMX matrix according to input configuration */
 1239|      0|    switch (inChMode) {
 1240|      0|      case CH_MODE_2_0_0_0: /* chCfg 2 */
  ------------------
  |  Branch (1240:7): [True: 0, False: 0]
  ------------------
 1241|       |        /* Apply the dual channel mode. */
 1242|      0|        switch (pParams->dualChannelMode) {
 1243|      0|          case CH1_MODE: /* L' = 0.707 * Ch1;
  ------------------
  |  Branch (1243:11): [True: 0, False: 0]
  ------------------
 1244|       |                            R' = 0.707 * Ch1; */
 1245|      0|            dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1246|      0|                          LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1247|      0|            dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1248|      0|                          LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1249|      0|            break;
 1250|      0|          case CH2_MODE: /* L' = 0.707 * Ch2;
  ------------------
  |  Branch (1250:11): [True: 0, False: 0]
  ------------------
 1251|       |                            R' = 0.707 * Ch2; */
 1252|      0|            dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1253|      0|                          RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1254|      0|            dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1255|      0|                          RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1256|      0|            break;
 1257|      0|          case MIXED_MODE: /* L' = 0.5*Ch1 + 0.5*Ch2;
  ------------------
  |  Branch (1257:11): [True: 0, False: 0]
  ------------------
 1258|       |                              R' = 0.5*Ch1 + 0.5*Ch2; */
 1259|      0|            dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1260|      0|                          LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1261|      0|            dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1262|      0|                          RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1263|      0|            dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1264|      0|                          LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1265|      0|            dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1266|      0|                          RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.5f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1267|      0|            break;
 1268|      0|          default:
  ------------------
  |  Branch (1268:11): [True: 0, False: 0]
  ------------------
 1269|      0|          case STEREO_MODE:
  ------------------
  |  Branch (1269:11): [True: 0, False: 0]
  ------------------
 1270|       |            /* Nothing to do */
 1271|      0|            break;
 1272|      0|        }
 1273|      0|        break;
 1274|       |      /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 1275|       |       * - - - - - - - - - - - - - - - - - - - */
 1276|      0|      case CH_MODE_2_0_1_0: {
  ------------------
  |  Branch (1276:7): [True: 0, False: 0]
  ------------------
 1277|      0|        FIXP_DMX sMixLvl;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1278|      0|        if (dmxMethod == DMX_METHOD_ARIB_JAPAN) {
  ------------------
  |  | 1208|      0|#define DMX_METHOD_ARIB_JAPAN 4
  ------------------
  |  Branch (1278:13): [True: 0, False: 0]
  ------------------
 1279|       |          /* L' = 0.707*L + 0.5*S;  R' = 0.707*R + 0.5*S; */
 1280|      0|          dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1281|      0|                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                      LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1282|      0|          dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1283|      0|                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                      RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1284|      0|          sMixLvl = FL2FXCONST_DMX(0.5f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1285|      0|        } else { /* L' = L + 0.707*S;  R' = R + 0.707*S; */
 1286|      0|          sMixLvl = FL2FXCONST_DMX(0.707f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1287|      0|        }
 1288|      0|        dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1289|      0|                      LEFT_REAR_CHANNEL, sMixLvl, 0);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1290|      0|        dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1291|      0|                      LEFT_REAR_CHANNEL, sMixLvl, 0);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1292|      0|      } break;
 1293|       |      /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 1294|       |       * - - - - - - - - - - - - - - - - - - - */
 1295|      0|      case CH_MODE_3_0_0_0: /* chCfg 3 */
  ------------------
  |  Branch (1295:7): [True: 0, False: 0]
  ------------------
 1296|      0|      {
 1297|      0|        FIXP_DMX cMixLvl;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1298|      0|        if (dmxMethod == DMX_METHOD_ARIB_JAPAN) {
  ------------------
  |  | 1208|      0|#define DMX_METHOD_ARIB_JAPAN 4
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  ------------------
 1299|       |          /* L' = 0.707*L + 0.5*C;  R' = 0.707*R + 0.5*C; */
 1300|      0|          dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1301|      0|                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                      LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1302|      0|          dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1303|      0|                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                      RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1304|      0|          cMixLvl = FL2FXCONST_DMX(0.5f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1305|      0|        } else { /* L' = L + 0.707*C;  R' = R + 0.707*C; */
 1306|      0|          cMixLvl = FL2FXCONST_DMX(0.707f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1307|      0|        }
 1308|      0|        dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1309|      0|                      CENTER_FRONT_CHANNEL, cMixLvl, 0);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1310|      0|        dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1311|      0|                      CENTER_FRONT_CHANNEL, cMixLvl, 0);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1312|      0|      } break;
 1313|       |      /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 1314|       |       * - - - - - - - - - - - - - - - - - - - */
 1315|      0|      case CH_MODE_3_0_1_0: /* chCfg 4 */
  ------------------
  |  Branch (1315:7): [True: 0, False: 0]
  ------------------
 1316|      0|      {
 1317|      0|        FIXP_DMX csMixLvl;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1318|      0|        if (dmxMethod == DMX_METHOD_ARIB_JAPAN) {
  ------------------
  |  | 1208|      0|#define DMX_METHOD_ARIB_JAPAN 4
  ------------------
  |  Branch (1318:13): [True: 0, False: 0]
  ------------------
 1319|       |          /* L' = 0.707*L + 0.5*C + 0.5*S;  R' = 0.707*R + 0.5*C + 0.5*S; */
 1320|      0|          dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1321|      0|                        LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
                                      LEFT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1322|      0|          dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1323|      0|                        RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
                                      RIGHT_FRONT_CHANNEL, FL2FXCONST_DMX(0.707f), 0);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1324|      0|          csMixLvl = FL2FXCONST_DMX(0.5f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1325|      0|        } else { /* L' = L + 0.707*C + 0.707*S;
 1326|       |                    R' = R + 0.707*C + 0.707*S; */
 1327|      0|          csMixLvl = FL2FXCONST_DMX(0.707f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1328|      0|        }
 1329|      0|        dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1330|      0|                      CENTER_FRONT_CHANNEL, csMixLvl, 0);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1331|      0|        dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1332|      0|                      LEFT_REAR_CHANNEL, csMixLvl, 0);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1333|      0|        dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1334|      0|                      CENTER_FRONT_CHANNEL, csMixLvl, 0);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1335|      0|        dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1336|      0|                      LEFT_REAR_CHANNEL, csMixLvl, 0);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1337|      0|      } break;
 1338|       |      /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 1339|       |       * - - - - - - - - - - - - - - - - - - - */
 1340|      0|      case CH_MODE_3_0_2_0: /* chCfg 5 */
  ------------------
  |  Branch (1340:7): [True: 0, False: 0]
  ------------------
 1341|      0|      case CH_MODE_3_0_2_1: /* chCfg 6 */
  ------------------
  |  Branch (1341:7): [True: 0, False: 0]
  ------------------
 1342|      0|      {
 1343|      0|        switch (dmxMethod) {
 1344|      0|          default:
  ------------------
  |  Branch (1344:11): [True: 0, False: 0]
  ------------------
 1345|      0|          case DMX_METHOD_MPEG_AMD4: {
  ------------------
  |  | 1206|      0|#define DMX_METHOD_MPEG_AMD4 1
  ------------------
  |  Branch (1345:11): [True: 0, False: 0]
  ------------------
 1346|      0|            FIXP_DMX cMixLvl, sMixLvl, lMixLvl;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1347|      0|            INT cMixScale, sMixScale, lMixScale;
 1348|       |
 1349|       |            /* Get factors from meta data */
 1350|      0|            cMixLvl = abMixLvlValueTab[pMetaData->cLevIdx];
 1351|      0|            cMixScale = (pMetaData->cLevIdx == 0) ? 1 : 0;
  ------------------
  |  Branch (1351:25): [True: 0, False: 0]
  ------------------
 1352|      0|            sMixLvl = abMixLvlValueTab[pMetaData->sLevIdx];
 1353|      0|            sMixScale = (pMetaData->sLevIdx == 0) ? 1 : 0;
  ------------------
  |  Branch (1353:25): [True: 0, False: 0]
  ------------------
 1354|      0|            lMixLvl = lfeMixLvlValueTab[pMetaData->dmixIdxLfe];
 1355|      0|            if (pMetaData->dmixIdxLfe <= 1) {
  ------------------
  |  Branch (1355:17): [True: 0, False: 0]
  ------------------
 1356|      0|              lMixScale = 2;
 1357|      0|            } else if (pMetaData->dmixIdxLfe <= 5) {
  ------------------
  |  Branch (1357:24): [True: 0, False: 0]
  ------------------
 1358|      0|              lMixScale = 1;
 1359|      0|            } else {
 1360|      0|              lMixScale = 0;
 1361|      0|            }
 1362|       |            /* Setup the DMX matrix */
 1363|      0|            if ((pParams->pseudoSurrMode == FORCE_PS_DMX) ||
  ------------------
  |  Branch (1363:17): [True: 0, False: 0]
  ------------------
 1364|      0|                ((pParams->pseudoSurrMode == AUTO_PS_DMX) &&
  ------------------
  |  Branch (1364:18): [True: 0, False: 0]
  ------------------
 1365|      0|                 (pMetaData->pseudoSurround ==
  ------------------
  |  Branch (1365:18): [True: 0, False: 0]
  ------------------
 1366|      0|                  1))) { /* L' = L + C*clev - (Ls+Rs)*slev + LFE*lflev;
 1367|       |                            R' = R + C*clev + (Ls+Rs)*slev + LFE*lflev; */
 1368|      0|              dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1369|      0|                            CENTER_FRONT_CHANNEL, cMixLvl, cMixScale);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1370|      0|              dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1371|      0|                            LEFT_REAR_CHANNEL, -sMixLvl, sMixScale);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1372|      0|              dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1373|      0|                            RIGHT_REAR_CHANNEL, -sMixLvl, sMixScale);
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1374|      0|              dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1375|      0|                            LOW_FREQUENCY_CHANNEL, lMixLvl, lMixScale);
  ------------------
  |  |  150|      0|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1376|      0|              dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1377|      0|                            CENTER_FRONT_CHANNEL, cMixLvl, cMixScale);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1378|      0|              dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1379|      0|                            LEFT_REAR_CHANNEL, sMixLvl, sMixScale);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1380|      0|              dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1381|      0|                            RIGHT_REAR_CHANNEL, sMixLvl, sMixScale);
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1382|      0|              dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1383|      0|                            LOW_FREQUENCY_CHANNEL, lMixLvl, lMixScale);
  ------------------
  |  |  150|      0|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1384|      0|            } else { /* L' = L + C*clev + Ls*slev + LFE*llev;
 1385|       |                        R' = R + C*clev + Rs*slev + LFE*llev; */
 1386|      0|              dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1387|      0|                            CENTER_FRONT_CHANNEL, cMixLvl, cMixScale);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1388|      0|              dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1389|      0|                            LEFT_REAR_CHANNEL, sMixLvl, sMixScale);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1390|      0|              dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1391|      0|                            LOW_FREQUENCY_CHANNEL, lMixLvl, lMixScale);
  ------------------
  |  |  150|      0|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1392|      0|              dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1393|      0|                            CENTER_FRONT_CHANNEL, cMixLvl, cMixScale);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1394|      0|              dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1395|      0|                            RIGHT_REAR_CHANNEL, sMixLvl, sMixScale);
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1396|      0|              dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1397|      0|                            LOW_FREQUENCY_CHANNEL, lMixLvl, lMixScale);
  ------------------
  |  |  150|      0|#define LOW_FREQUENCY_CHANNEL (5)   /* Lf */
  ------------------
 1398|      0|            }
 1399|       |
 1400|       |            /* Add additional DMX gain */
 1401|      0|            if (pMetaData->dmxGainIdx2 != 0) { /* Apply DMX gain 2 */
  ------------------
  |  Branch (1401:17): [True: 0, False: 0]
  ------------------
 1402|      0|              FIXP_DMX dmxGain;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1403|      0|              INT dmxScale;
 1404|      0|              INT sign = (pMetaData->dmxGainIdx2 & 0x40) ? -1 : 1;
  ------------------
  |  Branch (1404:26): [True: 0, False: 0]
  ------------------
 1405|      0|              INT val = pMetaData->dmxGainIdx2 & 0x3F;
 1406|       |
 1407|       |              /* 10^(dmx_gain_2/80) */
 1408|      0|              dmxGain = FX_DBL2FX_DMX(
  ------------------
  |  |  123|      0|#define FX_DBL2FX_DMX(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 0, Folded]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  |  |  Branch (220:41): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1409|      0|                  fLdPow(FL2FXCONST_DBL(0.830482023721841f), 2, /* log2(10) */
 1410|      0|                         (FIXP_DBL)(sign * val * (LONG)FL2FXCONST_DBL(0.0125f)),
 1411|      0|                         0, &dmxScale));
 1412|       |              /* Currently only positive scale factors supported! */
 1413|      0|              if (dmxScale < 0) {
  ------------------
  |  Branch (1413:19): [True: 0, False: 0]
  ------------------
 1414|      0|                dmxGain >>= -dmxScale;
 1415|      0|                dmxScale = 0;
 1416|      0|              }
 1417|       |
 1418|      0|              dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1419|      0|                            LEFT_FRONT_CHANNEL, dmxGain, dmxScale);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1420|      0|              dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1421|      0|                            RIGHT_FRONT_CHANNEL, dmxGain, dmxScale);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1422|      0|            }
 1423|      0|          } break;
 1424|      0|          case DMX_METHOD_ARIB_JAPAN:
  ------------------
  |  | 1208|      0|#define DMX_METHOD_ARIB_JAPAN 4
  ------------------
  |  Branch (1424:11): [True: 0, False: 0]
  ------------------
 1425|      0|          case DMX_METHOD_MPEG_LEGACY: {
  ------------------
  |  | 1207|      0|#define DMX_METHOD_MPEG_LEGACY 2
  ------------------
  |  Branch (1425:11): [True: 0, False: 0]
  ------------------
 1426|      0|            FIXP_DMX flev, clev, slevLL, slevLR, slevRL, slevRR;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1427|      0|            FIXP_DMX mtrxMixDwnCoef =
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1428|      0|                mpegMixDownIdx2Coef[pMetaData->matrixMixdownIdx];
 1429|       |
 1430|      0|            if ((pParams->pseudoSurrMode == FORCE_PS_DMX) ||
  ------------------
  |  Branch (1430:17): [True: 0, False: 0]
  ------------------
 1431|      0|                ((pParams->pseudoSurrMode == AUTO_PS_DMX) &&
  ------------------
  |  Branch (1431:18): [True: 0, False: 0]
  ------------------
 1432|      0|                 (pMetaData->pseudoSurround == 1))) {
  ------------------
  |  Branch (1432:18): [True: 0, False: 0]
  ------------------
 1433|      0|              if (dmxMethod == DMX_METHOD_ARIB_JAPAN) {
  ------------------
  |  | 1208|      0|#define DMX_METHOD_ARIB_JAPAN 4
  ------------------
  |  Branch (1433:19): [True: 0, False: 0]
  ------------------
 1434|       |                /* 3/2 input: L' = 0.707 * [L+0.707*C-k*Ls-k*Rs];
 1435|       |                              R' = 0.707 * [R+0.707*C+k*Ls+k*Rs]; */
 1436|      0|                flev = mpegMixDownIdx2Coef[0]; /* a = 0.707 */
 1437|      0|              } else { /* 3/2 input: L' = (1.707+2*A)^-1 *
 1438|       |                          [L+0.707*C-A*Ls-A*Rs]; R' = (1.707+2*A)^-1 *
 1439|       |                          [R+0.707*C+A*Ls+A*Rs]; */
 1440|      0|                flev = mpegMixDownIdx2PreFact[1][pMetaData->matrixMixdownIdx];
 1441|      0|              }
 1442|      0|              slevRR = slevRL = FX_DBL2FX_DMX(fMult(flev, mtrxMixDwnCoef));
  ------------------
  |  |  123|      0|#define FX_DBL2FX_DMX(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1443|      0|              slevLL = slevLR = -slevRL;
 1444|      0|            } else {
 1445|      0|              if (dmxMethod == DMX_METHOD_ARIB_JAPAN) {
  ------------------
  |  | 1208|      0|#define DMX_METHOD_ARIB_JAPAN 4
  ------------------
  |  Branch (1445:19): [True: 0, False: 0]
  ------------------
 1446|       |                /* 3/2 input: L' = 0.707 * [L+0.707*C+k*Ls];
 1447|       |                              R' = 0.707 * [R+0.707*C+k*Rs]; */
 1448|      0|                flev = mpegMixDownIdx2Coef[0]; /* a = 0.707 */
 1449|      0|              } else { /* 3/2 input: L' = (1.707+A)^-1 * [L+0.707*C+A*Ls];
 1450|       |                                     R' = (1.707+A)^-1 * [R+0.707*C+A*Rs]; */
 1451|      0|                flev = mpegMixDownIdx2PreFact[0][pMetaData->matrixMixdownIdx];
 1452|      0|              }
 1453|      0|              slevRR = slevLL = FX_DBL2FX_DMX(fMult(flev, mtrxMixDwnCoef));
  ------------------
  |  |  123|      0|#define FX_DBL2FX_DMX(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1454|      0|              slevLR = slevRL = (FIXP_DMX)0;
 1455|      0|            }
 1456|       |            /* common factor */
 1457|      0|            clev =
 1458|      0|                FX_DBL2FX_DMX(fMult(flev, mpegMixDownIdx2Coef[0] /* 0.707 */));
  ------------------
  |  |  123|      0|#define FX_DBL2FX_DMX(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1459|       |
 1460|      0|            dmxSetChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1461|      0|                          LEFT_FRONT_CHANNEL, flev, 0);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1462|      0|            dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1463|      0|                          CENTER_FRONT_CHANNEL, clev, 0);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1464|      0|            dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1465|      0|                          LEFT_REAR_CHANNEL, slevLL, 0);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1466|      0|            dmxAddChannel(mixFactors, mixScales, LEFT_FRONT_CHANNEL,
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1467|      0|                          RIGHT_REAR_CHANNEL, slevLR, 0);
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1468|       |
 1469|      0|            dmxSetChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1470|      0|                          RIGHT_FRONT_CHANNEL, flev, 0);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1471|      0|            dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1472|      0|                          CENTER_FRONT_CHANNEL, clev, 0);
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1473|      0|            dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1474|      0|                          LEFT_REAR_CHANNEL, slevRL, 0);
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1475|      0|            dmxAddChannel(mixFactors, mixScales, RIGHT_FRONT_CHANNEL,
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1476|      0|                          RIGHT_REAR_CHANNEL, slevRR, 0);
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1477|      0|          } break;
 1478|      0|        } /* switch (dmxMethod) */
 1479|      0|      } break;
 1480|      0|      default:
  ------------------
  |  Branch (1480:7): [True: 0, False: 0]
  ------------------
 1481|       |        /* This configuration does not fit to any known downmix equation! */
 1482|      0|        err = PCMDMX_INVALID_MODE;
 1483|      0|        break;
 1484|      0|    } /* switch (inChMode) */
 1485|       |
 1486|       |    /* Mark the output channels */
 1487|      0|    FDKmemclear(valid, (8) * sizeof(unsigned int));
 1488|      0|    valid[LEFT_FRONT_CHANNEL] = 1;
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1489|      0|    valid[RIGHT_FRONT_CHANNEL] = 1;
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1490|      0|  }
 1491|       |
 1492|  18.6k|  if (numOutChannel == ONE_CHANNEL) {
  ------------------
  |  |  173|  18.6k|#define ONE_CHANNEL (1)
  ------------------
  |  Branch (1492:7): [True: 0, False: 18.6k]
  ------------------
 1493|      0|    FIXP_DMX monoMixLevel;
  ------------------
  |  |  121|      0|#define FIXP_DMX FIXP_SGL
  ------------------
 1494|      0|    INT monoMixScale = 0;
 1495|       |
 1496|      0|    dmxClearChannel(mixFactors, mixScales,
 1497|      0|                    CENTER_FRONT_CHANNEL); /* C is not in the mix */
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1498|       |
 1499|      0|    if (dmxMethod ==
  ------------------
  |  Branch (1499:9): [True: 0, False: 0]
  ------------------
 1500|      0|        DMX_METHOD_MPEG_LEGACY) { /* C' = (3+2*A)^-1 * [C+L+R+A*Ls+A+Rs]; */
  ------------------
  |  | 1207|      0|#define DMX_METHOD_MPEG_LEGACY 2
  ------------------
 1501|      0|      monoMixLevel = mpegMixDownIdx2PreFact[2][pMetaData->matrixMixdownIdx];
 1502|       |
 1503|      0|      mixFactors[CENTER_FRONT_CHANNEL][CENTER_FRONT_CHANNEL] = monoMixLevel;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
                    mixFactors[CENTER_FRONT_CHANNEL][CENTER_FRONT_CHANNEL] = monoMixLevel;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1504|      0|      mixFactors[CENTER_FRONT_CHANNEL][LEFT_FRONT_CHANNEL] = monoMixLevel;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
                    mixFactors[CENTER_FRONT_CHANNEL][LEFT_FRONT_CHANNEL] = monoMixLevel;
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1505|      0|      mixFactors[CENTER_FRONT_CHANNEL][RIGHT_FRONT_CHANNEL] = monoMixLevel;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
                    mixFactors[CENTER_FRONT_CHANNEL][RIGHT_FRONT_CHANNEL] = monoMixLevel;
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1506|      0|      monoMixLevel = FX_DBL2FX_DMX(fMult(
  ------------------
  |  |  123|      0|#define FX_DBL2FX_DMX(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1507|      0|          monoMixLevel, mpegMixDownIdx2Coef[pMetaData->matrixMixdownIdx]));
 1508|      0|      mixFactors[CENTER_FRONT_CHANNEL][LEFT_REAR_CHANNEL] = monoMixLevel;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
                    mixFactors[CENTER_FRONT_CHANNEL][LEFT_REAR_CHANNEL] = monoMixLevel;
  ------------------
  |  |  148|      0|  (3) /* Lr (aka left back channel) or center back channel */
  ------------------
 1509|      0|      mixFactors[CENTER_FRONT_CHANNEL][RIGHT_REAR_CHANNEL] = monoMixLevel;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
                    mixFactors[CENTER_FRONT_CHANNEL][RIGHT_REAR_CHANNEL] = monoMixLevel;
  ------------------
  |  |  149|      0|#define RIGHT_REAR_CHANNEL (4)      /* Rr (aka right back channel) */
  ------------------
 1510|      0|    } else {
 1511|      0|      switch (dmxMethod) {
 1512|      0|        case DMX_METHOD_MPEG_AMD4:
  ------------------
  |  | 1206|      0|#define DMX_METHOD_MPEG_AMD4 1
  ------------------
  |  Branch (1512:9): [True: 0, False: 0]
  ------------------
 1513|       |          /* C' = L + R; */
 1514|      0|          monoMixLevel = FL2FXCONST_DMX(0.5f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1515|      0|          monoMixScale = 1;
 1516|      0|          break;
 1517|      0|        default:
  ------------------
  |  Branch (1517:9): [True: 0, False: 0]
  ------------------
 1518|       |          /* C' = 0.5*L + 0.5*R; */
 1519|      0|          monoMixLevel = FL2FXCONST_DMX(0.5f);
  ------------------
  |  |  124|      0|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1520|      0|          monoMixScale = 0;
 1521|      0|          break;
 1522|      0|      }
 1523|      0|      dmxSetChannel(mixFactors, mixScales, CENTER_FRONT_CHANNEL,
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1524|      0|                    LEFT_FRONT_CHANNEL, monoMixLevel, monoMixScale);
  ------------------
  |  |  145|      0|#define LEFT_FRONT_CHANNEL (1)   /* L  */
  ------------------
 1525|      0|      dmxAddChannel(mixFactors, mixScales, CENTER_FRONT_CHANNEL,
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1526|      0|                    RIGHT_FRONT_CHANNEL, monoMixLevel, monoMixScale);
  ------------------
  |  |  146|      0|#define RIGHT_FRONT_CHANNEL (2)  /* R  */
  ------------------
 1527|      0|    }
 1528|       |
 1529|       |    /* Mark the output channel */
 1530|      0|    FDKmemclear(valid, (8) * sizeof(unsigned int));
 1531|      0|    valid[CENTER_FRONT_CHANNEL] = 1;
  ------------------
  |  |  144|      0|#define CENTER_FRONT_CHANNEL (0) /* C  */
  ------------------
 1532|      0|  }
 1533|       |
 1534|  18.6k|#define MAX_SEARCH_START_VAL (-7)
 1535|       |
 1536|  18.6k|  {
 1537|  18.6k|    LONG chSum[(8)];
  ------------------
  |  |  181|  18.6k|#define LONG INT
  ------------------
 1538|  18.6k|    INT chSumMax = MAX_SEARCH_START_VAL;
  ------------------
  |  | 1534|  18.6k|#define MAX_SEARCH_START_VAL (-7)
  ------------------
 1539|       |
 1540|       |    /* Determine the current maximum scale factor */
 1541|   168k|    for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (1541:21): [True: 149k, False: 18.6k]
  ------------------
 1542|   149k|      if (valid[outCh] != 0) {
  ------------------
  |  Branch (1542:11): [True: 112k, False: 37.3k]
  ------------------
 1543|   112k|        unsigned int inCh;
 1544|  1.00M|        for (inCh = 0; inCh < (8); inCh += 1) {
  ------------------
  |  Branch (1544:24): [True: 897k, False: 112k]
  ------------------
 1545|   897k|          if (mixScales[outCh][inCh] > maxScale) { /* Store the new maximum */
  ------------------
  |  Branch (1545:15): [True: 24.5k, False: 872k]
  ------------------
 1546|  24.5k|            maxScale = mixScales[outCh][inCh];
 1547|  24.5k|          }
 1548|   897k|        }
 1549|   112k|      }
 1550|   149k|    }
 1551|       |
 1552|       |    /* Individualy analyse output chanal levels */
 1553|   168k|    for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (1553:21): [True: 149k, False: 18.6k]
  ------------------
 1554|   149k|      chSum[outCh] = MAX_SEARCH_START_VAL;
  ------------------
  |  | 1534|   149k|#define MAX_SEARCH_START_VAL (-7)
  ------------------
 1555|   149k|      if (valid[outCh] != 0) {
  ------------------
  |  Branch (1555:11): [True: 112k, False: 37.3k]
  ------------------
 1556|   112k|        int ovrflwProtScale = 0;
 1557|   112k|        unsigned int inCh;
 1558|       |
 1559|       |        /* Accumulate all factors for each output channel */
 1560|   112k|        chSum[outCh] = 0;
 1561|  1.00M|        for (inCh = 0; inCh < (8); inCh += 1) {
  ------------------
  |  Branch (1561:24): [True: 897k, False: 112k]
  ------------------
 1562|   897k|          SHORT addFact = FX_DMX2SHRT(mixFactors[outCh][inCh]);
  ------------------
  |  |  126|   897k|#define FX_DMX2SHRT(x) ((SHORT)(x))
  ------------------
 1563|   897k|          if (mixScales[outCh][inCh] <= maxScale) {
  ------------------
  |  Branch (1563:15): [True: 897k, False: 0]
  ------------------
 1564|   897k|            addFact >>= maxScale - mixScales[outCh][inCh];
 1565|   897k|          } else {
 1566|      0|            addFact <<= mixScales[outCh][inCh] - maxScale;
 1567|      0|          }
 1568|   897k|          chSum[outCh] += addFact;
 1569|   897k|        }
 1570|   112k|        if (chSum[outCh] > (LONG)MAXVAL_SGL) {
  ------------------
  |  |  152|   112k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  |  Branch (1570:13): [True: 0, False: 112k]
  ------------------
 1571|      0|          while (chSum[outCh] > (LONG)MAXVAL_SGL) {
  ------------------
  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  |  Branch (1571:18): [True: 0, False: 0]
  ------------------
 1572|      0|            ovrflwProtScale += 1;
 1573|      0|            chSum[outCh] >>= 1;
 1574|      0|          }
 1575|   112k|        } else if (chSum[outCh] > 0) {
  ------------------
  |  Branch (1575:20): [True: 111k, False: 350]
  ------------------
 1576|   146k|          while ((chSum[outCh] << 1) <= (LONG)MAXVAL_SGL) {
  ------------------
  |  |  152|   146k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  |  Branch (1576:18): [True: 34.5k, False: 111k]
  ------------------
 1577|  34.5k|            ovrflwProtScale -= 1;
 1578|  34.5k|            chSum[outCh] <<= 1;
 1579|  34.5k|          }
 1580|   111k|        }
 1581|       |        /* Store the differential scaling in the same array */
 1582|   112k|        chSum[outCh] = ovrflwProtScale;
 1583|   112k|      }
 1584|   149k|    }
 1585|       |
 1586|   168k|    for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (1586:21): [True: 149k, False: 18.6k]
  ------------------
 1587|   149k|      if ((valid[outCh] != 0) &&
  ------------------
  |  Branch (1587:11): [True: 112k, False: 37.3k]
  ------------------
 1588|   112k|          (chSum[outCh] > chSumMax)) { /* Store the new maximum */
  ------------------
  |  Branch (1588:11): [True: 18.9k, False: 93.1k]
  ------------------
 1589|  18.9k|        chSumMax = chSum[outCh];
 1590|  18.9k|      }
 1591|   149k|    }
 1592|  18.6k|    maxScale = fMax(maxScale + chSumMax, 0);
 1593|       |
 1594|       |    /* Normalize all factors */
 1595|   168k|    for (outCh = 0; outCh < (8); outCh += 1) {
  ------------------
  |  Branch (1595:21): [True: 149k, False: 18.6k]
  ------------------
 1596|   149k|      if (valid[outCh] != 0) {
  ------------------
  |  Branch (1596:11): [True: 112k, False: 37.3k]
  ------------------
 1597|   112k|        unsigned int inCh;
 1598|  1.00M|        for (inCh = 0; inCh < (8); inCh += 1) {
  ------------------
  |  Branch (1598:24): [True: 897k, False: 112k]
  ------------------
 1599|   897k|          if (mixFactors[outCh][inCh] != (FIXP_DMX)0) {
  ------------------
  |  Branch (1599:15): [True: 160k, False: 737k]
  ------------------
 1600|   160k|            if (mixScales[outCh][inCh] <= maxScale) {
  ------------------
  |  Branch (1600:17): [True: 158k, False: 1.42k]
  ------------------
 1601|   158k|              mixFactors[outCh][inCh] >>= maxScale - mixScales[outCh][inCh];
 1602|   158k|            } else {
 1603|  1.42k|              mixFactors[outCh][inCh] <<= mixScales[outCh][inCh] - maxScale;
 1604|  1.42k|            }
 1605|   160k|            mixScales[outCh][inCh] = maxScale;
 1606|   160k|          }
 1607|   897k|        }
 1608|   112k|      }
 1609|   149k|    }
 1610|  18.6k|  }
 1611|       |
 1612|       |  /* return the scale factor */
 1613|  18.6k|  *pOutScale = maxScale;
 1614|       |
 1615|  18.6k|  return (err);
 1616|  18.6k|}
pcmdmx_lib.cpp:_ZL14dmxInitChannelPA8_sPA8_ij:
  876|   149k|                           INT mixScales[(8)][(8)], const unsigned int outCh) {
  877|   149k|  unsigned int inCh;
  878|  1.34M|  for (inCh = 0; inCh < (8); inCh += 1) {
  ------------------
  |  Branch (878:18): [True: 1.19M, False: 149k]
  ------------------
  879|  1.19M|    if (inCh == outCh) {
  ------------------
  |  Branch (879:9): [True: 149k, False: 1.04M]
  ------------------
  880|   149k|      mixFactors[outCh][inCh] = FL2FXCONST_DMX(0.5f);
  ------------------
  |  |  124|   149k|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|   149k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   149k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 149k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   149k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   149k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   149k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |  183|   149k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   149k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   149k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   149k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   149k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   149k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   149k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  881|   149k|      mixScales[outCh][inCh] = 1;
  882|  1.04M|    } else {
  883|  1.04M|      mixFactors[outCh][inCh] = FL2FXCONST_DMX(0.0f);
  ------------------
  |  |  124|  1.04M|#define FL2FXCONST_DMX(x) FL2FXCONST_SGL(x)
  |  |  ------------------
  |  |  |  |  180|  1.04M|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  1.04M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 1.04M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  1.04M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  1.04M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  1.04M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 1.04M]
  |  |  |  |  ------------------
  |  |  |  |  183|  1.04M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  1.04M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  1.04M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  1.04M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  1.04M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  1.04M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  1.04M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  884|  1.04M|      mixScales[outCh][inCh] = 0;
  885|  1.04M|    }
  886|  1.19M|  }
  887|   149k|}
pcmdmx_lib.cpp:_ZL15dmxClearChannelPA8_sPA8_ij:
  898|  2.40k|                            INT mixScales[(8)][(8)], const unsigned int outCh) {
  899|  2.40k|  FDK_ASSERT((outCh >= 0) && (outCh < (8)));
  ------------------
  |  |  221|  2.40k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (899:3): [True: 2.40k, False: 0]
  |  Branch (899:3): [True: 2.40k, False: 0]
  |  Branch (899:3): [True: 2.40k, False: 0]
  ------------------
  900|  2.40k|  FDKmemclear(&mixFactors[outCh], (8) * sizeof(FIXP_DMX));
  901|  2.40k|  FDKmemclear(&mixScales[outCh], (8) * sizeof(INT));
  902|  2.40k|}
pcmdmx_lib.cpp:_ZL13dmxSetChannelPA8_sPA8_ijjsi:
  920|  88.8k|                          const INT scale) {
  921|  88.8k|  int ch;
  922|   799k|  for (ch = 0; ch < (8); ch += 1) {
  ------------------
  |  Branch (922:16): [True: 710k, False: 88.8k]
  ------------------
  923|   710k|    if (mixFactors[srcCh][ch] != (FIXP_DMX)0) {
  ------------------
  |  Branch (923:9): [True: 100k, False: 610k]
  ------------------
  924|   100k|      mixFactors[dstCh][ch] =
  925|   100k|          FX_DBL2FX_DMX(fMult(mixFactors[srcCh][ch], factor));
  ------------------
  |  |  123|   100k|#define FX_DBL2FX_DMX(x) FX_DBL2FX_SGL(x)
  |  |  ------------------
  |  |  |  |  220|   100k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   100k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   100k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  926|   100k|      mixScales[dstCh][ch] = mixScales[srcCh][ch] + scale;
  927|   100k|    }
  928|   710k|  }
  929|  88.8k|}

_Z35SpatialDecParseSpecificConfigHeaderP13FDK_BITSTREAMP25T_SPATIAL_SPECIFIC_CONFIG17AUDIO_OBJECT_TYPE22SPATIAL_DEC_UPMIX_TYPE:
  282|  6.02k|    AUDIO_OBJECT_TYPE coreCodec, SPATIAL_DEC_UPMIX_TYPE upmixType) {
  283|  6.02k|  SACDEC_ERROR err = MPS_OK;
  284|  6.02k|  INT numFillBits;
  285|  6.02k|  int sacHeaderLen = 0;
  286|  6.02k|  int sacTimeAlignFlag = 0;
  287|       |
  288|  6.02k|  sacTimeAlignFlag = FDKreadBits(bitstream, 1);
  289|  6.02k|  sacHeaderLen = FDKreadBits(bitstream, 7);
  290|       |
  291|  6.02k|  if (sacHeaderLen == 127) {
  ------------------
  |  Branch (291:7): [True: 362, False: 5.65k]
  ------------------
  292|    362|    sacHeaderLen += FDKreadBits(bitstream, 16);
  293|    362|  }
  294|  6.02k|  numFillBits = (INT)FDKgetValidBits(bitstream);
  295|       |
  296|  6.02k|  err = SpatialDecParseSpecificConfig(bitstream, pSpatialSpecificConfig,
  297|  6.02k|                                      sacHeaderLen, coreCodec);
  298|       |
  299|  6.02k|  numFillBits -=
  300|  6.02k|      (INT)FDKgetValidBits(bitstream); /* the number of read bits (tmpBits) */
  301|  6.02k|  numFillBits = (8 * sacHeaderLen) - numFillBits;
  302|  6.02k|  if (numFillBits < 0) {
  ------------------
  |  Branch (302:7): [True: 69, False: 5.95k]
  ------------------
  303|       |    /* Parsing went wrong */
  304|     69|    err = MPS_PARSE_ERROR;
  305|     69|  }
  306|       |  /* Move to the very end of the SSC */
  307|  6.02k|  FDKpushBiDirectional(bitstream, numFillBits);
  308|       |
  309|  6.02k|  if ((err == MPS_OK) && sacTimeAlignFlag) {
  ------------------
  |  Branch (309:7): [True: 4.82k, False: 1.20k]
  |  Branch (309:26): [True: 174, False: 4.64k]
  ------------------
  310|       |    /* not supported */
  311|    174|    FDKreadBits(bitstream, 16);
  312|    174|    err = MPS_UNSUPPORTED_CONFIG;
  313|    174|  }
  314|       |
  315|       |  /* Derive additional helper variables */
  316|  6.02k|  SpatialDecDecodeHelperInfo(pSpatialSpecificConfig, (UPMIXTYPE)upmixType);
  317|       |
  318|  6.02k|  return err;
  319|  6.02k|}
_Z27SpatialDecParseMps212ConfigP13FDK_BITSTREAMP25T_SPATIAL_SPECIFIC_CONFIGi17AUDIO_OBJECT_TYPEii:
  325|  79.6k|    INT coreSbrFrameLengthIndex) {
  326|  79.6k|  int i;
  327|       |
  328|  79.6k|  FDKmemclear(pSpatialSpecificConfig, sizeof(SPATIAL_SPECIFIC_CONFIG));
  329|       |
  330|  79.6k|  pSpatialSpecificConfig->stereoConfigIndex = stereoConfigIndex;
  331|  79.6k|  pSpatialSpecificConfig->coreSbrFrameLengthIndex = coreSbrFrameLengthIndex;
  332|  79.6k|  pSpatialSpecificConfig->freqRes =
  333|  79.6k|      (SPATIALDEC_FREQ_RES)freqResTable[FDKreadBits(bitstream, 3)];
  334|  79.6k|  if (pSpatialSpecificConfig->freqRes == 0) {
  ------------------
  |  Branch (334:7): [True: 617, False: 78.9k]
  ------------------
  335|    617|    return MPS_PARSE_ERROR; /* reserved value */
  336|    617|  }
  337|       |
  338|  78.9k|  switch (coreCodec) {
  339|      0|    case AOT_DRM_USAC:
  ------------------
  |  Branch (339:5): [True: 0, False: 78.9k]
  ------------------
  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|  78.9k|    case AOT_USAC:
  ------------------
  |  Branch (348:5): [True: 78.9k, False: 0]
  ------------------
  349|  78.9k|      pSpatialSpecificConfig->bsFixedGainDMX =
  350|  78.9k|          (SPATIALDEC_FIXED_GAINS)FDKreadBits(bitstream, 3);
  351|  78.9k|      pSpatialSpecificConfig->tempShapeConfig =
  352|  78.9k|          (SPATIALDEC_TS_CONF)FDKreadBits(bitstream, 2);
  353|  78.9k|      pSpatialSpecificConfig->decorrConfig =
  354|  78.9k|          (SPATIALDEC_DECORR_CONF)FDKreadBits(bitstream, 2);
  355|  78.9k|      if (pSpatialSpecificConfig->decorrConfig > 2) {
  ------------------
  |  Branch (355:11): [True: 1.14k, False: 77.8k]
  ------------------
  356|  1.14k|        return MPS_PARSE_ERROR; /* reserved value */
  357|  1.14k|      }
  358|  77.8k|      pSpatialSpecificConfig->bsDecorrType = 0;
  359|  77.8k|      break;
  360|      0|    default:
  ------------------
  |  Branch (360:5): [True: 0, False: 78.9k]
  ------------------
  361|      0|      return MPS_UNSUPPORTED_FORMAT;
  362|  78.9k|  }
  363|  77.8k|  pSpatialSpecificConfig->nTimeSlots = (coreSbrFrameLengthIndex == 4) ? 64 : 32;
  ------------------
  |  Branch (363:40): [True: 16.1k, False: 61.6k]
  ------------------
  364|  77.8k|  pSpatialSpecificConfig->bsHighRateMode = (UCHAR)FDKreadBits(bitstream, 1);
  365|       |
  366|  77.8k|  {
  367|  77.8k|    pSpatialSpecificConfig->bsPhaseCoding = (UCHAR)FDKreadBits(bitstream, 1);
  368|  77.8k|    pSpatialSpecificConfig->bsOttBandsPhasePresent =
  369|  77.8k|        (UCHAR)FDKreadBits(bitstream, 1);
  370|  77.8k|    if (pSpatialSpecificConfig->bsOttBandsPhasePresent) {
  ------------------
  |  Branch (370:9): [True: 25.7k, False: 52.1k]
  ------------------
  371|  25.7k|      if (MAX_PARAMETER_BANDS < (pSpatialSpecificConfig->bsOttBandsPhase =
  ------------------
  |  |  118|  25.7k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (371:11): [True: 203, False: 25.5k]
  ------------------
  372|  25.7k|                                     FDKreadBits(bitstream, 5))) {
  373|    203|        return MPS_PARSE_ERROR;
  374|    203|      }
  375|  52.1k|    } else {
  376|  52.1k|      pSpatialSpecificConfig->bsOttBandsPhase = 0;
  377|  52.1k|    }
  378|  77.8k|  }
  379|       |
  380|  77.6k|  if (stereoConfigIndex > 1) { /* do residual coding */
  ------------------
  |  Branch (380:7): [True: 35.2k, False: 42.3k]
  ------------------
  381|  35.2k|    pSpatialSpecificConfig->bResidualCoding = 1;
  382|  35.2k|    pSpatialSpecificConfig->ResidualConfig->bResidualPresent = 1;
  383|  35.2k|    if (pSpatialSpecificConfig->freqRes <
  ------------------
  |  Branch (383:9): [True: 673, False: 34.6k]
  ------------------
  384|  35.2k|        (pSpatialSpecificConfig->ResidualConfig->nResidualBands =
  385|  35.2k|             FDKreadBits(bitstream, 5))) {
  386|    673|      return MPS_PARSE_ERROR;
  387|    673|    }
  388|  34.6k|    pSpatialSpecificConfig->bsOttBandsPhase =
  389|  34.6k|        fMax(pSpatialSpecificConfig->bsOttBandsPhase,
  390|  34.6k|             pSpatialSpecificConfig->ResidualConfig->nResidualBands);
  391|  34.6k|    pSpatialSpecificConfig->bsPseudoLr = (UCHAR)FDKreadBits(bitstream, 1);
  392|       |
  393|  34.6k|    if (pSpatialSpecificConfig->bsPhaseCoding) {
  ------------------
  |  Branch (393:9): [True: 10.1k, False: 24.4k]
  ------------------
  394|  10.1k|      pSpatialSpecificConfig->bsPhaseCoding = 3;
  395|  10.1k|    }
  396|  42.3k|  } else {
  397|  42.3k|    pSpatialSpecificConfig->bResidualCoding = 0;
  398|  42.3k|    pSpatialSpecificConfig->ResidualConfig->bResidualPresent = 0;
  399|  42.3k|  }
  400|       |
  401|  76.9k|  if (pSpatialSpecificConfig->tempShapeConfig == 2) {
  ------------------
  |  Branch (401:7): [True: 45.9k, False: 31.0k]
  ------------------
  402|  45.9k|    switch (coreCodec) {
  403|  45.9k|      case AOT_USAC:
  ------------------
  |  Branch (403:7): [True: 45.9k, False: 0]
  ------------------
  404|  45.9k|        pSpatialSpecificConfig->envQuantMode = FDKreadBits(bitstream, 1);
  405|  45.9k|        break;
  406|      0|      default: /* added to avoid compiler warning */
  ------------------
  |  Branch (406:7): [True: 0, False: 45.9k]
  ------------------
  407|      0|        break; /* added to avoid compiler warning */
  408|  45.9k|    }
  409|  45.9k|  }
  410|       |
  411|       |  /* Static parameters */
  412|       |
  413|  76.9k|  pSpatialSpecificConfig->samplingFreq =
  414|  76.9k|      samplingRate; /* wrong for stereoConfigIndex == 3 but value is unused */
  415|  76.9k|  pSpatialSpecificConfig->treeConfig = SPATIALDEC_MODE_RSVD7;
  416|  76.9k|  pSpatialSpecificConfig->nOttBoxes =
  417|  76.9k|      treePropertyTable[pSpatialSpecificConfig->treeConfig].numOttBoxes;
  418|  76.9k|  pSpatialSpecificConfig->nInputChannels =
  419|  76.9k|      treePropertyTable[pSpatialSpecificConfig->treeConfig].numInputChannels;
  420|  76.9k|  pSpatialSpecificConfig->nOutputChannels =
  421|  76.9k|      treePropertyTable[pSpatialSpecificConfig->treeConfig].numOutputChannels;
  422|       |
  423|  76.9k|  pSpatialSpecificConfig->bArbitraryDownmix = 0;
  424|       |
  425|   153k|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (425:15): [True: 76.9k, False: 76.9k]
  ------------------
  426|  76.9k|    pSpatialSpecificConfig->OttConfig[i].nOttBands = 0;
  427|  76.9k|  }
  428|       |
  429|  76.9k|  if (coreCodec == AOT_DRM_USAC) {
  ------------------
  |  Branch (429:7): [True: 0, False: 76.9k]
  ------------------
  430|       |    /* MPS payload is MPEG conform -> no need for pseudo DRM AOT */
  431|      0|    coreCodec = AOT_USAC;
  432|      0|  }
  433|  76.9k|  pSpatialSpecificConfig->coreCodec = coreCodec;
  434|       |
  435|       |  /* Derive additional helper variables */
  436|  76.9k|  SpatialDecDecodeHelperInfo(pSpatialSpecificConfig, UPMIXTYPE_NORMAL);
  437|       |
  438|  76.9k|  return MPS_OK;
  439|  76.9k|}
_Z29SpatialDecParseSpecificConfigP13FDK_BITSTREAMP25T_SPATIAL_SPECIFIC_CONFIGi17AUDIO_OBJECT_TYPE:
  444|  98.7k|    AUDIO_OBJECT_TYPE coreCodec) {
  445|  98.7k|  SACDEC_ERROR err = MPS_OK;
  446|  98.7k|  int i;
  447|  98.7k|  int bsSamplingFreqIndex;
  448|  98.7k|  int bsFreqRes, b3DaudioMode = 0;
  449|  98.7k|  int numHeaderBits;
  450|  98.7k|  int cfgStartPos, bitsAvailable;
  451|       |
  452|  98.7k|  FDKmemclear(pSpatialSpecificConfig, sizeof(SPATIAL_SPECIFIC_CONFIG));
  453|       |
  454|  98.7k|  cfgStartPos = FDKgetValidBits(bitstream);
  455|       |  /* It might be that we do not know the SSC length beforehand. */
  456|  98.7k|  if (sacHeaderLen == 0) {
  ------------------
  |  Branch (456:7): [True: 16.2k, False: 82.5k]
  ------------------
  457|  16.2k|    bitsAvailable = cfgStartPos;
  458|  82.5k|  } else {
  459|  82.5k|    bitsAvailable = 8 * sacHeaderLen;
  460|  82.5k|    if (bitsAvailable > cfgStartPos) {
  ------------------
  |  Branch (460:9): [True: 805, False: 81.7k]
  ------------------
  461|    805|      err = MPS_PARSE_ERROR;
  462|    805|      goto bail;
  463|    805|    }
  464|  82.5k|  }
  465|       |
  466|  97.9k|  bsSamplingFreqIndex = FDKreadBits(bitstream, 4);
  467|       |
  468|  97.9k|  if (bsSamplingFreqIndex == 15) {
  ------------------
  |  Branch (468:7): [True: 6.36k, False: 91.6k]
  ------------------
  469|  6.36k|    pSpatialSpecificConfig->samplingFreq = FDKreadBits(bitstream, 24);
  470|  91.6k|  } else {
  471|  91.6k|    pSpatialSpecificConfig->samplingFreq =
  472|  91.6k|        samplingFreqTable[bsSamplingFreqIndex];
  473|  91.6k|    if (pSpatialSpecificConfig->samplingFreq == 0) {
  ------------------
  |  Branch (473:9): [True: 2.15k, False: 89.4k]
  ------------------
  474|  2.15k|      err = MPS_PARSE_ERROR;
  475|  2.15k|      goto bail;
  476|  2.15k|    }
  477|  91.6k|  }
  478|       |
  479|  95.8k|  pSpatialSpecificConfig->nTimeSlots = FDKreadBits(bitstream, 5) + 1;
  480|  95.8k|  if ((pSpatialSpecificConfig->nTimeSlots < 1) ||
  ------------------
  |  Branch (480:7): [True: 0, False: 95.8k]
  ------------------
  481|  95.8k|      (pSpatialSpecificConfig->nTimeSlots > MAX_TIME_SLOTS)) {
  ------------------
  |  |  109|  95.8k|#define MAX_TIME_SLOTS 64
  ------------------
  |  Branch (481:7): [True: 0, False: 95.8k]
  ------------------
  482|      0|    err = MPS_PARSE_ERROR;
  483|      0|    goto bail;
  484|      0|  }
  485|       |
  486|  95.8k|  bsFreqRes = FDKreadBits(bitstream, 3);
  487|       |
  488|  95.8k|  pSpatialSpecificConfig->freqRes =
  489|  95.8k|      (SPATIALDEC_FREQ_RES)freqResTable_LD[bsFreqRes];
  490|       |
  491|  95.8k|  {
  492|  95.8k|    UINT treeConfig = FDKreadBits(bitstream, 4);
  493|       |
  494|  95.8k|    switch (treeConfig) {
  495|  59.0k|      case SPATIALDEC_MODE_RSVD7:
  ------------------
  |  Branch (495:7): [True: 59.0k, False: 36.7k]
  ------------------
  496|  59.0k|        pSpatialSpecificConfig->treeConfig = (SPATIALDEC_TREE_CONFIG)treeConfig;
  497|  59.0k|        break;
  498|  36.7k|      default:
  ------------------
  |  Branch (498:7): [True: 36.7k, False: 59.0k]
  ------------------
  499|  36.7k|        err = MPS_UNSUPPORTED_CONFIG;
  500|  36.7k|        goto bail;
  501|  95.8k|    }
  502|  95.8k|  }
  503|       |
  504|  59.0k|  {
  505|  59.0k|    pSpatialSpecificConfig->nOttBoxes =
  506|  59.0k|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numOttBoxes;
  507|  59.0k|    pSpatialSpecificConfig->nTttBoxes =
  508|  59.0k|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numTttBoxes;
  509|  59.0k|    pSpatialSpecificConfig->nInputChannels =
  510|  59.0k|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numInputChannels;
  511|  59.0k|    pSpatialSpecificConfig->nOutputChannels =
  512|  59.0k|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numOutputChannels;
  513|  59.0k|  }
  514|       |
  515|  59.0k|  pSpatialSpecificConfig->quantMode =
  516|  59.0k|      (SPATIALDEC_QUANT_MODE)FDKreadBits(bitstream, 2);
  517|       |
  518|  59.0k|  pSpatialSpecificConfig->bArbitraryDownmix = FDKreadBits(bitstream, 1);
  519|       |
  520|  59.0k|  pSpatialSpecificConfig->bsFixedGainDMX =
  521|  59.0k|      (SPATIALDEC_FIXED_GAINS)FDKreadBits(bitstream, 3);
  522|       |
  523|  59.0k|  pSpatialSpecificConfig->tempShapeConfig =
  524|  59.0k|      (SPATIALDEC_TS_CONF)FDKreadBits(bitstream, 2);
  525|  59.0k|  if (pSpatialSpecificConfig->tempShapeConfig > 2) {
  ------------------
  |  Branch (525:7): [True: 3.65k, False: 55.4k]
  ------------------
  526|  3.65k|    return MPS_PARSE_ERROR; /* reserved value */
  527|  3.65k|  }
  528|       |
  529|  55.4k|  pSpatialSpecificConfig->decorrConfig =
  530|  55.4k|      (SPATIALDEC_DECORR_CONF)FDKreadBits(bitstream, 2);
  531|  55.4k|  if (pSpatialSpecificConfig->decorrConfig > 2) {
  ------------------
  |  Branch (531:7): [True: 459, False: 54.9k]
  ------------------
  532|    459|    return MPS_PARSE_ERROR; /* reserved value */
  533|    459|  }
  534|       |
  535|   109k|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (535:15): [True: 54.9k, False: 54.9k]
  ------------------
  536|  54.9k|    pSpatialSpecificConfig->OttConfig[i].nOttBands = 0;
  537|  54.9k|  }
  538|       |
  539|  54.9k|  for (i = 0; i < pSpatialSpecificConfig->nTttBoxes; i++) {
  ------------------
  |  Branch (539:15): [True: 0, False: 54.9k]
  ------------------
  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|  54.9k|  if (pSpatialSpecificConfig->tempShapeConfig == 2) {
  ------------------
  |  Branch (548:7): [True: 30.9k, False: 23.9k]
  ------------------
  549|  30.9k|    pSpatialSpecificConfig->envQuantMode = FDKreadBits(bitstream, 1);
  550|  30.9k|  }
  551|       |
  552|  54.9k|  if (b3DaudioMode) {
  ------------------
  |  Branch (552:7): [True: 0, False: 54.9k]
  ------------------
  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|  54.9k|  FDKbyteAlign(bitstream,
  578|  54.9k|               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|  54.9k|  numHeaderBits = cfgStartPos - (INT)FDKgetValidBits(bitstream);
  583|  54.9k|  bitsAvailable -= numHeaderBits;
  584|  54.9k|  if (bitsAvailable < 0) {
  ------------------
  |  Branch (584:7): [True: 1.14k, False: 53.8k]
  ------------------
  585|  1.14k|    err = MPS_PARSE_ERROR;
  586|  1.14k|    goto bail;
  587|  1.14k|  }
  588|       |
  589|  53.8k|  pSpatialSpecificConfig->sacExtCnt = 0;
  590|  53.8k|  pSpatialSpecificConfig->bResidualCoding = 0;
  591|       |
  592|  53.8k|  err = SpatialDecParseExtensionConfig(
  593|  53.8k|      bitstream, pSpatialSpecificConfig, pSpatialSpecificConfig->nOttBoxes,
  594|  53.8k|      pSpatialSpecificConfig->nTttBoxes,
  595|  53.8k|      pSpatialSpecificConfig->nOutputChannels, bitsAvailable);
  596|       |
  597|  53.8k|  FDKbyteAlign(
  598|  53.8k|      bitstream,
  599|  53.8k|      cfgStartPos); /* Same alignment anchor as above because
  600|       |                       SpatialExtensionConfig() always reads full bytes */
  601|       |
  602|  53.8k|  pSpatialSpecificConfig->coreCodec = coreCodec;
  603|       |
  604|  53.8k|  SpatialDecDecodeHelperInfo(pSpatialSpecificConfig, UPMIXTYPE_NORMAL);
  605|       |
  606|  94.6k|bail:
  607|  94.6k|  if (sacHeaderLen > 0) {
  ------------------
  |  Branch (607:7): [True: 78.6k, False: 16.0k]
  ------------------
  608|       |    /* If the config is of known length then assure that the
  609|       |       bitbuffer is exactly at its end when leaving the function. */
  610|  78.6k|    FDKpushBiDirectional(
  611|  78.6k|        bitstream,
  612|  78.6k|        (sacHeaderLen * 8) - (cfgStartPos - (INT)FDKgetValidBits(bitstream)));
  613|  78.6k|  }
  614|       |
  615|  94.6k|  return err;
  616|  53.8k|}
_Z31SpatialDecDefaultSpecificConfigP25T_SPATIAL_SPECIFIC_CONFIG17AUDIO_OBJECT_TYPEiiiii:
  623|    702|{
  624|    702|  int err = MPS_OK;
  625|    702|  int i;
  626|       |
  627|    702|  FDK_ASSERT(coreCodec != AOT_NONE);
  ------------------
  |  |  221|    702|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (627:3): [True: 702, False: 0]
  ------------------
  628|    702|  FDK_ASSERT(nTimeSlots > 0);
  ------------------
  |  |  221|    702|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (628:3): [True: 702, False: 0]
  ------------------
  629|    702|  FDK_ASSERT(samplingFreq > 0);
  ------------------
  |  |  221|    702|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (629:3): [True: 702, False: 0]
  ------------------
  630|       |
  631|    702|  pSpatialSpecificConfig->coreCodec = coreCodec;
  632|    702|  pSpatialSpecificConfig->samplingFreq = samplingFreq;
  633|    702|  pSpatialSpecificConfig->nTimeSlots = nTimeSlots;
  634|    702|  if ((pSpatialSpecificConfig->coreCodec == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (634:7): [True: 702, False: 0]
  ------------------
  635|      0|      (pSpatialSpecificConfig->coreCodec == AOT_ER_AAC_LD))
  ------------------
  |  Branch (635:7): [True: 0, False: 0]
  ------------------
  636|    702|    pSpatialSpecificConfig->freqRes = SPATIALDEC_FREQ_RES_23;
  637|      0|  else
  638|      0|    pSpatialSpecificConfig->freqRes = SPATIALDEC_FREQ_RES_28;
  639|       |
  640|    702|  {
  641|    702|    pSpatialSpecificConfig->treeConfig =
  642|    702|        SPATIALDEC_MODE_RSVD7; /* 212  configuration */
  643|    702|  }
  644|       |
  645|    702|  {
  646|    702|    pSpatialSpecificConfig->nOttBoxes =
  647|    702|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numOttBoxes;
  648|    702|    pSpatialSpecificConfig->nInputChannels =
  649|    702|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numInputChannels;
  650|    702|    pSpatialSpecificConfig->nOutputChannels =
  651|    702|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numOutputChannels;
  652|    702|  }
  653|       |
  654|    702|  pSpatialSpecificConfig->quantMode = SPATIALDEC_QUANT_FINE_DEF;
  655|    702|  pSpatialSpecificConfig->bArbitraryDownmix = 0;
  656|    702|  pSpatialSpecificConfig->bResidualCoding = 0;
  657|    702|  if ((pSpatialSpecificConfig->coreCodec == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (657:7): [True: 702, False: 0]
  ------------------
  658|      0|      (pSpatialSpecificConfig->coreCodec == AOT_ER_AAC_LD))
  ------------------
  |  Branch (658:7): [True: 0, False: 0]
  ------------------
  659|    702|    pSpatialSpecificConfig->bsFixedGainDMX = SPATIALDEC_GAIN_RSVD2;
  660|      0|  else
  661|      0|    pSpatialSpecificConfig->bsFixedGainDMX = SPATIALDEC_GAIN_MODE0;
  662|       |
  663|    702|  pSpatialSpecificConfig->tempShapeConfig = SPATIALDEC_TS_TPNOWHITE;
  664|    702|  pSpatialSpecificConfig->decorrConfig = SPATIALDEC_DECORR_MODE0;
  665|       |
  666|  1.40k|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (666:15): [True: 702, False: 702]
  ------------------
  667|    702|    pSpatialSpecificConfig->OttConfig[i].nOttBands = 0;
  668|    702|  }
  669|       |
  670|    702|  return err;
  671|    702|}
_Z24SpatialDecParseFrameDataP17spatialDec_structP23SPATIAL_BS_FRAME_structP13FDK_BITSTREAMPK25T_SPATIAL_SPECIFIC_CONFIG9UPMIXTYPEi:
  971|   103k|    int fGlobalIndependencyFlag) {
  972|   103k|  SACDEC_ERROR err = MPS_OK;
  973|   103k|  int bsFramingType, dataBands, ps, pg, i;
  974|   103k|  int pb;
  975|   103k|  int numTempShapeChan = 0;
  976|   103k|  int bsNumOutputChannels =
  977|   103k|      treePropertyTable[pSpatialSpecificConfig->treeConfig]
  978|   103k|          .numOutputChannels; /* CAUTION: Maybe different to
  979|       |                                 pSpatialSpecificConfig->treeConfig in some
  980|       |                                 modes! */
  981|   103k|  int paramSetErr = 0;
  982|   103k|  UINT alignAnchor = FDKgetValidBits(
  983|   103k|      bitstream); /* Anchor for ByteAlign() function. See comment below. */
  984|   103k|  UINT syntaxFlags;
  985|       |
  986|   103k|  syntaxFlags = pSpatialSpecificConfig->syntaxFlags;
  987|       |
  988|   103k|  if ((syntaxFlags & (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) &&
  ------------------
  |  |  532|   103k|#define SACDEC_SYNTAX_USAC 2
  ------------------
                if ((syntaxFlags & (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) &&
  ------------------
  |  |  533|   103k|#define SACDEC_SYNTAX_RSVD50 4
  ------------------
  |  Branch (988:7): [True: 96.9k, False: 6.85k]
  ------------------
  989|  96.9k|      pSpatialSpecificConfig->bsHighRateMode == 0) {
  ------------------
  |  Branch (989:7): [True: 10.8k, False: 86.1k]
  ------------------
  990|  10.8k|    bsFramingType = 0; /* fixed framing */
  991|  10.8k|    frame->numParameterSets = 1;
  992|  92.9k|  } else {
  993|  92.9k|    bsFramingType = FDKreadBits(bitstream, 1);
  994|  92.9k|    if (syntaxFlags & SACDEC_SYNTAX_LD)
  ------------------
  |  |  536|  92.9k|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (994:9): [True: 6.85k, False: 86.1k]
  ------------------
  995|  6.85k|      frame->numParameterSets = FDKreadBits(bitstream, 1) + 1;
  996|  86.1k|    else
  997|  86.1k|      frame->numParameterSets = FDKreadBits(bitstream, 3) + 1;
  998|  92.9k|  }
  999|       |
 1000|       |  /* Any error after this line shall trigger parameter invalidation at bail
 1001|       |   * label. */
 1002|   103k|  paramSetErr = 1;
 1003|       |
 1004|   103k|  if (frame->numParameterSets >= MAX_PARAMETER_SETS) {
  ------------------
  |  |  156|   103k|#define MAX_PARAMETER_SETS (9)
  ------------------
  |  Branch (1004:7): [True: 0, False: 103k]
  ------------------
 1005|      0|    goto bail;
 1006|      0|  }
 1007|       |
 1008|       |  /* Basic config check. */
 1009|   103k|  if (pSpatialSpecificConfig->nInputChannels <= 0 ||
  ------------------
  |  Branch (1009:7): [True: 0, False: 103k]
  ------------------
 1010|   103k|      pSpatialSpecificConfig->nOutputChannels <= 0) {
  ------------------
  |  Branch (1010:7): [True: 0, False: 103k]
  ------------------
 1011|      0|    err = MPS_UNSUPPORTED_CONFIG;
 1012|      0|    goto bail;
 1013|      0|  }
 1014|       |
 1015|   103k|  if (bsFramingType) {
  ------------------
  |  Branch (1015:7): [True: 5.22k, False: 98.6k]
  ------------------
 1016|  5.22k|    int prevParamSlot = -1;
 1017|  5.22k|    int bitsParamSlot;
 1018|       |
 1019|  5.22k|    {
 1020|  5.22k|      bitsParamSlot = nBitsParamSlot(pSpatialSpecificConfig->nTimeSlots);
 1021|       |
 1022|  12.4k|      for (i = 0; i < frame->numParameterSets; i++) {
  ------------------
  |  Branch (1022:19): [True: 7.36k, False: 5.07k]
  ------------------
 1023|  7.36k|        frame->paramSlot[i] = FDKreadBits(bitstream, bitsParamSlot);
 1024|       |        /* Sanity check */
 1025|  7.36k|        if ((frame->paramSlot[i] <= prevParamSlot) ||
  ------------------
  |  Branch (1025:13): [True: 74, False: 7.28k]
  ------------------
 1026|  7.28k|            (frame->paramSlot[i] >= pSpatialSpecificConfig->nTimeSlots)) {
  ------------------
  |  Branch (1026:13): [True: 72, False: 7.21k]
  ------------------
 1027|    146|          err = MPS_PARSE_ERROR;
 1028|    146|          goto bail;
 1029|    146|        }
 1030|  7.21k|        prevParamSlot = frame->paramSlot[i];
 1031|  7.21k|      }
 1032|  5.22k|    }
 1033|  98.6k|  } else {
 1034|   251k|    for (i = 0; i < frame->numParameterSets; i++) {
  ------------------
  |  Branch (1034:17): [True: 152k, False: 98.6k]
  ------------------
 1035|   152k|      frame->paramSlot[i] = ((pSpatialSpecificConfig->nTimeSlots * (i + 1)) /
 1036|   152k|                             frame->numParameterSets) -
 1037|   152k|                            1;
 1038|   152k|    }
 1039|  98.6k|  }
 1040|       |
 1041|   103k|  if ((syntaxFlags & (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) &&
  ------------------
  |  |  532|   103k|#define SACDEC_SYNTAX_USAC 2
  ------------------
                if ((syntaxFlags & (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) &&
  ------------------
  |  |  533|   103k|#define SACDEC_SYNTAX_RSVD50 4
  ------------------
  |  Branch (1041:7): [True: 96.9k, False: 6.71k]
  ------------------
 1042|  96.9k|      fGlobalIndependencyFlag) {
  ------------------
  |  Branch (1042:7): [True: 84.0k, False: 12.9k]
  ------------------
 1043|  84.0k|    frame->bsIndependencyFlag = 1;
 1044|  84.0k|  } else {
 1045|  19.6k|    frame->bsIndependencyFlag = (UCHAR)FDKreadBits(bitstream, 1);
 1046|  19.6k|  }
 1047|       |
 1048|       |  /*
 1049|       |   * OttData()
 1050|       |   */
 1051|   205k|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (1051:15): [True: 103k, False: 101k]
  ------------------
 1052|   103k|    err = ecDataDec(frame, syntaxFlags, bitstream, &frame->CLDLosslessData[i],
 1053|   103k|                    frame->cmpOttCLDidx, self->cmpOttCLDidxPrev, t_CLD, i, 0,
 1054|   103k|                    pSpatialSpecificConfig->bitstreamOttBands[i],
 1055|   103k|                    pSpatialSpecificConfig->ottCLDdefault[i]);
 1056|   103k|    if (err != MPS_OK) {
  ------------------
  |  Branch (1056:9): [True: 2.03k, False: 101k]
  ------------------
 1057|  2.03k|      goto bail;
 1058|  2.03k|    }
 1059|   103k|  } /* i < numOttBoxes */
 1060|       |
 1061|   101k|  {
 1062|   202k|    for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (1062:17): [True: 101k, False: 101k]
  ------------------
 1063|   101k|      err = ecDataDec(frame, syntaxFlags, bitstream, &frame->ICCLosslessData[i],
 1064|   101k|                      frame->cmpOttICCidx, self->cmpOttICCidxPrev, t_ICC, i, 0,
 1065|   101k|                      pSpatialSpecificConfig->bitstreamOttBands[i], ICCdefault);
  ------------------
  |  |  126|   101k|#define ICCdefault 0
  ------------------
 1066|   101k|      if (err != MPS_OK) {
  ------------------
  |  Branch (1066:11): [True: 386, False: 101k]
  ------------------
 1067|    386|        goto bail;
 1068|    386|      }
 1069|   101k|    } /* i < numOttBoxes */
 1070|   101k|  }   /* !oneICC */
 1071|       |
 1072|   101k|  if ((pSpatialSpecificConfig->treeConfig == SPATIALDEC_MODE_RSVD7) &&
  ------------------
  |  Branch (1072:7): [True: 101k, False: 0]
  ------------------
 1073|   101k|      (pSpatialSpecificConfig->bsPhaseCoding)) {
  ------------------
  |  Branch (1073:7): [True: 9.25k, False: 92.0k]
  ------------------
 1074|  9.25k|    frame->phaseMode = FDKreadBits(bitstream, 1);
 1075|       |
 1076|  9.25k|    if (frame->phaseMode == 0) {
  ------------------
  |  Branch (1076:9): [True: 6.66k, False: 2.59k]
  ------------------
 1077|  40.9k|      for (pb = 0; pb < pSpatialSpecificConfig->numOttBandsIPD; pb++) {
  ------------------
  |  Branch (1077:20): [True: 34.3k, False: 6.66k]
  ------------------
 1078|  34.3k|        self->cmpOttIPDidxPrev[0][pb] = 0;
 1079|   227k|        for (i = 0; i < frame->numParameterSets; i++) {
  ------------------
  |  Branch (1079:21): [True: 192k, False: 34.3k]
  ------------------
 1080|   192k|          frame->cmpOttIPDidx[0][i][pb] = 0;
 1081|       |          // frame->ottIPDidx[0][i][pb] = 0;
 1082|   192k|        }
 1083|       |        /* self->ottIPDidxPrev[0][pb] = 0; */
 1084|  34.3k|      }
 1085|  6.66k|      frame->OpdSmoothingMode = 0;
 1086|  6.66k|    } else {
 1087|  2.59k|      frame->OpdSmoothingMode = FDKreadBits(bitstream, 1);
 1088|  2.59k|      err = ecDataDec(frame, syntaxFlags, bitstream, &frame->IPDLosslessData[0],
 1089|  2.59k|                      frame->cmpOttIPDidx, self->cmpOttIPDidxPrev, t_IPD, 0, 0,
 1090|  2.59k|                      pSpatialSpecificConfig->numOttBandsIPD, IPDdefault);
  ------------------
  |  |  127|  2.59k|#define IPDdefault 0
  ------------------
 1091|  2.59k|      if (err != MPS_OK) {
  ------------------
  |  Branch (1091:11): [True: 63, False: 2.53k]
  ------------------
 1092|     63|        goto bail;
 1093|     63|      }
 1094|  2.59k|    }
 1095|  9.25k|  }
 1096|       |
 1097|       |  /*
 1098|       |   * SmgData()
 1099|       |   */
 1100|       |
 1101|   101k|  {
 1102|   101k|    if (!pSpatialSpecificConfig->bsHighRateMode &&
  ------------------
  |  Branch (1102:9): [True: 15.2k, False: 85.9k]
  ------------------
 1103|  15.2k|        (syntaxFlags & SACDEC_SYNTAX_USAC)) {
  ------------------
  |  |  532|  15.2k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (1103:9): [True: 10.8k, False: 4.37k]
  ------------------
 1104|  21.6k|      for (ps = 0; ps < frame->numParameterSets; ps++) {
  ------------------
  |  Branch (1104:20): [True: 10.8k, False: 10.8k]
  ------------------
 1105|  10.8k|        frame->bsSmoothMode[ps] = 0;
 1106|  10.8k|      }
 1107|  90.3k|    } else {
 1108|   235k|      for (ps = 0; ps < frame->numParameterSets; ps++) {
  ------------------
  |  Branch (1108:20): [True: 145k, False: 90.3k]
  ------------------
 1109|   145k|        frame->bsSmoothMode[ps] = (UCHAR)FDKreadBits(bitstream, 2);
 1110|   145k|        if (frame->bsSmoothMode[ps] >= 2) {
  ------------------
  |  Branch (1110:13): [True: 18.8k, False: 126k]
  ------------------
 1111|  18.8k|          frame->bsSmoothTime[ps] = (UCHAR)FDKreadBits(bitstream, 2);
 1112|  18.8k|        }
 1113|   145k|        if (frame->bsSmoothMode[ps] == 3) {
  ------------------
  |  Branch (1113:13): [True: 12.2k, False: 133k]
  ------------------
 1114|  12.2k|          frame->bsFreqResStrideSmg[ps] = (UCHAR)FDKreadBits(bitstream, 2);
 1115|  12.2k|          dataBands = (pSpatialSpecificConfig->freqRes - 1) /
 1116|  12.2k|                          pbStrideTable[frame->bsFreqResStrideSmg[ps]] +
 1117|  12.2k|                      1;
 1118|  51.6k|          for (pg = 0; pg < dataBands; pg++) {
  ------------------
  |  Branch (1118:24): [True: 39.4k, False: 12.2k]
  ------------------
 1119|  39.4k|            frame->bsSmgData[ps][pg] = (UCHAR)FDKreadBits(bitstream, 1);
 1120|  39.4k|          }
 1121|  12.2k|        }
 1122|   145k|      } /* ps < numParameterSets */
 1123|  90.3k|    }
 1124|   101k|  }
 1125|       |
 1126|       |  /*
 1127|       |   * TempShapeData()
 1128|       |   */
 1129|   101k|  if ((pSpatialSpecificConfig->tempShapeConfig == 3) &&
  ------------------
  |  Branch (1129:7): [True: 7.45k, False: 93.7k]
  ------------------
 1130|  7.45k|      (syntaxFlags & SACDEC_SYNTAX_USAC)) {
  ------------------
  |  |  532|  7.45k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (1130:7): [True: 7.45k, False: 0]
  ------------------
 1131|  7.45k|    int TsdErr;
 1132|  7.45k|    TsdErr = TsdRead(bitstream, pSpatialSpecificConfig->nTimeSlots,
 1133|  7.45k|                     &frame->TsdData[0]);
 1134|  7.45k|    if (TsdErr) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 7.45k]
  ------------------
 1135|      0|      err = MPS_PARSE_ERROR;
 1136|      0|      goto bail;
 1137|      0|    }
 1138|  93.7k|  } else {
 1139|  93.7k|    frame->TsdData[0].bsTsdEnable = 0;
 1140|  93.7k|  }
 1141|       |
 1142|   303k|  for (i = 0; i < bsNumOutputChannels; i++) {
  ------------------
  |  Branch (1142:15): [True: 202k, False: 101k]
  ------------------
 1143|   202k|    frame->tempShapeEnableChannelSTP[i] = 0;
 1144|   202k|    frame->tempShapeEnableChannelGES[i] = 0;
 1145|   202k|  }
 1146|       |
 1147|   101k|  if ((pSpatialSpecificConfig->tempShapeConfig == 1) ||
  ------------------
  |  Branch (1147:7): [True: 5.45k, False: 95.7k]
  ------------------
 1148|  95.7k|      (pSpatialSpecificConfig->tempShapeConfig == 2)) {
  ------------------
  |  Branch (1148:7): [True: 83.7k, False: 11.9k]
  ------------------
 1149|  89.2k|    int bsTempShapeEnable = FDKreadBits(bitstream, 1);
 1150|  89.2k|    if (bsTempShapeEnable) {
  ------------------
  |  Branch (1150:9): [True: 5.40k, False: 83.8k]
  ------------------
 1151|  5.40k|      numTempShapeChan =
 1152|  5.40k|          tempShapeChanTable[pSpatialSpecificConfig->tempShapeConfig - 1]
 1153|  5.40k|                            [pSpatialSpecificConfig->treeConfig];
 1154|  5.40k|      switch (pSpatialSpecificConfig->tempShapeConfig) {
 1155|  2.53k|        case 1: /* STP */
  ------------------
  |  Branch (1155:9): [True: 2.53k, False: 2.86k]
  ------------------
 1156|  7.61k|          for (i = 0; i < numTempShapeChan; i++) {
  ------------------
  |  Branch (1156:23): [True: 5.07k, False: 2.53k]
  ------------------
 1157|  5.07k|            int stpEnable = FDKreadBits(bitstream, 1);
 1158|  5.07k|            frame->tempShapeEnableChannelSTP[i] = stpEnable;
 1159|  5.07k|          }
 1160|  2.53k|          break;
 1161|  2.86k|        case 2: /* GES */
  ------------------
  |  Branch (1161:9): [True: 2.86k, False: 2.53k]
  ------------------
 1162|  2.86k|        {
 1163|  2.86k|          UCHAR gesChannelEnable[MAX_OUTPUT_CHANNELS];
 1164|       |
 1165|  8.58k|          for (i = 0; i < numTempShapeChan; i++) {
  ------------------
  |  Branch (1165:23): [True: 5.72k, False: 2.86k]
  ------------------
 1166|  5.72k|            gesChannelEnable[i] = (UCHAR)FDKreadBits(bitstream, 1);
 1167|  5.72k|            frame->tempShapeEnableChannelGES[i] = gesChannelEnable[i];
 1168|  5.72k|          }
 1169|  8.30k|          for (i = 0; i < numTempShapeChan; i++) {
  ------------------
  |  Branch (1169:23): [True: 5.62k, False: 2.68k]
  ------------------
 1170|  5.62k|            if (gesChannelEnable[i]) {
  ------------------
  |  Branch (1170:17): [True: 2.94k, False: 2.68k]
  ------------------
 1171|  2.94k|              int envShapeData_tmp[MAX_TIME_SLOTS];
 1172|  2.94k|              if (huff_dec_reshape(bitstream, envShapeData_tmp,
  ------------------
  |  Branch (1172:19): [True: 180, False: 2.76k]
  ------------------
 1173|  2.94k|                                   pSpatialSpecificConfig->nTimeSlots) != 0) {
 1174|    180|                err = MPS_PARSE_ERROR;
 1175|    180|                goto bail;
 1176|    180|              }
 1177|  88.4k|              for (int ts = 0; ts < pSpatialSpecificConfig->nTimeSlots; ts++) {
  ------------------
  |  Branch (1177:32): [True: 85.7k, False: 2.76k]
  ------------------
 1178|  85.7k|                if (!(envShapeData_tmp[ts] >= 0) &&
  ------------------
  |  Branch (1178:21): [True: 0, False: 85.7k]
  ------------------
 1179|      0|                    (envShapeData_tmp[ts] <= 4)) {
  ------------------
  |  Branch (1179:21): [True: 0, False: 0]
  ------------------
 1180|      0|                  err = MPS_PARSE_ERROR;
 1181|      0|                  goto bail;
 1182|      0|                }
 1183|  85.7k|                frame->bsEnvShapeData[i][ts] = (UCHAR)envShapeData_tmp[ts];
 1184|  85.7k|              }
 1185|  2.76k|            }
 1186|  5.62k|          }
 1187|  2.86k|        } break;
 1188|  2.68k|        default:
  ------------------
  |  Branch (1188:9): [True: 0, False: 5.40k]
  ------------------
 1189|      0|          err = MPS_INVALID_TEMPSHAPE;
 1190|      0|          goto bail;
 1191|  5.40k|      }
 1192|  5.40k|    } /* bsTempShapeEnable */
 1193|  89.2k|  }   /* pSpatialSpecificConfig->tempShapeConfig != 0 */
 1194|       |
 1195|   101k|  if (pSpatialSpecificConfig->bArbitraryDownmix != 0) {
  ------------------
  |  Branch (1195:7): [True: 4.04k, False: 96.9k]
  ------------------
 1196|  4.04k|    err = parseArbitraryDownmixData(self, pSpatialSpecificConfig, syntaxFlags,
 1197|  4.04k|                                    frame, bitstream);
 1198|  4.04k|    if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1198:9): [True: 1.57k, False: 2.46k]
  ------------------
 1199|  4.04k|  }
 1200|       |
 1201|  99.4k|  if (1 && (!(syntaxFlags & (SACDEC_SYNTAX_USAC)))) {
  ------------------
  |  |  532|  99.4k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (1201:7): [True: 99.4k, Folded]
  |  Branch (1201:12): [True: 2.62k, False: 96.8k]
  ------------------
 1202|  2.62k|    FDKbyteAlign(bitstream,
 1203|  2.62k|                 alignAnchor); /* ISO/IEC FDIS 23003-1: 5.2. ... byte alignment
 1204|       |                                  with respect to the beginning of the syntactic
 1205|       |                                  element in which ByteAlign() occurs. */
 1206|  2.62k|  }
 1207|       |
 1208|   103k|bail:
 1209|   103k|  if (err != MPS_OK && paramSetErr != 0) {
  ------------------
  |  Branch (1209:7): [True: 4.38k, False: 99.4k]
  |  Branch (1209:24): [True: 4.38k, False: 0]
  ------------------
 1210|       |    /* Since the parameter set data has already been written to the instance we
 1211|       |     * need to ... */
 1212|  4.38k|    frame->numParameterSets = 0; /* ... signal that it is corrupt ... */
 1213|  4.38k|  }
 1214|       |
 1215|   103k|  return err;
 1216|       |
 1217|  99.4k|} /* SpatialDecParseFrame */
_Z21SpatialDecDecodeFrameP17spatialDec_structP23SPATIAL_BS_FRAME_struct:
 1862|   157k|SACDEC_ERROR SpatialDecDecodeFrame(spatialDec *self, SPATIAL_BS_FRAME *frame) {
 1863|   157k|  SACDEC_ERROR err = MPS_OK;
 1864|       |
 1865|   157k|  self->extendFrame = 0;
 1866|   157k|  if (frame->paramSlot[frame->numParameterSets - 1] != self->timeSlots - 1) {
  ------------------
  |  Branch (1866:7): [True: 3.00k, False: 154k]
  ------------------
 1867|  3.00k|    self->extendFrame = 1;
 1868|  3.00k|  }
 1869|       |
 1870|   157k|  self->TsdTs = 0;
 1871|       |
 1872|       |  /****** DTDF and MAP DATA ********/
 1873|   157k|  if ((err = decodeAndMapFrameOtt(self, frame)) != MPS_OK) goto bail;
  ------------------
  |  Branch (1873:7): [True: 0, False: 157k]
  ------------------
 1874|       |
 1875|   157k|  if ((err = decodeAndMapFrameSmg(self, frame)) != MPS_OK) goto bail;
  ------------------
  |  Branch (1875:7): [True: 0, False: 157k]
  ------------------
 1876|       |
 1877|   157k|  if (self->arbitraryDownmix != 0) {
  ------------------
  |  Branch (1877:7): [True: 32.7k, False: 124k]
  ------------------
 1878|  32.7k|    if ((err = decodeAndMapFrameArbdmx(self, frame)) != MPS_OK) goto bail;
  ------------------
  |  Branch (1878:9): [True: 0, False: 32.7k]
  ------------------
 1879|  32.7k|  }
 1880|       |
 1881|   157k|  if (self->extendFrame) {
  ------------------
  |  Branch (1881:7): [True: 3.00k, False: 154k]
  ------------------
 1882|  3.00k|    frame->numParameterSets =
 1883|  3.00k|        fixMin(MAX_PARAMETER_SETS, frame->numParameterSets + 1);
  ------------------
  |  |  306|  3.00k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1884|  3.00k|    frame->paramSlot[frame->numParameterSets - 1] = self->timeSlots - 1;
 1885|       |
 1886|  10.9k|    for (int p = 0; p < frame->numParameterSets; p++) {
  ------------------
  |  Branch (1886:21): [True: 7.94k, False: 3.00k]
  ------------------
 1887|  7.94k|      if (frame->paramSlot[p] > self->timeSlots - 1) {
  ------------------
  |  Branch (1887:11): [True: 0, False: 7.94k]
  ------------------
 1888|      0|        frame->paramSlot[p] = self->timeSlots - 1;
 1889|      0|        err = MPS_PARSE_ERROR;
 1890|      0|      }
 1891|  7.94k|    }
 1892|  3.00k|    if (err != MPS_OK) {
  ------------------
  |  Branch (1892:9): [True: 0, False: 3.00k]
  ------------------
 1893|      0|      goto bail;
 1894|      0|    }
 1895|  3.00k|  }
 1896|       |
 1897|   157k|bail:
 1898|   157k|  return err;
 1899|   157k|} /* SpatialDecDecodeFrame() */
_Z22SpatialDecDecodeHeaderP17spatialDec_structP25T_SPATIAL_SPECIFIC_CONFIG:
 1914|  51.2k|    spatialDec *self, SPATIAL_SPECIFIC_CONFIG *pSpatialSpecificConfig) {
 1915|  51.2k|  SACDEC_ERROR err = MPS_OK;
 1916|  51.2k|  int i;
 1917|       |
 1918|  51.2k|  self->samplingFreq = pSpatialSpecificConfig->samplingFreq;
 1919|  51.2k|  self->timeSlots = pSpatialSpecificConfig->nTimeSlots;
 1920|  51.2k|  self->frameLength = self->timeSlots * self->qmfBands;
 1921|  51.2k|  self->bitstreamParameterBands = pSpatialSpecificConfig->freqRes;
 1922|       |
 1923|  51.2k|  if (self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD)
  ------------------
  |  |  536|  51.2k|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (1923:7): [True: 27.9k, False: 23.2k]
  ------------------
 1924|  27.9k|    self->hybridBands = self->qmfBands;
 1925|  23.2k|  else
 1926|  23.2k|    self->hybridBands = SacGetHybridSubbands(self->qmfBands);
 1927|  51.2k|  self->tp_hybBandBorder = 12;
 1928|       |
 1929|  51.2k|  self->numParameterBands = self->bitstreamParameterBands;
 1930|       |
 1931|  51.2k|  if (self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD) {
  ------------------
  |  |  536|  51.2k|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (1931:7): [True: 27.9k, False: 23.2k]
  ------------------
 1932|  27.9k|    switch (self->numParameterBands) {
 1933|    371|      case 4:
  ------------------
  |  Branch (1933:7): [True: 371, False: 27.5k]
  ------------------
 1934|    371|        self->kernels = kernels_4_to_64;
 1935|    371|        break;
 1936|  9.52k|      case 5:
  ------------------
  |  Branch (1936:7): [True: 9.52k, False: 18.4k]
  ------------------
 1937|  9.52k|        self->kernels = kernels_5_to_64;
 1938|  9.52k|        break;
 1939|    432|      case 7:
  ------------------
  |  Branch (1939:7): [True: 432, False: 27.5k]
  ------------------
 1940|    432|        self->kernels = kernels_7_to_64;
 1941|    432|        break;
 1942|  13.4k|      case 9:
  ------------------
  |  Branch (1942:7): [True: 13.4k, False: 14.4k]
  ------------------
 1943|  13.4k|        self->kernels = kernels_9_to_64;
 1944|  13.4k|        break;
 1945|    287|      case 12:
  ------------------
  |  Branch (1945:7): [True: 287, False: 27.6k]
  ------------------
 1946|    287|        self->kernels = kernels_12_to_64;
 1947|    287|        break;
 1948|  1.38k|      case 15:
  ------------------
  |  Branch (1948:7): [True: 1.38k, False: 26.5k]
  ------------------
 1949|  1.38k|        self->kernels = kernels_15_to_64;
 1950|  1.38k|        break;
 1951|  1.75k|      case 23:
  ------------------
  |  Branch (1951:7): [True: 1.75k, False: 26.1k]
  ------------------
 1952|  1.75k|        self->kernels = kernels_23_to_64;
 1953|  1.75k|        break;
 1954|    710|      default:
  ------------------
  |  Branch (1954:7): [True: 710, False: 27.2k]
  ------------------
 1955|    710|        return MPS_INVALID_PARAMETERBANDS; /* unsupported numParameterBands */
 1956|  27.9k|    }
 1957|  27.9k|  } else {
 1958|  23.2k|    switch (self->numParameterBands) {
 1959|    927|      case 4:
  ------------------
  |  Branch (1959:7): [True: 927, False: 22.3k]
  ------------------
 1960|    927|        self->kernels = kernels_4_to_71;
 1961|    927|        break;
 1962|    983|      case 5:
  ------------------
  |  Branch (1962:7): [True: 983, False: 22.3k]
  ------------------
 1963|    983|        self->kernels = kernels_5_to_71;
 1964|    983|        break;
 1965|  9.31k|      case 7:
  ------------------
  |  Branch (1965:7): [True: 9.31k, False: 13.9k]
  ------------------
 1966|  9.31k|        self->kernels = kernels_7_to_71;
 1967|  9.31k|        break;
 1968|  2.99k|      case 10:
  ------------------
  |  Branch (1968:7): [True: 2.99k, False: 20.2k]
  ------------------
 1969|  2.99k|        self->kernels = kernels_10_to_71;
 1970|  2.99k|        break;
 1971|  1.43k|      case 14:
  ------------------
  |  Branch (1971:7): [True: 1.43k, False: 21.8k]
  ------------------
 1972|  1.43k|        self->kernels = kernels_14_to_71;
 1973|  1.43k|        break;
 1974|  5.47k|      case 20:
  ------------------
  |  Branch (1974:7): [True: 5.47k, False: 17.8k]
  ------------------
 1975|  5.47k|        self->kernels = kernels_20_to_71;
 1976|  5.47k|        break;
 1977|  2.16k|      case 28:
  ------------------
  |  Branch (1977:7): [True: 2.16k, False: 21.1k]
  ------------------
 1978|  2.16k|        self->kernels = kernels_28_to_71;
 1979|  2.16k|        break;
 1980|      0|      default:
  ------------------
  |  Branch (1980:7): [True: 0, False: 23.2k]
  ------------------
 1981|      0|        return MPS_INVALID_PARAMETERBANDS; /* unsupported numParameterBands */
 1982|  23.2k|    }
 1983|  23.2k|  }
 1984|       |
 1985|       |  /* create param to hyb band table */
 1986|  50.5k|  FDKmemclear(self->param2hyb, (MAX_PARAMETER_BANDS + 1) * sizeof(int));
  ------------------
  |  |  118|  50.5k|#define MAX_PARAMETER_BANDS (28)
  ------------------
 1987|  2.46M|  for (i = 0; i < self->hybridBands; i++) {
  ------------------
  |  Branch (1987:15): [True: 2.41M, False: 50.5k]
  ------------------
 1988|  2.41M|    self->param2hyb[self->kernels[i] + 1] = i + 1;
 1989|  2.41M|  }
 1990|  50.5k|  {
 1991|  50.5k|    int pb = self->kernels[i - 1] + 2;
 1992|   942k|    for (; pb < (MAX_PARAMETER_BANDS + 1); pb++) {
  ------------------
  |  |  118|   942k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (1992:12): [True: 892k, False: 50.5k]
  ------------------
 1993|   892k|      self->param2hyb[pb] = i;
 1994|   892k|    }
 1995|  1.46M|    for (pb = 0; pb < MAX_PARAMETER_BANDS; pb += 1) {
  ------------------
  |  |  118|  1.46M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (1995:18): [True: 1.41M, False: 50.5k]
  ------------------
 1996|  1.41M|      self->kernels_width[pb] = self->param2hyb[pb + 1] - self->param2hyb[pb];
 1997|  1.41M|    }
 1998|  50.5k|  }
 1999|       |
 2000|  50.5k|  self->treeConfig = pSpatialSpecificConfig->treeConfig;
 2001|       |
 2002|  50.5k|  self->numOttBoxes = pSpatialSpecificConfig->nOttBoxes;
 2003|       |
 2004|  50.5k|  self->numInputChannels = pSpatialSpecificConfig->nInputChannels;
 2005|       |
 2006|  50.5k|  self->numOutputChannels = pSpatialSpecificConfig->nOutputChannels;
 2007|       |
 2008|  50.5k|  self->quantMode = pSpatialSpecificConfig->quantMode;
 2009|       |
 2010|  50.5k|  self->arbitraryDownmix = pSpatialSpecificConfig->bArbitraryDownmix;
 2011|       |
 2012|  50.5k|  self->numM2rows = self->numOutputChannels;
 2013|       |
 2014|  50.5k|  {
 2015|  50.5k|    self->residualCoding = 0;
 2016|  50.5k|    if (self->arbitraryDownmix == 2)
  ------------------
  |  Branch (2016:9): [True: 0, False: 50.5k]
  ------------------
 2017|      0|      self->arbitraryDownmix = 1; /* no arbitrary downmix residuals */
 2018|  50.5k|  }
 2019|  50.5k|  if ((self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_USAC)) {
  ------------------
  |  |  532|  50.5k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (2019:7): [True: 23.2k, False: 27.2k]
  ------------------
 2020|  23.2k|    self->residualCoding = pSpatialSpecificConfig->bResidualCoding;
 2021|  23.2k|  }
 2022|       |
 2023|  50.5k|  self->clipProtectGain__FDK =
 2024|  50.5k|      FX_CFG2FX_DBL(clipGainTable__FDK[pSpatialSpecificConfig->bsFixedGainDMX]);
 2025|  50.5k|  self->clipProtectGainSF__FDK =
 2026|  50.5k|      clipGainSFTable__FDK[pSpatialSpecificConfig->bsFixedGainDMX];
 2027|       |
 2028|  50.5k|  self->tempShapeConfig = pSpatialSpecificConfig->tempShapeConfig;
 2029|       |
 2030|  50.5k|  self->decorrConfig = pSpatialSpecificConfig->decorrConfig;
 2031|       |
 2032|  50.5k|  if (self->upmixType == UPMIXTYPE_BYPASS) {
  ------------------
  |  Branch (2032:7): [True: 0, False: 50.5k]
  ------------------
 2033|      0|    self->numOutputChannels = self->numInputChannels;
 2034|      0|  }
 2035|       |
 2036|  50.5k|  self->numOutputChannelsAT = self->numOutputChannels;
 2037|       |
 2038|  50.5k|  self->numOttBandsIPD = pSpatialSpecificConfig->numOttBandsIPD;
 2039|  50.5k|  self->phaseCoding = pSpatialSpecificConfig->bsPhaseCoding;
 2040|   101k|  for (i = 0; i < self->numOttBoxes; i++) {
  ------------------
  |  Branch (2040:15): [True: 50.5k, False: 50.5k]
  ------------------
 2041|  50.5k|    {
 2042|  50.5k|      self->pConfigCurrent->bitstreamOttBands[i] =
 2043|  50.5k|          self->bitstreamParameterBands;
 2044|  50.5k|    }
 2045|  50.5k|    self->numOttBands[i] = self->pConfigCurrent->bitstreamOttBands[i];
 2046|  50.5k|  } /* i */
 2047|       |
 2048|  50.5k|  if (self->residualCoding) {
  ------------------
  |  Branch (2048:7): [True: 4.54k, False: 45.9k]
  ------------------
 2049|  4.54k|    int numBoxes = self->numOttBoxes;
 2050|  9.09k|    for (i = 0; i < numBoxes; i++) {
  ------------------
  |  Branch (2050:17): [True: 4.54k, False: 4.54k]
  ------------------
 2051|  4.54k|      self->residualPresent[i] =
 2052|  4.54k|          pSpatialSpecificConfig->ResidualConfig[i].bResidualPresent;
 2053|       |
 2054|  4.54k|      if (self->residualPresent[i]) {
  ------------------
  |  Branch (2054:11): [True: 4.54k, False: 0]
  ------------------
 2055|  4.54k|        self->residualBands[i] =
 2056|  4.54k|            pSpatialSpecificConfig->ResidualConfig[i].nResidualBands;
 2057|       |        /* conversion from hybrid bands to qmf bands */
 2058|  4.54k|        self->residualQMFBands[i] =
 2059|  4.54k|            fMax(self->param2hyb[self->residualBands[i]] + 3 - 10,
 2060|  4.54k|                 3); /* simplification for the lowest 10 hybrid bands */
 2061|  4.54k|      } else {
 2062|      0|        self->residualBands[i] = 0;
 2063|      0|        self->residualQMFBands[i] = 0;
 2064|      0|      }
 2065|  4.54k|    }
 2066|  4.54k|  } /* self->residualCoding */
 2067|  45.9k|  else {
 2068|  45.9k|    int boxes = self->numOttBoxes;
 2069|  91.9k|    for (i = 0; i < boxes; i += 1) {
  ------------------
  |  Branch (2069:17): [True: 45.9k, False: 45.9k]
  ------------------
 2070|  45.9k|      self->residualPresent[i] = 0;
 2071|  45.9k|      self->residualBands[i] = 0;
 2072|  45.9k|    }
 2073|  45.9k|  }
 2074|       |
 2075|  50.5k|  switch (self->treeConfig) {
 2076|  50.5k|    case TREE_212:
  ------------------
  |  Branch (2076:5): [True: 50.5k, False: 0]
  ------------------
 2077|  50.5k|      self->numDirektSignals = 1;
 2078|  50.5k|      self->numDecorSignals = 1;
 2079|  50.5k|      self->numXChannels = 1;
 2080|  50.5k|      if (self->arbitraryDownmix == 2) {
  ------------------
  |  Branch (2080:11): [True: 0, False: 50.5k]
  ------------------
 2081|      0|        self->numXChannels += 1;
 2082|      0|      }
 2083|  50.5k|      self->numVChannels = self->numDirektSignals + self->numDecorSignals;
 2084|  50.5k|      break;
 2085|      0|    default:
  ------------------
  |  Branch (2085:5): [True: 0, False: 50.5k]
  ------------------
 2086|      0|      return MPS_INVALID_TREECONFIG;
 2087|  50.5k|  }
 2088|       |
 2089|  50.5k|  self->highRateMode = pSpatialSpecificConfig->bsHighRateMode;
 2090|  50.5k|  self->decorrType = pSpatialSpecificConfig->bsDecorrType;
 2091|       |
 2092|  50.5k|  SpatialDecDecodeHelperInfo(pSpatialSpecificConfig, UPMIXTYPE_NORMAL);
 2093|       |
 2094|  50.5k|  return err;
 2095|  50.5k|}
_Z23SpatialDecCreateBsFrameP23SPATIAL_BS_FRAME_structP11BS_LL_STATE:
 2110|  21.8k|                                     BS_LL_STATE *llState) {
 2111|  21.8k|  SPATIAL_BS_FRAME *pBs = bsFrame;
 2112|       |
 2113|  21.8k|  const int maxNumOtt = MAX_NUM_OTT;
  ------------------
  |  |  115|  21.8k|#define MAX_NUM_OTT (5)
  ------------------
 2114|  21.8k|  const int maxNumInputChannels = MAX_INPUT_CHANNELS;
  ------------------
  |  |  110|  21.8k|#define MAX_INPUT_CHANNELS 1
  ------------------
 2115|       |
 2116|  21.8k|  FDK_ALLOCATE_MEMORY_1D_P(
  ------------------
  |  |  160|  21.8k|  if (((a) = (ptype)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (160:7): [True: 0, False: 21.8k]
  |  |  ------------------
  |  |  161|      0|    goto bail;                                                          \
  |  |  162|      0|  }
  ------------------
 2117|  21.8k|      pBs->cmpOttIPDidx, maxNumOtt * MAX_PARAMETER_SETS * MAX_PARAMETER_BANDS,
 2118|  21.8k|      SCHAR, SCHAR(*)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS])
 2119|       |
 2120|       |  /* Arbitrary Downmix */
 2121|  21.8k|  FDK_ALLOCATE_MEMORY_1D_P(
  ------------------
  |  |  160|  21.8k|  if (((a) = (ptype)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (160:7): [True: 0, False: 21.8k]
  |  |  ------------------
  |  |  161|      0|    goto bail;                                                          \
  |  |  162|      0|  }
  ------------------
 2122|  21.8k|      pBs->cmpArbdmxGainIdx,
 2123|  21.8k|      maxNumInputChannels * MAX_PARAMETER_SETS * MAX_PARAMETER_BANDS, SCHAR,
 2124|  21.8k|      SCHAR(*)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS])
 2125|       |
 2126|       |  /* Lossless control */
 2127|  21.8k|  FDK_ALLOCATE_MEMORY_1D(pBs->CLDLosslessData, MAX_NUM_PARAMETERS, LOSSLESSDATA)
  ------------------
  |  |  149|  43.7k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.8k]
  |  |  |  Branch (149:40): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
 2128|  21.8k|  FDK_ALLOCATE_MEMORY_1D(pBs->ICCLosslessData, MAX_NUM_PARAMETERS, LOSSLESSDATA)
  ------------------
  |  |  149|  43.7k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.8k]
  |  |  |  Branch (149:40): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
 2129|       |
 2130|  21.8k|  FDK_ALLOCATE_MEMORY_1D(pBs->IPDLosslessData, MAX_NUM_PARAMETERS, LOSSLESSDATA)
  ------------------
  |  |  149|  43.7k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.8k]
  |  |  |  Branch (149:40): [True: 21.8k, Folded]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
 2131|       |
 2132|  21.8k|  pBs->newBsData = 0;
 2133|  21.8k|  pBs->numParameterSets = 1;
 2134|       |
 2135|       |  /* Link lossless states */
 2136|   152k|  for (int x = 0; x < MAX_NUM_PARAMETERS; x++) {
  ------------------
  |  |  154|   152k|#define MAX_NUM_PARAMETERS (MAX(MAX_NUM_PARAMS, MAX_NUM_OTT))
  |  |  ------------------
  |  |  |  |  123|   152k|#define MAX(a, b) ((a) > (b) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:20): [True: 152k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2136:19): [True: 131k, False: 21.8k]
  ------------------
 2137|   131k|    pBs->CLDLosslessData[x].state = &llState->CLDLosslessState[x];
 2138|   131k|    pBs->ICCLosslessData[x].state = &llState->ICCLosslessState[x];
 2139|       |
 2140|   131k|    pBs->IPDLosslessData[x].state = &llState->IPDLosslessState[x];
 2141|   131k|  }
 2142|       |
 2143|  21.8k|  return MPS_OK;
 2144|       |
 2145|      0|bail:
 2146|      0|  return MPS_OUTOFMEMORY;
 2147|  21.8k|}
_Z22SpatialDecCloseBsFrameP23SPATIAL_BS_FRAME_struct:
 2160|  21.8k|void SpatialDecCloseBsFrame(SPATIAL_BS_FRAME *pBs) {
 2161|  21.8k|  if (pBs != NULL) {
  ------------------
  |  Branch (2161:7): [True: 21.8k, False: 0]
  ------------------
 2162|       |    /* These arrays contain the compact indices, only one value per pbstride,
 2163|       |     * only paramsets actually containing data. */
 2164|       |
 2165|  21.8k|    FDK_FREE_MEMORY_1D(pBs->cmpOttIPDidx);
  ------------------
  |  |  171|  21.8k|  do {                           \
  |  |  172|  21.8k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.8k|    (a) = NULL;                  \
  |  |  174|  21.8k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.8k]
  |  |  ------------------
  ------------------
 2166|       |
 2167|       |    /* Arbitrary Downmix */
 2168|  21.8k|    FDK_FREE_MEMORY_1D(pBs->cmpArbdmxGainIdx);
  ------------------
  |  |  171|  21.8k|  do {                           \
  |  |  172|  21.8k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.8k|    (a) = NULL;                  \
  |  |  174|  21.8k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.8k]
  |  |  ------------------
  ------------------
 2169|       |
 2170|       |    /* Lossless control */
 2171|  21.8k|    FDK_FREE_MEMORY_1D(pBs->IPDLosslessData);
  ------------------
  |  |  171|  21.8k|  do {                           \
  |  |  172|  21.8k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.8k|    (a) = NULL;                  \
  |  |  174|  21.8k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.8k]
  |  |  ------------------
  ------------------
 2172|  21.8k|    FDK_FREE_MEMORY_1D(pBs->CLDLosslessData);
  ------------------
  |  |  171|  21.8k|  do {                           \
  |  |  172|  21.8k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.8k|    (a) = NULL;                  \
  |  |  174|  21.8k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.8k]
  |  |  ------------------
  ------------------
 2173|       |    FDK_FREE_MEMORY_1D(pBs->ICCLosslessData);
  ------------------
  |  |  171|  21.8k|  do {                           \
  |  |  172|  21.8k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.8k|    (a) = NULL;                  \
  |  |  174|  21.8k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.8k]
  |  |  ------------------
  ------------------
 2174|  21.8k|  }
 2175|  21.8k|}
sac_bitdec.cpp:_ZL26SpatialDecDecodeHelperInfoP25T_SPATIAL_SPECIFIC_CONFIG9UPMIXTYPE:
  119|   187k|    SPATIAL_SPECIFIC_CONFIG *pSpatialSpecificConfig, UPMIXTYPE upmixType) {
  120|   187k|  int i;
  121|   187k|  UINT syntaxFlags;
  122|       |
  123|       |  /* Determine bit stream syntax */
  124|   187k|  syntaxFlags = 0;
  125|   187k|  switch (pSpatialSpecificConfig->coreCodec) {
  126|  86.1k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (126:5): [True: 86.1k, False: 101k]
  ------------------
  127|  86.1k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (127:5): [True: 0, False: 187k]
  ------------------
  128|  86.1k|      syntaxFlags |= SACDEC_SYNTAX_LD;
  ------------------
  |  |  536|  86.1k|#define SACDEC_SYNTAX_LD 32
  ------------------
  129|  86.1k|      break;
  130|   100k|    case AOT_USAC:
  ------------------
  |  Branch (130:5): [True: 100k, False: 87.0k]
  ------------------
  131|   100k|      syntaxFlags |= SACDEC_SYNTAX_USAC;
  ------------------
  |  |  532|   100k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  132|   100k|      break;
  133|      0|    case AOT_NONE:
  ------------------
  |  Branch (133:5): [True: 0, False: 187k]
  ------------------
  134|    915|    default:
  ------------------
  |  Branch (134:5): [True: 915, False: 186k]
  ------------------
  135|    915|      return MPS_UNSUPPORTED_FORMAT;
  136|   187k|  }
  137|       |
  138|   186k|  pSpatialSpecificConfig->syntaxFlags = syntaxFlags;
  139|       |
  140|   186k|  switch (pSpatialSpecificConfig->treeConfig) {
  141|   186k|    case TREE_212: {
  ------------------
  |  Branch (141:5): [True: 186k, False: 0]
  ------------------
  142|   186k|      pSpatialSpecificConfig->ottCLDdefault[0] = 0;
  143|   186k|    } break;
  144|      0|    default:
  ------------------
  |  Branch (144:5): [True: 0, False: 186k]
  ------------------
  145|      0|      return MPS_INVALID_TREECONFIG;
  146|   186k|  }
  147|       |
  148|   186k|  if (syntaxFlags & SACDEC_SYNTAX_USAC) {
  ------------------
  |  |  532|   186k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (148:7): [True: 100k, False: 86.1k]
  ------------------
  149|   100k|    if (pSpatialSpecificConfig->bsOttBandsPhasePresent) {
  ------------------
  |  Branch (149:9): [True: 26.5k, False: 73.6k]
  ------------------
  150|  26.5k|      pSpatialSpecificConfig->numOttBandsIPD =
  151|  26.5k|          pSpatialSpecificConfig->bsOttBandsPhase;
  152|  73.6k|    } else {
  153|  73.6k|      int numParameterBands;
  154|       |
  155|  73.6k|      numParameterBands = pSpatialSpecificConfig->freqRes;
  156|  73.6k|      switch (numParameterBands) {
  157|  2.41k|        case 4:
  ------------------
  |  Branch (157:9): [True: 2.41k, False: 71.2k]
  ------------------
  158|  5.32k|        case 5:
  ------------------
  |  Branch (158:9): [True: 2.91k, False: 70.7k]
  ------------------
  159|  5.32k|          pSpatialSpecificConfig->numOttBandsIPD = 2;
  160|  5.32k|          break;
  161|  35.5k|        case 7:
  ------------------
  |  Branch (161:9): [True: 35.5k, False: 38.1k]
  ------------------
  162|  35.5k|          pSpatialSpecificConfig->numOttBandsIPD = 3;
  163|  35.5k|          break;
  164|  7.63k|        case 10:
  ------------------
  |  Branch (164:9): [True: 7.63k, False: 66.0k]
  ------------------
  165|  7.63k|          pSpatialSpecificConfig->numOttBandsIPD = 5;
  166|  7.63k|          break;
  167|  6.52k|        case 14:
  ------------------
  |  Branch (167:9): [True: 6.52k, False: 67.1k]
  ------------------
  168|  6.52k|          pSpatialSpecificConfig->numOttBandsIPD = 7;
  169|  6.52k|          break;
  170|  14.1k|        case 20:
  ------------------
  |  Branch (170:9): [True: 14.1k, False: 59.5k]
  ------------------
  171|  18.6k|        case 28:
  ------------------
  |  Branch (171:9): [True: 4.50k, False: 69.1k]
  ------------------
  172|  18.6k|          pSpatialSpecificConfig->numOttBandsIPD = 10;
  173|  18.6k|          break;
  174|      0|        default:
  ------------------
  |  Branch (174:9): [True: 0, False: 73.6k]
  ------------------
  175|      0|          return MPS_INVALID_PARAMETERBANDS;
  176|  73.6k|      }
  177|  73.6k|    }
  178|   100k|  } else {
  179|  86.1k|    pSpatialSpecificConfig->numOttBandsIPD = 0;
  180|  86.1k|  }
  181|   372k|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (181:15): [True: 186k, False: 186k]
  ------------------
  182|   186k|    {
  183|   186k|      pSpatialSpecificConfig->bitstreamOttBands[i] =
  184|   186k|          pSpatialSpecificConfig->freqRes;
  185|   186k|    }
  186|   186k|    {
  187|   186k|      pSpatialSpecificConfig->numOttBands[i] =
  188|   186k|          pSpatialSpecificConfig->bitstreamOttBands[i];
  189|   186k|      if (syntaxFlags & SACDEC_SYNTAX_USAC &&
  ------------------
  |  |  532|   372k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (189:11): [True: 100k, False: 86.1k]
  ------------------
  190|   100k|          !pSpatialSpecificConfig->bsOttBandsPhasePresent) {
  ------------------
  |  Branch (190:11): [True: 73.6k, False: 26.5k]
  ------------------
  191|  73.6k|        if (pSpatialSpecificConfig->bResidualCoding &&
  ------------------
  |  Branch (191:13): [True: 19.4k, False: 54.2k]
  ------------------
  192|  19.4k|            pSpatialSpecificConfig->ResidualConfig[i].bResidualPresent &&
  ------------------
  |  Branch (192:13): [True: 19.4k, False: 0]
  ------------------
  193|  19.4k|            (pSpatialSpecificConfig->numOttBandsIPD <
  ------------------
  |  Branch (193:13): [True: 5.90k, False: 13.5k]
  ------------------
  194|  19.4k|             pSpatialSpecificConfig->ResidualConfig[i].nResidualBands)) {
  195|  5.90k|          pSpatialSpecificConfig->numOttBandsIPD =
  196|  5.90k|              pSpatialSpecificConfig->ResidualConfig[i].nResidualBands;
  197|  5.90k|        }
  198|  73.6k|      }
  199|   186k|    }
  200|   186k|  } /* i */
  201|       |
  202|   186k|  return MPS_OK;
  203|   186k|}
sac_bitdec.cpp:_ZL30SpatialDecParseExtensionConfigP13FDK_BITSTREAMP25T_SPATIAL_SPECIFIC_CONFIGiiii:
  219|  53.8k|    int numOttBoxes, int numTttBoxes, int numOutChan, int bitsAvailable) {
  220|  53.8k|  SACDEC_ERROR err = MPS_OK;
  221|  53.8k|  INT ba = bitsAvailable;
  222|       |
  223|  53.8k|  config->sacExtCnt = 0;
  224|  53.8k|  config->bResidualCoding = 0;
  225|       |
  226|  53.8k|  ba = fMin((int)FDKgetValidBits(bitstream), ba);
  227|       |
  228|   190k|  while ((ba >= 8) && (config->sacExtCnt < MAX_NUM_EXT_TYPES)) {
  ------------------
  |  |  117|   155k|#define MAX_NUM_EXT_TYPES (8)
  ------------------
  |  Branch (228:10): [True: 155k, False: 34.9k]
  |  Branch (228:23): [True: 140k, False: 14.9k]
  ------------------
  229|   140k|    int bitsRead, nFillBits;
  230|   140k|    INT tmp;
  231|   140k|    UINT sacExtLen;
  232|       |
  233|   140k|    config->sacExtType[config->sacExtCnt] = FDKreadBits(bitstream, 4);
  234|   140k|    ba -= 4;
  235|       |
  236|   140k|    sacExtLen = FDKreadBits(bitstream, 4);
  237|   140k|    ba -= 4;
  238|       |
  239|   140k|    if (sacExtLen == 15) {
  ------------------
  |  Branch (239:9): [True: 22.1k, False: 118k]
  ------------------
  240|  22.1k|      sacExtLen += FDKreadBits(bitstream, 8);
  241|  22.1k|      ba -= 8;
  242|  22.1k|      if (sacExtLen == 15 + 255) {
  ------------------
  |  Branch (242:11): [True: 13.4k, False: 8.69k]
  ------------------
  243|  13.4k|        sacExtLen += FDKreadBits(bitstream, 16);
  244|  13.4k|        ba -= 16;
  245|  13.4k|      }
  246|  22.1k|    }
  247|       |
  248|   140k|    tmp = (INT)FDKgetValidBits(
  249|   140k|        bitstream); /* Extension config payload start anchor. */
  250|   140k|    if ((tmp <= 0) || (tmp < (INT)sacExtLen * 8) || (ba < (INT)sacExtLen * 8)) {
  ------------------
  |  Branch (250:9): [True: 79, False: 140k]
  |  Branch (250:23): [True: 3.21k, False: 137k]
  |  Branch (250:53): [True: 610, False: 136k]
  ------------------
  251|  3.90k|      err = MPS_PARSE_ERROR;
  252|  3.90k|      goto bail;
  253|  3.90k|    }
  254|       |
  255|   136k|    switch (config->sacExtType[config->sacExtCnt]) {
  256|   136k|      default:; /* unknown extension data => do nothing */
  ------------------
  |  Branch (256:7): [True: 136k, False: 0]
  ------------------
  257|   136k|    }
  258|       |
  259|       |    /* skip remaining extension data */
  260|   136k|    bitsRead = tmp - FDKgetValidBits(bitstream);
  261|   136k|    nFillBits = 8 * sacExtLen - bitsRead;
  262|       |
  263|   136k|    if (nFillBits < 0) {
  ------------------
  |  Branch (263:9): [True: 0, False: 136k]
  ------------------
  264|      0|      err = MPS_PARSE_ERROR;
  265|      0|      goto bail;
  266|   136k|    } else {
  267|       |      /* Skip fill bits or an unkown extension. */
  268|   136k|      FDKpushFor(bitstream, nFillBits);
  269|   136k|    }
  270|       |
  271|   136k|    ba -= 8 * sacExtLen;
  272|   136k|    config->sacExtCnt++;
  273|   136k|  }
  274|       |
  275|  53.8k|bail:
  276|  53.8k|  return err;
  277|  53.8k|}
sac_bitdec.cpp:_ZL14nBitsParamSloti:
  955|  5.22k|static int nBitsParamSlot(int i) {
  956|  5.22k|  int bitsParamSlot;
  957|       |
  958|  5.22k|  bitsParamSlot = fMax(0, DFRACT_BITS - 1 - fNormz((FIXP_DBL)i));
  ------------------
  |  |  113|  5.22k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  959|  5.22k|  if ((1 << bitsParamSlot) < i) {
  ------------------
  |  Branch (959:7): [True: 75, False: 5.14k]
  ------------------
  960|     75|    bitsParamSlot++;
  961|     75|  }
  962|  5.22k|  FDK_ASSERT((bitsParamSlot >= 0) && (bitsParamSlot <= 32));
  ------------------
  |  |  221|  5.22k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (962:3): [True: 5.22k, False: 0]
  |  Branch (962:3): [True: 5.22k, False: 0]
  |  Branch (962:3): [True: 5.22k, False: 0]
  ------------------
  963|       |
  964|  5.22k|  return bitsParamSlot;
  965|  5.22k|}
sac_bitdec.cpp:_ZL9ecDataDecPK23SPATIAL_BS_FRAME_structjP13FDK_BITSTREAMP12LOSSLESSDATAPA9_A28_aPPaiiiia:
  788|   211k|    int datatype, int boxIdx, int startBand, int stopBand, SCHAR defaultValue) {
  789|   211k|  SACDEC_ERROR err = MPS_OK;
  790|   211k|  int i, j, pb, dataSets, setIdx, bsDataPair, dataBands, oldQuantCoarseXXX;
  791|   211k|  INT aStrides[MAX_PARAMETER_BANDS + 1] = {0};
  792|       |
  793|   211k|  dataSets = 0;
  794|   550k|  for (i = 0; i < frame->numParameterSets; i++) {
  ------------------
  |  Branch (794:15): [True: 341k, False: 208k]
  ------------------
  795|   341k|    llData->bsXXXDataMode[i] = (SCHAR)FDKreadBits(bitstream, 2);
  796|       |
  797|   341k|    if ((frame->bsIndependencyFlag == 1) && (i == 0) &&
  ------------------
  |  Branch (797:9): [True: 294k, False: 46.4k]
  |  Branch (797:45): [True: 177k, False: 117k]
  ------------------
  798|   177k|        (llData->bsXXXDataMode[i] == 1 ||
  ------------------
  |  Branch (798:10): [True: 39, False: 177k]
  ------------------
  799|   177k|         llData->bsXXXDataMode[i] == 2)) { /* This check catches bitstreams
  ------------------
  |  Branch (799:10): [True: 74, False: 177k]
  ------------------
  800|       |                                              generated by older encoder that
  801|       |                                              cause trouble */
  802|    113|      return MPS_PARSE_ERROR;
  803|    113|    }
  804|   341k|    if ((i >= frame->numParameterSets - 1) &&
  ------------------
  |  Branch (804:9): [True: 211k, False: 129k]
  ------------------
  805|   211k|        (llData->bsXXXDataMode[i] ==
  ------------------
  |  Branch (805:9): [True: 2.88k, False: 208k]
  ------------------
  806|   211k|         2)) { /* The interpolation mode must not be active for the last
  807|       |                  parameter set */
  808|  2.88k|      return MPS_PARSE_ERROR;
  809|  2.88k|    }
  810|       |
  811|   338k|    if (llData->bsXXXDataMode[i] == 3) {
  ------------------
  |  Branch (811:9): [True: 80.6k, False: 257k]
  ------------------
  812|  80.6k|      dataSets++;
  813|  80.6k|    }
  814|   338k|  }
  815|       |
  816|   208k|  setIdx = 0;
  817|   208k|  bsDataPair = 0;
  818|   208k|  oldQuantCoarseXXX = llData->state->bsQuantCoarseXXXprevParse;
  819|       |
  820|   545k|  for (i = 0; i < frame->numParameterSets; i++) {
  ------------------
  |  Branch (820:15): [True: 337k, False: 207k]
  ------------------
  821|   337k|    if (llData->bsXXXDataMode[i] == 0) {
  ------------------
  |  Branch (821:9): [True: 211k, False: 125k]
  ------------------
  822|  2.18M|      for (pb = startBand; pb < stopBand; pb++) {
  ------------------
  |  Branch (822:28): [True: 1.96M, False: 211k]
  ------------------
  823|  1.96M|        lastdata[boxIdx][pb] = defaultValue;
  824|  1.96M|      }
  825|       |
  826|   211k|      oldQuantCoarseXXX = 0;
  827|   211k|    }
  828|       |
  829|   337k|    if (llData->bsXXXDataMode[i] == 3) {
  ------------------
  |  Branch (829:9): [True: 80.3k, False: 256k]
  ------------------
  830|  80.3k|      if (bsDataPair) {
  ------------------
  |  Branch (830:11): [True: 25.4k, False: 54.8k]
  ------------------
  831|  25.4k|        bsDataPair = 0;
  832|  54.8k|      } else {
  833|  54.8k|        bsDataPair = FDKreadBits(bitstream, 1);
  834|  54.8k|        llData->bsQuantCoarseXXX[setIdx] = (UCHAR)FDKreadBits(bitstream, 1);
  835|  54.8k|        llData->bsFreqResStrideXXX[setIdx] = (UCHAR)FDKreadBits(bitstream, 2);
  836|       |
  837|  54.8k|        if (llData->bsQuantCoarseXXX[setIdx] != oldQuantCoarseXXX) {
  ------------------
  |  Branch (837:13): [True: 25.0k, False: 29.8k]
  ------------------
  838|  25.0k|          if (oldQuantCoarseXXX) {
  ------------------
  |  Branch (838:15): [True: 7.30k, False: 17.7k]
  ------------------
  839|  7.30k|            coarse2fine(lastdata[boxIdx], (DATA_TYPE)datatype, startBand,
  840|  7.30k|                        stopBand - startBand);
  841|  17.7k|          } else {
  842|  17.7k|            fine2coarse(lastdata[boxIdx], (DATA_TYPE)datatype, startBand,
  843|  17.7k|                        stopBand - startBand);
  844|  17.7k|          }
  845|  25.0k|        }
  846|       |
  847|  54.8k|        dataBands = getStrideMap(llData->bsFreqResStrideXXX[setIdx], startBand,
  848|  54.8k|                                 stopBand, aStrides);
  849|       |
  850|   267k|        for (pb = 0; pb < dataBands; pb++) {
  ------------------
  |  Branch (850:22): [True: 213k, False: 54.8k]
  ------------------
  851|   213k|          lastdata[boxIdx][startBand + pb] = lastdata[boxIdx][aStrides[pb]];
  852|   213k|        }
  853|       |
  854|  54.8k|        if (boxIdx > MAX_NUM_OTT) return MPS_INVALID_BOXIDX;
  ------------------
  |  |  115|  54.8k|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (854:13): [True: 0, False: 54.8k]
  ------------------
  855|  54.8k|        if ((setIdx + bsDataPair) > MAX_PARAMETER_SETS)
  ------------------
  |  |  156|  54.8k|#define MAX_PARAMETER_SETS (9)
  ------------------
  |  Branch (855:13): [True: 0, False: 54.8k]
  ------------------
  856|      0|          return MPS_INVALID_SETIDX;
  857|       |
  858|       |        /* DECODER_TYPE defined in FDK_tools */
  859|  54.8k|        DECODER_TYPE this_decoder_type = SAC_DECODER;
  860|  54.8k|        if (syntaxFlags & (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  532|  54.8k|#define SACDEC_SYNTAX_USAC 2
  ------------------
                      if (syntaxFlags & (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  533|  54.8k|#define SACDEC_SYNTAX_RSVD50 4
  ------------------
  |  Branch (860:13): [True: 49.4k, False: 5.42k]
  ------------------
  861|  49.4k|          this_decoder_type = USAC_DECODER;
  862|  49.4k|        } else if (syntaxFlags & SACDEC_SYNTAX_LD) {
  ------------------
  |  |  536|  5.42k|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (862:20): [True: 5.42k, False: 0]
  ------------------
  863|  5.42k|          this_decoder_type = SAOC_DECODER;
  864|  5.42k|        }
  865|       |
  866|  54.8k|        err = (SACDEC_ERROR)EcDataPairDec(
  867|  54.8k|            this_decoder_type, bitstream, data[boxIdx][setIdx + 0],
  868|  54.8k|            data[boxIdx][setIdx + 1], lastdata[boxIdx], (DATA_TYPE)datatype,
  869|  54.8k|            startBand, dataBands, bsDataPair, llData->bsQuantCoarseXXX[setIdx],
  870|  54.8k|            !(frame->bsIndependencyFlag && (i == 0)) || (setIdx > 0));
  ------------------
  |  Branch (870:15): [True: 48.8k, False: 6.04k]
  |  Branch (870:44): [True: 17.8k, False: 30.9k]
  |  Branch (870:57): [True: 0, False: 17.8k]
  ------------------
  871|  54.8k|        if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (871:13): [True: 1.06k, False: 53.8k]
  ------------------
  872|       |
  873|  53.8k|        if (datatype == t_IPD) {
  ------------------
  |  Branch (873:13): [True: 8.79k, False: 45.0k]
  ------------------
  874|  8.79k|          const SCHAR mask = (llData->bsQuantCoarseXXX[setIdx]) ? 7 : 15;
  ------------------
  |  Branch (874:30): [True: 3.37k, False: 5.41k]
  ------------------
  875|  47.8k|          for (pb = 0; pb < dataBands; pb++) {
  ------------------
  |  Branch (875:24): [True: 39.0k, False: 8.79k]
  ------------------
  876|   109k|            for (j = aStrides[pb]; j < aStrides[pb + 1]; j++) {
  ------------------
  |  Branch (876:36): [True: 70.2k, False: 39.0k]
  ------------------
  877|  70.2k|              lastdata[boxIdx][j] =
  878|  70.2k|                  data[boxIdx][setIdx + bsDataPair][startBand + pb] & mask;
  879|  70.2k|            }
  880|  39.0k|          }
  881|  45.0k|        } else {
  882|   213k|          for (pb = 0; pb < dataBands; pb++) {
  ------------------
  |  Branch (882:24): [True: 168k, False: 45.0k]
  ------------------
  883|   605k|            for (j = aStrides[pb]; j < aStrides[pb + 1]; j++) {
  ------------------
  |  Branch (883:36): [True: 437k, False: 168k]
  ------------------
  884|   437k|              lastdata[boxIdx][j] =
  885|   437k|                  data[boxIdx][setIdx + bsDataPair][startBand + pb];
  886|   437k|            }
  887|   168k|          }
  888|  45.0k|        }
  889|       |
  890|  53.8k|        oldQuantCoarseXXX = llData->bsQuantCoarseXXX[setIdx];
  891|       |
  892|  53.8k|        if (bsDataPair) {
  ------------------
  |  Branch (892:13): [True: 33.4k, False: 20.3k]
  ------------------
  893|  33.4k|          llData->bsQuantCoarseXXX[setIdx + 1] =
  894|  33.4k|              llData->bsQuantCoarseXXX[setIdx];
  895|  33.4k|          llData->bsFreqResStrideXXX[setIdx + 1] =
  896|  33.4k|              llData->bsFreqResStrideXXX[setIdx];
  897|  33.4k|        }
  898|  53.8k|        setIdx += bsDataPair + 1;
  899|  53.8k|      } /* !bsDataPair */
  900|  80.3k|    }   /* llData->bsXXXDataMode[i] == 3 */
  901|   337k|  }
  902|       |
  903|   207k|  llData->state->bsQuantCoarseXXXprevParse = oldQuantCoarseXXX;
  904|       |
  905|   208k|bail:
  906|   208k|  return err;
  907|   207k|}
sac_bitdec.cpp:_ZL11coarse2finePa9DATA_TYPEii:
  688|  80.9k|                        int numBands) {
  689|  80.9k|  int i;
  690|       |
  691|   831k|  for (i = startBand; i < startBand + numBands; i++) {
  ------------------
  |  Branch (691:23): [True: 750k, False: 80.9k]
  ------------------
  692|   750k|    data[i] <<= 1;
  693|   750k|  }
  694|       |
  695|  80.9k|  if (dataType == t_CLD) {
  ------------------
  |  Branch (695:7): [True: 36.0k, False: 44.8k]
  ------------------
  696|   402k|    for (i = startBand; i < startBand + numBands; i++) {
  ------------------
  |  Branch (696:25): [True: 366k, False: 36.0k]
  ------------------
  697|   366k|      if (data[i] == -14)
  ------------------
  |  Branch (697:11): [True: 120k, False: 246k]
  ------------------
  698|   120k|        data[i] = -15;
  699|   246k|      else if (data[i] == 14)
  ------------------
  |  Branch (699:16): [True: 13.6k, False: 232k]
  ------------------
  700|  13.6k|        data[i] = 15;
  701|   366k|    }
  702|  36.0k|  }
  703|  80.9k|}
sac_bitdec.cpp:_ZL11fine2coarsePa9DATA_TYPEii:
  720|  17.7k|                        int numBands) {
  721|  17.7k|  int i;
  722|       |
  723|   187k|  for (i = startBand; i < startBand + numBands; i++) {
  ------------------
  |  Branch (723:23): [True: 169k, False: 17.7k]
  ------------------
  724|       |    /* Note: the if cases below actually make a difference (negative values) */
  725|   169k|    if (dataType == t_CLD)
  ------------------
  |  Branch (725:9): [True: 80.6k, False: 89.3k]
  ------------------
  726|  80.6k|      data[i] /= 2;
  727|  89.3k|    else
  728|  89.3k|      data[i] >>= 1;
  729|   169k|  }
  730|  17.7k|}
sac_bitdec.cpp:_ZL12getStrideMapiiiPi:
  747|  54.8k|                        int *aStrides) {
  748|  54.8k|  int i, pb, pbStride, dataBands, strOffset;
  749|       |
  750|  54.8k|  pbStride = pbStrideTable[freqResStride];
  751|  54.8k|  dataBands = (stopBand - startBand - 1) / pbStride + 1;
  752|       |
  753|  54.8k|  aStrides[0] = startBand;
  754|   267k|  for (pb = 1; pb <= dataBands; pb++) {
  ------------------
  |  Branch (754:16): [True: 213k, False: 54.8k]
  ------------------
  755|   213k|    aStrides[pb] = aStrides[pb - 1] + pbStride;
  756|   213k|  }
  757|  54.8k|  strOffset = 0;
  758|   479k|  while (aStrides[dataBands] > stopBand) {
  ------------------
  |  Branch (758:10): [True: 424k, False: 54.8k]
  ------------------
  759|   424k|    if (strOffset < dataBands) strOffset++;
  ------------------
  |  Branch (759:9): [True: 24.7k, False: 400k]
  ------------------
  760|   855k|    for (i = strOffset; i <= dataBands; i++) {
  ------------------
  |  Branch (760:25): [True: 430k, False: 424k]
  ------------------
  761|   430k|      aStrides[i]--;
  762|   430k|    }
  763|   424k|  }
  764|       |
  765|  54.8k|  return dataBands;
  766|  54.8k|}
sac_bitdec.cpp:_ZL25parseArbitraryDownmixDataP17spatialDec_structPK25T_SPATIAL_SPECIFIC_CONFIGjPK23SPATIAL_BS_FRAME_structP13FDK_BITSTREAM:
  923|  4.04k|    HANDLE_FDK_BITSTREAM bitstream) {
  924|  4.04k|  SACDEC_ERROR err = MPS_OK;
  925|  4.04k|  int ch;
  926|  4.04k|  int offset = pSSC->nOttBoxes;
  927|       |
  928|       |  /* CLD (arbitrary down-mix gains) */
  929|  6.51k|  for (ch = 0; ch < pSSC->nInputChannels; ch++) {
  ------------------
  |  Branch (929:16): [True: 4.04k, False: 2.46k]
  ------------------
  930|  4.04k|    err = ecDataDec(frame, syntaxFlags, bitstream,
  931|  4.04k|                    &frame->CLDLosslessData[offset + ch],
  932|  4.04k|                    frame->cmpArbdmxGainIdx, self->cmpArbdmxGainIdxPrev, t_CLD,
  933|  4.04k|                    ch, 0, pSSC->freqRes, arbdmxGainDefault);
  ------------------
  |  |  128|  4.04k|#define arbdmxGainDefault 0
  ------------------
  934|  4.04k|    if (err != MPS_OK) return err;
  ------------------
  |  Branch (934:9): [True: 1.57k, False: 2.46k]
  ------------------
  935|  4.04k|  }
  936|       |
  937|  2.46k|  return err;
  938|       |
  939|  4.04k|} /* parseArbitraryDownmixData */
sac_bitdec.cpp:_ZL20decodeAndMapFrameOttP17spatialDec_structP23SPATIAL_BS_FRAME_struct:
 1646|   157k|                                         SPATIAL_BS_FRAME *pCurBs) {
 1647|   157k|  int i, ottIdx;
 1648|   157k|  int numOttBoxes;
 1649|       |
 1650|   157k|  SACDEC_ERROR err = MPS_OK;
 1651|       |
 1652|   157k|  numOttBoxes = self->numOttBoxes;
 1653|       |
 1654|   157k|  switch (self->treeConfig) {
 1655|   157k|    default: {
  ------------------
  |  Branch (1655:5): [True: 157k, False: 0]
  ------------------
 1656|   157k|      if (self->quantMode != 0) {
  ------------------
  |  Branch (1656:11): [True: 17.8k, False: 139k]
  ------------------
 1657|  17.8k|        goto bail;
 1658|  17.8k|      }
 1659|   157k|    }
 1660|   279k|      for (i = 0; i < numOttBoxes; i++) {
  ------------------
  |  Branch (1660:19): [True: 139k, False: 139k]
  ------------------
 1661|   139k|        err = mapIndexData(
 1662|   139k|            &pCurBs->CLDLosslessData[i], /* LOSSLESSDATA *llData,*/
 1663|   139k|            self->ottCLD__FDK, self->outIdxData,
 1664|   139k|            pCurBs
 1665|   139k|                ->cmpOttCLDidx, /* int
 1666|       |                                   cmpIdxData[MAX_NUM_OTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
 1667|       |                                 */
 1668|   139k|            NULL,               /* no differential data */
 1669|   139k|            i, /*  int   xttIdx,  Which ott/ttt index to use for input and
 1670|       |                  output buffers */
 1671|   139k|            self->ottCLDidxPrev,                        /* int
 1672|       |                                                           idxPrev[MAX_NUM_OTT][MAX_PARAMETER_BANDS],
 1673|       |                                                         */
 1674|   139k|            i, t_CLD, 0,                                /* int   startBand, */
 1675|   139k|            self->pConfigCurrent->bitstreamOttBands[i], /*  int   stopBand, */
 1676|   139k|            self->pConfigCurrent->ottCLDdefault[i], /* int   defaultValue, */
 1677|   139k|            pCurBs->numParameterSets, /* int   numParameterSets) */
 1678|   139k|            pCurBs->paramSlot, self->extendFrame, self->quantMode,
 1679|   139k|            &(self->concealInfo), ottVsTotInactiv, NULL, NULL, NULL);
 1680|   139k|        if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1680:13): [True: 0, False: 139k]
  ------------------
 1681|       |
 1682|   139k|      } /* for(i = 0; i < numOttBoxes ; i++ ) */
 1683|   139k|      break;
 1684|   157k|  } /* case */
 1685|       |
 1686|   279k|  for (ottIdx = 0; ottIdx < numOttBoxes; ottIdx++) {
  ------------------
  |  Branch (1686:20): [True: 139k, False: 139k]
  ------------------
 1687|       |    /* Read ICC */
 1688|   139k|    err = mapIndexData(
 1689|   139k|        &pCurBs->ICCLosslessData[ottIdx], /* LOSSLESSDATA *llData,*/
 1690|   139k|        self->ottICC__FDK, self->outIdxData,
 1691|   139k|        pCurBs
 1692|   139k|            ->cmpOttICCidx,  /* int
 1693|       |                                cmpIdxData[MAX_NUM_OTT][MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
 1694|       |                              */
 1695|   139k|        self->ottICCdiffidx, /* differential data */
 1696|   139k|        ottIdx, /* int   xttIdx,  Which ott/ttt index to use for input and
 1697|       |                   output buffers */
 1698|   139k|        self->ottICCidxPrev, /* int   idxPrev[MAX_NUM_OTT][MAX_PARAMETER_BANDS],
 1699|       |                              */
 1700|   139k|        ottIdx, t_ICC, 0,    /* int   startBand, */
 1701|   139k|        self->pConfigCurrent->bitstreamOttBands[ottIdx], /* int   stopBand, */
 1702|   139k|        ICCdefault,               /* int   defaultValue, */
  ------------------
  |  |  126|   139k|#define ICCdefault 0
  ------------------
 1703|   139k|        pCurBs->numParameterSets, /* int   numParameterSets) */
 1704|   139k|        pCurBs->paramSlot, self->extendFrame, self->quantMode,
 1705|   139k|        &(self->concealInfo), ottVsTotInactiv, NULL, NULL, NULL);
 1706|   139k|    if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1706:9): [True: 0, False: 139k]
  ------------------
 1707|   139k|  } /* ottIdx */
 1708|       |
 1709|   139k|  if ((self->treeConfig == TREE_212) && (self->phaseCoding)) {
  ------------------
  |  Branch (1709:7): [True: 139k, False: 0]
  |  Branch (1709:41): [True: 14.7k, False: 124k]
  ------------------
 1710|  14.7k|    if (pCurBs->phaseMode == 0) {
  ------------------
  |  Branch (1710:9): [True: 11.6k, False: 3.06k]
  ------------------
 1711|  83.2k|      for (int pb = 0; pb < self->pConfigCurrent->numOttBandsIPD; pb++) {
  ------------------
  |  Branch (1711:24): [True: 71.5k, False: 11.6k]
  ------------------
 1712|  71.5k|        self->ottIPDidxPrev[0][pb] = 0;
 1713|  71.5k|      }
 1714|  11.6k|    }
 1715|  29.4k|    for (ottIdx = 0; ottIdx < numOttBoxes; ottIdx++) {
  ------------------
  |  Branch (1715:22): [True: 14.7k, False: 14.7k]
  ------------------
 1716|  14.7k|      err = mapIndexData(
 1717|  14.7k|          &pCurBs->IPDLosslessData[ottIdx], self->ottIPD__FDK, self->outIdxData,
 1718|  14.7k|          pCurBs->cmpOttIPDidx, NULL, ottIdx, self->ottIPDidxPrev, ottIdx,
 1719|  14.7k|          t_IPD, 0, self->numOttBandsIPD, IPDdefault, pCurBs->numParameterSets,
  ------------------
  |  |  127|  14.7k|#define IPDdefault 0
  ------------------
 1720|  14.7k|          pCurBs->paramSlot, self->extendFrame, self->quantMode,
 1721|  14.7k|          &(self->concealInfo), ottVsTotInactiv, NULL, NULL, NULL);
 1722|  14.7k|    }
 1723|  14.7k|  }
 1724|       |
 1725|   157k|bail:
 1726|       |
 1727|   157k|  return MPS_OK;
 1728|       |
 1729|   139k|} /* decodeAndMapFrameOtt */
sac_bitdec.cpp:_ZL12mapIndexDataP12LOSSLESSDATAPPPaS3_PA9_A28_KaS3_aS2_iiiiaiPKiiiP25SpatialDecConcealmentInfoaPA9_A28_iSE_SE_:
 1463|   326k|    FIXP_DBL (*pOttVsTotDb2)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS]) {
 1464|   326k|  int aParamSlots[MAX_PARAMETER_SETS];
 1465|   326k|  int aInterpolate[MAX_PARAMETER_SETS] = {0};
 1466|       |
 1467|   326k|  int dataSets;
 1468|   326k|  int aMap[MAX_PARAMETER_BANDS + 1];
 1469|       |
 1470|   326k|  int setIdx, i, band, parmSlot;
 1471|   326k|  int dataBands;
 1472|   326k|  int ps, pb;
 1473|   326k|  int i1;
 1474|       |
 1475|   326k|  if (numParameterSets > MAX_PARAMETER_SETS) return MPS_WRONG_PARAMETERSETS;
  ------------------
  |  |  156|   326k|#define MAX_PARAMETER_SETS (9)
  ------------------
  |  Branch (1475:7): [True: 0, False: 326k]
  ------------------
 1476|       |
 1477|   326k|  dataSets = 0;
 1478|   795k|  for (i = 0; i < numParameterSets; i++) {
  ------------------
  |  Branch (1478:15): [True: 469k, False: 326k]
  ------------------
 1479|   469k|    if (llData->bsXXXDataMode[i] == 3) {
  ------------------
  |  Branch (1479:9): [True: 85.9k, False: 383k]
  ------------------
 1480|  85.9k|      aParamSlots[dataSets] = i;
 1481|  85.9k|      dataSets++;
 1482|  85.9k|    }
 1483|   469k|  }
 1484|       |
 1485|   326k|  setIdx = 0;
 1486|       |
 1487|       |  /* Main concealment stage is here: */
 1488|   326k|  SpatialDecConcealment_Apply(
 1489|   326k|      concealmentInfo, cmpIdxData[xttIdx],
 1490|   326k|      (diffIdxData != NULL) ? diffIdxData[xttIdx] : NULL, idxPrev[xttIdx],
  ------------------
  |  Branch (1490:7): [True: 139k, False: 187k]
  ------------------
 1491|   326k|      llData->bsXXXDataMode, startBand, stopBand, defaultValue, paramType,
 1492|   326k|      numParameterSets);
 1493|       |
 1494|       |  /* Prepare data */
 1495|   795k|  for (i = 0; i < numParameterSets; i++) {
  ------------------
  |  Branch (1495:15): [True: 469k, False: 326k]
  ------------------
 1496|   469k|    if (llData->bsXXXDataMode[i] == 0) {
  ------------------
  |  Branch (1496:9): [True: 298k, False: 170k]
  ------------------
 1497|   298k|      llData->nocmpQuantCoarseXXX[i] = 0;
 1498|  2.88M|      for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1498:30): [True: 2.58M, False: 298k]
  ------------------
 1499|  2.58M|        outputIdxData[xttIdx][i][band] = defaultValue;
 1500|  2.58M|      }
 1501|  2.88M|      for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1501:30): [True: 2.58M, False: 298k]
  ------------------
 1502|  2.58M|        idxPrev[xttIdx][band] = outputIdxData[xttIdx][i][band];
 1503|  2.58M|      }
 1504|       |      /* Because the idxPrev are also set to the defaultValue -> signalize fine
 1505|       |       */
 1506|   298k|      llData->state->bsQuantCoarseXXXprev = 0;
 1507|   298k|    }
 1508|       |
 1509|   469k|    if (llData->bsXXXDataMode[i] == 1) {
  ------------------
  |  Branch (1509:9): [True: 66.8k, False: 402k]
  ------------------
 1510|   847k|      for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1510:30): [True: 780k, False: 66.8k]
  ------------------
 1511|   780k|        outputIdxData[xttIdx][i][band] = idxPrev[xttIdx][band];
 1512|   780k|      }
 1513|  66.8k|      llData->nocmpQuantCoarseXXX[i] = llData->state->bsQuantCoarseXXXprev;
 1514|  66.8k|    }
 1515|       |
 1516|   469k|    if (llData->bsXXXDataMode[i] == 2) {
  ------------------
  |  Branch (1516:9): [True: 23.9k, False: 445k]
  ------------------
 1517|   273k|      for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1517:30): [True: 249k, False: 23.9k]
  ------------------
 1518|   249k|        outputIdxData[xttIdx][i][band] = idxPrev[xttIdx][band];
 1519|   249k|      }
 1520|  23.9k|      llData->nocmpQuantCoarseXXX[i] = llData->state->bsQuantCoarseXXXprev;
 1521|  23.9k|      aInterpolate[i] = 1;
 1522|   445k|    } else {
 1523|   445k|      aInterpolate[i] = 0;
 1524|   445k|    }
 1525|       |
 1526|   469k|    if (llData->bsXXXDataMode[i] == 3) {
  ------------------
  |  Branch (1526:9): [True: 79.6k, False: 389k]
  ------------------
 1527|  79.6k|      int stride;
 1528|       |
 1529|  79.6k|      parmSlot = aParamSlots[setIdx];
 1530|  79.6k|      stride = pbStrideTable[llData->bsFreqResStrideXXX[setIdx]];
 1531|  79.6k|      dataBands = (stopBand - startBand - 1) / stride + 1;
 1532|  79.6k|      createMapping(aMap, startBand, stopBand, stride);
 1533|  79.6k|      mapFrequency(&cmpIdxData[xttIdx][setIdx][0],
 1534|  79.6k|                   &outputIdxData[xttIdx][parmSlot][0], aMap, dataBands);
 1535|   804k|      for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1535:30): [True: 724k, False: 79.6k]
  ------------------
 1536|   724k|        idxPrev[xttIdx][band] = outputIdxData[xttIdx][parmSlot][band];
 1537|   724k|      }
 1538|  79.6k|      llData->state->bsQuantCoarseXXXprev = llData->bsQuantCoarseXXX[setIdx];
 1539|  79.6k|      llData->nocmpQuantCoarseXXX[i] = llData->bsQuantCoarseXXX[setIdx];
 1540|       |
 1541|  79.6k|      setIdx++;
 1542|  79.6k|    }
 1543|   469k|    if (diffIdxData != NULL) {
  ------------------
  |  Branch (1543:9): [True: 192k, False: 276k]
  ------------------
 1544|  2.05M|      for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1544:30): [True: 1.86M, False: 192k]
  ------------------
 1545|  1.86M|        outputIdxData[xttIdx][i][band] += diffIdxData[xttIdx][i][band];
 1546|  1.86M|      }
 1547|   192k|    }
 1548|   469k|  } /* for( i = 0 ; i < numParameterSets; i++ ) */
 1549|       |
 1550|       |  /* Map all coarse data to fine */
 1551|   795k|  for (i = 0; i < numParameterSets; i++) {
  ------------------
  |  Branch (1551:15): [True: 469k, False: 326k]
  ------------------
 1552|   469k|    if (llData->nocmpQuantCoarseXXX[i] == 1) {
  ------------------
  |  Branch (1552:9): [True: 73.6k, False: 395k]
  ------------------
 1553|  73.6k|      coarse2fine(outputIdxData[xttIdx][i], (DATA_TYPE)paramType, startBand,
 1554|  73.6k|                  stopBand - startBand);
 1555|  73.6k|      llData->nocmpQuantCoarseXXX[i] = 0;
 1556|  73.6k|    }
 1557|   469k|  }
 1558|       |
 1559|       |  /* Interpolate */
 1560|   326k|  i1 = 0;
 1561|   795k|  for (i = 0; i < numParameterSets; i++) {
  ------------------
  |  Branch (1561:15): [True: 469k, False: 326k]
  ------------------
 1562|   469k|    if (aInterpolate[i] != 1) {
  ------------------
  |  Branch (1562:9): [True: 445k, False: 23.9k]
  ------------------
 1563|   445k|      i1 = i;
 1564|   445k|    } else {
 1565|  23.9k|      int xi, i2, x1, x2;
 1566|       |
 1567|  58.4k|      for (i2 = i; i2 < numParameterSets; i2++) {
  ------------------
  |  Branch (1567:20): [True: 58.4k, False: 69]
  ------------------
 1568|  58.4k|        if (aInterpolate[i2] != 1) break;
  ------------------
  |  Branch (1568:13): [True: 23.8k, False: 34.5k]
  ------------------
 1569|  58.4k|      }
 1570|  23.9k|      if (i2 >= numParameterSets) return MPS_WRONG_PARAMETERSETS;
  ------------------
  |  Branch (1570:11): [True: 69, False: 23.8k]
  ------------------
 1571|       |
 1572|  23.8k|      x1 = paramSlot[i1];
 1573|  23.8k|      xi = paramSlot[i];
 1574|  23.8k|      x2 = paramSlot[i2];
 1575|       |
 1576|   273k|      for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1576:30): [True: 249k, False: 23.8k]
  ------------------
 1577|   249k|        int yi, y1, y2;
 1578|   249k|        y1 = outputIdxData[xttIdx][i1][band];
 1579|   249k|        y2 = outputIdxData[xttIdx][i2][band];
 1580|   249k|        if (x1 != x2) {
  ------------------
  |  Branch (1580:13): [True: 249k, False: 0]
  ------------------
 1581|   249k|          yi = y1 + (xi - x1) * (y2 - y1) / (x2 - x1);
 1582|   249k|        } else {
 1583|      0|          yi = y1 /*+ (xi-x1)*(y2-y1)/1e-12*/;
 1584|      0|        }
 1585|   249k|        outputIdxData[xttIdx][i][band] = yi;
 1586|   249k|      }
 1587|  23.8k|    }
 1588|   469k|  } /* for( i = 0 ; i < numParameterSets; i++ ) */
 1589|       |
 1590|       |  /* Dequantize data and apply factorCLD if necessary */
 1591|   795k|  for (ps = 0; ps < numParameterSets; ps++) {
  ------------------
  |  Branch (1591:16): [True: 468k, False: 326k]
  ------------------
 1592|   468k|    if (quantMode && (paramType == t_CLD)) {
  ------------------
  |  Branch (1592:9): [True: 0, False: 468k]
  |  Branch (1592:22): [True: 0, False: 0]
  ------------------
 1593|      0|      if (pOttVsTotDbIn == 0) return MPS_WRONG_OTT;
  ------------------
  |  Branch (1593:11): [True: 0, False: 0]
  ------------------
 1594|      0|      if ((pOttVsTotDb1 == 0) && (ottVsTotDbMode & ottVsTotDb1Activ))
  ------------------
  |  Branch (1594:11): [True: 0, False: 0]
  |  Branch (1594:34): [True: 0, False: 0]
  ------------------
 1595|      0|        return MPS_WRONG_OTT;
 1596|      0|      if ((pOttVsTotDb2 == 0) && (ottVsTotDbMode & ottVsTotDb2Activ))
  ------------------
  |  Branch (1596:11): [True: 0, False: 0]
  |  Branch (1596:34): [True: 0, False: 0]
  ------------------
 1597|      0|        return MPS_WRONG_OTT;
 1598|       |
 1599|      0|      for (pb = startBand; pb < stopBand; pb++) {
  ------------------
  |  Branch (1599:28): [True: 0, False: 0]
  ------------------
 1600|      0|        factorCLD(&(outputIdxData[xttIdx][ps][pb]), (*pOttVsTotDbIn)[ps][pb],
 1601|      0|                  (pOttVsTotDb1 != NULL) ? &((*pOttVsTotDb1)[ps][pb]) : NULL,
  ------------------
  |  Branch (1601:19): [True: 0, False: 0]
  ------------------
 1602|      0|                  (pOttVsTotDb2 != NULL) ? &((*pOttVsTotDb2)[ps][pb]) : NULL,
  ------------------
  |  Branch (1602:19): [True: 0, False: 0]
  ------------------
 1603|      0|                  ottVsTotDbMode, quantMode);
 1604|      0|      }
 1605|      0|    }
 1606|       |
 1607|       |    /* Dequantize data */
 1608|  4.81M|    for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1608:28): [True: 4.34M, False: 468k]
  ------------------
 1609|  4.34M|      outputDataIdx[xttIdx][ps][band] =
 1610|  4.34M|          deqIdx(outputIdxData[xttIdx][ps][band], paramType);
 1611|  4.34M|      if (outputDataIdx[xttIdx][ps][band] == -1) {
  ------------------
  |  Branch (1611:11): [True: 123k, False: 4.22M]
  ------------------
 1612|   123k|        outputDataIdx[xttIdx][ps][band] = defaultValue;
 1613|   123k|      }
 1614|  4.34M|    }
 1615|   468k|  } /* for( i = 0 ; i < numParameterSets; i++ ) */
 1616|       |
 1617|   326k|  if (extendFrame) {
  ------------------
  |  Branch (1617:7): [True: 7.10k, False: 319k]
  ------------------
 1618|  7.10k|    if (paramType == t_IPD) {
  ------------------
  |  Branch (1618:9): [True: 1.04k, False: 6.06k]
  ------------------
 1619|  1.04k|      llData->bsQuantCoarseXXX[numParameterSets] =
 1620|  1.04k|          llData->bsQuantCoarseXXX[numParameterSets - 1];
 1621|  1.04k|    }
 1622|  59.4k|    for (band = startBand; band < stopBand; band++) {
  ------------------
  |  Branch (1622:28): [True: 52.3k, False: 7.10k]
  ------------------
 1623|  52.3k|      outputDataIdx[xttIdx][numParameterSets][band] =
 1624|  52.3k|          outputDataIdx[xttIdx][numParameterSets - 1][band];
 1625|  52.3k|    }
 1626|  7.10k|  }
 1627|       |
 1628|   326k|  return MPS_OK;
 1629|   326k|}
sac_bitdec.cpp:_ZL13createMappingPiiii:
 1231|  90.2k|                          int stopBand, int stride) {
 1232|  90.2k|  int inBands, outBands, bandsAchived, bandsDiff, incr, k, i;
 1233|  90.2k|  int vDk[MAX_PARAMETER_BANDS + 1];
 1234|  90.2k|  inBands = stopBand - startBand;
 1235|  90.2k|  outBands = (inBands - 1) / stride + 1;
 1236|       |
 1237|  90.2k|  if (outBands < 1) {
  ------------------
  |  Branch (1237:7): [True: 2.10k, False: 88.1k]
  ------------------
 1238|  2.10k|    outBands = 1;
 1239|  2.10k|  }
 1240|       |
 1241|  90.2k|  bandsAchived = outBands * stride;
 1242|  90.2k|  bandsDiff = inBands - bandsAchived;
 1243|   363k|  for (i = 0; i < outBands; i++) {
  ------------------
  |  Branch (1243:15): [True: 273k, False: 90.2k]
  ------------------
 1244|   273k|    vDk[i] = stride;
 1245|   273k|  }
 1246|       |
 1247|  90.2k|  if (bandsDiff > 0) {
  ------------------
  |  Branch (1247:7): [True: 0, False: 90.2k]
  ------------------
 1248|      0|    incr = -1;
 1249|      0|    k = outBands - 1;
 1250|  90.2k|  } else {
 1251|  90.2k|    incr = 1;
 1252|  90.2k|    k = 0;
 1253|  90.2k|  }
 1254|       |
 1255|   904k|  while (bandsDiff != 0) {
  ------------------
  |  Branch (1255:10): [True: 813k, False: 90.2k]
  ------------------
 1256|   813k|    vDk[k] = vDk[k] - incr;
 1257|   813k|    k = k + incr;
 1258|   813k|    bandsDiff = bandsDiff + incr;
 1259|   813k|    if (k >= outBands) {
  ------------------
  |  Branch (1259:9): [True: 809k, False: 4.49k]
  ------------------
 1260|   809k|      if (bandsDiff > 0) {
  ------------------
  |  Branch (1260:11): [True: 0, False: 809k]
  ------------------
 1261|      0|        k = outBands - 1;
 1262|   809k|      } else if (bandsDiff < 0) {
  ------------------
  |  Branch (1262:18): [True: 766k, False: 43.3k]
  ------------------
 1263|   766k|        k = 0;
 1264|   766k|      }
 1265|   809k|    }
 1266|   813k|  }
 1267|  90.2k|  aMap[0] = startBand;
 1268|   363k|  for (i = 0; i < outBands; i++) {
  ------------------
  |  Branch (1268:15): [True: 273k, False: 90.2k]
  ------------------
 1269|   273k|    aMap[i + 1] = aMap[i] + vDk[i];
 1270|   273k|  }
 1271|  90.2k|} /* createMapping */
sac_bitdec.cpp:_ZL12mapFrequencyPKaPaPii:
 1288|  79.6k|{
 1289|  79.6k|  int i, j;
 1290|  79.6k|  int startBand0 = pMap[0];
 1291|       |
 1292|   318k|  for (i = 0; i < dataBands; i++) {
  ------------------
  |  Branch (1292:15): [True: 238k, False: 79.6k]
  ------------------
 1293|   238k|    int startBand, stopBand, value;
 1294|       |
 1295|   238k|    value = pInput[i + startBand0];
 1296|       |
 1297|   238k|    startBand = pMap[i];
 1298|   238k|    stopBand = pMap[i + 1];
 1299|   962k|    for (j = startBand; j < stopBand; j++) {
  ------------------
  |  Branch (1299:25): [True: 724k, False: 238k]
  ------------------
 1300|   724k|      pOutput[j] = value;
 1301|   724k|    }
 1302|   238k|  }
 1303|  79.6k|}
sac_bitdec.cpp:_ZL6deqIdxii:
 1316|  4.34M|static int deqIdx(int value, int paramType) {
 1317|  4.34M|  int idx = -1;
 1318|       |
 1319|  4.34M|  switch (paramType) {
 1320|  2.10M|    case t_CLD:
  ------------------
  |  Branch (1320:5): [True: 2.10M, False: 2.24M]
  ------------------
 1321|  2.10M|      if (((value + 15) >= 0) && ((value + 15) < 31)) {
  ------------------
  |  Branch (1321:11): [True: 2.09M, False: 4.37k]
  |  Branch (1321:34): [True: 2.05M, False: 45.7k]
  ------------------
 1322|  2.05M|        idx = (value + 15);
 1323|  2.05M|      }
 1324|  2.10M|      break;
 1325|       |
 1326|  1.86M|    case t_ICC:
  ------------------
  |  Branch (1326:5): [True: 1.86M, False: 2.47M]
  ------------------
 1327|  1.86M|      if ((value >= 0) && (value < 8)) {
  ------------------
  |  Branch (1327:11): [True: 1.86M, False: 5.59k]
  |  Branch (1327:27): [True: 1.79M, False: 67.6k]
  ------------------
 1328|  1.79M|        idx = value;
 1329|  1.79M|      }
 1330|  1.86M|      break;
 1331|       |
 1332|   373k|    case t_IPD:
  ------------------
  |  Branch (1332:5): [True: 373k, False: 3.96M]
  ------------------
 1333|       |      /* (+/-)15 * MAX_PARAMETER_BANDS for differential coding in frequency
 1334|       |       * domain (according to rbl) */
 1335|   373k|      if ((value >= -420) && (value <= 420)) {
  ------------------
  |  Branch (1335:11): [True: 373k, False: 0]
  |  Branch (1335:30): [True: 373k, False: 0]
  ------------------
 1336|   373k|        idx = (value & 0xf);
 1337|   373k|      }
 1338|   373k|      break;
 1339|       |
 1340|      0|    default:
  ------------------
  |  Branch (1340:5): [True: 0, False: 4.34M]
  ------------------
 1341|      0|      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1341:7): [Folded, False: 0]
  ------------------
 1342|  4.34M|  }
 1343|       |
 1344|  4.34M|  return idx;
 1345|  4.34M|}
sac_bitdec.cpp:_ZL20decodeAndMapFrameSmgP17spatialDec_structPK23SPATIAL_BS_FRAME_struct:
 1747|   157k|                                         const SPATIAL_BS_FRAME *frame) {
 1748|   157k|  int ps, pb, pg, pbStride, dataBands, pbStart, pbStop,
 1749|   157k|      aGroupToBand[MAX_PARAMETER_BANDS + 1];
 1750|       |
 1751|   157k|  if (frame->numParameterSets > MAX_PARAMETER_SETS)
  ------------------
  |  |  156|   157k|#define MAX_PARAMETER_SETS (9)
  ------------------
  |  Branch (1751:7): [True: 0, False: 157k]
  ------------------
 1752|      0|    return MPS_WRONG_PARAMETERSETS;
 1753|   157k|  if (self->bitstreamParameterBands > MAX_PARAMETER_BANDS)
  ------------------
  |  |  118|   157k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (1753:7): [True: 0, False: 157k]
  ------------------
 1754|      0|    return MPS_WRONG_PARAMETERBANDS;
 1755|       |
 1756|   367k|  for (ps = 0; ps < frame->numParameterSets; ps++) {
  ------------------
  |  Branch (1756:16): [True: 210k, False: 157k]
  ------------------
 1757|   210k|    switch (frame->bsSmoothMode[ps]) {
  ------------------
  |  Branch (1757:13): [True: 210k, False: 0]
  ------------------
 1758|   181k|      case 0:
  ------------------
  |  Branch (1758:7): [True: 181k, False: 28.8k]
  ------------------
 1759|   181k|        self->smgTime[ps] = 256;
 1760|   181k|        FDKmemclear(self->smgData[ps],
 1761|   181k|                    self->bitstreamParameterBands * sizeof(UCHAR));
 1762|   181k|        break;
 1763|       |
 1764|  12.5k|      case 1:
  ------------------
  |  Branch (1764:7): [True: 12.5k, False: 197k]
  ------------------
 1765|  12.5k|        if (ps > 0) {
  ------------------
  |  Branch (1765:13): [True: 10.9k, False: 1.54k]
  ------------------
 1766|  10.9k|          self->smgTime[ps] = self->smgTime[ps - 1];
 1767|  10.9k|          FDKmemcpy(self->smgData[ps], self->smgData[ps - 1],
 1768|  10.9k|                    self->bitstreamParameterBands * sizeof(UCHAR));
 1769|  10.9k|        } else {
 1770|  1.54k|          self->smgTime[ps] = self->smoothState->prevSmgTime;
 1771|  1.54k|          FDKmemcpy(self->smgData[ps], self->smoothState->prevSmgData,
 1772|  1.54k|                    self->bitstreamParameterBands * sizeof(UCHAR));
 1773|  1.54k|        }
 1774|  12.5k|        break;
 1775|       |
 1776|  5.78k|      case 2:
  ------------------
  |  Branch (1776:7): [True: 5.78k, False: 204k]
  ------------------
 1777|  5.78k|        self->smgTime[ps] = smgTimeTable[frame->bsSmoothTime[ps]];
 1778|  61.6k|        for (pb = 0; pb < self->bitstreamParameterBands; pb++) {
  ------------------
  |  Branch (1778:22): [True: 55.8k, False: 5.78k]
  ------------------
 1779|  55.8k|          self->smgData[ps][pb] = 1;
 1780|  55.8k|        }
 1781|  5.78k|        break;
 1782|       |
 1783|  10.5k|      case 3:
  ------------------
  |  Branch (1783:7): [True: 10.5k, False: 199k]
  ------------------
 1784|  10.5k|        self->smgTime[ps] = smgTimeTable[frame->bsSmoothTime[ps]];
 1785|  10.5k|        pbStride = pbStrideTable[frame->bsFreqResStrideSmg[ps]];
 1786|  10.5k|        dataBands = (self->bitstreamParameterBands - 1) / pbStride + 1;
 1787|  10.5k|        createMapping(aGroupToBand, 0, self->bitstreamParameterBands, pbStride);
 1788|  43.2k|        for (pg = 0; pg < dataBands; pg++) {
  ------------------
  |  Branch (1788:22): [True: 32.6k, False: 10.5k]
  ------------------
 1789|  32.6k|          pbStart = aGroupToBand[pg];
 1790|  32.6k|          pbStop = aGroupToBand[pg + 1];
 1791|   124k|          for (pb = pbStart; pb < pbStop; pb++) {
  ------------------
  |  Branch (1791:30): [True: 92.2k, False: 32.6k]
  ------------------
 1792|  92.2k|            self->smgData[ps][pb] = frame->bsSmgData[ps][pg];
 1793|  92.2k|          }
 1794|  32.6k|        }
 1795|  10.5k|        break;
 1796|   210k|    }
 1797|   210k|  }
 1798|       |
 1799|   157k|  self->smoothState->prevSmgTime = self->smgTime[frame->numParameterSets - 1];
 1800|   157k|  FDKmemcpy(self->smoothState->prevSmgData,
 1801|   157k|            self->smgData[frame->numParameterSets - 1],
 1802|   157k|            self->bitstreamParameterBands * sizeof(UCHAR));
 1803|       |
 1804|   157k|  if (self->extendFrame) {
  ------------------
  |  Branch (1804:7): [True: 3.00k, False: 154k]
  ------------------
 1805|  3.00k|    self->smgTime[frame->numParameterSets] =
 1806|  3.00k|        self->smgTime[frame->numParameterSets - 1];
 1807|  3.00k|    FDKmemcpy(self->smgData[frame->numParameterSets],
 1808|  3.00k|              self->smgData[frame->numParameterSets - 1],
 1809|  3.00k|              self->bitstreamParameterBands * sizeof(UCHAR));
 1810|  3.00k|  }
 1811|       |
 1812|   157k|  return MPS_OK;
 1813|   157k|}
sac_bitdec.cpp:_ZL23decodeAndMapFrameArbdmxP17spatialDec_structPK23SPATIAL_BS_FRAME_struct:
 1830|  32.7k|                                            const SPATIAL_BS_FRAME *frame) {
 1831|  32.7k|  SACDEC_ERROR err = MPS_OK;
 1832|  32.7k|  int ch;
 1833|  32.7k|  int offset = self->numOttBoxes;
 1834|       |
 1835|  65.4k|  for (ch = 0; ch < self->numInputChannels; ch++) {
  ------------------
  |  Branch (1835:16): [True: 32.7k, False: 32.7k]
  ------------------
 1836|  32.7k|    err = mapIndexData(&frame->CLDLosslessData[offset + ch],
 1837|  32.7k|                       self->arbdmxGain__FDK, self->outIdxData,
 1838|  32.7k|                       frame->cmpArbdmxGainIdx, NULL, /* no differential data */
 1839|  32.7k|                       ch, self->arbdmxGainIdxPrev, offset + ch, t_CLD, 0,
 1840|  32.7k|                       self->bitstreamParameterBands,
 1841|  32.7k|                       0 /*self->arbdmxGainDefault*/, frame->numParameterSets,
 1842|  32.7k|                       frame->paramSlot, self->extendFrame, 0,
 1843|  32.7k|                       &(self->concealInfo), ottVsTotInactiv, NULL, NULL, NULL);
 1844|  32.7k|    if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1844:9): [True: 0, False: 32.7k]
  ------------------
 1845|  32.7k|  }
 1846|       |
 1847|  32.7k|bail:
 1848|  32.7k|  return err;
 1849|  32.7k|} /* decodeAndMapFrameArbdmx */

_Z26SpatialDecGetResidualIndexP17spatialDec_structi:
  164|  13.0M|int SpatialDecGetResidualIndex(spatialDec* self, int row) {
  165|  13.0M|  return row2residual[self->treeConfig][row];
  166|  13.0M|}
_Z26SpatialDecCalculateM1andM2P17spatialDec_structiPK23SPATIAL_BS_FRAME_struct:
  201|   213k|                                        const SPATIAL_BS_FRAME* frame) {
  202|   213k|  SACDEC_ERROR err = MPS_OK;
  203|       |
  204|   213k|  if ((self->arbitraryDownmix != 0) && (ps == 0)) {
  ------------------
  |  Branch (204:7): [True: 32.7k, False: 180k]
  |  Branch (204:40): [True: 32.7k, False: 73]
  ------------------
  205|  32.7k|    updateAlpha(self);
  206|  32.7k|  }
  207|       |
  208|   213k|  self->pActivM2ParamBands = NULL;
  209|       |
  210|   213k|  switch (self->upmixType) {
  211|      0|    case UPMIXTYPE_BYPASS:
  ------------------
  |  Branch (211:5): [True: 0, False: 213k]
  ------------------
  212|   213k|    case UPMIXTYPE_NORMAL:
  ------------------
  |  Branch (212:5): [True: 213k, False: 0]
  ------------------
  213|   213k|      switch (self->treeConfig) {
  214|   213k|        case TREE_212:
  ------------------
  |  Branch (214:9): [True: 213k, False: 0]
  ------------------
  215|   213k|          err = SpatialDecCalculateM1andM2_212(self, ps, frame);
  216|   213k|          break;
  217|      0|        default:
  ------------------
  |  Branch (217:9): [True: 0, False: 213k]
  ------------------
  218|      0|          err = MPS_WRONG_TREECONFIG;
  219|   213k|      };
  220|   213k|      break;
  221|       |
  222|      0|    default:
  ------------------
  |  Branch (222:5): [True: 0, False: 213k]
  ------------------
  223|      0|      err = MPS_WRONG_TREECONFIG;
  224|   213k|  }
  225|       |
  226|   213k|  if (err != MPS_OK) {
  ------------------
  |  Branch (226:7): [True: 0, False: 213k]
  ------------------
  227|      0|    goto bail;
  228|      0|  }
  229|       |
  230|   213k|bail:
  231|   213k|  return err;
  232|   213k|}
_Z11initM1andM2P17spatialDec_structii:
  753|  50.5k|                         int configChanged) {
  754|  50.5k|  SACDEC_ERROR err = MPS_OK;
  755|       |
  756|  50.5k|  self->bOverwriteM1M2prev = (configChanged && !initStatesFlag) ? 1 : 0;
  ------------------
  |  Branch (756:31): [True: 14.8k, False: 35.6k]
  |  Branch (756:48): [True: 6.57k, False: 8.25k]
  ------------------
  757|       |
  758|  50.5k|  { self->numM2rows = self->numOutputChannels; }
  759|       |
  760|  50.5k|  if (initStatesFlag) {
  ------------------
  |  Branch (760:7): [True: 9.27k, False: 41.2k]
  ------------------
  761|  9.27k|    int i, j, k;
  762|       |
  763|  27.8k|    for (i = 0; i < self->numM2rows; i++) {
  ------------------
  |  Branch (763:17): [True: 18.5k, False: 9.27k]
  ------------------
  764|  55.6k|      for (j = 0; j < self->numVChannels; j++) {
  ------------------
  |  Branch (764:19): [True: 37.1k, False: 18.5k]
  ------------------
  765|  1.07M|        for (k = 0; k < MAX_PARAMETER_BANDS; k++) {
  ------------------
  |  |  118|  1.07M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (765:21): [True: 1.03M, False: 37.1k]
  ------------------
  766|  1.03M|          self->M2Real__FDK[i][j][k] = FL2FXCONST_DBL(0);
  ------------------
  |  |  192|  1.03M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.03M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.03M, Folded]
  |  |  ------------------
  |  |  194|  1.03M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.03M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.03M]
  |  |  ------------------
  |  |  195|  1.03M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.03M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.03M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.03M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.03M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.03M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  767|  1.03M|          self->M2RealPrev__FDK[i][j][k] = FL2FXCONST_DBL(0);
  ------------------
  |  |  192|  1.03M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.03M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.03M, Folded]
  |  |  ------------------
  |  |  194|  1.03M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.03M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.03M]
  |  |  ------------------
  |  |  195|  1.03M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.03M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.03M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.03M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.03M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.03M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  768|  1.03M|        }
  769|  37.1k|      }
  770|  18.5k|    }
  771|  9.27k|  }
  772|       |
  773|  50.5k|  return err;
  774|  50.5k|}
sac_calcM1andM2.cpp:_ZL11updateAlphaP17spatialDec_struct:
  181|  32.7k|static void updateAlpha(spatialDec* self) {
  182|  32.7k|  int nChIn = self->numInputChannels;
  183|  32.7k|  int ch;
  184|       |
  185|  65.4k|  for (ch = 0; ch < nChIn; ch++) {
  ------------------
  |  Branch (185:16): [True: 32.7k, False: 32.7k]
  ------------------
  186|  32.7k|    FIXP_DBL alpha = /* FL2FXCONST_DBL(1.0f) */ (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  32.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  187|       |
  188|  32.7k|    self->arbdmxAlphaPrev__FDK[ch] = self->arbdmxAlpha__FDK[ch];
  189|       |
  190|  32.7k|    self->arbdmxAlpha__FDK[ch] = alpha;
  191|  32.7k|  }
  192|  32.7k|}
sac_calcM1andM2.cpp:_ZL30SpatialDecCalculateM1andM2_212P17spatialDec_structiPK23SPATIAL_BS_FRAME_struct:
  246|   213k|    spatialDec* self, int ps, const SPATIAL_BS_FRAME* frame) {
  247|   213k|  SACDEC_ERROR err = MPS_OK;
  248|   213k|  int pb;
  249|       |
  250|   213k|  FIXP_DBL H11re[MAX_PARAMETER_BANDS] = {FL2FXCONST_DBL(0.0f)};
  ------------------
  |  |  192|   213k|  (FIXP_DBL)(                                                                \
  |  |  193|   213k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   213k|          ? ((((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|   213k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 213k]
  |  |  ------------------
  |  |  199|   213k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   213k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   213k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   213k|                 ? (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|   213k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  251|   213k|  FIXP_DBL H12re[MAX_PARAMETER_BANDS] = {FL2FXCONST_DBL(0.0f)};
  ------------------
  |  |  192|   213k|  (FIXP_DBL)(                                                                \
  |  |  193|   213k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   213k|          ? ((((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|   213k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 213k]
  |  |  ------------------
  |  |  199|   213k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   213k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   213k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   213k|                 ? (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|   213k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  252|   213k|  FIXP_DBL H21re[MAX_PARAMETER_BANDS] = {FL2FXCONST_DBL(0.0f)};
  ------------------
  |  |  192|   213k|  (FIXP_DBL)(                                                                \
  |  |  193|   213k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   213k|          ? ((((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|   213k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 213k]
  |  |  ------------------
  |  |  199|   213k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   213k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   213k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   213k|                 ? (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|   213k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  253|   213k|  FIXP_DBL H22re[MAX_PARAMETER_BANDS] = {FL2FXCONST_DBL(0.0f)};
  ------------------
  |  |  192|   213k|  (FIXP_DBL)(                                                                \
  |  |  193|   213k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   213k|          ? ((((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|   213k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 213k]
  |  |  ------------------
  |  |  199|   213k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   213k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   213k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   213k|                 ? (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|   213k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|   213k|  FIXP_DBL H11im[MAX_PARAMETER_BANDS] = {FL2FXCONST_DBL(0.0f)};
  ------------------
  |  |  192|   213k|  (FIXP_DBL)(                                                                \
  |  |  193|   213k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   213k|          ? ((((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|   213k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 213k]
  |  |  ------------------
  |  |  199|   213k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   213k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   213k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   213k|                 ? (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|   213k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|   213k|  FIXP_DBL H21im[MAX_PARAMETER_BANDS] = {FL2FXCONST_DBL(0.0f)};
  ------------------
  |  |  192|   213k|  (FIXP_DBL)(                                                                \
  |  |  193|   213k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   213k|          ? ((((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|   213k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 213k]
  |  |  ------------------
  |  |  199|   213k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   213k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   213k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   213k|                 ? (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|   213k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   213k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   213k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  256|       |
  257|   213k|  INT phaseCoding = self->phaseCoding;
  258|       |
  259|   213k|  switch (phaseCoding) {
  260|  48.5k|    case 1:
  ------------------
  |  Branch (260:5): [True: 48.5k, False: 164k]
  ------------------
  261|       |      /* phase coding: yes; residuals: no */
  262|  48.5k|      param2UMX_PS_IPD_OPD__FDK(self, frame, H11re, H12re, H21re, H22re, NULL,
  263|  48.5k|                                NULL, 0, ps, self->residualBands[0]);
  264|  48.5k|      break;
  265|  4.37k|    case 3:
  ------------------
  |  Branch (265:5): [True: 4.37k, False: 208k]
  ------------------
  266|       |      /* phase coding: yes; residuals: yes */
  267|  4.37k|      param2UMX_Prediction__FDK(self, H11re, H11im, H12re, NULL, H21re, H21im,
  268|  4.37k|                                H22re, NULL, 0, ps, self->residualBands[0]);
  269|  4.37k|      break;
  270|   160k|    default:
  ------------------
  |  Branch (270:5): [True: 160k, False: 52.9k]
  ------------------
  271|   160k|      if (self->residualCoding) {
  ------------------
  |  Branch (271:11): [True: 12.0k, False: 148k]
  ------------------
  272|       |        /* phase coding: no; residuals: yes */
  273|  12.0k|        param2UMX_Prediction__FDK(self, H11re, NULL, H12re, NULL, H21re, NULL,
  274|  12.0k|                                  H22re, NULL, 0, ps, self->residualBands[0]);
  275|   148k|      } else {
  276|       |        /* phase coding: no; residuals: no */
  277|   148k|        param2UMX_PS__FDK(self, H11re, H12re, H21re, H22re, NULL, NULL, 0, ps,
  278|   148k|                          0);
  279|   148k|      }
  280|   160k|      break;
  281|   213k|  }
  282|       |
  283|  2.26M|  for (pb = 0; pb < self->numParameterBands; pb++) {
  ------------------
  |  Branch (283:16): [True: 2.05M, False: 213k]
  ------------------
  284|  2.05M|    self->M2Real__FDK[0][0][pb] = (H11re[pb]);
  285|  2.05M|    self->M2Real__FDK[0][1][pb] = (H12re[pb]);
  286|       |
  287|  2.05M|    self->M2Real__FDK[1][0][pb] = (H21re[pb]);
  288|  2.05M|    self->M2Real__FDK[1][1][pb] = (H22re[pb]);
  289|  2.05M|  }
  290|   213k|  if (phaseCoding == 3) {
  ------------------
  |  Branch (290:7): [True: 4.37k, False: 208k]
  ------------------
  291|  70.5k|    for (pb = 0; pb < self->numParameterBands; pb++) {
  ------------------
  |  Branch (291:18): [True: 66.1k, False: 4.37k]
  ------------------
  292|  66.1k|      self->M2Imag__FDK[0][0][pb] = (H11im[pb]);
  293|  66.1k|      self->M2Imag__FDK[1][0][pb] = (H21im[pb]);
  294|  66.1k|      self->M2Imag__FDK[0][1][pb] = (FIXP_DBL)0;  // H12im[pb];
  295|  66.1k|      self->M2Imag__FDK[1][1][pb] = (FIXP_DBL)0;  // H22im[pb];
  296|  66.1k|    }
  297|  4.37k|  }
  298|       |
  299|   213k|  if (self->phaseCoding == 1) {
  ------------------
  |  Branch (299:7): [True: 48.5k, False: 164k]
  ------------------
  300|  48.5k|    SpatialDecSmoothOPD(
  301|  48.5k|        self, frame,
  302|  48.5k|        ps); /* INPUT: PhaseLeft, PhaseRight, (opdLeftState, opdRightState) */
  303|  48.5k|  }
  304|       |
  305|   213k|  return err;
  306|   213k|}
sac_calcM1andM2.cpp:_ZL25param2UMX_PS_IPD_OPD__FDKP17spatialDec_structPK23SPATIAL_BS_FRAME_structPiS4_S4_S4_S4_S4_iii:
  528|  48.5k|    int ottBoxIndx, int parameterSetIndx, int residualBands) {
  529|  48.5k|  INT band;
  530|  48.5k|  FIXP_DBL opd[2 * MAX_PARAMETER_BANDS];
  531|  48.5k|  INT numOttBands = self->numOttBands[ottBoxIndx];
  532|  48.5k|  INT numIpdBands;
  533|       |
  534|  48.5k|  numIpdBands = frame->phaseMode ? self->numOttBandsIPD : 0;
  ------------------
  |  Branch (534:17): [True: 17.6k, False: 30.9k]
  ------------------
  535|       |
  536|  48.5k|  FDK_ASSERT(self->residualCoding == 0);
  ------------------
  |  |  221|  48.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (536:3): [True: 48.5k, False: 0]
  ------------------
  537|       |
  538|  48.5k|  param2UMX_PS_Core__FDK(self->ottCLD__FDK[ottBoxIndx][parameterSetIndx],
  539|  48.5k|                         self->ottICC__FDK[ottBoxIndx][parameterSetIndx],
  540|  48.5k|                         self->numOttBands[ottBoxIndx], residualBands, H11, H12,
  541|  48.5k|                         H21, H22, c_l, c_r);
  542|       |
  543|  48.5k|  for (band = self->numOttBands[ottBoxIndx]; band < self->numParameterBands;
  ------------------
  |  Branch (543:46): [True: 0, False: 48.5k]
  ------------------
  544|  48.5k|       band++) {
  545|      0|    H11[band] = H21[band] = H12[band] = H22[band] = FL2FXCONST_DBL(0.f);
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  546|      0|  }
  547|       |
  548|  48.5k|  if (frame->phaseMode) {
  ------------------
  |  Branch (548:7): [True: 17.6k, False: 30.9k]
  ------------------
  549|  17.6k|    calculateOpd(self, ottBoxIndx, parameterSetIndx, opd);
  550|       |
  551|   158k|    for (band = 0; band < numIpdBands; band++) {
  ------------------
  |  Branch (551:20): [True: 140k, False: 17.6k]
  ------------------
  552|   140k|      self->PhaseLeft__FDK[band] = wrapPhase(opd[2 * band]);
  553|   140k|      self->PhaseRight__FDK[band] = wrapPhase(opd[2 * band + 1]);
  554|   140k|    }
  555|  17.6k|  }
  556|       |
  557|   395k|  for (band = numIpdBands; band < numOttBands; band++) {
  ------------------
  |  Branch (557:28): [True: 346k, False: 48.5k]
  ------------------
  558|   346k|    self->PhaseLeft__FDK[band] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   346k|  (FIXP_DBL)(                                                                \
  |  |  193|   346k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 346k, Folded]
  |  |  ------------------
  |  |  194|   346k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   346k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   346k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 346k]
  |  |  ------------------
  |  |  195|   346k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   346k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   346k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   346k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   346k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   346k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   346k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  559|   346k|    self->PhaseRight__FDK[band] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   346k|  (FIXP_DBL)(                                                                \
  |  |  193|   346k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 346k, Folded]
  |  |  ------------------
  |  |  194|   346k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   346k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   346k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 346k]
  |  |  ------------------
  |  |  195|   346k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   346k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   346k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   346k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   346k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   346k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   346k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  560|   346k|  }
  561|  48.5k|}
sac_calcM1andM2.cpp:_ZL22param2UMX_PS_Core__FDKPKaS0_iiPiS1_S1_S1_S1_S1_:
  324|   196k|    FIXP_DBL c_l[MAX_PARAMETER_BANDS], FIXP_DBL c_r[MAX_PARAMETER_BANDS]) {
  325|   196k|  int band;
  326|       |
  327|   196k|  if ((c_l != NULL) && (c_r != NULL)) {
  ------------------
  |  Branch (327:7): [True: 0, False: 196k]
  |  Branch (327:24): [True: 0, False: 0]
  ------------------
  328|      0|    for (band = 0; band < numOttBands; band++) {
  ------------------
  |  Branch (328:20): [True: 0, False: 0]
  ------------------
  329|      0|      SpatialDequantGetCLDValues(cld[band], &c_l[band], &c_r[band]);
  330|      0|    }
  331|      0|  }
  332|       |
  333|   196k|  band = 0;
  334|   196k|  FDK_ASSERT(resBands == 0);
  ------------------
  |  |  221|   196k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (334:3): [True: 196k, False: 0]
  ------------------
  335|  2.06M|  for (; band < numOttBands; band++) {
  ------------------
  |  Branch (335:10): [True: 1.86M, False: 196k]
  ------------------
  336|       |    /* compute mixing variables: */
  337|  1.86M|    const int idx1 = cld[band];
  338|  1.86M|    const int idx2 = icc[band];
  339|  1.86M|    H11[band] = FX_CFG2FX_DBL(H11_nc[idx1][idx2]);
  340|  1.86M|    H21[band] = FX_CFG2FX_DBL(H11_nc[30 - idx1][idx2]);
  341|  1.86M|    H12[band] = FX_CFG2FX_DBL(H12_nc[idx1][idx2]);
  342|  1.86M|    H22[band] = FX_CFG2FX_DBL(-H12_nc[30 - idx1][idx2]);
  343|  1.86M|  }
  344|   196k|}
sac_calcM1andM2.cpp:_ZL12calculateOpdP17spatialDec_structiiPi:
  478|  17.6k|                         FIXP_DBL opd[MAX_PARAMETER_BANDS]) {
  479|  17.6k|  INT band;
  480|       |
  481|   158k|  for (band = 0; band < self->numOttBandsIPD; band++) {
  ------------------
  |  Branch (481:18): [True: 140k, False: 17.6k]
  ------------------
  482|   140k|    INT idxCld = self->ottCLD__FDK[ottBoxIndx][parameterSetIndx][band];
  483|   140k|    INT idxIpd = self->ottIPD__FDK[ottBoxIndx][parameterSetIndx][band];
  484|   140k|    INT idxIcc = self->ottICC__FDK[ottBoxIndx][parameterSetIndx][band];
  485|   140k|    FIXP_DBL cld, ipd;
  486|       |
  487|   140k|    ipd = FX_CFG2FX_DBL(dequantIPD__FDK[idxIpd]);
  488|       |
  489|   140k|    SpatialDequantGetCLD2Values(idxCld, &cld);
  490|       |
  491|       |    /* ipd(idxIpd==8) == PI */
  492|   140k|    if (((cld == FL2FXCONST_DBL(0.0f)) && (idxIpd == 8)) || (idxIpd == 0)) {
  ------------------
  |  |  192|   140k|  (FIXP_DBL)(                                                                \
  |  |  193|   140k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 140k, Folded]
  |  |  ------------------
  |  |  194|   140k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   140k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   140k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 140k]
  |  |  ------------------
  |  |  195|   140k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   140k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   140k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   140k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   140k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   140k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   140k|          : ((((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 (492:10): [True: 34.2k, False: 106k]
  |  Branch (492:43): [True: 1.61k, False: 32.6k]
  |  Branch (492:61): [True: 65.2k, False: 74.1k]
  ------------------
  493|  66.8k|      opd[2 * band] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  66.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  66.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 66.8k, Folded]
  |  |  ------------------
  |  |  194|  66.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  66.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  66.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 66.8k]
  |  |  ------------------
  |  |  195|  66.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  66.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  66.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  66.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  66.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  66.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  66.8k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  494|  74.1k|    } else {
  495|  74.1k|      FDK_ASSERT(idxIpd > 0);
  ------------------
  |  |  221|  74.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (495:7): [True: 74.1k, False: 0]
  ------------------
  496|  74.1k|      opd[2 * band] =
  497|  74.1k|          dequantIPD_CLD_ICC_splitAngle__FDK[idxIpd - 1][idxCld][idxIcc];
  498|  74.1k|    }
  499|   140k|    opd[2 * band + 1] = opd[2 * band] - ipd;
  500|   140k|  }
  501|  17.6k|}
sac_calcM1andM2.cpp:_ZL9wrapPhasei:
  504|   281k|static FIXP_DBL wrapPhase(FIXP_DBL phase) {
  505|   393k|  while (phase < (FIXP_DBL)0) phase += PIx2__IPD;
  ------------------
  |  |  145|   111k|  (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << (IPD_SCALE - 1))))
  |  |  ------------------
  |  |  |  |  192|   111k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   111k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 111k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   111k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   111k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   111k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 111k]
  |  |  |  |  ------------------
  |  |  |  |  195|   111k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   111k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   111k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   111k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   111k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   111k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   111k|          : ((((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 (505:10): [True: 111k, False: 281k]
  ------------------
  506|   281k|  while (phase >= PIx2__IPD) phase -= PIx2__IPD;
  ------------------
  |  |  145|   281k|  (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << (IPD_SCALE - 1))))
  |  |  ------------------
  |  |  |  |  192|   281k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   281k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 281k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   281k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   281k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   281k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 281k]
  |  |  |  |  ------------------
  |  |  |  |  195|   281k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   281k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   281k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   281k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   281k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   281k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   281k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                while (phase >= PIx2__IPD) phase -= PIx2__IPD;
  ------------------
  |  |  145|      0|  (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << (IPD_SCALE - 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 (506:10): [True: 0, False: 281k]
  ------------------
  507|   281k|  FDK_ASSERT((phase >= (FIXP_DBL)0) && (phase < PIx2__IPD));
  ------------------
  |  |  221|   281k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (507:3): [Folded, False: 281k]
  |  Branch (507:3): [Folded, False: 0]
  |  Branch (507:3): [True: 281k, Folded]
  |  Branch (507:3): [True: 281k, False: 0]
  |  Branch (507:3): [True: 281k, False: 0]
  |  Branch (507:3): [True: 281k, False: 0]
  ------------------
  508|       |
  509|   281k|  return phase;
  510|   281k|}
sac_calcM1andM2.cpp:_ZL25param2UMX_Prediction__FDKP17spatialDec_structPiS1_S1_S1_S1_S1_S1_S1_iii:
  724|  16.4k|                                      int parameterSetIndx, int resBands) {
  725|  16.4k|  int band;
  726|  16.4k|  FDK_ASSERT((H12im == NULL) && (H22im == NULL)); /* always == 0 */
  ------------------
  |  |  221|  16.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (726:3): [True: 16.4k, False: 0]
  |  Branch (726:3): [True: 16.4k, False: 0]
  |  Branch (726:3): [True: 16.4k, False: 0]
  ------------------
  727|       |
  728|   209k|  for (band = 0; band < self->numParameterBands; band++) {
  ------------------
  |  Branch (728:18): [True: 192k, False: 16.4k]
  ------------------
  729|   192k|    int cldIdx = self->ottCLD__FDK[ottBoxIndx][parameterSetIndx][band];
  730|   192k|    int iccIdx = self->ottICC__FDK[ottBoxIndx][parameterSetIndx][band];
  731|   192k|    int ipdIdx = self->ottIPD__FDK[ottBoxIndx][parameterSetIndx][band];
  732|       |
  733|   192k|    param2UMX_Prediction_Core__FDK(
  734|   192k|        &H11re[band], (H11im ? &H11im[band] : NULL), &H12re[band], NULL,
  ------------------
  |  Branch (734:24): [True: 66.1k, False: 126k]
  ------------------
  735|   192k|        &H21re[band], (H21im ? &H21im[band] : NULL), &H22re[band], NULL, cldIdx,
  ------------------
  |  Branch (735:24): [True: 66.1k, False: 126k]
  ------------------
  736|   192k|        iccIdx, ipdIdx, band, self->numOttBandsIPD, resBands);
  737|   192k|  }
  738|  16.4k|}
sac_calcM1andM2.cpp:_ZL30param2UMX_Prediction_Core__FDKPiS_S_S_S_S_S_S_iiiiii:
  567|   192k|    int resBands) {
  568|   192k|#define MAX_WEIGHT (1.2f)
  569|   192k|  FDK_ASSERT((H12im == NULL) && (H22im == NULL)); /* always == 0 */
  ------------------
  |  |  221|   192k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (569:3): [True: 192k, False: 0]
  |  Branch (569:3): [True: 192k, False: 0]
  |  Branch (569:3): [True: 192k, False: 0]
  ------------------
  570|       |
  571|   192k|  if ((band < numOttBandsIPD) && (cldIdx == 15) && (iccIdx == 0) &&
  ------------------
  |  Branch (571:7): [True: 120k, False: 72.2k]
  |  Branch (571:34): [True: 114k, False: 6.11k]
  |  Branch (571:52): [True: 112k, False: 1.79k]
  ------------------
  572|   112k|      (ipdIdx == 8)) {
  ------------------
  |  Branch (572:7): [True: 926, False: 111k]
  ------------------
  573|    926|    const FIXP_DBL gain =
  574|    926|        FL2FXCONST_DBL(0.5f / MAX_WEIGHT) >> SCALE_PARAM_M2_212_PRED;
  ------------------
  |  |  192|    926|  (FIXP_DBL)(                                                                \
  |  |  193|    926|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|    926|          ? ((((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|    926|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|    926|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    926|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 926]
  |  |  ------------------
  |  |  199|    926|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|    926|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|    926|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|    926|                 ? (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|    926|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|    926|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    926|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      FL2FXCONST_DBL(0.5f / MAX_WEIGHT) >> SCALE_PARAM_M2_212_PRED;
  ------------------
  |  |  116|    926|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
  575|       |
  576|    926|    *H11re = gain;
  577|    926|    if (band < resBands) {
  ------------------
  |  Branch (577:9): [True: 591, False: 335]
  ------------------
  578|    591|      *H21re = gain;
  579|    591|      *H12re = gain;
  580|    591|      *H22re = -gain;
  581|    591|    } else {
  582|    335|      *H21re = -gain;
  583|    335|      *H12re = (FIXP_DBL)0;
  584|    335|      *H22re = (FIXP_DBL)0;
  585|    335|    }
  586|    926|    if ((H11im != NULL) &&
  ------------------
  |  Branch (586:9): [True: 487, False: 439]
  ------------------
  587|    487|        (H21im != NULL) /*&& (H12im!=NULL) && (H22im!=NULL)*/) {
  ------------------
  |  Branch (587:9): [True: 487, False: 0]
  ------------------
  588|    487|      *H11im = (FIXP_DBL)0;
  589|    487|      *H21im = (FIXP_DBL)0;
  590|       |      /* *H12im = (FIXP_DBL)0; */
  591|       |      /* *H22im = (FIXP_DBL)0; */
  592|    487|    }
  593|   191k|  } else {
  594|   191k|    const FIXP_DBL one_m = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|   191k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  595|   191k|    const int one_e = 0;
  596|       |    /* iidLin = sqrt(cld); */
  597|   191k|    FIXP_DBL iidLin_m = sqrt_CLD_m[cldIdx];
  598|   191k|    int iidLin_e = sqrt_CLD_e[cldIdx];
  599|       |    /* iidLin2 = cld; */
  600|   191k|    FIXP_DBL iidLin2_m = CLD_m[cldIdx];
  601|   191k|    int iidLin2_e = sqrt_CLD_e[cldIdx] << 1;
  602|       |    /* iidLin21 = iidLin2 + 1.0f; */
  603|   191k|    int iidLin21_e;
  604|   191k|    FIXP_DBL iidLin21_m =
  605|   191k|        fAddNorm(iidLin2_m, iidLin2_e, one_m, one_e, &iidLin21_e);
  606|       |    /* iidIcc2 = iidLin * icc * 2.0f; */
  607|   191k|    FIXP_CFG icc = dequantICC__FDK[iccIdx];
  ------------------
  |  |  114|   191k|#define FIXP_CFG FIXP_DBL
  ------------------
  608|   191k|    int iidIcc2_e = iidLin_e + 1;
  609|   191k|    FIXP_DBL iidIcc2_m = fMult(iidLin_m, icc);
  610|   191k|    FIXP_DBL temp_m, sqrt_temp_m, inv_temp_m, weight_m;
  611|   191k|    int temp_e, sqrt_temp_e, inv_temp_e, weight_e, scale;
  612|   191k|    FIXP_DBL cosIpd, sinIpd;
  613|       |
  614|   191k|    cosIpd = COS_IPD((band < numOttBandsIPD) ? ipdIdx : 0);
  ------------------
  |  |  391|   383k|#define COS_IPD(a) (sinIpd_tab[((a) + 4) & 15])  //(cosIpd_tab[(a)])
  |  |  ------------------
  |  |  |  Branch (391:34): [True: 119k, False: 72.2k]
  |  |  ------------------
  ------------------
  615|   191k|    sinIpd = SIN_IPD((band < numOttBandsIPD) ? ipdIdx : 0);
  ------------------
  |  |  390|   383k|#define SIN_IPD(a) (sinIpd_tab[(a)])
  |  |  ------------------
  |  |  |  Branch (390:33): [True: 119k, False: 72.2k]
  |  |  ------------------
  ------------------
  616|       |
  617|       |    /* temp    = iidLin21 + iidIcc2 * cosIpd; */
  618|   191k|    temp_m = fAddNorm(iidLin21_m, iidLin21_e, fMult(iidIcc2_m, cosIpd),
  619|   191k|                      iidIcc2_e, &temp_e);
  620|       |
  621|       |    /* calculate 1/temp needed later */
  622|   191k|    inv_temp_e = temp_e;
  623|   191k|    inv_temp_m = invFixp(temp_m, &inv_temp_e);
  624|       |
  625|       |    /* 1/weight = sqrt(temp) * 1/sqrt(iidLin21) */
  626|   191k|    if (temp_e & 1) {
  ------------------
  |  Branch (626:9): [True: 5.47k, False: 186k]
  ------------------
  627|  5.47k|      sqrt_temp_m = temp_m >> 1;
  628|  5.47k|      sqrt_temp_e = (temp_e + 1) >> 1;
  629|   186k|    } else {
  630|   186k|      sqrt_temp_m = temp_m;
  631|   186k|      sqrt_temp_e = temp_e >> 1;
  632|   186k|    }
  633|   191k|    sqrt_temp_m = sqrtFixp(sqrt_temp_m);
  634|   191k|    if (iidLin21_e & 1) {
  ------------------
  |  Branch (634:9): [True: 9.05k, False: 182k]
  ------------------
  635|  9.05k|      iidLin21_e += 1;
  636|  9.05k|      iidLin21_m >>= 1;
  637|  9.05k|    }
  638|       |    /* weight_[m,e] is actually 1/weight in the next few lines */
  639|   191k|    weight_m = invSqrtNorm2(iidLin21_m, &weight_e);
  640|   191k|    weight_e -= iidLin21_e >> 1;
  641|   191k|    weight_m = fMult(sqrt_temp_m, weight_m);
  642|   191k|    weight_e += sqrt_temp_e;
  643|   191k|    scale = fNorm(weight_m);
  644|   191k|    weight_m = scaleValue(weight_m, scale);
  645|   191k|    weight_e -= scale;
  646|       |    /* weight = 0.5 * max(1/weight, 1/maxWeight) */
  647|   191k|    if ((weight_e < 0) ||
  ------------------
  |  Branch (647:9): [True: 2.00k, False: 189k]
  ------------------
  648|   189k|        ((weight_e == 0) && (weight_m < FL2FXCONST_DBL(1.f / MAX_WEIGHT)))) {
  ------------------
  |  |  192|  5.70k|  (FIXP_DBL)(                                                                \
  |  |  193|  5.70k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 5.70k, Folded]
  |  |  ------------------
  |  |  194|  5.70k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  5.70k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.70k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 5.70k]
  |  |  ------------------
  |  |  195|  5.70k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  5.70k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  5.70k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  5.70k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  5.70k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.70k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  5.70k|          : ((((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 (648:10): [True: 5.70k, False: 184k]
  |  Branch (648:29): [True: 1.38k, False: 4.31k]
  ------------------
  649|  3.38k|      weight_m = FL2FXCONST_DBL(1.f / MAX_WEIGHT);
  ------------------
  |  |  192|  3.38k|  (FIXP_DBL)(                                                                \
  |  |  193|  3.38k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.38k, Folded]
  |  |  ------------------
  |  |  194|  3.38k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.38k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.38k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.38k]
  |  |  ------------------
  |  |  195|  3.38k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.38k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.38k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.38k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.38k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.38k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.38k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  650|  3.38k|      weight_e = 0;
  651|  3.38k|    }
  652|   191k|    weight_e -= 1;
  653|       |
  654|   191k|    {
  655|   191k|      FIXP_DBL alphaRe_m, alphaIm_m, accu_m;
  656|   191k|      int alphaRe_e, alphaIm_e, accu_e;
  657|       |      /* alphaRe = (1.0f - iidLin2) / temp; */
  658|   191k|      alphaRe_m = fAddNorm(one_m, one_e, -iidLin2_m, iidLin2_e, &alphaRe_e);
  659|   191k|      alphaRe_m = fMult(alphaRe_m, inv_temp_m);
  660|   191k|      alphaRe_e += inv_temp_e;
  661|       |
  662|       |      /* H11re = weight - alphaRe * weight; */
  663|       |      /* H21re = weight + alphaRe * weight; */
  664|   191k|      accu_m = fMult(alphaRe_m, weight_m);
  665|   191k|      accu_e = alphaRe_e + weight_e;
  666|   191k|      {
  667|   191k|        int accu2_e;
  668|   191k|        FIXP_DBL accu2_m;
  669|   191k|        accu2_m = fAddNorm(weight_m, weight_e, -accu_m, accu_e, &accu2_e);
  670|   191k|        *H11re = scaleValue(accu2_m, accu2_e - SCALE_PARAM_M2_212_PRED);
  ------------------
  |  |  116|   191k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
  671|   191k|        accu2_m = fAddNorm(weight_m, weight_e, accu_m, accu_e, &accu2_e);
  672|   191k|        *H21re = scaleValue(accu2_m, accu2_e - SCALE_PARAM_M2_212_PRED);
  ------------------
  |  |  116|   191k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
  673|   191k|      }
  674|       |
  675|   191k|      if ((H11im != NULL) &&
  ------------------
  |  Branch (675:11): [True: 65.6k, False: 126k]
  ------------------
  676|  65.6k|          (H21im != NULL) /*&& (H12im != NULL) && (H22im != NULL)*/) {
  ------------------
  |  Branch (676:11): [True: 65.6k, False: 0]
  ------------------
  677|       |        /* alphaIm = -iidIcc2 * sinIpd / temp; */
  678|  65.6k|        alphaIm_m = fMult(-iidIcc2_m, sinIpd);
  679|  65.6k|        alphaIm_m = fMult(alphaIm_m, inv_temp_m);
  680|  65.6k|        alphaIm_e = iidIcc2_e + inv_temp_e;
  681|       |        /* H11im = -alphaIm * weight; */
  682|       |        /* H21im =  alphaIm * weight; */
  683|  65.6k|        accu_m = fMult(alphaIm_m, weight_m);
  684|  65.6k|        accu_e = alphaIm_e + weight_e;
  685|  65.6k|        accu_m = scaleValue(accu_m, accu_e - SCALE_PARAM_M2_212_PRED);
  ------------------
  |  |  116|  65.6k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
  686|  65.6k|        *H11im = -accu_m;
  687|  65.6k|        *H21im = accu_m;
  688|       |
  689|       |        /* *H12im = (FIXP_DBL)0; */
  690|       |        /* *H22im = (FIXP_DBL)0; */
  691|  65.6k|      }
  692|   191k|    }
  693|   191k|    if (band < resBands) {
  ------------------
  |  Branch (693:9): [True: 93.5k, False: 98.2k]
  ------------------
  694|  93.5k|      FIXP_DBL weight =
  695|  93.5k|          scaleValue(weight_m, weight_e - SCALE_PARAM_M2_212_PRED);
  ------------------
  |  |  116|  93.5k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
  696|  93.5k|      *H12re = weight;
  697|  93.5k|      *H22re = -weight;
  698|  98.2k|    } else {
  699|       |      /* beta = 2.0f * iidLin * (float) sqrt(1.0f - icc * icc) * weight / temp;
  700|       |       */
  701|  98.2k|      FIXP_DBL beta_m;
  702|  98.2k|      int beta_e;
  703|  98.2k|      beta_m = FX_SGL2FX_DBL(sqrt_one_minus_ICC2[iccIdx]);
  ------------------
  |  |  219|  98.2k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  98.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  98.2k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  704|  98.2k|      beta_e = 1; /* multipication with 2.0f */
  705|  98.2k|      beta_m = fMult(beta_m, weight_m);
  706|  98.2k|      beta_e += weight_e;
  707|  98.2k|      beta_m = fMult(beta_m, iidLin_m);
  708|  98.2k|      beta_e += iidLin_e;
  709|  98.2k|      beta_m = fMult(beta_m, inv_temp_m);
  710|  98.2k|      beta_e += inv_temp_e;
  711|       |
  712|  98.2k|      beta_m = scaleValue(beta_m, beta_e - SCALE_PARAM_M2_212_PRED);
  ------------------
  |  |  116|  98.2k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
  713|  98.2k|      *H12re = beta_m;
  714|  98.2k|      *H22re = -beta_m;
  715|  98.2k|    }
  716|   191k|  }
  717|   192k|}
sac_calcM1andM2.cpp:_ZL17param2UMX_PS__FDKP17spatialDec_structPiS1_S1_S1_S1_S1_iii:
  364|   148k|                              int parameterSetIndx, int residualBands) {
  365|   148k|  int band;
  366|   148k|  param2UMX_PS_Core__FDK(self->ottCLD__FDK[ottBoxIndx][parameterSetIndx],
  367|   148k|                         self->ottICC__FDK[ottBoxIndx][parameterSetIndx],
  368|   148k|                         self->numOttBands[ottBoxIndx], residualBands, H11, H12,
  369|   148k|                         H21, H22, c_l, c_r);
  370|       |
  371|   148k|  for (band = self->numOttBands[ottBoxIndx]; band < self->numParameterBands;
  ------------------
  |  Branch (371:46): [True: 0, False: 148k]
  ------------------
  372|   148k|       band++) {
  373|      0|    H11[band] = H21[band] = H12[band] = H22[band] = FL2FXCONST_DBL(0.f);
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  374|      0|  }
  375|   148k|}

FDK_SpatialDecInitDefaultSpatialSpecificConfig:
  144|    702|    int nTimeSlots, int decoderLevel, int isBlind) {
  145|    702|  return SpatialDecDefaultSpecificConfig(pSpatialSpecificConfig, coreCodec,
  146|    702|                                         samplingFreq, nTimeSlots, decoderLevel,
  147|    702|                                         isBlind, coreChannels);
  148|    702|}
FDK_SpatialDecCompareSpatialSpecificConfigHeader:
  158|  44.6k|    SPATIAL_SPECIFIC_CONFIG *pSsc1, SPATIAL_SPECIFIC_CONFIG *pSsc2) {
  159|  44.6k|  int result = MPS_OK;
  160|       |
  161|       |  /* we assume: every bit must be equal */
  162|  44.6k|  if (FDKmemcmp(pSsc1, pSsc2, sizeof(SPATIAL_SPECIFIC_CONFIG)) != 0) {
  ------------------
  |  Branch (162:7): [True: 32.9k, False: 11.7k]
  ------------------
  163|  32.9k|    result = MPS_UNEQUAL_SSC;
  164|  32.9k|  }
  165|  44.6k|  return result;
  166|  44.6k|}
FDK_SpatialDecOpen:
  240|  21.2k|                               int stereoConfigIndex) {
  241|  21.2k|  int i;
  242|  21.2k|  int lfSize, hfSize;
  243|  21.2k|  spatialDec *self = NULL;
  244|  21.2k|  SACDEC_CREATION_PARAMS setup;
  245|       |
  246|  21.2k|  switch (config->decoderLevel) {
  247|  21.2k|    case DECODER_LEVEL_0: /* 212 maxNumOutputChannels== 2 */
  ------------------
  |  Branch (247:5): [True: 21.2k, False: 0]
  ------------------
  248|  21.2k|      setup.maxNumInputChannels = 1;
  249|  21.2k|      setup.maxNumOutputChannels = 2;
  250|  21.2k|      setup.maxNumQmfBands = 64;
  251|  21.2k|      setup.maxNumXChannels = 2;
  252|  21.2k|      setup.maxNumVChannels = 2;
  253|  21.2k|      setup.maxNumDecorChannels = 1;
  254|  21.2k|      setup.bProcResidual = 1;
  255|  21.2k|      setup.maxNumResidualChannels = 0;
  256|  21.2k|      setup.maxNumOttBoxes = 1;
  257|  21.2k|      setup.maxNumParams = setup.maxNumInputChannels + setup.maxNumOttBoxes;
  258|  21.2k|      break;
  259|      0|    default:
  ------------------
  |  Branch (259:5): [True: 0, False: 21.2k]
  ------------------
  260|      0|      return NULL;
  261|  21.2k|  }
  262|       |
  263|  21.2k|  setup.maxNumResChannels = 1;
  264|       |
  265|  21.2k|  {
  266|  21.2k|    switch (config->maxNumOutputChannels) {
  267|      0|      case OUTPUT_CHANNELS_2_0:
  ------------------
  |  Branch (267:7): [True: 0, False: 21.2k]
  ------------------
  268|      0|        setup.maxNumOutputChannels = fMin(setup.maxNumOutputChannels, 2);
  269|      0|        break;
  270|  21.2k|      case OUTPUT_CHANNELS_DEFAULT:
  ------------------
  |  Branch (270:7): [True: 21.2k, False: 0]
  ------------------
  271|  21.2k|      default:
  ------------------
  |  Branch (271:7): [True: 0, False: 21.2k]
  ------------------
  272|  21.2k|        break;
  273|  21.2k|    }
  274|  21.2k|  }
  275|       |
  276|  21.2k|  setup.maxNumHybridBands = SacGetHybridSubbands(setup.maxNumQmfBands);
  277|       |
  278|  21.2k|  switch (config->decoderMode) {
  279|  21.2k|    case EXT_HQ_ONLY:
  ------------------
  |  Branch (279:5): [True: 21.2k, False: 0]
  ------------------
  280|  21.2k|      setup.maxNumCmplxQmfBands = setup.maxNumQmfBands;
  281|  21.2k|      setup.maxNumCmplxHybBands = setup.maxNumHybridBands;
  282|  21.2k|      break;
  283|      0|    default:
  ------------------
  |  Branch (283:5): [True: 0, False: 21.2k]
  ------------------
  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|  21.2k|  } /* switch config->decoderMode */
  289|       |
  290|  21.2k|  FDK_ALLOCATE_MEMORY_1D_INT(self, 1, spatialDec, SECT_DATA_L2)
  ------------------
  |  |  165|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D_int((dim1), sizeof(type), (s))) == \
  |  |  ------------------
  |  |  |  Branch (165:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  166|  21.2k|      NULL) {                                                            \
  |  |  167|      0|    goto bail;                                                           \
  |  |  168|      0|  }
  ------------------
  291|       |
  292|  21.2k|  self->createParams = setup;
  293|       |
  294|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->param2hyb, MAX_PARAMETER_BANDS + 1, int)
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  295|       |
  296|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->numOttBands, setup.maxNumOttBoxes, int)
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  297|       |
  298|       |  /* allocate arrays */
  299|       |
  300|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->smgTime, MAX_PARAMETER_SETS, int)
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  301|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->smgData, MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  302|  21.2k|                         UCHAR)
  303|       |
  304|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->ottCLD__FDK, setup.maxNumOttBoxes,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  305|  21.2k|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  306|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->ottICC__FDK, setup.maxNumOttBoxes,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  307|  21.2k|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  308|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->ottIPD__FDK, setup.maxNumOttBoxes,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  309|  21.2k|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  310|       |
  311|       |  /* Last parameters from prev frame */
  312|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->ottCLDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  313|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  314|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->ottICCidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  315|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  316|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->ottICCdiffidx, setup.maxNumOttBoxes,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  317|  21.2k|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  318|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->ottIPDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  319|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  320|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->arbdmxGainIdxPrev, setup.maxNumInputChannels,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  321|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  322|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->cmpOttCLDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  323|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  324|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->cmpOttICCidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  325|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  326|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->outIdxData, setup.maxNumOttBoxes,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  327|  21.2k|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  328|       |
  329|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->arbdmxGain__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  330|  21.2k|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  331|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->arbdmxAlpha__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  332|  21.2k|                         FIXP_DBL)
  333|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->arbdmxAlphaPrev__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  334|  21.2k|                         FIXP_DBL)
  335|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->cmpArbdmxGainIdxPrev, setup.maxNumInputChannels,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  336|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  337|       |
  338|  21.2k|  FDK_ALLOCATE_MEMORY_2D(self->cmpOttIPDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  339|  21.2k|                         MAX_PARAMETER_BANDS, SCHAR)
  340|       |
  341|  21.2k|  FDK_ALLOCATE_MEMORY_3D_INT(self->M2Real__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  219|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D_int((dim1), (dim2), (dim3),        \
  |  |  ------------------
  |  |  |  Branch (219:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  220|  21.2k|                                            sizeof(type), (s))) == NULL) { \
  |  |  221|      0|    goto bail;                                                             \
  |  |  222|      0|  }
  ------------------
  342|  21.2k|                             setup.maxNumVChannels, MAX_PARAMETER_BANDS,
  343|  21.2k|                             FIXP_DBL, SECT_DATA_L2)
  344|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->M2Imag__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  345|  21.2k|                         setup.maxNumVChannels, MAX_PARAMETER_BANDS, FIXP_DBL)
  346|       |
  347|  21.2k|  FDK_ALLOCATE_MEMORY_3D_INT(self->M2RealPrev__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  219|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D_int((dim1), (dim2), (dim3),        \
  |  |  ------------------
  |  |  |  Branch (219:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  220|  21.2k|                                            sizeof(type), (s))) == NULL) { \
  |  |  221|      0|    goto bail;                                                             \
  |  |  222|      0|  }
  ------------------
  348|  21.2k|                             setup.maxNumVChannels, MAX_PARAMETER_BANDS,
  349|  21.2k|                             FIXP_DBL, SECT_DATA_L2)
  350|  21.2k|  FDK_ALLOCATE_MEMORY_3D(self->M2ImagPrev__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  213|  21.2k|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  214|  21.2k|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  351|  21.2k|                         setup.maxNumVChannels, MAX_PARAMETER_BANDS, FIXP_DBL)
  352|       |
  353|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(
  ------------------
  |  |  195|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  196|  21.2k|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  354|  21.2k|      self->qmfInputReal__FDK, setup.maxNumInputChannels, setup.maxNumQmfBands,
  355|  21.2k|      FIXP_DBL, SECT_DATA_L2)
  356|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(
  ------------------
  |  |  195|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  196|  21.2k|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  357|  21.2k|      self->qmfInputImag__FDK, setup.maxNumInputChannels,
  358|  21.2k|      setup.maxNumCmplxQmfBands, FIXP_DBL, SECT_DATA_L2)
  359|       |
  360|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybInputReal__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  361|  21.2k|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  362|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybInputImag__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  363|  21.2k|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  364|       |
  365|  21.2k|  if (setup.bProcResidual) {
  ------------------
  |  Branch (365:7): [True: 21.2k, False: 0]
  ------------------
  366|  21.2k|    FDK_ALLOCATE_MEMORY_1D(self->qmfResidualReal__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  367|  21.2k|                           FIXP_DBL **)
  368|  21.2k|    FDK_ALLOCATE_MEMORY_1D(self->qmfResidualImag__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  369|  21.2k|                           FIXP_DBL **)
  370|       |
  371|  21.2k|    FDK_ALLOCATE_MEMORY_1D(self->hybResidualReal__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  372|  21.2k|                           FIXP_DBL *)
  373|  21.2k|    FDK_ALLOCATE_MEMORY_1D(self->hybResidualImag__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  374|  21.2k|                           FIXP_DBL *)
  375|       |
  376|  42.4k|    for (i = 0; i < setup.maxNumResChannels; i++) {
  ------------------
  |  Branch (376:17): [True: 21.2k, False: 21.2k]
  ------------------
  377|  21.2k|      int resQmfBands = (config->decoderMode == EXT_LP_ONLY)
  ------------------
  |  Branch (377:25): [True: 0, False: 21.2k]
  ------------------
  378|  21.2k|                            ? PC_NUM_BANDS
  ------------------
  |  |  139|      0|#define PC_NUM_BANDS (8)
  ------------------
  379|  21.2k|                            : setup.maxNumQmfBands;
  380|  21.2k|      int resHybBands = (config->decoderMode == EXT_LP_ONLY)
  ------------------
  |  Branch (380:25): [True: 0, False: 21.2k]
  ------------------
  381|  21.2k|                            ? PC_NUM_HYB_BANDS
  ------------------
  |  |  140|      0|#define PC_NUM_HYB_BANDS (PC_NUM_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |  139|      0|#define PC_NUM_BANDS (8)
  |  |  ------------------
  ------------------
  382|  21.2k|                            : setup.maxNumHybridBands;
  383|       |      /* Alignment is needed for USAC residuals because QMF analysis directly
  384|       |       * writes to this buffer. */
  385|  21.2k|      FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(self->qmfResidualReal__FDK[i], (1),
  ------------------
  |  |  195|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  196|  21.2k|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  386|  21.2k|                                         resQmfBands, FIXP_DBL, SECT_DATA_L1)
  387|  21.2k|      FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(self->qmfResidualImag__FDK[i], (1),
  ------------------
  |  |  195|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  196|  21.2k|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  388|  21.2k|                                         resQmfBands, FIXP_DBL, SECT_DATA_L1)
  389|       |
  390|  21.2k|      FDK_ALLOCATE_MEMORY_1D(self->hybResidualReal__FDK[i],
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  391|  21.2k|                             setup.maxNumHybridBands, FIXP_DBL)
  392|  21.2k|      FDK_ALLOCATE_MEMORY_1D(self->hybResidualImag__FDK[i], resHybBands,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  393|  21.2k|                             FIXP_DBL)
  394|  21.2k|    }
  395|  21.2k|  } /* if (setup.bProcResidual) */
  396|       |
  397|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->wReal__FDK, setup.maxNumVChannels,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  398|  21.2k|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  399|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->wImag__FDK, setup.maxNumVChannels,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  400|  21.2k|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  401|       |
  402|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputRealDry__FDK,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  403|  21.2k|                             setup.maxNumOutputChannels,
  404|  21.2k|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  405|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputImagDry__FDK,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  406|  21.2k|                             setup.maxNumOutputChannels,
  407|  21.2k|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  408|       |
  409|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputRealWet__FDK,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  410|  21.2k|                             setup.maxNumOutputChannels,
  411|  21.2k|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  412|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputImagWet__FDK,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  413|  21.2k|                             setup.maxNumOutputChannels,
  414|  21.2k|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  415|       |
  416|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->hybridSynthesis, setup.maxNumOutputChannels,
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  417|  21.2k|                         FDK_SYN_HYB_FILTER)
  418|       |
  419|  21.2k|  FDK_ALLOCATE_MEMORY_1D(
  ------------------
  |  |  149|  42.4k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  |  Branch (149:40): [True: 21.2k, False: 0]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  420|  21.2k|      self->hybridAnalysis,
  421|  21.2k|      setup.bProcResidual ? setup.maxNumInputChannels + setup.maxNumResChannels
  422|  21.2k|                          : setup.maxNumInputChannels,
  423|  21.2k|      FDK_ANA_HYB_FILTER)
  424|       |
  425|  21.2k|  lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  163|  21.2k|#define BUFFER_LEN_LF (PROTO_LEN)
  |  |  ------------------
  |  |  |  |  162|  21.2k|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
                lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  161|  21.2k|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  426|  21.2k|  {
  427|  21.2k|    hfSize =
  428|  21.2k|        BUFFER_LEN_HF * ((setup.maxNumQmfBands - MAX_QMF_BANDS_TO_HYBRID) +
  ------------------
  |  |  164|  21.2k|#define BUFFER_LEN_HF ((PROTO_LEN - 1) / 2)
  |  |  ------------------
  |  |  |  |  162|  21.2k|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
                      BUFFER_LEN_HF * ((setup.maxNumQmfBands - MAX_QMF_BANDS_TO_HYBRID) +
  ------------------
  |  |  161|  21.2k|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  429|  21.2k|                         (setup.maxNumCmplxQmfBands - MAX_QMF_BANDS_TO_HYBRID));
  ------------------
  |  |  161|  21.2k|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  430|  21.2k|  }
  431|       |
  432|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->pHybridAnaStatesLFdmx,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  433|  21.2k|                             setup.maxNumInputChannels, lfSize, FIXP_DBL,
  434|  21.2k|                             SECT_DATA_L2) {
  435|  21.2k|    FDK_ALLOCATE_MEMORY_2D(self->pHybridAnaStatesHFdmx,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  436|  21.2k|                           setup.maxNumInputChannels, hfSize, FIXP_DBL)
  437|  21.2k|  }
  438|       |
  439|  42.4k|  for (i = 0; i < setup.maxNumInputChannels; i++) {
  ------------------
  |  Branch (439:15): [True: 21.2k, False: 21.2k]
  ------------------
  440|  21.2k|    FIXP_DBL *pHybridAnaStatesHFdmx;
  441|       |
  442|  21.2k|    pHybridAnaStatesHFdmx = self->pHybridAnaStatesHFdmx[i];
  443|       |
  444|  21.2k|    FDKhybridAnalysisOpen(&self->hybridAnalysis[i],
  445|  21.2k|                          self->pHybridAnaStatesLFdmx[i],
  446|  21.2k|                          lfSize * sizeof(FIXP_DBL), pHybridAnaStatesHFdmx,
  447|  21.2k|                          hfSize * sizeof(FIXP_DBL));
  448|  21.2k|  }
  449|  21.2k|  if (setup.bProcResidual) {
  ------------------
  |  Branch (449:7): [True: 21.2k, False: 0]
  ------------------
  450|  21.2k|    lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  163|  21.2k|#define BUFFER_LEN_LF (PROTO_LEN)
  |  |  ------------------
  |  |  |  |  162|  21.2k|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
                  lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  161|  21.2k|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  451|  21.2k|    hfSize = BUFFER_LEN_HF *
  ------------------
  |  |  164|  21.2k|#define BUFFER_LEN_HF ((PROTO_LEN - 1) / 2)
  |  |  ------------------
  |  |  |  |  162|  21.2k|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
  452|  21.2k|             ((((config->decoderMode == EXT_LP_ONLY) ? PC_NUM_BANDS
  ------------------
  |  |  139|      0|#define PC_NUM_BANDS (8)
  ------------------
  |  Branch (452:17): [True: 0, False: 21.2k]
  ------------------
  453|  21.2k|                                                     : setup.maxNumQmfBands) -
  454|  21.2k|               MAX_QMF_BANDS_TO_HYBRID) +
  ------------------
  |  |  161|  21.2k|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  455|  21.2k|              (setup.maxNumCmplxQmfBands - MAX_QMF_BANDS_TO_HYBRID));
  ------------------
  |  |  161|  21.2k|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  456|       |
  457|  21.2k|    FDK_ALLOCATE_MEMORY_2D_INT(self->pHybridAnaStatesLFres,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  458|  21.2k|                               setup.maxNumResChannels, lfSize, FIXP_DBL,
  459|  21.2k|                               SECT_DATA_L2)
  460|  21.2k|    FDK_ALLOCATE_MEMORY_2D(self->pHybridAnaStatesHFres, setup.maxNumResChannels,
  ------------------
  |  |  183|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  184|  21.2k|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  461|  21.2k|                           hfSize, FIXP_DBL)
  462|       |
  463|  21.2k|    for (i = setup.maxNumInputChannels;
  464|  42.4k|         i < (setup.maxNumInputChannels + setup.maxNumResChannels); i++) {
  ------------------
  |  Branch (464:10): [True: 21.2k, False: 21.2k]
  ------------------
  465|  21.2k|      FDKhybridAnalysisOpen(
  466|  21.2k|          &self->hybridAnalysis[i],
  467|  21.2k|          self->pHybridAnaStatesLFres[i - setup.maxNumInputChannels],
  468|  21.2k|          lfSize * sizeof(FIXP_DBL),
  469|  21.2k|          self->pHybridAnaStatesHFres[i - setup.maxNumInputChannels],
  470|  21.2k|          hfSize * sizeof(FIXP_DBL));
  471|  21.2k|    }
  472|  21.2k|  }
  473|       |
  474|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->smoothState, 1, SMOOTHING_STATE)
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  475|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->reshapeBBEnvState, 1, RESHAPE_BBENV_STATE)
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  476|       |
  477|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self->apDecor, setup.maxNumDecorChannels, DECORR_DEC)
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  478|  21.2k|  FDK_ALLOCATE_MEMORY_2D_INT(self->pDecorBufferCplx, setup.maxNumDecorChannels,
  ------------------
  |  |  189|  21.2k|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  190|  21.2k|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  479|  21.2k|                             (2 * ((825) + (373))), FIXP_DBL, SECT_DATA_L2)
  480|       |
  481|  42.4k|  for (i = 0; i < setup.maxNumDecorChannels; i++) {
  ------------------
  |  Branch (481:15): [True: 21.2k, False: 21.2k]
  ------------------
  482|  21.2k|    if (FDKdecorrelateOpen(&self->apDecor[i], self->pDecorBufferCplx[i],
  ------------------
  |  Branch (482:9): [True: 0, False: 21.2k]
  ------------------
  483|  21.2k|                           (2 * ((825) + (373))))) {
  484|      0|      goto bail;
  485|      0|    }
  486|  21.2k|  }
  487|       |
  488|  21.2k|  if (subbandTPCreate(&self->hStpDec) != MPS_OK) {
  ------------------
  |  Branch (488:7): [True: 0, False: 21.2k]
  ------------------
  489|      0|    goto bail;
  490|      0|  }
  491|       |
  492|       |  /* save general decoder configuration */
  493|  21.2k|  self->decoderLevel = config->decoderLevel;
  494|  21.2k|  self->decoderMode = config->decoderMode;
  495|  21.2k|  self->binauralMode = config->binauralMode;
  496|       |
  497|       |  /* preinitialize configuration */
  498|  21.2k|  self->partiallyComplex = (config->decoderMode != EXT_HQ_ONLY) ? 1 : 0;
  ------------------
  |  Branch (498:28): [True: 0, False: 21.2k]
  ------------------
  499|       |
  500|       |  /* Set to default state */
  501|  21.2k|  SpatialDecConcealment_Init(&self->concealInfo, MPEGS_CONCEAL_RESET_ALL);
  ------------------
  |  |  168|  21.2k|#define MPEGS_CONCEAL_RESET_ALL (0xFF)
  ------------------
  502|       |
  503|       |  /* Everything is fine so return the handle */
  504|  21.2k|  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|  21.2k|}
SpatialDecInitParserContext:
  593|  54.4k|void SpatialDecInitParserContext(spatialDec *self) {
  594|  54.4k|  int i, j;
  595|       |
  596|   108k|  for (i = 0; i < self->createParams.maxNumOttBoxes; i += 1) {
  ------------------
  |  Branch (596:15): [True: 54.4k, False: 54.4k]
  ------------------
  597|  1.57M|    for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
  ------------------
  |  |  118|  1.57M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (597:17): [True: 1.52M, False: 54.4k]
  ------------------
  598|  1.52M|      self->ottCLDidxPrev[i][j] = 0;
  599|  1.52M|      self->ottICCidxPrev[i][j] = 0;
  600|  1.52M|      self->cmpOttCLDidxPrev[i][j] = 0;
  601|  1.52M|      self->cmpOttICCidxPrev[i][j] = 0;
  602|  1.52M|    }
  603|  54.4k|  }
  604|   108k|  for (i = 0; i < self->createParams.maxNumInputChannels; i++) {
  ------------------
  |  Branch (604:15): [True: 54.4k, False: 54.4k]
  ------------------
  605|  1.57M|    for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
  ------------------
  |  |  118|  1.57M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (605:17): [True: 1.52M, False: 54.4k]
  ------------------
  606|  1.52M|      self->arbdmxGainIdxPrev[i][j] = 0;
  607|  1.52M|      self->cmpArbdmxGainIdxPrev[i][j] = 0;
  608|  1.52M|    }
  609|  54.4k|  }
  610|  54.4k|}
FDK_SpatialDecInit:
  628|  51.2k|                                SPATIALDEC_PARAM *pUserParams, UINT initFlags) {
  629|  51.2k|  SACDEC_ERROR err = MPS_OK;
  630|  51.2k|  int nCh, i, j, k;
  631|  51.2k|  int maxQmfBands;
  632|  51.2k|  int bypassMode = 0;
  633|       |
  634|  51.2k|  self->useFDreverb = 0;
  635|       |
  636|       |  /* check configuration parameter */
  637|  51.2k|  if (!isValidConfig(self, upmixType, pUserParams,
  ------------------
  |  Branch (637:7): [True: 0, False: 51.2k]
  ------------------
  638|  51.2k|                     pSpatialSpecificConfig->coreCodec)) {
  639|      0|    return MPS_INVALID_PARAMETER;
  640|      0|  }
  641|       |
  642|       |  /* check tree configuration */
  643|  51.2k|  err = CheckLevelTreeUpmixType(&self->createParams, pSpatialSpecificConfig,
  644|  51.2k|                                self->decoderLevel, (UPMIXTYPE)upmixType);
  645|  51.2k|  if (err != MPS_OK) {
  ------------------
  |  Branch (645:7): [True: 0, False: 51.2k]
  ------------------
  646|      0|    goto bail;
  647|      0|  }
  648|       |
  649|       |  /* Store and update instance after all checks passed successfully: */
  650|  51.2k|  self->upmixType = (UPMIXTYPE)upmixType;
  651|       |
  652|  51.2k|  if (initFlags & MPEGS_INIT_PARAMS_ERROR_CONCEALMENT) { /* At least one error
  ------------------
  |  Branch (652:7): [True: 9.97k, False: 41.2k]
  ------------------
  653|       |                                                            concealment
  654|       |                                                            parameter changed */
  655|  9.97k|    err = SpatialDecConcealment_SetParam(
  656|  9.97k|        &self->concealInfo, SAC_DEC_CONCEAL_METHOD, pUserParams->concealMethod);
  657|  9.97k|    if (err != MPS_OK) {
  ------------------
  |  Branch (657:9): [True: 0, False: 9.97k]
  ------------------
  658|      0|      goto bail;
  659|      0|    }
  660|  9.97k|    err = SpatialDecConcealment_SetParam(&self->concealInfo,
  661|  9.97k|                                         SAC_DEC_CONCEAL_NUM_KEEP_FRAMES,
  662|  9.97k|                                         pUserParams->concealNumKeepFrames);
  663|  9.97k|    if (err != MPS_OK) {
  ------------------
  |  Branch (663:9): [True: 0, False: 9.97k]
  ------------------
  664|      0|      goto bail;
  665|      0|    }
  666|  9.97k|    err = SpatialDecConcealment_SetParam(
  667|  9.97k|        &self->concealInfo, SAC_DEC_CONCEAL_FADE_OUT_SLOPE_LENGTH,
  668|  9.97k|        pUserParams->concealFadeOutSlopeLength);
  669|  9.97k|    if (err != MPS_OK) {
  ------------------
  |  Branch (669:9): [True: 0, False: 9.97k]
  ------------------
  670|      0|      goto bail;
  671|      0|    }
  672|  9.97k|    err = SpatialDecConcealment_SetParam(&self->concealInfo,
  673|  9.97k|                                         SAC_DEC_CONCEAL_FADE_IN_SLOPE_LENGTH,
  674|  9.97k|                                         pUserParams->concealFadeInSlopeLength);
  675|  9.97k|    if (err != MPS_OK) {
  ------------------
  |  Branch (675:9): [True: 0, False: 9.97k]
  ------------------
  676|      0|      goto bail;
  677|      0|    }
  678|  9.97k|    err = SpatialDecConcealment_SetParam(&self->concealInfo,
  679|  9.97k|                                         SAC_DEC_CONCEAL_NUM_RELEASE_FRAMES,
  680|  9.97k|                                         pUserParams->concealNumReleaseFrames);
  681|  9.97k|    if (err != MPS_OK) {
  ------------------
  |  Branch (681:9): [True: 0, False: 9.97k]
  ------------------
  682|      0|      goto bail;
  683|      0|    }
  684|  9.97k|  }
  685|       |
  686|  51.2k|  if (initFlags &
  ------------------
  |  Branch (686:7): [True: 9.97k, False: 41.2k]
  ------------------
  687|  51.2k|      MPEGS_INIT_STATES_ERROR_CONCEALMENT) { /* Set to default state */
  688|  9.97k|    SpatialDecConcealment_Init(&self->concealInfo, MPEGS_CONCEAL_RESET_STATE);
  ------------------
  |  |  166|  9.97k|#define MPEGS_CONCEAL_RESET_STATE (0x01)
  ------------------
  689|  9.97k|  }
  690|       |
  691|       |  /* determine bypass mode */
  692|  51.2k|  bypassMode |= pUserParams->bypassMode;
  693|  51.2k|  bypassMode |= ((self->upmixType == UPMIXTYPE_BYPASS) ? 1 : 0);
  ------------------
  |  Branch (693:18): [True: 0, False: 51.2k]
  ------------------
  694|       |
  695|       |  /* static decoder scale depends on number of qmf bands */
  696|  51.2k|  switch (nQmfBands) {
  697|  1.53k|    case 16:
  ------------------
  |  Branch (697:5): [True: 1.53k, False: 49.6k]
  ------------------
  698|  2.58k|    case 24:
  ------------------
  |  Branch (698:5): [True: 1.04k, False: 50.1k]
  ------------------
  699|  30.2k|    case 32:
  ------------------
  |  Branch (699:5): [True: 27.6k, False: 23.5k]
  ------------------
  700|  30.2k|      self->staticDecScale = 21;
  701|  30.2k|      break;
  702|  20.9k|    case 64:
  ------------------
  |  Branch (702:5): [True: 20.9k, False: 30.2k]
  ------------------
  703|  20.9k|      self->staticDecScale = 22;
  704|  20.9k|      break;
  705|      0|    default:
  ------------------
  |  Branch (705:5): [True: 0, False: 51.2k]
  ------------------
  706|      0|      return MPS_INVALID_PARAMETER;
  707|  51.2k|  }
  708|       |
  709|  51.2k|  self->numParameterSetsPrev = 1;
  710|       |
  711|  51.2k|  self->qmfBands = nQmfBands;
  712|       |  /* self->hybridBands will be updated in SpatialDecDecodeHeader() below. */
  713|       |
  714|  51.2k|  self->bShareDelayWithSBR = 0;
  715|       |
  716|  51.2k|  err = SpatialDecDecodeHeader(self, pSpatialSpecificConfig);
  717|  51.2k|  if (err != MPS_OK) {
  ------------------
  |  Branch (717:7): [True: 710, False: 50.5k]
  ------------------
  718|    710|    goto bail;
  719|    710|  }
  720|       |
  721|  50.5k|  self->stereoConfigIndex = pSpatialSpecificConfig->stereoConfigIndex;
  722|       |
  723|  50.5k|  if (initFlags & MPEGS_INIT_STATES_ANA_QMF_FILTER) {
  ------------------
  |  Branch (723:7): [True: 9.27k, False: 41.2k]
  ------------------
  724|  9.27k|    self->qmfInputDelayBufPos = 0;
  725|  9.27k|    self->pc_filterdelay = 1; /* Division by 0 not possible */
  726|  9.27k|  }
  727|       |
  728|  50.5k|  maxQmfBands = self->qmfBands;
  729|       |
  730|       |  /* init residual decoder */
  731|       |
  732|       |  /* init tonality smoothing */
  733|  50.5k|  if (initFlags & MPEGS_INIT_STATES_PARAM) {
  ------------------
  |  Branch (733:7): [True: 15.8k, False: 34.6k]
  ------------------
  734|  15.8k|    initParameterSmoothing(self);
  735|  15.8k|  }
  736|       |
  737|       |  /* init GES */
  738|  50.5k|  initBBEnv(self, (initFlags & MPEGS_INIT_STATES_GES) ? 1 : 0);
  ------------------
  |  Branch (738:19): [True: 10.1k, False: 40.3k]
  ------------------
  739|       |
  740|       |  /* Clip protection is applied only for normal processing. */
  741|  50.5k|  if (!isTwoChMode(self->upmixType) && !bypassMode) {
  ------------------
  |  Branch (741:7): [True: 50.5k, False: 0]
  |  Branch (741:40): [True: 50.5k, False: 0]
  ------------------
  742|  50.5k|    self->staticDecScale += self->clipProtectGainSF__FDK;
  743|  50.5k|  }
  744|       |
  745|  50.5k|  {
  746|  50.5k|    UINT flags = 0;
  747|  50.5k|    INT initStatesFlag = (initFlags & MPEGS_INIT_STATES_ANA_QMF_FILTER) ? 1 : 0;
  ------------------
  |  Branch (747:26): [True: 9.27k, False: 41.2k]
  ------------------
  748|  50.5k|    INT useLdFilter =
  749|  50.5k|        (self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD) ? 1 : 0;
  ------------------
  |  |  536|  50.5k|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (749:9): [True: 27.2k, False: 23.2k]
  ------------------
  750|       |
  751|  50.5k|    flags = self->pQmfDomain->globalConf.flags_requested;
  752|  50.5k|    flags &= (~(UINT)QMF_FLAG_LP);
  ------------------
  |  |  126|  50.5k|#define QMF_FLAG_LP 1
  ------------------
  753|       |
  754|  50.5k|    if (initStatesFlag)
  ------------------
  |  Branch (754:9): [True: 9.27k, False: 41.2k]
  ------------------
  755|  9.27k|      flags &= ~QMF_FLAG_KEEP_STATES;
  ------------------
  |  |  135|  9.27k|#define QMF_FLAG_KEEP_STATES 8
  ------------------
  756|  41.2k|    else
  757|  41.2k|      flags |= QMF_FLAG_KEEP_STATES;
  ------------------
  |  |  135|  41.2k|#define QMF_FLAG_KEEP_STATES 8
  ------------------
  758|       |
  759|  50.5k|    if (useLdFilter)
  ------------------
  |  Branch (759:9): [True: 27.2k, False: 23.2k]
  ------------------
  760|  27.2k|      flags |= QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|  27.2k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  761|  23.2k|    else
  762|  23.2k|      flags &= ~QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|  23.2k|#define QMF_FLAG_MPSLDFB 16
  ------------------
  763|       |
  764|  50.5k|    self->pQmfDomain->globalConf.flags_requested = flags;
  765|  50.5k|    FDK_QmfDomain_Configure(self->pQmfDomain);
  766|       |
  767|       |    /* output scaling */
  768|   151k|    for (nCh = 0; nCh < self->numOutputChannelsAT; nCh++) {
  ------------------
  |  Branch (768:19): [True: 101k, False: 50.5k]
  ------------------
  769|   101k|      int outputScale = 0, outputGain_e = 0, scale = -(8) + (1);
  770|   101k|      FIXP_DBL outputGain_m = getChGain(self, nCh, &outputGain_e);
  771|       |
  772|   101k|      if (!isTwoChMode(self->upmixType) && !bypassMode) {
  ------------------
  |  Branch (772:11): [True: 101k, False: 0]
  |  Branch (772:44): [True: 101k, False: 0]
  ------------------
  773|   101k|        outputScale +=
  774|   101k|            self->clipProtectGainSF__FDK; /* consider clip protection scaling at
  775|       |                                             synthesis qmf */
  776|   101k|      }
  777|       |
  778|   101k|      scale += outputScale;
  779|       |
  780|   101k|      qmfChangeOutScalefactor(&self->pQmfDomain->QmfDomainOut[nCh].fb, scale);
  781|   101k|      qmfChangeOutGain(&self->pQmfDomain->QmfDomainOut[nCh].fb, outputGain_m,
  782|   101k|                       outputGain_e);
  783|   101k|    }
  784|  50.5k|  }
  785|       |
  786|   151k|  for (nCh = 0; nCh < self->numOutputChannelsAT; nCh++) {
  ------------------
  |  Branch (786:17): [True: 101k, False: 50.5k]
  ------------------
  787|   101k|    FDKhybridSynthesisInit(&self->hybridSynthesis[nCh], THREE_TO_TEN,
  788|   101k|                           self->qmfBands, maxQmfBands);
  789|   101k|  }
  790|       |
  791|       |  /* for input, residual channels and arbitrary down-mix residual channels */
  792|   101k|  for (nCh = 0; nCh < self->createParams.maxNumInputChannels; nCh++) {
  ------------------
  |  Branch (792:17): [True: 50.5k, False: 50.5k]
  ------------------
  793|  50.5k|    FDKhybridAnalysisInit(
  794|  50.5k|        &self->hybridAnalysis[nCh], THREE_TO_TEN, self->qmfBands, maxQmfBands,
  795|  50.5k|        (initFlags & MPEGS_INIT_STATES_ANA_HYB_FILTER) ? 1 : 0);
  ------------------
  |  Branch (795:9): [True: 9.27k, False: 41.2k]
  ------------------
  796|  50.5k|  }
  797|   101k|  for (; nCh < (self->createParams.bProcResidual
  ------------------
  |  Branch (797:10): [True: 50.5k, False: 50.5k]
  |  Branch (797:17): [True: 101k, False: 0]
  ------------------
  798|   101k|                    ? (self->createParams.maxNumInputChannels +
  799|   101k|                       self->createParams.maxNumResChannels)
  800|   101k|                    : self->createParams.maxNumInputChannels);
  801|  50.5k|       nCh++) {
  802|  50.5k|    FDKhybridAnalysisInit(&self->hybridAnalysis[nCh], THREE_TO_TEN, maxQmfBands,
  803|  50.5k|                          maxQmfBands, 0);
  804|  50.5k|  }
  805|       |
  806|  50.5k|  {
  807|   101k|    for (k = 0; k < self->numDecorSignals; k++) {
  ------------------
  |  Branch (807:17): [True: 50.5k, False: 50.5k]
  ------------------
  808|  50.5k|      int errCode, idec;
  809|  50.5k|      FDK_DECORR_TYPE decorrType = DECORR_PS;
  810|  50.5k|      decorrType = DECORR_LD;
  811|  50.5k|      if (self->pConfigCurrent->syntaxFlags &
  ------------------
  |  Branch (811:11): [True: 23.2k, False: 27.2k]
  ------------------
  812|  50.5k|          (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  532|  50.5k|#define SACDEC_SYNTAX_USAC 2
  ------------------
                        (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  533|  50.5k|#define SACDEC_SYNTAX_RSVD50 4
  ------------------
  813|  23.2k|        decorrType =
  814|  23.2k|            ((self->treeConfig == TREE_212) && (self->decorrType == DECORR_PS))
  ------------------
  |  Branch (814:14): [True: 23.2k, False: 0]
  |  Branch (814:48): [True: 0, False: 23.2k]
  ------------------
  815|  23.2k|                ? DECORR_PS
  816|  23.2k|                : DECORR_USAC;
  817|  23.2k|      }
  818|  50.5k|      {
  819|  50.5k|        idec = k;
  820|  50.5k|        if (self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD) {
  ------------------
  |  |  536|  50.5k|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (820:13): [True: 27.2k, False: 23.2k]
  ------------------
  821|  27.2k|          if (self->treeConfig == TREE_212 && k == 0) {
  ------------------
  |  Branch (821:15): [True: 27.2k, False: 0]
  |  Branch (821:47): [True: 27.2k, False: 0]
  ------------------
  822|  27.2k|            idec = 2;
  823|  27.2k|          }
  824|  27.2k|        }
  825|  50.5k|      }
  826|  50.5k|      errCode = FDKdecorrelateInit(
  827|  50.5k|          &self->apDecor[k], self->hybridBands, decorrType, DUCKER_AUTOMATIC,
  828|  50.5k|          self->decorrConfig, idec, 0, /* self->partiallyComplex */
  829|  50.5k|          0, 0,                        /* isLegacyPS */
  830|  50.5k|          (initFlags & MPEGS_INIT_STATES_DECORRELATOR) ? 1 : 0);
  ------------------
  |  Branch (830:11): [True: 9.73k, False: 40.7k]
  ------------------
  831|  50.5k|      if (errCode) return MPS_NOTOK;
  ------------------
  |  Branch (831:11): [True: 0, False: 50.5k]
  ------------------
  832|  50.5k|    }
  833|  50.5k|  } /* !self->partiallyComplex */
  834|       |
  835|  50.5k|  err = initM1andM2(self, (initFlags & MPEGS_INIT_STATES_M1M2) ? 1 : 0,
  ------------------
  |  Branch (835:27): [True: 9.27k, False: 41.2k]
  ------------------
  836|  50.5k|                    (initFlags & MPEGS_INIT_CONFIG) ? 1 : 0);
  ------------------
  |  Branch (836:21): [True: 14.8k, False: 35.6k]
  ------------------
  837|  50.5k|  if (err != MPS_OK) return err;
  ------------------
  |  Branch (837:7): [True: 0, False: 50.5k]
  ------------------
  838|       |
  839|       |  /* Initialization of previous frame data */
  840|  50.5k|  if (initFlags & MPEGS_INIT_STATES_PARAM) {
  ------------------
  |  Branch (840:7): [True: 15.8k, False: 34.6k]
  ------------------
  841|  31.7k|    for (i = 0; i < self->createParams.maxNumOttBoxes; i += 1) {
  ------------------
  |  Branch (841:17): [True: 15.8k, False: 15.8k]
  ------------------
  842|       |      /* reset icc diff data */
  843|   158k|      for (k = 0; k < MAX_PARAMETER_SETS; k += 1) {
  ------------------
  |  |  156|   158k|#define MAX_PARAMETER_SETS (9)
  ------------------
  |  Branch (843:19): [True: 142k, False: 15.8k]
  ------------------
  844|  4.13M|        for (j = 0; j < MAX_PARAMETER_BANDS; j += 1) {
  ------------------
  |  |  118|  4.13M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (844:21): [True: 3.99M, False: 142k]
  ------------------
  845|  3.99M|          self->ottICCdiffidx[i][k][j] = 0;
  846|  3.99M|        }
  847|   142k|      }
  848|  15.8k|    }
  849|       |    /* Parameter Smoothing */
  850|       |    /* robustness: init with one of the values of smgTimeTable[] = {64, 128,
  851|       |       256, 512} to avoid division by zero in calcFilterCoeff__FDK() */
  852|  15.8k|    self->smoothState->prevSmgTime = smgTimeTable[2]; /* == 256 */
  853|  15.8k|    FDKmemclear(self->smoothState->prevSmgData,
  854|  15.8k|                MAX_PARAMETER_BANDS * sizeof(UCHAR));
  ------------------
  |  |  118|  15.8k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  855|  15.8k|    FDKmemclear(self->smoothState->opdLeftState__FDK,
  856|  15.8k|                MAX_PARAMETER_BANDS * sizeof(FIXP_DBL));
  ------------------
  |  |  118|  15.8k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  857|  15.8k|    FDKmemclear(self->smoothState->opdRightState__FDK,
  858|  15.8k|                MAX_PARAMETER_BANDS * sizeof(FIXP_DBL));
  ------------------
  |  |  118|  15.8k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  859|  15.8k|  }
  860|       |
  861|  50.5k|  self->prevTimeSlot = -1;
  862|  50.5k|  self->curTimeSlot =
  863|  50.5k|      MAX_TIME_SLOTS + 1; /* Initialize with a invalid value to trigger
  ------------------
  |  |  109|  50.5k|#define MAX_TIME_SLOTS 64
  ------------------
  864|       |                             concealment if first frame has no valid data. */
  865|  50.5k|  self->curPs = 0;
  866|       |
  867|  50.5k|  subbandTPInit(self->hStpDec);
  868|       |
  869|  51.2k|bail:
  870|  51.2k|  return err;
  871|  50.5k|}
SpatialDecChannelProperties:
  876|   158k|                                 const FDK_channelMapDescr *const mapDescr) {
  877|   158k|  if ((self == NULL) || (channelType == NULL) || (channelIndices == NULL) ||
  ------------------
  |  Branch (877:7): [True: 0, False: 158k]
  |  Branch (877:25): [True: 0, False: 158k]
  |  Branch (877:50): [True: 0, False: 158k]
  ------------------
  878|   158k|      (mapDescr == NULL)) {
  ------------------
  |  Branch (878:7): [True: 0, False: 158k]
  ------------------
  879|      0|    return; /* no extern buffer to be filled */
  880|      0|  }
  881|       |
  882|   158k|  if (self->numOutputChannelsAT !=
  ------------------
  |  Branch (882:7): [True: 0, False: 158k]
  ------------------
  883|   158k|      treePropertyTable[self->treeConfig].numOutputChannels) {
  884|      0|    int ch;
  885|       |    /* Declare all channels to be front channels: */
  886|      0|    for (ch = 0; ch < self->numOutputChannelsAT; ch += 1) {
  ------------------
  |  Branch (886:18): [True: 0, False: 0]
  ------------------
  887|      0|      channelType[ch] = ACT_FRONT;
  888|      0|      channelIndices[ch] = ch;
  889|      0|    }
  890|   158k|  } else {
  891|       |    /* ISO/IEC FDIS 23003-1:2006(E), page 46, Table 40 bsTreeConfig */
  892|   158k|    switch (self->treeConfig) {
  893|   158k|      case TREE_212:
  ------------------
  |  Branch (893:7): [True: 158k, False: 0]
  ------------------
  894|   158k|        channelType[0] = ACT_FRONT;
  895|   158k|        channelIndices[0] = 0;
  896|   158k|        channelType[1] = ACT_FRONT;
  897|   158k|        channelIndices[1] = 1;
  898|   158k|        break;
  899|      0|      default:;
  ------------------
  |  Branch (899:7): [True: 0, False: 158k]
  ------------------
  900|   158k|    }
  901|   158k|  }
  902|   158k|}
FDK_SpatialDecClose:
  916|   333k|void FDK_SpatialDecClose(spatialDec *self) {
  917|   333k|  if (self) {
  ------------------
  |  Branch (917:7): [True: 21.2k, False: 312k]
  ------------------
  918|  21.2k|    int k;
  919|       |
  920|  21.2k|    if (self->apDecor != NULL) {
  ------------------
  |  Branch (920:9): [True: 21.2k, False: 0]
  ------------------
  921|  42.4k|      for (k = 0; k < self->createParams.maxNumDecorChannels; k++) {
  ------------------
  |  Branch (921:19): [True: 21.2k, False: 21.2k]
  ------------------
  922|  21.2k|        FDKdecorrelateClose(&(self->apDecor[k]));
  923|  21.2k|      }
  924|  21.2k|      FDK_FREE_MEMORY_1D(self->apDecor);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  925|  21.2k|    }
  926|  21.2k|    if (self->pDecorBufferCplx != NULL) {
  ------------------
  |  Branch (926:9): [True: 21.2k, False: 0]
  ------------------
  927|  21.2k|      FDK_FREE_MEMORY_2D(self->pDecorBufferCplx);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  928|  21.2k|    }
  929|       |
  930|  21.2k|    subbandTPDestroy(&self->hStpDec);
  931|       |
  932|  21.2k|    FDK_FREE_MEMORY_1D(self->reshapeBBEnvState);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  933|  21.2k|    FDK_FREE_MEMORY_1D(self->smoothState);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  934|       |
  935|  21.2k|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesLFdmx);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  936|  21.2k|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesHFdmx);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  937|  21.2k|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesLFres);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  938|  21.2k|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesHFres);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  939|  21.2k|    FDK_FREE_MEMORY_1D(self->hybridAnalysis);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  940|       |
  941|  21.2k|    FDK_FREE_MEMORY_1D(self->hybridSynthesis);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  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|  21.2k|    FDK_FREE_MEMORY_2D(self->hybOutputImagWet__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  948|  21.2k|    FDK_FREE_MEMORY_2D(self->hybOutputRealWet__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  949|       |
  950|  21.2k|    FDK_FREE_MEMORY_2D(self->hybOutputImagDry__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  951|  21.2k|    FDK_FREE_MEMORY_2D(self->hybOutputRealDry__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  952|       |
  953|  21.2k|    FDK_FREE_MEMORY_2D(self->wImag__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  954|  21.2k|    FDK_FREE_MEMORY_2D(self->wReal__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  955|       |
  956|  21.2k|    if (self->createParams.bProcResidual) {
  ------------------
  |  Branch (956:9): [True: 21.2k, False: 0]
  ------------------
  957|  21.2k|      int i;
  958|       |
  959|  42.4k|      for (i = 0; i < self->createParams.maxNumResChannels; i++) {
  ------------------
  |  Branch (959:19): [True: 21.2k, False: 21.2k]
  ------------------
  960|  21.2k|        if (self->hybResidualImag__FDK != NULL)
  ------------------
  |  Branch (960:13): [True: 21.2k, False: 0]
  ------------------
  961|  21.2k|          FDK_FREE_MEMORY_1D(self->hybResidualImag__FDK[i]);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  962|  21.2k|        if (self->hybResidualReal__FDK != NULL)
  ------------------
  |  Branch (962:13): [True: 21.2k, False: 0]
  ------------------
  963|  21.2k|          FDK_FREE_MEMORY_1D(self->hybResidualReal__FDK[i]);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  964|  21.2k|        if (self->qmfResidualImag__FDK != NULL)
  ------------------
  |  Branch (964:13): [True: 21.2k, False: 0]
  ------------------
  965|  21.2k|          FDK_FREE_MEMORY_2D_ALIGNED(self->qmfResidualImag__FDK[i]);
  ------------------
  |  |  207|  21.2k|  do {                                    \
  |  |  208|  21.2k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  21.2k|    (a) = NULL;                           \
  |  |  210|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  966|  21.2k|        if (self->qmfResidualReal__FDK != NULL)
  ------------------
  |  Branch (966:13): [True: 21.2k, False: 0]
  ------------------
  967|  21.2k|          FDK_FREE_MEMORY_2D_ALIGNED(self->qmfResidualReal__FDK[i]);
  ------------------
  |  |  207|  21.2k|  do {                                    \
  |  |  208|  21.2k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  21.2k|    (a) = NULL;                           \
  |  |  210|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  968|  21.2k|      }
  969|       |
  970|  21.2k|      FDK_FREE_MEMORY_1D(self->hybResidualImag__FDK);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  971|  21.2k|      FDK_FREE_MEMORY_1D(self->hybResidualReal__FDK);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  972|       |
  973|  21.2k|      FDK_FREE_MEMORY_1D(self->qmfResidualImag__FDK);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  974|  21.2k|      FDK_FREE_MEMORY_1D(self->qmfResidualReal__FDK);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  975|       |
  976|  21.2k|    } /* self->createParams.bProcResidual */
  977|       |
  978|  21.2k|    FDK_FREE_MEMORY_2D(self->hybInputImag__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  979|  21.2k|    FDK_FREE_MEMORY_2D(self->hybInputReal__FDK);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  980|       |
  981|  21.2k|    FDK_FREE_MEMORY_2D_ALIGNED(self->qmfInputImag__FDK);
  ------------------
  |  |  207|  21.2k|  do {                                    \
  |  |  208|  21.2k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  21.2k|    (a) = NULL;                           \
  |  |  210|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  982|  21.2k|    FDK_FREE_MEMORY_2D_ALIGNED(self->qmfInputReal__FDK);
  ------------------
  |  |  207|  21.2k|  do {                                    \
  |  |  208|  21.2k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  21.2k|    (a) = NULL;                           \
  |  |  210|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  983|       |
  984|  21.2k|    FDK_FREE_MEMORY_3D(self->M2ImagPrev__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  985|       |
  986|  21.2k|    FDK_FREE_MEMORY_3D(self->M2RealPrev__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  987|       |
  988|  21.2k|    FDK_FREE_MEMORY_3D(self->M2Imag__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  989|       |
  990|  21.2k|    FDK_FREE_MEMORY_3D(self->M2Real__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  991|       |
  992|  21.2k|    FDK_FREE_MEMORY_1D(self->arbdmxAlphaPrev__FDK);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  993|  21.2k|    FDK_FREE_MEMORY_1D(self->arbdmxAlpha__FDK);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  994|       |
  995|  21.2k|    FDK_FREE_MEMORY_3D(self->arbdmxGain__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  996|       |
  997|  21.2k|    FDK_FREE_MEMORY_3D(self->ottIPD__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  998|  21.2k|    FDK_FREE_MEMORY_3D(self->ottICC__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  999|  21.2k|    FDK_FREE_MEMORY_3D(self->ottCLD__FDK);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1000|       |
 1001|       |    /* Last parameters from prev frame */
 1002|  21.2k|    FDK_FREE_MEMORY_2D(self->ottCLDidxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1003|  21.2k|    FDK_FREE_MEMORY_2D(self->ottICCidxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1004|  21.2k|    FDK_FREE_MEMORY_3D(self->ottICCdiffidx);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1005|  21.2k|    FDK_FREE_MEMORY_2D(self->ottIPDidxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1006|  21.2k|    FDK_FREE_MEMORY_2D(self->arbdmxGainIdxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1007|       |
 1008|  21.2k|    FDK_FREE_MEMORY_2D(self->cmpOttCLDidxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1009|  21.2k|    FDK_FREE_MEMORY_2D(self->cmpOttICCidxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1010|  21.2k|    FDK_FREE_MEMORY_3D(self->outIdxData);
  ------------------
  |  |  225|  21.2k|  do {                             \
  |  |  226|  21.2k|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|  21.2k|    (a) = NULL;                    \
  |  |  228|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1011|  21.2k|    FDK_FREE_MEMORY_2D(self->cmpOttIPDidxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1012|  21.2k|    FDK_FREE_MEMORY_2D(self->cmpArbdmxGainIdxPrev);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1013|       |
 1014|  21.2k|    FDK_FREE_MEMORY_2D(self->smgData);
  ------------------
  |  |  201|  21.2k|  do {                            \
  |  |  202|  21.2k|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|  21.2k|    (a) = NULL;                   \
  |  |  204|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1015|  21.2k|    FDK_FREE_MEMORY_1D(self->smgTime);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1016|       |
 1017|  21.2k|    FDK_FREE_MEMORY_1D(self->numOttBands);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1018|       |
 1019|  21.2k|    FDK_FREE_MEMORY_1D(self->param2hyb);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1020|       |
 1021|  21.2k|    FDK_FREE_MEMORY_1D(self);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1022|  21.2k|  }
 1023|       |
 1024|   333k|  return;
 1025|   333k|}
SpatialDecApplyFrame:
 1445|   158k|    const FDK_channelMapDescr *const mapDescr) {
 1446|   158k|  SACDEC_ERROR err = MPS_OK;
 1447|       |
 1448|   158k|  int fDecAndMapFrameData;
 1449|   158k|  int controlFlags;
 1450|       |
 1451|   158k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|   158k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1451:3): [True: 158k, False: 0]
  ------------------
 1452|   158k|  FDK_ASSERT(pControlFlags != NULL);
  ------------------
  |  |  221|   158k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1452:3): [True: 158k, False: 0]
  ------------------
 1453|   158k|  FDK_ASSERT(pcmOutBuf != NULL);
  ------------------
  |  |  221|   158k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1453:3): [True: 158k, False: 0]
  ------------------
 1454|   158k|  FDK_ASSERT(self->sacInDataHeadroom >= (1));
  ------------------
  |  |  221|   158k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1454:3): [True: 158k, False: 0]
  ------------------
 1455|       |
 1456|   158k|  self->errInt = err; /* Init internal error */
 1457|       |
 1458|   158k|  controlFlags = *pControlFlags;
 1459|       |
 1460|   158k|  if ((self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_USAC) &&
  ------------------
  |  |  532|   158k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (1460:7): [True: 121k, False: 37.4k]
  ------------------
 1461|   121k|      (self->stereoConfigIndex > 1)) {
  ------------------
  |  Branch (1461:7): [True: 15.8k, False: 105k]
  ------------------
 1462|  15.8k|    numInputChannels =
 1463|  15.8k|        1; /* Do not count residual channel as input channel. It is handled
 1464|       |              seperately. */
 1465|  15.8k|  }
 1466|       |
 1467|       |  /* Check if input amount of channels is consistent */
 1468|   158k|  if (numInputChannels != self->numInputChannels) {
  ------------------
  |  Branch (1468:7): [True: 0, False: 158k]
  ------------------
 1469|      0|    controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|      0|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1470|      0|    if (numInputChannels > self->createParams.maxNumInputChannels) {
  ------------------
  |  Branch (1470:9): [True: 0, False: 0]
  ------------------
 1471|      0|      return MPS_INVALID_PARAMETER;
 1472|      0|    }
 1473|      0|  }
 1474|       |
 1475|   158k|  self->timeOut__FDK = pcmOutBuf;
 1476|       |
 1477|       |  /* Determine local function control flags */
 1478|   158k|  fDecAndMapFrameData = frame->newBsData;
 1479|       |
 1480|   158k|  if (((fDecAndMapFrameData ==
  ------------------
  |  Branch (1480:8): [True: 61.6k, False: 97.2k]
  ------------------
 1481|   158k|        0) /* assures that conceal flag will not be set for blind mode */
 1482|  61.6k|       && (self->curTimeSlot + (int)nSamples / self->qmfBands >
  ------------------
  |  Branch (1482:11): [True: 60.1k, False: 1.42k]
  ------------------
 1483|  61.6k|           self->timeSlots)) ||
 1484|  98.6k|      (frame->numParameterSets ==
  ------------------
  |  Branch (1484:7): [True: 81, False: 98.5k]
  ------------------
 1485|  98.6k|       0)) { /* New input samples but missing side info */
 1486|  60.2k|    fDecAndMapFrameData = 1;
 1487|  60.2k|    controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|  60.2k|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1488|  60.2k|  }
 1489|       |
 1490|   158k|  if ((fDecAndMapFrameData == 0) &&
  ------------------
  |  Branch (1490:7): [True: 1.42k, False: 157k]
  ------------------
 1491|  1.42k|      (frame->paramSlot[fMax(0, frame->numParameterSets - 1)] !=
  ------------------
  |  Branch (1491:8): [True: 0, False: 1.42k]
  ------------------
 1492|  1.42k|           (self->timeSlots - 1) ||
 1493|  1.42k|       self->curTimeSlot >
  ------------------
  |  Branch (1493:8): [True: 0, False: 1.42k]
  ------------------
 1494|  1.42k|           frame->paramSlot[self->curPs])) { /* Detected faulty parameter slot
 1495|       |                                                data. */
 1496|      0|    fDecAndMapFrameData = 1;
 1497|      0|    controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|      0|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1498|      0|  }
 1499|       |
 1500|       |  /* Update concealment state machine */
 1501|   158k|  SpatialDecConcealment_UpdateState(
 1502|   158k|      &self->concealInfo,
 1503|   158k|      (controlFlags & MPEGS_CONCEAL)
  ------------------
  |  |  186|   158k|#define MPEGS_CONCEAL (0x00000002)
  ------------------
  |  Branch (1503:7): [True: 62.9k, False: 95.8k]
  ------------------
 1504|   158k|          ? 0
 1505|   158k|          : 1); /* convert from conceal flag to frame ok flag */
 1506|       |
 1507|   158k|  if (fDecAndMapFrameData) {
  ------------------
  |  Branch (1507:7): [True: 157k, False: 1.42k]
  ------------------
 1508|       |    /* Reset spatial framing control vars */
 1509|   157k|    frame->newBsData = 0;
 1510|   157k|    self->prevTimeSlot = -1;
 1511|   157k|    self->curTimeSlot = 0;
 1512|   157k|    self->curPs = 0;
 1513|       |
 1514|   157k|    if (controlFlags & MPEGS_CONCEAL) {
  ------------------
  |  |  186|   157k|#define MPEGS_CONCEAL (0x00000002)
  ------------------
  |  Branch (1514:9): [True: 61.5k, False: 95.8k]
  ------------------
 1515|       |      /* Reset frame data to avoid misconfiguration. */
 1516|  61.5k|      SpatialDecClearFrameData(self, frame, &self->createParams);
 1517|  61.5k|    }
 1518|       |
 1519|   157k|    {
 1520|   157k|      err = SpatialDecDecodeFrame(self, frame); /* input: ... */
 1521|       |      /* output: decodeAndMapFrameDATA */
 1522|   157k|    }
 1523|       |
 1524|   157k|    if (err != MPS_OK) {
  ------------------
  |  Branch (1524:9): [True: 0, False: 157k]
  ------------------
 1525|       |      /* Rescue strategy is to apply bypass mode in order
 1526|       |         to keep at least the downmix channels continuous. */
 1527|      0|      controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|      0|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1528|      0|      if (self->errInt == MPS_OK) {
  ------------------
  |  Branch (1528:11): [True: 0, False: 0]
  ------------------
 1529|       |        /* store internal error befor it gets overwritten */
 1530|      0|        self->errInt = err;
 1531|      0|      }
 1532|      0|    }
 1533|   157k|  }
 1534|       |
 1535|   158k|  err = SpatialDecApplyParameterSets(
 1536|   158k|      self, frame, inputMode, inData, qmfInDataReal, qmfInDataImag, nSamples,
 1537|   158k|      controlFlags | ((err == MPS_OK) ? 0 : MPEGS_BYPASSMODE), numInputChannels,
  ------------------
  |  |  185|      0|#define MPEGS_BYPASSMODE (0x00000001)
  ------------------
  |  Branch (1537:23): [True: 158k, False: 0]
  ------------------
 1538|   158k|      mapDescr);
 1539|   158k|  if (err != MPS_OK) {
  ------------------
  |  Branch (1539:7): [True: 0, False: 158k]
  ------------------
 1540|      0|    goto bail;
 1541|      0|  }
 1542|       |
 1543|   158k|bail:
 1544|       |
 1545|   158k|  *pControlFlags = controlFlags;
 1546|       |
 1547|   158k|  return err;
 1548|   158k|}
sac_dec.cpp:_ZL13isValidConfigPK17spatialDec_struct22SPATIAL_DEC_UPMIX_TYPEPK16SPATIALDEC_PARAM17AUDIO_OBJECT_TYPE:
  528|  51.2k|                         const AUDIO_OBJECT_TYPE coreAot) {
  529|  51.2k|  UPMIXTYPE nUpmixType;
  530|       |
  531|  51.2k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|  51.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (531:3): [True: 51.2k, False: 0]
  ------------------
  532|  51.2k|  FDK_ASSERT(pUserParams != NULL);
  ------------------
  |  |  221|  51.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (532:3): [True: 51.2k, False: 0]
  ------------------
  533|       |
  534|  51.2k|  nUpmixType = (UPMIXTYPE)upmixType;
  535|       |
  536|  51.2k|  switch (nUpmixType) {
  537|      0|    case UPMIXTYPE_BYPASS: /* UPMIX_TYPE_BYPASS */
  ------------------
  |  Branch (537:5): [True: 0, False: 51.2k]
  ------------------
  538|      0|      break;
  539|  51.2k|    case UPMIXTYPE_NORMAL: /* UPMIX_TYPE_NORMAL */
  ------------------
  |  Branch (539:5): [True: 51.2k, False: 0]
  ------------------
  540|  51.2k|      break;
  541|      0|    default:
  ------------------
  |  Branch (541:5): [True: 0, False: 51.2k]
  ------------------
  542|      0|      return 0; /* unsupported upmixType */
  543|  51.2k|  }
  544|       |
  545|  51.2k|  return 1; /* upmixType supported */
  546|  51.2k|}
sac_dec.cpp:_ZL23CheckLevelTreeUpmixTypePK22SACDEC_CREATION_PARAMSPK25T_SPATIAL_SPECIFIC_CONFIGi9UPMIXTYPE:
  551|  51.2k|    const UPMIXTYPE upmixType) {
  552|  51.2k|  SACDEC_ERROR err = MPS_OK;
  553|  51.2k|  int nOutputChannels, treeConfig;
  554|       |
  555|  51.2k|  FDK_ASSERT(pCreateParams != NULL);
  ------------------
  |  |  221|  51.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (555:3): [True: 51.2k, False: 0]
  ------------------
  556|  51.2k|  FDK_ASSERT(pSsc != NULL);
  ------------------
  |  |  221|  51.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (556:3): [True: 51.2k, False: 0]
  ------------------
  557|       |
  558|  51.2k|  treeConfig = pSsc->treeConfig;
  559|       |
  560|  51.2k|  switch (decoderLevel) {
  561|  51.2k|    case 0: {
  ------------------
  |  Branch (561:5): [True: 51.2k, False: 0]
  ------------------
  562|  51.2k|      if (treeConfig != SPATIALDEC_MODE_RSVD7) {
  ------------------
  |  Branch (562:11): [True: 0, False: 51.2k]
  ------------------
  563|      0|        err = MPS_INVALID_TREECONFIG;
  564|      0|        goto bail;
  565|      0|      }
  566|  51.2k|      break;
  567|  51.2k|    }
  568|  51.2k|    default:
  ------------------
  |  Branch (568:5): [True: 0, False: 51.2k]
  ------------------
  569|      0|      err = MPS_INVALID_PARAMETER /* MPS_UNIMPLEMENTED */;
  570|      0|      goto bail;
  571|  51.2k|  }
  572|       |
  573|  51.2k|  switch (upmixType) {
  574|      0|    case UPMIXTYPE_BYPASS:
  ------------------
  |  Branch (574:5): [True: 0, False: 51.2k]
  ------------------
  575|      0|      nOutputChannels = pSsc->nInputChannels;
  576|      0|      break;
  577|  51.2k|    default:
  ------------------
  |  Branch (577:5): [True: 51.2k, False: 0]
  ------------------
  578|  51.2k|      nOutputChannels = pSsc->nOutputChannels;
  579|  51.2k|      break;
  580|  51.2k|  }
  581|       |
  582|       |  /* Is sufficient memory allocated. */
  583|  51.2k|  if ((pSsc->nInputChannels > pCreateParams->maxNumInputChannels) ||
  ------------------
  |  Branch (583:7): [True: 0, False: 51.2k]
  ------------------
  584|  51.2k|      (nOutputChannels > pCreateParams->maxNumOutputChannels) ||
  ------------------
  |  Branch (584:7): [True: 0, False: 51.2k]
  ------------------
  585|  51.2k|      (pSsc->nOttBoxes > pCreateParams->maxNumOttBoxes)) {
  ------------------
  |  Branch (585:7): [True: 0, False: 51.2k]
  ------------------
  586|      0|    err = MPS_INVALID_PARAMETER;
  587|      0|  }
  588|       |
  589|  51.2k|bail:
  590|  51.2k|  return err;
  591|  51.2k|}
sac_dec.cpp:_ZL24SpatialDecClearFrameDataP17spatialDec_structP23SPATIAL_BS_FRAME_structPK22SACDEC_CREATION_PARAMS:
  181|  61.5k|    SPATIAL_BS_FRAME *bsFrame, const SACDEC_CREATION_PARAMS *const setup) {
  182|  61.5k|  int i;
  183|       |
  184|  61.5k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|  61.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (184:3): [True: 61.5k, False: 0]
  ------------------
  185|  61.5k|  FDK_ASSERT(bsFrame != NULL);
  ------------------
  |  |  221|  61.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (185:3): [True: 61.5k, False: 0]
  ------------------
  186|  61.5k|  FDK_ASSERT(setup != NULL);
  ------------------
  |  |  221|  61.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (186:3): [True: 61.5k, False: 0]
  ------------------
  187|       |
  188|       |  /* do not apply shaping tools (GES or STP) */
  189|   184k|  for (i = 0; i < setup->maxNumOutputChannels;
  ------------------
  |  Branch (189:15): [True: 123k, False: 61.5k]
  ------------------
  190|   123k|       i += 1) { /* MAX_OUTPUT_CHANNELS */
  191|   123k|    bsFrame->tempShapeEnableChannelSTP[i] = 0;
  192|   123k|    bsFrame->tempShapeEnableChannelGES[i] = 0;
  193|   123k|  }
  194|       |
  195|  61.5k|  bsFrame->TsdData->bsTsdEnable = 0;
  196|       |
  197|       |  /* use only 1 parameter set at the end of the frame */
  198|  61.5k|  bsFrame->numParameterSets = 1;
  199|  61.5k|  bsFrame->paramSlot[0] = self->timeSlots - 1;
  200|       |
  201|       |  /* parameter smoothing tool set to off */
  202|  61.5k|  bsFrame->bsSmoothMode[0] = 0;
  203|  61.5k|  initParameterSmoothing(self);
  204|       |
  205|       |  /* reset residual data */
  206|  61.5k|  {
  207|  61.5k|    int resQmfBands, resTimeSlots = (1);
  208|       |
  209|  61.5k|    resQmfBands = setup->maxNumQmfBands;
  210|       |
  211|   123k|    for (i = 0; i < setup->bProcResidual
  ------------------
  |  Branch (211:17): [True: 61.5k, False: 61.5k]
  |  Branch (211:17): [True: 61.5k, False: 61.5k]
  ------------------
  212|   123k|                    ? fMin(setup->maxNumResChannels,
  213|  61.5k|                           setup->maxNumOttBoxes + setup->maxNumInputChannels)
  214|   123k|                    : 0;
  215|  61.5k|         i += 1) {
  216|   123k|      for (int j = 0; j < resTimeSlots; j += 1) {
  ------------------
  |  Branch (216:23): [True: 61.5k, False: 61.5k]
  ------------------
  217|  4.00M|        for (int k = 0; k < resQmfBands; k += 1) {
  ------------------
  |  Branch (217:25): [True: 3.94M, False: 61.5k]
  ------------------
  218|  3.94M|          self->qmfResidualReal__FDK[i][j][k] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  3.94M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.94M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.94M, Folded]
  |  |  ------------------
  |  |  194|  3.94M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.94M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.94M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.94M]
  |  |  ------------------
  |  |  195|  3.94M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.94M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.94M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.94M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.94M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.94M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.94M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  219|  3.94M|          self->qmfResidualImag__FDK[i][j][k] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  3.94M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.94M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.94M, Folded]
  |  |  ------------------
  |  |  194|  3.94M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.94M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.94M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.94M]
  |  |  ------------------
  |  |  195|  3.94M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.94M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.94M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.94M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.94M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.94M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.94M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  220|  3.94M|        }
  221|  61.5k|      }
  222|  61.5k|    }
  223|  61.5k|  }
  224|       |
  225|  61.5k|  return;
  226|  61.5k|}
sac_dec.cpp:_ZL28SpatialDecApplyParameterSetsP17spatialDec_structPK23SPATIAL_BS_FRAME_struct21SPATIALDEC_INPUT_MODEPiPS5_S6_jjiPK19FDK_channelMapDescr:
 1140|   158k|    const FDK_channelMapDescr *const mapDescr) {
 1141|   158k|  SACDEC_ERROR err = MPS_OK;
 1142|       |
 1143|   158k|  FIXP_SGL alpha = FL2FXCONST_SGL(0.0);
  ------------------
  |  |  180|   158k|  (FIXP_SGL)(                                                                \
  |  |  181|   158k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 158k, Folded]
  |  |  ------------------
  |  |  182|   158k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   158k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   158k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 158k]
  |  |  ------------------
  |  |  183|   158k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   158k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   158k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   158k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   158k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   158k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   158k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1144|       |
 1145|   158k|  int ts;
 1146|   158k|  int ch;
 1147|   158k|  int hyb;
 1148|       |
 1149|   158k|  int prevSlot = self->prevTimeSlot;
 1150|   158k|  int ps = self->curPs;
 1151|   158k|  int ts_io = 0; /* i/o dependent slot */
 1152|   158k|  int bypassMode = (controlFlags & MPEGS_BYPASSMODE) ? 1 : 0;
  ------------------
  |  |  185|   158k|#define MPEGS_BYPASSMODE (0x00000001)
  ------------------
  |  Branch (1152:20): [True: 0, False: 158k]
  ------------------
 1153|       |
 1154|       |  /* Bypass can be triggered by the upmixType, too. */
 1155|   158k|  bypassMode |= ((self->upmixType == UPMIXTYPE_BYPASS) ? 1 : 0);
  ------------------
  |  Branch (1155:18): [True: 0, False: 158k]
  ------------------
 1156|       |
 1157|       |  /*
 1158|       |   * Decode available slots
 1159|       |   */
 1160|   158k|  for (ts = self->curTimeSlot;
 1161|  4.97M|       ts <= fixMin(self->curTimeSlot + (int)nSamples / self->qmfBands - 1,
  ------------------
  |  |  306|  4.97M|#define fixMin(a, b) fMin(a, b)
  ------------------
  |  Branch (1161:8): [True: 4.81M, False: 158k]
  ------------------
 1162|   158k|                    self->timeSlots - 1);
 1163|  4.81M|       ts++, ts_io++) {
 1164|  4.81M|    int currSlot = frame->paramSlot[ps];
 1165|       |
 1166|  4.81M|    err = (currSlot < ts) ? MPS_WRONG_PARAMETERSETS : MPS_OK;
  ------------------
  |  Branch (1166:11): [True: 0, False: 4.81M]
  ------------------
 1167|  4.81M|    if (err != MPS_OK) {
  ------------------
  |  Branch (1167:9): [True: 0, False: 4.81M]
  ------------------
 1168|      0|      err = SpatialDecSetInternalError(self, &bypassMode, err);
 1169|      0|    }
 1170|       |
 1171|       |    /*
 1172|       |     * Get new parameter set
 1173|       |     */
 1174|  4.81M|    if (ts == prevSlot + 1) {
  ------------------
  |  Branch (1174:9): [True: 213k, False: 4.59M]
  ------------------
 1175|   213k|      if (bypassMode == 0) {
  ------------------
  |  Branch (1175:11): [True: 213k, False: 0]
  ------------------
 1176|   213k|        err = SpatialDecCalculateM1andM2(
 1177|   213k|            self, ps, frame); /* input: ottCLD, ottICC, ... */
 1178|       |                              /* output: M1param(Real/Imag), M2(Real/Imag) */
 1179|   213k|        if (err != MPS_OK) {
  ------------------
  |  Branch (1179:13): [True: 0, False: 213k]
  ------------------
 1180|      0|          err = SpatialDecSetInternalError(self, &bypassMode, err);
 1181|      0|        }
 1182|   213k|      }
 1183|       |
 1184|   213k|      if ((ps == 0) && (self->bOverwriteM1M2prev != 0)) {
  ------------------
  |  Branch (1184:11): [True: 157k, False: 55.6k]
  |  Branch (1184:24): [True: 6.57k, False: 150k]
  ------------------
 1185|       |        /* copy matrix entries of M1/M2 of the first parameter set to the
 1186|       |           previous matrices (of the last frame). This avoids the interpolation
 1187|       |           of incompatible values. E.g. for residual bands the coefficients are
 1188|       |           calculated differently compared to non-residual bands.
 1189|       |         */
 1190|  6.57k|        SpatialDecBufferMatrices(self); /* input: M(1/2)param(Real/Imag) */
 1191|       |                                        /* output: M(1/2)param(Real/Imag)Prev */
 1192|  6.57k|        self->bOverwriteM1M2prev = 0;
 1193|  6.57k|      }
 1194|       |
 1195|   213k|      if (bypassMode == 0) {
  ------------------
  |  Branch (1195:11): [True: 213k, False: 0]
  ------------------
 1196|   213k|        SpatialDecSmoothM1andM2(
 1197|   213k|            self, frame,
 1198|   213k|            ps); /* input: M1param(Real/Imag)(Prev), M2(Real/Imag)(Prev) */
 1199|   213k|      }          /* output: M1param(Real/Imag), M2(Real/Imag) */
 1200|   213k|    }
 1201|       |
 1202|  4.81M|    if (bypassMode == 0) {
  ------------------
  |  Branch (1202:9): [True: 4.81M, False: 0]
  ------------------
 1203|  4.81M|      alpha = FX_DBL2FX_SGL(fDivNorm(ts - prevSlot, currSlot - prevSlot));
  ------------------
  |  |  220|  4.81M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  4.81M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  4.81M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1204|  4.81M|    }
 1205|       |
 1206|  4.81M|    switch (mode) {
 1207|  3.54M|      case INPUTMODE_QMF_SBR:
  ------------------
  |  Branch (1207:7): [True: 3.54M, False: 1.26M]
  ------------------
 1208|  3.54M|        if (self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD)
  ------------------
  |  |  536|  3.54M|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (1208:13): [True: 15.1k, False: 3.53M]
  ------------------
 1209|  15.1k|          self->bShareDelayWithSBR = 0; /* We got no hybrid delay */
 1210|  3.53M|        else
 1211|  3.53M|          self->bShareDelayWithSBR = 1;
 1212|  3.54M|        SpatialDecFeedQMF(
 1213|  3.54M|            self, qmfInDataReal, qmfInDataImag, ts_io, bypassMode,
 1214|  3.54M|            self->qmfInputReal__FDK, self->qmfInputImag__FDK,
 1215|  3.54M|            (bypassMode) ? numInputChannels : self->numInputChannels);
  ------------------
  |  Branch (1215:13): [True: 0, False: 3.54M]
  ------------------
 1216|  3.54M|        break;
 1217|  1.26M|      case INPUTMODE_TIME:
  ------------------
  |  Branch (1217:7): [True: 1.26M, False: 3.54M]
  ------------------
 1218|  1.26M|        self->bShareDelayWithSBR = 0;
 1219|  1.26M|        SpatialDecQMFAnalysis(
 1220|  1.26M|            self, inData, ts_io, bypassMode, self->qmfInputReal__FDK,
 1221|  1.26M|            self->qmfInputImag__FDK,
 1222|  1.26M|            (bypassMode) ? numInputChannels : self->numInputChannels);
  ------------------
  |  Branch (1222:13): [True: 0, False: 1.26M]
  ------------------
 1223|  1.26M|        break;
 1224|      0|      default:
  ------------------
  |  Branch (1224:7): [True: 0, False: 4.81M]
  ------------------
 1225|      0|        break;
 1226|  4.81M|    }
 1227|       |
 1228|  4.81M|    if ((self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_USAC) &&
  ------------------
  |  |  532|  4.81M|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (1228:9): [True: 4.22M, False: 584k]
  ------------------
 1229|  4.22M|        self->residualCoding) {
  ------------------
  |  Branch (1229:9): [True: 824k, False: 3.40M]
  ------------------
 1230|   824k|      int offset;
 1231|   824k|      ch = 1;
 1232|       |
 1233|   824k|      offset = self->pQmfDomain->globalConf.nBandsSynthesis *
 1234|   824k|               self->pQmfDomain->globalConf.nQmfTimeSlots;
 1235|       |
 1236|   824k|      {
 1237|   824k|        const PCM_MPS *inSamples =
 1238|   824k|            &inData[ts * self->pQmfDomain->globalConf.nBandsAnalysis];
 1239|       |
 1240|   824k|        CalculateSpaceAnalysisQmf(
 1241|   824k|            &self->pQmfDomain->QmfDomainIn[ch].fb, inSamples + (ch * offset),
 1242|   824k|            self->qmfResidualReal__FDK[0][0], self->qmfResidualImag__FDK[0][0]);
 1243|       |
 1244|   824k|        if (!isTwoChMode(self->upmixType) && !bypassMode) {
  ------------------
  |  Branch (1244:13): [True: 824k, False: 0]
  |  Branch (1244:46): [True: 824k, False: 0]
  ------------------
 1245|   824k|          int i;
 1246|   824k|          FIXP_DBL *RESTRICT self_qmfResidualReal__FDK_0_0 =
 1247|   824k|              &self->qmfResidualReal__FDK[0][0][0];
 1248|   824k|          FIXP_DBL *RESTRICT self_qmfResidualImag__FDK_0_0 =
 1249|   824k|              &self->qmfResidualImag__FDK[0][0][0];
 1250|       |
 1251|   824k|          if ((self->pQmfDomain->globalConf.nBandsAnalysis == 24) &&
  ------------------
  |  Branch (1251:15): [True: 132k, False: 692k]
  ------------------
 1252|   132k|              !(self->stereoConfigIndex == 3)) {
  ------------------
  |  Branch (1252:15): [True: 92.3k, False: 39.7k]
  ------------------
 1253|  6.00M|            for (i = 0; i < self->qmfBands; i++) {
  ------------------
  |  Branch (1253:25): [True: 5.91M, False: 92.3k]
  ------------------
 1254|  5.91M|              self_qmfResidualReal__FDK_0_0[i] =
 1255|  5.91M|                  fMult(scaleValueSaturate(self_qmfResidualReal__FDK_0_0[i],
 1256|  5.91M|                                           1 + self->sacInDataHeadroom - (1)),
 1257|  5.91M|                        self->clipProtectGain__FDK);
 1258|  5.91M|              self_qmfResidualImag__FDK_0_0[i] =
 1259|  5.91M|                  fMult(scaleValueSaturate(self_qmfResidualImag__FDK_0_0[i],
 1260|  5.91M|                                           1 + self->sacInDataHeadroom - (1)),
 1261|  5.91M|                        self->clipProtectGain__FDK);
 1262|  5.91M|            }
 1263|   731k|          } else {
 1264|  15.3M|            for (i = 0; i < self->qmfBands; i++) {
  ------------------
  |  Branch (1264:25): [True: 14.5M, False: 731k]
  ------------------
 1265|  14.5M|              self_qmfResidualReal__FDK_0_0[i] =
 1266|  14.5M|                  fMult(scaleValueSaturate(self_qmfResidualReal__FDK_0_0[i],
 1267|  14.5M|                                           self->sacInDataHeadroom - (1)),
 1268|  14.5M|                        self->clipProtectGain__FDK);
 1269|  14.5M|              self_qmfResidualImag__FDK_0_0[i] =
 1270|  14.5M|                  fMult(scaleValueSaturate(self_qmfResidualImag__FDK_0_0[i],
 1271|  14.5M|                                           self->sacInDataHeadroom - (1)),
 1272|  14.5M|                        self->clipProtectGain__FDK);
 1273|  14.5M|            }
 1274|   731k|          }
 1275|   824k|        }
 1276|   824k|      }
 1277|   824k|    }
 1278|       |
 1279|  4.81M|    SpatialDecHybridAnalysis(
 1280|  4.81M|        self, /* input: qmfInput(Real/Imag), qmfResidual(Real/Imag) */
 1281|  4.81M|        self->qmfInputReal__FDK, self->qmfInputImag__FDK,
 1282|  4.81M|        self->hybInputReal__FDK, self->hybInputImag__FDK, ts, numInputChannels);
 1283|       |
 1284|  4.81M|    if (bypassMode) {
  ------------------
  |  Branch (1284:9): [True: 0, False: 4.81M]
  ------------------
 1285|      0|      SpatialDecApplyBypass(
 1286|      0|          self, self->hybInputReal__FDK, /* input: hybInput(Real/Imag) */
 1287|      0|          self->hybInputImag__FDK,
 1288|      0|          self->hybOutputRealDry__FDK, /* output: hybOutput(Real/Imag)Dry */
 1289|      0|          self->hybOutputImagDry__FDK, numInputChannels);
 1290|      0|    } else /* !bypassMode */
 1291|  4.81M|    {
 1292|  4.81M|      FIXP_DBL *pxReal[MAX_NUM_XCHANNELS] = {NULL};
 1293|  4.81M|      FIXP_DBL *pxImag[MAX_NUM_XCHANNELS] = {NULL};
 1294|       |
 1295|  4.81M|      SpatialDecCreateX(self,
 1296|  4.81M|                        self->hybInputReal__FDK, /* input: hybInput(Real/Imag),
 1297|       |                                                    hybResidual(Real/Imag) */
 1298|  4.81M|                        self->hybInputImag__FDK, pxReal, pxImag);
 1299|       |
 1300|  4.81M|      {
 1301|  4.81M|        SpatialDecApplyM1_CreateW_Mode212(
 1302|  4.81M|            self, frame, pxReal, pxImag,
 1303|  4.81M|            self->wReal__FDK, /* output: w(Real/Imag) */
 1304|  4.81M|            self->wImag__FDK);
 1305|  4.81M|      }
 1306|  4.81M|      if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1306:11): [True: 0, False: 4.81M]
  ------------------
 1307|       |
 1308|  4.81M|      int applyM2Config = APPLY_M2_NONE;
 1309|       |
 1310|  4.81M|      applyM2Config = APPLY_M2;
 1311|  4.81M|      if ((self->pConfigCurrent->syntaxFlags &
  ------------------
  |  Branch (1311:11): [True: 4.22M, False: 584k]
  ------------------
 1312|  4.81M|           (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) &&
  ------------------
  |  |  532|  4.81M|#define SACDEC_SYNTAX_USAC 2
  ------------------
                         (SACDEC_SYNTAX_USAC | SACDEC_SYNTAX_RSVD50)) &&
  ------------------
  |  |  533|  4.81M|#define SACDEC_SYNTAX_RSVD50 4
  ------------------
 1313|  4.22M|          (self->tempShapeConfig != 1) && (self->tempShapeConfig != 2)) {
  ------------------
  |  Branch (1313:11): [True: 3.98M, False: 240k]
  |  Branch (1313:43): [True: 713k, False: 3.27M]
  ------------------
 1314|   713k|        if (self->phaseCoding == 3)
  ------------------
  |  Branch (1314:13): [True: 60.0k, False: 653k]
  ------------------
 1315|  60.0k|          applyM2Config = APPLY_M2_MODE212_Res_PhaseCoding;
 1316|   653k|        else
 1317|   653k|          applyM2Config = APPLY_M2_MODE212;
 1318|   713k|      }
 1319|       |
 1320|  4.81M|      switch (applyM2Config) {
 1321|   653k|        case APPLY_M2_MODE212: {
  ------------------
  |  Branch (1321:9): [True: 653k, False: 4.15M]
  ------------------
 1322|   653k|          err = SpatialDecApplyM2_Mode212(
 1323|   653k|              self, ps, alpha, self->wReal__FDK, self->wImag__FDK,
 1324|   653k|              self->hybOutputRealDry__FDK, self->hybOutputImagDry__FDK);
 1325|   653k|        } break;
 1326|  60.0k|        case APPLY_M2_MODE212_Res_PhaseCoding:
  ------------------
  |  Branch (1326:9): [True: 60.0k, False: 4.75M]
  ------------------
 1327|  60.0k|          err = SpatialDecApplyM2_Mode212_ResidualsPlusPhaseCoding(
 1328|  60.0k|              self, ps, alpha, self->wReal__FDK, self->wImag__FDK,
 1329|  60.0k|              self->hybOutputRealDry__FDK, self->hybOutputImagDry__FDK);
 1330|  60.0k|          break;
 1331|  4.09M|        case APPLY_M2:
  ------------------
  |  Branch (1331:9): [True: 4.09M, False: 713k]
  ------------------
 1332|  4.09M|          err = SpatialDecApplyM2(
 1333|  4.09M|              self, ps, alpha, self->wReal__FDK, self->wImag__FDK,
 1334|  4.09M|              self->hybOutputRealDry__FDK, self->hybOutputImagDry__FDK,
 1335|  4.09M|              self->hybOutputRealWet__FDK, self->hybOutputImagWet__FDK);
 1336|  4.09M|          break;
 1337|      0|        default:
  ------------------
  |  Branch (1337:9): [True: 0, False: 4.81M]
  ------------------
 1338|      0|          err = MPS_APPLY_M2_ERROR;
 1339|      0|          goto bail;
 1340|  4.81M|      }
 1341|       |
 1342|  4.81M|      if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1342:11): [True: 0, False: 4.81M]
  ------------------
 1343|       |
 1344|  4.81M|      if ((self->tempShapeConfig == 2) && (!isTwoChMode(self->upmixType))) {
  ------------------
  |  Branch (1344:11): [True: 3.32M, False: 1.48M]
  |  Branch (1344:43): [True: 3.32M, False: 0]
  ------------------
 1345|  3.32M|        SpatialDecReshapeBBEnv(self, frame,
 1346|  3.32M|                               ts); /* input: reshapeBBEnvState,
 1347|       |                                       hybOutput(Real/Imag)(Dry/Wet),
 1348|       |                                       hybInput(Real/Imag) */
 1349|  3.32M|      }                             /* output: hybOutput(Real/Imag)Dry */
 1350|       |
 1351|       |      /* Merge parts of the dry and wet QMF buffers. */
 1352|  4.81M|      if ((self->tempShapeConfig == 1) && (!isTwoChMode(self->upmixType))) {
  ------------------
  |  Branch (1352:11): [True: 626k, False: 4.18M]
  |  Branch (1352:43): [True: 626k, False: 0]
  ------------------
 1353|  1.87M|        for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (1353:22): [True: 1.25M, False: 626k]
  ------------------
 1354|  16.2M|          for (hyb = 0; hyb < self->tp_hybBandBorder; hyb++) {
  ------------------
  |  Branch (1354:25): [True: 15.0M, False: 1.25M]
  ------------------
 1355|  15.0M|            self->hybOutputRealDry__FDK[ch][hyb] =
 1356|  15.0M|                fAddSaturate(self->hybOutputRealDry__FDK[ch][hyb],
 1357|  15.0M|                             self->hybOutputRealWet__FDK[ch][hyb]);
 1358|  15.0M|            self->hybOutputImagDry__FDK[ch][hyb] =
 1359|  15.0M|                fAddSaturate(self->hybOutputImagDry__FDK[ch][hyb],
 1360|  15.0M|                             self->hybOutputImagWet__FDK[ch][hyb]);
 1361|  15.0M|          } /* loop hyb */
 1362|  1.25M|        }   /* loop ch */
 1363|   626k|        err = subbandTPApply(
 1364|   626k|            self, frame); /* input: hStpDec, hybOutput(Real/Imag)Dry/Wet */
 1365|       |                          /* output: hStpDec, hybOutput(Real/Imag)Dry */
 1366|   626k|        if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1366:13): [True: 0, False: 626k]
  ------------------
 1367|   626k|      } /* (self->tempShapeConfig == 1) */
 1368|  4.18M|      else {
 1369|       |        /* The wet signal is added to the dry signal in applyM2 if GES and STP
 1370|       |         * are disabled */
 1371|  4.18M|        if ((self->tempShapeConfig == 1) || (self->tempShapeConfig == 2)) {
  ------------------
  |  Branch (1371:13): [True: 0, False: 4.18M]
  |  Branch (1371:45): [True: 3.32M, False: 858k]
  ------------------
 1372|  3.32M|          int nHybBands;
 1373|  3.32M|          nHybBands = self->hybridBands;
 1374|       |
 1375|  9.98M|          for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (1375:24): [True: 6.65M, False: 3.32M]
  ------------------
 1376|  6.65M|            FIXP_DBL *RESTRICT pRealDry = self->hybOutputRealDry__FDK[ch];
 1377|  6.65M|            FIXP_DBL *RESTRICT pImagDry = self->hybOutputImagDry__FDK[ch];
 1378|  6.65M|            FIXP_DBL *RESTRICT pRealWet = self->hybOutputRealWet__FDK[ch];
 1379|  6.65M|            FIXP_DBL *RESTRICT pImagWet = self->hybOutputImagWet__FDK[ch];
 1380|   474M|            for (hyb = 0; hyb < nHybBands; hyb++) {
  ------------------
  |  Branch (1380:27): [True: 468M, False: 6.65M]
  ------------------
 1381|   468M|              pRealDry[hyb] = fAddSaturate(pRealDry[hyb], pRealWet[hyb]);
 1382|   468M|              pImagDry[hyb] = fAddSaturate(pImagDry[hyb], pImagWet[hyb]);
 1383|   468M|            } /* loop hyb */
 1384|  6.65M|            for (; hyb < self->hybridBands; hyb++) {
  ------------------
  |  Branch (1384:20): [True: 0, False: 6.65M]
  ------------------
 1385|      0|              pRealDry[hyb] = fAddSaturate(pRealDry[hyb], pRealWet[hyb]);
 1386|      0|            } /* loop hyb */
 1387|  6.65M|          }   /* loop ch */
 1388|  3.32M|        } /* ( self->tempShapeConfig == 1 ) || ( self->tempShapeConfig == 2 ) */
 1389|  4.18M|      }   /* !self->tempShapeConfig == 1 */
 1390|  4.81M|    }     /*  !bypassMode */
 1391|       |
 1392|  4.81M|    if ((self->phaseCoding == 1) && (bypassMode == 0)) {
  ------------------
  |  Branch (1392:9): [True: 350k, False: 4.46M]
  |  Branch (1392:37): [True: 350k, False: 0]
  ------------------
 1393|       |      /* only if bsPhaseCoding == 1 and bsResidualCoding == 0 */
 1394|       |
 1395|   350k|      SpatialDecApplyPhase(
 1396|   350k|          self, alpha, (ts == currSlot) /* signal the last slot of the set */
 1397|   350k|      );
 1398|   350k|    }
 1399|       |
 1400|       |    /*
 1401|       |     * Synthesis Filtering
 1402|       |     */
 1403|       |
 1404|  4.81M|    err = SpatialDecSynthesis(
 1405|  4.81M|        self, ts_io,
 1406|  4.81M|        self->hybOutputRealDry__FDK, /* input: hybOutput(Real/Imag)Dry */
 1407|  4.81M|        self->hybOutputImagDry__FDK, self->timeOut__FDK, /* output: timeOut */
 1408|  4.81M|        numInputChannels, mapDescr);
 1409|       |
 1410|  4.81M|    if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (1410:9): [True: 0, False: 4.81M]
  ------------------
 1411|       |
 1412|       |    /*
 1413|       |     * Update parameter buffer
 1414|       |     */
 1415|  4.81M|    if (ts == currSlot) {
  ------------------
  |  Branch (1415:9): [True: 199k, False: 4.61M]
  ------------------
 1416|   199k|      SpatialDecBufferMatrices(self); /* input: M(1/2)param(Real/Imag) */
 1417|       |                                      /* output: M(1/2)param(Real/Imag)Prev */
 1418|       |
 1419|   199k|      prevSlot = currSlot;
 1420|   199k|      ps++;
 1421|   199k|    } /* if (ts==currSlot) */
 1422|       |
 1423|  4.81M|  } /* ts loop */
 1424|       |
 1425|       |  /*
 1426|       |   * Save parameter states
 1427|       |   */
 1428|   158k|  self->prevTimeSlot = prevSlot;
 1429|   158k|  self->curTimeSlot = ts;
 1430|   158k|  self->curPs = ps;
 1431|       |
 1432|   158k|bail:
 1433|       |
 1434|   158k|  return err;
 1435|   158k|}

sac_dec.cpp:_ZL11isTwoChMode9UPMIXTYPE:
  178|  4.93M|static inline int isTwoChMode(UPMIXTYPE upmixType) {
  179|  4.93M|  int retval = 0;
  180|  4.93M|  return retval;
  181|  4.93M|}
sac_process.cpp:_ZL11isTwoChMode9UPMIXTYPE:
  178|  4.91M|static inline int isTwoChMode(UPMIXTYPE upmixType) {
  179|  4.91M|  int retval = 0;
  180|  4.91M|  return retval;
  181|  4.91M|}

_Z26SpatialDecConcealment_InitP25SpatialDecConcealmentInfoj:
  106|  31.2k|                                const UINT resetFlags) {
  107|  31.2k|  FDK_ASSERT(info != NULL);
  ------------------
  |  |  221|  31.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (107:3): [True: 31.2k, False: 0]
  ------------------
  108|       |
  109|  31.2k|  if (resetFlags & MPEGS_CONCEAL_RESET_STATE) {
  ------------------
  |  |  166|  31.2k|#define MPEGS_CONCEAL_RESET_STATE (0x01)
  ------------------
  |  Branch (109:7): [True: 31.2k, False: 0]
  ------------------
  110|  31.2k|    info->concealState = SpatialDecConcealState_Init;
  111|       |    /* Frame counters will be initialized implicitely in function
  112|       |     * SpatialDecConcealment_UpdateState(). */
  113|  31.2k|  }
  114|       |
  115|  31.2k|  if (resetFlags & MPEGS_CONCEAL_RESET_PARAMETER) {
  ------------------
  |  |  167|  31.2k|#define MPEGS_CONCEAL_RESET_PARAMETER (0x02)
  ------------------
  |  Branch (115:7): [True: 21.2k, False: 9.97k]
  ------------------
  116|       |    /* Set default params */
  117|  21.2k|    info->concealParams.method = MPEGS_CONCEAL_DEFAULT_METHOD;
  ------------------
  |  |  129|  21.2k|#define MPEGS_CONCEAL_DEFAULT_METHOD SAC_DEC_CONCEAL_BY_FADING_PARAMETERS
  ------------------
  118|  21.2k|    info->concealParams.numKeepFrames = MPEGS_CONCEAL_DEFAULT_NUM_KEEP_FRAMES;
  ------------------
  |  |  130|  21.2k|#define MPEGS_CONCEAL_DEFAULT_NUM_KEEP_FRAMES (10)
  ------------------
  119|  21.2k|    info->concealParams.numFadeOutFrames =
  120|  21.2k|        MPEGS_CONCEAL_DEFAULT_FADE_OUT_SLOPE_LENGTH;
  ------------------
  |  |  131|  21.2k|#define MPEGS_CONCEAL_DEFAULT_FADE_OUT_SLOPE_LENGTH (5)
  ------------------
  121|  21.2k|    info->concealParams.numFadeInFrames =
  122|  21.2k|        MPEGS_CONCEAL_DEFAULT_FADE_IN_SLOPE_LENGTH;
  ------------------
  |  |  132|  21.2k|#define MPEGS_CONCEAL_DEFAULT_FADE_IN_SLOPE_LENGTH (5)
  ------------------
  123|  21.2k|    info->concealParams.numReleaseFrames =
  124|  21.2k|        MPEGS_CONCEAL_DEFAULT_NUM_RELEASE_FRAMES;
  ------------------
  |  |  133|  21.2k|#define MPEGS_CONCEAL_DEFAULT_NUM_RELEASE_FRAMES (3)
  ------------------
  125|  21.2k|  }
  126|       |
  127|  31.2k|  return;
  128|  31.2k|}
_Z27SpatialDecConcealment_ApplyP25SpatialDecConcealmentInfoPA28_KaPPaS4_S4_iiaii:
  138|   326k|    const SCHAR defaultValue, const int paramType, const int numParamSets) {
  139|   326k|  int appliedProcessing = 0;
  140|   326k|  int band, dataMode = -1;
  141|       |
  142|   326k|  FDK_ASSERT(info != NULL);
  ------------------
  |  |  221|   326k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (142:3): [True: 326k, False: 0]
  ------------------
  143|   326k|  FDK_ASSERT(cmpIdxData != NULL);
  ------------------
  |  |  221|   326k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (143:3): [True: 326k, False: 0]
  ------------------
  144|   326k|  FDK_ASSERT(idxPrev != NULL);
  ------------------
  |  |  221|   326k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (144:3): [True: 326k, False: 0]
  ------------------
  145|   326k|  FDK_ASSERT(bsXXXDataMode != NULL);
  ------------------
  |  |  221|   326k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (145:3): [True: 326k, False: 0]
  ------------------
  146|       |
  147|       |  /* Processing depends only on the internal state */
  148|   326k|  switch (info->concealState) {
  149|  80.0k|    case SpatialDecConcealState_Init:
  ------------------
  |  Branch (149:5): [True: 80.0k, False: 246k]
  ------------------
  150|  80.0k|      dataMode = 0; /* default */
  151|  80.0k|      break;
  152|       |
  153|   198k|    case SpatialDecConcealState_Ok:
  ------------------
  |  Branch (153:5): [True: 198k, False: 127k]
  ------------------
  154|       |      /* Nothing to do */
  155|   198k|      break;
  156|       |
  157|  36.5k|    case SpatialDecConcealState_Keep:
  ------------------
  |  Branch (157:5): [True: 36.5k, False: 290k]
  ------------------
  158|  36.5k|      dataMode = 1; /* keep */
  159|  36.5k|      break;
  160|       |
  161|  3.66k|    case SpatialDecConcealState_FadeToDefault: {
  ------------------
  |  Branch (161:5): [True: 3.66k, False: 322k]
  ------------------
  162|       |      /* Start simple fade out */
  163|  3.66k|      FIXP_DBL fac = fDivNorm(info->cntStateFrames + 1,
  164|  3.66k|                              info->concealParams.numFadeOutFrames + 1);
  165|       |
  166|  65.6k|      for (band = startBand; band < stopBand; band += 1) {
  ------------------
  |  Branch (166:30): [True: 61.9k, False: 3.66k]
  ------------------
  167|       |        /*            idxPrev = fac * defaultValue + (1-fac) * idxPrev; */
  168|  61.9k|        idxPrev[band] =
  169|  61.9k|            fMultI(fac, defaultValue - idxPrev[band]) + idxPrev[band];
  170|  61.9k|      }
  171|  3.66k|      dataMode = 1; /* keep */
  172|  3.66k|      appliedProcessing = 1;
  173|  3.66k|    } break;
  174|       |
  175|  5.94k|    case SpatialDecConcealState_Default:
  ------------------
  |  Branch (175:5): [True: 5.94k, False: 320k]
  ------------------
  176|  97.1k|      for (band = startBand; band < stopBand; band += 1) {
  ------------------
  |  Branch (176:30): [True: 91.1k, False: 5.94k]
  ------------------
  177|  91.1k|        idxPrev[band] = defaultValue;
  178|  91.1k|      }
  179|  5.94k|      dataMode = 1; /* keep */
  180|  5.94k|      appliedProcessing = 1;
  181|  5.94k|      break;
  182|       |
  183|  1.50k|    case SpatialDecConcealState_FadeFromDefault: {
  ------------------
  |  Branch (183:5): [True: 1.50k, False: 325k]
  ------------------
  184|  1.50k|      FIXP_DBL fac = fDivNorm(info->cntValidFrames + 1,
  185|  1.50k|                              info->concealParams.numFadeInFrames + 1);
  186|       |
  187|  29.0k|      for (band = startBand; band < stopBand; band += 1) {
  ------------------
  |  Branch (187:30): [True: 27.5k, False: 1.50k]
  ------------------
  188|       |        /*            idxPrev = fac * cmpIdxData + (1-fac) * defaultValue; */
  189|  27.5k|        idxPrev[band] =
  190|  27.5k|            fMultI(fac, cmpIdxData[numParamSets - 1][band] - defaultValue) +
  191|  27.5k|            defaultValue;
  192|  27.5k|      }
  193|  1.50k|      dataMode = 1; /* keep */
  194|  1.50k|      appliedProcessing = 1;
  195|  1.50k|    } break;
  196|       |
  197|      0|    default:
  ------------------
  |  Branch (197:5): [True: 0, False: 326k]
  ------------------
  198|      0|      FDK_ASSERT(0); /* All valid states shall be handled above. */
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (198:7): [Folded, False: 0]
  ------------------
  199|      0|      break;
  200|   326k|  }
  201|       |
  202|   326k|  if (dataMode >= 0) {
  ------------------
  |  Branch (202:7): [True: 127k, False: 198k]
  ------------------
  203|   127k|    int i;
  204|   255k|    for (i = 0; i < numParamSets; i += 1) {
  ------------------
  |  Branch (204:17): [True: 128k, False: 127k]
  ------------------
  205|   128k|      bsXXXDataMode[i] = dataMode;
  206|   128k|      if (diffIdxData != NULL) {
  ------------------
  |  Branch (206:11): [True: 44.6k, False: 83.5k]
  ------------------
  207|   513k|        for (band = startBand; band < stopBand; band += 1) {
  ------------------
  |  Branch (207:32): [True: 468k, False: 44.6k]
  ------------------
  208|   468k|          diffIdxData[i][band] = 0;
  209|   468k|        }
  210|  44.6k|      }
  211|   128k|    }
  212|   127k|  }
  213|       |
  214|   326k|  return appliedProcessing;
  215|   326k|}
_Z33SpatialDecConcealment_UpdateStateP25SpatialDecConcealmentInfoi:
  218|   158k|                                       const int frameOk) {
  219|   158k|  FDK_ASSERT(info != NULL);
  ------------------
  |  |  221|   158k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (219:3): [True: 158k, False: 0]
  ------------------
  220|       |
  221|   158k|  if (frameOk) {
  ------------------
  |  Branch (221:7): [True: 95.8k, False: 62.9k]
  ------------------
  222|  95.8k|    info->cntValidFrames += 1;
  223|  95.8k|  } else {
  224|  62.9k|    info->cntValidFrames = 0;
  225|  62.9k|  }
  226|       |
  227|   158k|  switch (info->concealState) {
  228|  44.7k|    case SpatialDecConcealState_Init:
  ------------------
  |  Branch (228:5): [True: 44.7k, False: 114k]
  ------------------
  229|  44.7k|      if (frameOk) {
  ------------------
  |  Branch (229:11): [True: 3.81k, False: 40.8k]
  ------------------
  230|       |        /* NEXT STATE: Ok */
  231|  3.81k|        info->concealState = SpatialDecConcealState_Ok;
  232|  3.81k|        info->cntStateFrames = 0;
  233|  3.81k|      }
  234|  44.7k|      break;
  235|       |
  236|  94.4k|    case SpatialDecConcealState_Ok:
  ------------------
  |  Branch (236:5): [True: 94.4k, False: 64.4k]
  ------------------
  237|  94.4k|      if (!frameOk) {
  ------------------
  |  Branch (237:11): [True: 12.6k, False: 81.7k]
  ------------------
  238|       |        /* NEXT STATE: Keep */
  239|  12.6k|        info->concealState = SpatialDecConcealState_Keep;
  240|  12.6k|        info->cntStateFrames = 0;
  241|  12.6k|      }
  242|  94.4k|      break;
  243|       |
  244|  14.3k|    case SpatialDecConcealState_Keep:
  ------------------
  |  Branch (244:5): [True: 14.3k, False: 144k]
  ------------------
  245|  14.3k|      info->cntStateFrames += 1;
  246|  14.3k|      if (frameOk) {
  ------------------
  |  Branch (246:11): [True: 9.39k, False: 5.00k]
  ------------------
  247|       |        /* NEXT STATE: Ok */
  248|  9.39k|        info->concealState = SpatialDecConcealState_Ok;
  249|  9.39k|      } else {
  250|  5.00k|        if (info->cntStateFrames >= info->concealParams.numKeepFrames) {
  ------------------
  |  Branch (250:13): [True: 308, False: 4.69k]
  ------------------
  251|    308|          if (info->concealParams.numFadeOutFrames == 0) {
  ------------------
  |  Branch (251:15): [True: 0, False: 308]
  ------------------
  252|       |            /* NEXT STATE: Default */
  253|      0|            info->concealState = SpatialDecConcealState_Default;
  254|    308|          } else {
  255|       |            /* NEXT STATE: Fade to default */
  256|    308|            info->concealState = SpatialDecConcealState_FadeToDefault;
  257|    308|            info->cntStateFrames = 0;
  258|    308|          }
  259|    308|        }
  260|  5.00k|      }
  261|  14.3k|      break;
  262|       |
  263|  1.67k|    case SpatialDecConcealState_FadeToDefault:
  ------------------
  |  Branch (263:5): [True: 1.67k, False: 157k]
  ------------------
  264|  1.67k|      info->cntStateFrames += 1;
  265|  1.67k|      if (info->cntValidFrames > 0) {
  ------------------
  |  Branch (265:11): [True: 184, False: 1.49k]
  ------------------
  266|       |        /* NEXT STATE: Fade in from default */
  267|    184|        info->concealState = SpatialDecConcealState_FadeFromDefault;
  268|    184|        info->cntStateFrames = 0;
  269|  1.49k|      } else {
  270|  1.49k|        if (info->cntStateFrames >= info->concealParams.numFadeOutFrames) {
  ------------------
  |  Branch (270:13): [True: 260, False: 1.23k]
  ------------------
  271|       |          /* NEXT STATE: Default */
  272|    260|          info->concealState = SpatialDecConcealState_Default;
  273|    260|        }
  274|  1.49k|      }
  275|  1.67k|      break;
  276|       |
  277|  2.95k|    case SpatialDecConcealState_Default:
  ------------------
  |  Branch (277:5): [True: 2.95k, False: 155k]
  ------------------
  278|  2.95k|      if (info->cntValidFrames > 0) {
  ------------------
  |  Branch (278:11): [True: 181, False: 2.77k]
  ------------------
  279|    181|        if (info->concealParams.numFadeInFrames == 0) {
  ------------------
  |  Branch (279:13): [True: 0, False: 181]
  ------------------
  280|       |          /* NEXT STATE: Ok */
  281|      0|          info->concealState = SpatialDecConcealState_Ok;
  282|    181|        } else {
  283|       |          /* NEXT STATE: Fade in from default */
  284|    181|          info->concealState = SpatialDecConcealState_FadeFromDefault;
  285|    181|          info->cntValidFrames = 0;
  286|    181|        }
  287|    181|      }
  288|  2.95k|      break;
  289|       |
  290|    705|    case SpatialDecConcealState_FadeFromDefault:
  ------------------
  |  Branch (290:5): [True: 705, False: 158k]
  ------------------
  291|    705|      info->cntValidFrames += 1;
  292|    705|      if (frameOk) {
  ------------------
  |  Branch (292:11): [True: 528, False: 177]
  ------------------
  293|    528|        if (info->cntValidFrames >= info->concealParams.numFadeInFrames) {
  ------------------
  |  Branch (293:13): [True: 176, False: 352]
  ------------------
  294|       |          /* NEXT STATE: Ok */
  295|    176|          info->concealState = SpatialDecConcealState_Ok;
  296|    176|        }
  297|    528|      } else {
  298|       |        /* NEXT STATE: Fade to default */
  299|    177|        info->concealState = SpatialDecConcealState_FadeToDefault;
  300|    177|        info->cntStateFrames = 0;
  301|    177|      }
  302|    705|      break;
  303|       |
  304|      0|    default:
  ------------------
  |  Branch (304:5): [True: 0, False: 158k]
  ------------------
  305|      0|      FDK_ASSERT(0); /* All valid states should be handled above! */
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (305:7): [Folded, False: 0]
  ------------------
  306|      0|      break;
  307|   158k|  }
  308|   158k|}
_Z30SpatialDecConcealment_SetParamP25SpatialDecConcealmentInfo21SAC_DEC_CONCEAL_PARAMi:
  312|  49.8k|                                            const INT value) {
  313|  49.8k|  SACDEC_ERROR err = MPS_OK;
  314|       |
  315|  49.8k|  switch (param) {
  316|  9.97k|    case SAC_DEC_CONCEAL_METHOD:
  ------------------
  |  Branch (316:5): [True: 9.97k, False: 39.9k]
  ------------------
  317|  9.97k|      switch ((SpatialDecConcealmentMethod)value) {
  318|      0|        case SAC_DEC_CONCEAL_WITH_ZERO_VALUED_OUTPUT:
  ------------------
  |  Branch (318:9): [True: 0, False: 9.97k]
  ------------------
  319|  9.97k|        case SAC_DEC_CONCEAL_BY_FADING_PARAMETERS:
  ------------------
  |  Branch (319:9): [True: 9.97k, False: 0]
  ------------------
  320|  9.97k|          break;
  321|      0|        default:
  ------------------
  |  Branch (321:9): [True: 0, False: 9.97k]
  ------------------
  322|      0|          err = MPS_INVALID_PARAMETER;
  323|      0|          goto bail;
  324|  9.97k|      }
  325|  9.97k|      if (self != NULL) {
  ------------------
  |  Branch (325:11): [True: 9.97k, False: 0]
  ------------------
  326|       |        /* store parameter value */
  327|  9.97k|        self->concealParams.method = (SpatialDecConcealmentMethod)value;
  328|  9.97k|      } else {
  329|      0|        err = MPS_INVALID_HANDLE;
  330|      0|        goto bail;
  331|      0|      }
  332|  9.97k|      break;
  333|  9.97k|    case SAC_DEC_CONCEAL_NUM_KEEP_FRAMES:
  ------------------
  |  Branch (333:5): [True: 9.97k, False: 39.9k]
  ------------------
  334|  9.97k|      if (value < 0) {
  ------------------
  |  Branch (334:11): [True: 0, False: 9.97k]
  ------------------
  335|      0|        err = MPS_INVALID_PARAMETER;
  336|      0|        goto bail;
  337|      0|      }
  338|  9.97k|      if (self != NULL) {
  ------------------
  |  Branch (338:11): [True: 9.97k, False: 0]
  ------------------
  339|       |        /* store parameter value */
  340|  9.97k|        self->concealParams.numKeepFrames = (UINT)value;
  341|  9.97k|      } else {
  342|      0|        err = MPS_INVALID_HANDLE;
  343|      0|        goto bail;
  344|      0|      }
  345|  9.97k|      break;
  346|  9.97k|    case SAC_DEC_CONCEAL_FADE_OUT_SLOPE_LENGTH:
  ------------------
  |  Branch (346:5): [True: 9.97k, False: 39.9k]
  ------------------
  347|  9.97k|      if (value < 0) {
  ------------------
  |  Branch (347:11): [True: 0, False: 9.97k]
  ------------------
  348|      0|        err = MPS_INVALID_PARAMETER;
  349|      0|        goto bail;
  350|      0|      }
  351|  9.97k|      if (self != NULL) {
  ------------------
  |  Branch (351:11): [True: 9.97k, False: 0]
  ------------------
  352|       |        /* store parameter value */
  353|  9.97k|        self->concealParams.numFadeOutFrames = (UINT)value;
  354|  9.97k|      } else {
  355|      0|        err = MPS_INVALID_HANDLE;
  356|      0|        goto bail;
  357|      0|      }
  358|  9.97k|      break;
  359|  9.97k|    case SAC_DEC_CONCEAL_FADE_IN_SLOPE_LENGTH:
  ------------------
  |  Branch (359:5): [True: 9.97k, False: 39.9k]
  ------------------
  360|  9.97k|      if (value < 0) {
  ------------------
  |  Branch (360:11): [True: 0, False: 9.97k]
  ------------------
  361|      0|        err = MPS_INVALID_PARAMETER;
  362|      0|        goto bail;
  363|      0|      }
  364|  9.97k|      if (self != NULL) {
  ------------------
  |  Branch (364:11): [True: 9.97k, False: 0]
  ------------------
  365|       |        /* store parameter value */
  366|  9.97k|        self->concealParams.numFadeInFrames = (UINT)value;
  367|  9.97k|      } else {
  368|      0|        err = MPS_INVALID_HANDLE;
  369|      0|        goto bail;
  370|      0|      }
  371|  9.97k|      break;
  372|  9.97k|    case SAC_DEC_CONCEAL_NUM_RELEASE_FRAMES:
  ------------------
  |  Branch (372:5): [True: 9.97k, False: 39.9k]
  ------------------
  373|  9.97k|      if (value < 0) {
  ------------------
  |  Branch (373:11): [True: 0, False: 9.97k]
  ------------------
  374|      0|        err = MPS_INVALID_PARAMETER;
  375|      0|        goto bail;
  376|      0|      }
  377|  9.97k|      if (self != NULL) {
  ------------------
  |  Branch (377:11): [True: 9.97k, False: 0]
  ------------------
  378|       |        /* store parameter value */
  379|  9.97k|        self->concealParams.numReleaseFrames = (UINT)value;
  380|  9.97k|      } else {
  381|      0|        err = MPS_INVALID_HANDLE;
  382|      0|        goto bail;
  383|      0|      }
  384|  9.97k|      break;
  385|  9.97k|    default:
  ------------------
  |  Branch (385:5): [True: 0, False: 49.8k]
  ------------------
  386|      0|      err = MPS_INVALID_PARAMETER;
  387|      0|      goto bail;
  388|  49.8k|  }
  389|       |
  390|  49.8k|bail:
  391|  49.8k|  return err;
  392|  49.8k|}

mpegSurroundDecoder_IsFullMpegSurroundDecoderInstanceAvailable:
  378|  2.47k|    CMpegSurroundDecoder *pMpegSurroundDecoder) {
  379|  2.47k|  SAC_INSTANCE_AVAIL instanceAvailable = SAC_INSTANCE_NOT_FULL_AVAILABLE;
  380|       |
  381|  2.47k|  if (pMpegSurroundDecoder->pSpatialDec != NULL) {
  ------------------
  |  Branch (381:7): [True: 1.53k, False: 946]
  ------------------
  382|  1.53k|    instanceAvailable = SAC_INSTANCE_FULL_AVAILABLE;
  383|  1.53k|  }
  384|       |
  385|  2.47k|  return instanceAvailable;
  386|  2.47k|}
mpegSurroundDecoder_Open:
  390|  44.0k|    HANDLE_FDK_QMF_DOMAIN pQmfDomain) {
  391|  44.0k|  SACDEC_ERROR error;
  392|       |
  393|  44.0k|  error = mpegSurroundDecoder_Create(pMpegSurroundDecoder, stereoConfigIndex,
  394|  44.0k|                                     pQmfDomain);
  395|       |
  396|  44.0k|  return error;
  397|  44.0k|}
mpegSurroundDecoder_Config:
  704|   175k|    INT configBytes, const UCHAR configMode, UCHAR *configChanged) {
  705|   175k|  SACDEC_ERROR err = MPS_OK;
  706|   175k|  INT nInputChannels;
  707|   175k|  SPATIAL_SPECIFIC_CONFIG spatialSpecificConfig;
  708|   175k|  SPATIAL_SPECIFIC_CONFIG *pSsc =
  709|   175k|      &pMpegSurroundDecoder->spatialSpecificConfigBackup;
  710|       |
  711|   175k|  switch (coreCodec) {
  712|      0|    case AOT_DRM_USAC:
  ------------------
  |  Branch (712:5): [True: 0, False: 175k]
  ------------------
  713|  79.6k|    case AOT_USAC:
  ------------------
  |  Branch (713:5): [True: 79.6k, False: 95.4k]
  ------------------
  714|  79.6k|      if (configMode == AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  79.6k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (714:11): [True: 49.9k, False: 29.6k]
  ------------------
  715|       |        /* In config detection mode write spatial specific config parameters
  716|       |         * into temporarily allocated structure */
  717|  49.9k|        err = SpatialDecParseMps212Config(
  718|  49.9k|            hBs, &spatialSpecificConfig, samplingRate, coreCodec,
  719|  49.9k|            stereoConfigIndex, coreSbrFrameLengthIndex);
  720|  49.9k|        nInputChannels = spatialSpecificConfig.nInputChannels;
  721|  49.9k|        pSsc = &spatialSpecificConfig;
  722|  49.9k|      } else {
  723|  29.6k|        err = SpatialDecParseMps212Config(
  724|  29.6k|            hBs, &pMpegSurroundDecoder->spatialSpecificConfigBackup,
  725|  29.6k|            samplingRate, coreCodec, stereoConfigIndex,
  726|  29.6k|            coreSbrFrameLengthIndex);
  727|  29.6k|        nInputChannels =
  728|  29.6k|            pMpegSurroundDecoder->spatialSpecificConfigBackup.nInputChannels;
  729|  29.6k|      }
  730|  79.6k|      if ((err == MPS_OK) && (numChannels != nInputChannels)) {
  ------------------
  |  Branch (730:11): [True: 76.9k, False: 2.63k]
  |  Branch (730:30): [True: 0, False: 76.9k]
  ------------------
  731|      0|        err = MPS_PARSE_ERROR;
  732|      0|      }
  733|  79.6k|      break;
  734|  92.7k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (734:5): [True: 92.7k, False: 82.3k]
  ------------------
  735|  92.7k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (735:5): [True: 0, False: 175k]
  ------------------
  736|  92.7k|      if (configMode == AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  92.7k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (736:11): [True: 75.5k, False: 17.2k]
  ------------------
  737|       |        /* In config detection mode write spatial specific config parameters
  738|       |         * into temporarily allocated structure */
  739|  75.5k|        err = SpatialDecParseSpecificConfig(hBs, &spatialSpecificConfig,
  740|  75.5k|                                            configBytes, coreCodec);
  741|  75.5k|        nInputChannels = spatialSpecificConfig.nInputChannels;
  742|  75.5k|        pSsc = &spatialSpecificConfig;
  743|  75.5k|      } else {
  744|  17.2k|        err = SpatialDecParseSpecificConfig(
  745|  17.2k|            hBs, &pMpegSurroundDecoder->spatialSpecificConfigBackup,
  746|  17.2k|            configBytes, coreCodec);
  747|  17.2k|        nInputChannels =
  748|  17.2k|            pMpegSurroundDecoder->spatialSpecificConfigBackup.nInputChannels;
  749|  17.2k|      }
  750|       |      /* check number of channels for channel_configuration > 0  */
  751|  92.7k|      if ((err == MPS_OK) && (numChannels > 0) &&
  ------------------
  |  Branch (751:11): [True: 45.0k, False: 47.7k]
  |  Branch (751:30): [True: 45.0k, False: 0]
  ------------------
  752|  45.0k|          (numChannels != nInputChannels)) {
  ------------------
  |  Branch (752:11): [True: 298, False: 44.7k]
  ------------------
  753|    298|        err = MPS_PARSE_ERROR;
  754|    298|      }
  755|  92.7k|      break;
  756|  2.72k|    default:
  ------------------
  |  Branch (756:5): [True: 2.72k, False: 172k]
  ------------------
  757|  2.72k|      err = MPS_UNSUPPORTED_FORMAT;
  758|  2.72k|      break;
  759|   175k|  }
  760|       |
  761|   175k|  if (err != MPS_OK) {
  ------------------
  |  Branch (761:7): [True: 53.3k, False: 121k]
  ------------------
  762|  53.3k|    goto bail;
  763|  53.3k|  }
  764|       |
  765|   121k|  err = sscCheckOutOfBand(pSsc, coreCodec, samplingRate, frameSize);
  766|       |
  767|   121k|  if (err != MPS_OK) {
  ------------------
  |  Branch (767:7): [True: 13.6k, False: 108k]
  ------------------
  768|  13.6k|    goto bail;
  769|  13.6k|  }
  770|       |
  771|   108k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   108k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (771:7): [True: 67.7k, False: 40.3k]
  ------------------
  772|  67.7k|    return err;
  773|  67.7k|  }
  774|       |
  775|  40.3k|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  40.3k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (775:7): [True: 40.3k, False: 0]
  ------------------
  776|  40.3k|    if (*configChanged) {
  ------------------
  |  Branch (776:9): [True: 21.2k, False: 19.1k]
  ------------------
  777|  21.2k|      err = mpegSurroundDecoder_Open(&pMpegSurroundDecoder, stereoConfigIndex,
  778|  21.2k|                                     NULL);
  779|  21.2k|      if (err) {
  ------------------
  |  Branch (779:11): [True: 0, False: 21.2k]
  ------------------
  780|      0|        return err;
  781|      0|      }
  782|  21.2k|    }
  783|  40.3k|  }
  784|       |
  785|  40.3k|  {
  786|  40.3k|    SPATIAL_SPECIFIC_CONFIG *sscParse =
  787|  40.3k|        &pMpegSurroundDecoder
  788|  40.3k|             ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameParse];
  789|       |
  790|  40.3k|    if (FDK_SpatialDecCompareSpatialSpecificConfigHeader(
  ------------------
  |  Branch (790:9): [True: 29.1k, False: 11.2k]
  ------------------
  791|  40.3k|            &pMpegSurroundDecoder->spatialSpecificConfigBackup, sscParse)) {
  792|  29.1k|      pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameParse] |=
  793|  29.1k|          MPEGS_INIT_CHANGE_HEADER;
  794|       |      /* Error resilience code */
  795|  29.1k|      if (pMpegSurroundDecoder->pSpatialDec == NULL) {
  ------------------
  |  Branch (795:11): [True: 665, False: 28.4k]
  ------------------
  796|    665|        err = MPS_NOTOK;
  797|    665|        goto bail;
  798|    665|      }
  799|  28.4k|      SpatialDecInitParserContext(pMpegSurroundDecoder->pSpatialDec);
  800|  28.4k|      pMpegSurroundDecoder->pSpatialDec->pConfigCurrent =
  801|  28.4k|          &pMpegSurroundDecoder
  802|  28.4k|               ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameDecode];
  803|  28.4k|    }
  804|  40.3k|  }
  805|       |
  806|  39.7k|  if (err == MPS_OK) {
  ------------------
  |  Branch (806:7): [True: 39.7k, False: 0]
  ------------------
  807|       |    /* We got a valid out-of-band configuration so label it accordingly. */
  808|  39.7k|    pMpegSurroundDecoder->mpegSurroundSscIsGlobalCfg = 1;
  809|  39.7k|  }
  810|       |
  811|   107k|bail:
  812|   107k|  return err;
  813|  39.7k|}
_Z14checkTimeSlotsiii:
  928|  4.64k|SACDEC_ERROR checkTimeSlots(int frameLength, int qmfBands, int timeSlots) {
  929|  4.64k|  int len;
  930|  4.64k|  int maxFrameLength;
  931|       |
  932|  4.64k|  if (qmfBands == 64) {
  ------------------
  |  Branch (932:7): [True: 383, False: 4.26k]
  ------------------
  933|       |    /* normal MPEG Surround */
  934|    383|    switch (frameLength) {
  935|      0|      case 960:
  ------------------
  |  Branch (935:7): [True: 0, False: 383]
  ------------------
  936|      0|      case 1920:
  ------------------
  |  Branch (936:7): [True: 0, False: 383]
  ------------------
  937|      0|        maxFrameLength = 3840;
  938|      0|        break;
  939|      0|      case 1024:
  ------------------
  |  Branch (939:7): [True: 0, False: 383]
  ------------------
  940|      0|      case 2048:
  ------------------
  |  Branch (940:7): [True: 0, False: 383]
  ------------------
  941|      0|        maxFrameLength = 4096;
  942|      0|        break;
  943|    303|      case 512:
  ------------------
  |  Branch (943:7): [True: 303, False: 80]
  ------------------
  944|    303|      case 1152:
  ------------------
  |  Branch (944:7): [True: 0, False: 383]
  ------------------
  945|    303|        maxFrameLength = 4608;
  946|    303|        break;
  947|     80|      default:
  ------------------
  |  Branch (947:7): [True: 80, False: 303]
  ------------------
  948|     80|        return MPS_PARSE_ERROR;
  949|    383|    }
  950|  4.26k|  } else if (qmfBands == 32) {
  ------------------
  |  Branch (950:14): [True: 3.77k, False: 491]
  ------------------
  951|       |    /* downsampled MPEG Surround */
  952|  3.77k|    switch (frameLength) {
  953|      0|      case 960:
  ------------------
  |  Branch (953:7): [True: 0, False: 3.77k]
  ------------------
  954|      0|      case 1920:
  ------------------
  |  Branch (954:7): [True: 0, False: 3.77k]
  ------------------
  955|      0|        maxFrameLength = 1920;
  956|      0|        break;
  957|  3.73k|      case 512:
  ------------------
  |  Branch (957:7): [True: 3.73k, False: 37]
  ------------------
  958|  3.73k|      case 1024:
  ------------------
  |  Branch (958:7): [True: 0, False: 3.77k]
  ------------------
  959|  3.73k|      case 2048:
  ------------------
  |  Branch (959:7): [True: 0, False: 3.77k]
  ------------------
  960|  3.73k|        maxFrameLength = 2048;
  961|  3.73k|        break;
  962|      0|      case 1152:
  ------------------
  |  Branch (962:7): [True: 0, False: 3.77k]
  ------------------
  963|      0|        maxFrameLength = 2304;
  964|      0|        break;
  965|     37|      default:
  ------------------
  |  Branch (965:7): [True: 37, False: 3.73k]
  ------------------
  966|     37|        return MPS_PARSE_ERROR;
  967|  3.77k|    }
  968|  3.77k|  } else if (qmfBands == 128) {
  ------------------
  |  Branch (968:14): [True: 491, False: 0]
  ------------------
  969|       |    /* upsampled MPEG Surround */
  970|    491|    switch (frameLength) {
  971|      0|      case 1920:
  ------------------
  |  Branch (971:7): [True: 0, False: 491]
  ------------------
  972|      0|        maxFrameLength = 7680;
  973|      0|        break;
  974|      0|      case 1024:
  ------------------
  |  Branch (974:7): [True: 0, False: 491]
  ------------------
  975|      0|        maxFrameLength = 9216;
  976|      0|        break;
  977|      0|      case 2048:
  ------------------
  |  Branch (977:7): [True: 0, False: 491]
  ------------------
  978|      0|        maxFrameLength = 8192;
  979|      0|        break;
  980|    441|      case 512:
  ------------------
  |  Branch (980:7): [True: 441, False: 50]
  ------------------
  981|    441|      case 960:
  ------------------
  |  Branch (981:7): [True: 0, False: 491]
  ------------------
  982|    441|      case 1152:
  ------------------
  |  Branch (982:7): [True: 0, False: 491]
  ------------------
  983|       |      /* no break, no support for upsampled MPEG Surround */
  984|    491|      default:
  ------------------
  |  Branch (984:7): [True: 50, False: 441]
  ------------------
  985|    491|        return MPS_PARSE_ERROR;
  986|    491|    }
  987|    491|  } else {
  988|      0|    return MPS_PARSE_ERROR;
  989|      0|  }
  990|       |
  991|  4.03k|  len = frameLength;
  992|       |
  993|  10.8k|  while (len <= maxFrameLength) {
  ------------------
  |  Branch (993:10): [True: 10.4k, False: 420]
  ------------------
  994|  10.4k|    if (len == timeSlots * qmfBands) {
  ------------------
  |  Branch (994:9): [True: 3.61k, False: 6.79k]
  ------------------
  995|  3.61k|      return MPS_OK;
  996|  3.61k|    }
  997|  6.79k|    len += frameLength;
  998|  6.79k|  }
  999|    420|  return MPS_PARSE_ERROR;
 1000|  4.03k|}
mpegSurroundDecoder_ConfigureQmfDomain:
 1053|  5.33k|    AUDIO_OBJECT_TYPE coreCodec) {
 1054|  5.33k|  SACDEC_ERROR err = MPS_OK;
 1055|  5.33k|  FDK_QMF_DOMAIN_GC *pGC = NULL;
 1056|       |
 1057|  5.33k|  if (pMpegSurroundDecoder == NULL) {
  ------------------
  |  Branch (1057:7): [True: 0, False: 5.33k]
  ------------------
 1058|      0|    return MPS_INVALID_HANDLE;
 1059|      0|  }
 1060|       |
 1061|  5.33k|  FDK_ASSERT(pMpegSurroundDecoder->pSpatialDec);
  ------------------
  |  |  221|  5.33k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1061:3): [True: 5.33k, False: 0]
  ------------------
 1062|       |
 1063|  5.33k|  pGC = &pMpegSurroundDecoder->pQmfDomain->globalConf;
 1064|  5.33k|  if (pMpegSurroundDecoder->mpegSurroundSscIsGlobalCfg) {
  ------------------
  |  Branch (1064:7): [True: 4.12k, False: 1.20k]
  ------------------
 1065|  4.12k|    SPATIAL_SPECIFIC_CONFIG *pSSC =
 1066|  4.12k|        &pMpegSurroundDecoder->spatialSpecificConfigBackup;
 1067|  4.12k|    if (sac_dec_interface == SAC_INTERFACE_TIME) {
  ------------------
  |  Branch (1067:9): [True: 3.49k, False: 634]
  ------------------
 1068|       |      /* For SAC_INTERFACE_QMF these parameters are set by SBR. */
 1069|  3.49k|      pGC->nBandsAnalysis_requested = mpegSurroundDecoder_GetNrOfQmfBands(
 1070|  3.49k|          pSSC, coreSamplingRate); /* coreSamplingRate == outputSamplingRate for
 1071|       |                                      SAC_INTERFACE_TIME */
 1072|  3.49k|      pGC->nBandsSynthesis_requested = pGC->nBandsAnalysis_requested;
 1073|  3.49k|      pGC->nInputChannels_requested =
 1074|  3.49k|          fMax((UINT)pSSC->nInputChannels, (UINT)pGC->nInputChannels_requested);
 1075|  3.49k|    }
 1076|  4.12k|    pGC->nOutputChannels_requested =
 1077|  4.12k|        fMax((UINT)pSSC->nOutputChannels, (UINT)pGC->nOutputChannels_requested);
 1078|  4.12k|  } else {
 1079|  1.20k|    if (sac_dec_interface == SAC_INTERFACE_TIME) {
  ------------------
  |  Branch (1079:9): [True: 1.20k, False: 0]
  ------------------
 1080|       |      /* For SAC_INTERFACE_QMF these parameters are set by SBR. */
 1081|  1.20k|      pGC->nBandsAnalysis_requested = mpegSurroundDecoder_GetNrOfQmfBands(
 1082|  1.20k|          NULL, coreSamplingRate); /* coreSamplingRate == outputSamplingRate for
 1083|       |                                      SAC_INTERFACE_TIME */
 1084|  1.20k|      pGC->nBandsSynthesis_requested = pGC->nBandsAnalysis_requested;
 1085|  1.20k|      pGC->nInputChannels_requested =
 1086|  1.20k|          pMpegSurroundDecoder->pSpatialDec->createParams.maxNumInputChannels;
 1087|  1.20k|    }
 1088|  1.20k|    pGC->nOutputChannels_requested =
 1089|  1.20k|        pMpegSurroundDecoder->pSpatialDec->createParams.maxNumOutputChannels;
 1090|  1.20k|  }
 1091|  5.33k|  pGC->nQmfProcBands_requested = 64;
 1092|  5.33k|  pGC->nQmfProcChannels_requested =
 1093|  5.33k|      fMin((INT)pGC->nInputChannels_requested,
 1094|  5.33k|           pMpegSurroundDecoder->pSpatialDec->createParams.maxNumInputChannels);
 1095|       |
 1096|  5.33k|  if (coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1096:7): [True: 5.33k, False: 0]
  ------------------
 1097|  5.33k|    pGC->flags_requested |= QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|  5.33k|#define QMF_FLAG_MPSLDFB 16
  ------------------
 1098|  5.33k|    pGC->flags_requested &= ~QMF_FLAG_CLDFB;
  ------------------
  |  |  133|  5.33k|#define QMF_FLAG_CLDFB 4
  ------------------
 1099|  5.33k|  }
 1100|       |
 1101|  5.33k|  return err;
 1102|  5.33k|}
mpegSurroundDecoder_ParseNoHeader:
 1186|  96.9k|    int *pMpsDataBits, int fGlobalIndependencyFlag) {
 1187|  96.9k|  SACDEC_ERROR err = MPS_OK;
 1188|  96.9k|  SPATIAL_SPECIFIC_CONFIG *sscParse;
 1189|  96.9k|  int bitsAvail, numSacBits;
 1190|       |
 1191|  96.9k|  if (pMpegSurroundDecoder == NULL || hBs == NULL) {
  ------------------
  |  Branch (1191:7): [True: 0, False: 96.9k]
  |  Branch (1191:39): [True: 0, False: 96.9k]
  ------------------
 1192|      0|    return MPS_INVALID_HANDLE;
 1193|      0|  }
 1194|       |
 1195|  96.9k|  sscParse = &pMpegSurroundDecoder
 1196|  96.9k|                  ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameParse];
 1197|       |
 1198|  96.9k|  bitsAvail = FDKgetValidBits(hBs);
 1199|       |
 1200|       |  /* First spatial specific config is parsed into spatialSpecificConfigBackup,
 1201|       |   * second spatialSpecificConfigBackup is copied into
 1202|       |   * spatialSpecificConfig[bsFrameDecode] */
 1203|  96.9k|  if (pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameParse]) {
  ------------------
  |  Branch (1203:7): [True: 13.9k, False: 83.0k]
  ------------------
 1204|  13.9k|    FDKmemcpy(sscParse, &pMpegSurroundDecoder->spatialSpecificConfigBackup,
 1205|  13.9k|              sizeof(SPATIAL_SPECIFIC_CONFIG));
 1206|  13.9k|    pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameParse] =
 1207|  13.9k|        MPEGS_SYNC_FOUND;
 1208|  13.9k|  }
 1209|       |
 1210|  96.9k|  if (bitsAvail <= 0) {
  ------------------
  |  Branch (1210:7): [True: 1, False: 96.9k]
  ------------------
 1211|      1|    err = MPS_PARSE_ERROR;
 1212|  96.9k|  } else {
 1213|  96.9k|    err = SpatialDecParseFrameData(
 1214|  96.9k|        pMpegSurroundDecoder->pSpatialDec,
 1215|  96.9k|        &pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameParse],
 1216|  96.9k|        hBs, sscParse, (UPMIXTYPE)pMpegSurroundDecoder->upmixType,
 1217|  96.9k|        fGlobalIndependencyFlag);
 1218|  96.9k|    if (err == MPS_OK) {
  ------------------
  |  Branch (1218:9): [True: 96.8k, False: 163]
  ------------------
 1219|  96.8k|      pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameParse]
 1220|  96.8k|          .newBsData = 1;
 1221|  96.8k|    }
 1222|  96.9k|  }
 1223|       |
 1224|  96.9k|  numSacBits = bitsAvail - (INT)FDKgetValidBits(hBs);
 1225|       |
 1226|  96.9k|  if (numSacBits > bitsAvail) {
  ------------------
  |  Branch (1226:7): [True: 271, False: 96.7k]
  ------------------
 1227|    271|    pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameParse]
 1228|    271|        .newBsData = 0;
 1229|    271|    err = MPS_PARSE_ERROR;
 1230|    271|  }
 1231|       |
 1232|  96.9k|  *pMpsDataBits -= numSacBits;
 1233|       |
 1234|  96.9k|  return err;
 1235|  96.9k|}
mpegSurroundDecoder_Parse:
 1304|  34.1k|                              int frameSize, int fGlobalIndependencyFlag) {
 1305|  34.1k|  SACDEC_ERROR err = MPS_OK;
 1306|  34.1k|  SPATIAL_SPECIFIC_CONFIG *sscParse;
 1307|  34.1k|  SPATIAL_BS_FRAME *bsFrame;
 1308|  34.1k|  HANDLE_FDK_BITSTREAM hMpsBsData = NULL;
 1309|  34.1k|  FDK_BITSTREAM mpsBsData;
 1310|  34.1k|  int mpsDataBits = *pMpsDataBits;
 1311|  34.1k|  int mpsBsBits;
 1312|  34.1k|  MPEGS_ANCTYPE ancType;
 1313|  34.1k|  MPEGS_ANCSTARTSTOP ancStartStop;
 1314|       |
 1315|  34.1k|  if (pMpegSurroundDecoder == NULL) {
  ------------------
  |  Branch (1315:7): [True: 0, False: 34.1k]
  ------------------
 1316|      0|    return MPS_INVALID_HANDLE;
 1317|      0|  }
 1318|       |
 1319|  34.1k|  FDK_ASSERT(pMpegSurroundDecoder->pSpatialDec);
  ------------------
  |  |  221|  34.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1319:3): [True: 34.1k, False: 0]
  ------------------
 1320|       |
 1321|  34.1k|  mpsBsBits = (INT)FDKgetValidBits(hBs);
 1322|       |
 1323|  34.1k|  sscParse = &pMpegSurroundDecoder
 1324|  34.1k|                  ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameParse];
 1325|  34.1k|  bsFrame = &pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameParse];
 1326|       |
 1327|       |  /*
 1328|       |     Find operation mode of mpeg surround decoder:
 1329|       |     - MPEGS_OPMODE_EMM:            Mode: Enhanced Matrix Mode (Blind)
 1330|       |     - MPEGS_OPMODE_MPS_PAYLOAD:    Mode: Normal, Stereo or Binaural
 1331|       |     - MPEGS_OPMODE_NO_MPS_PAYLOAD: Mode: No MpegSurround Payload
 1332|       |  */
 1333|  34.1k|  {
 1334|       |    /* Parse ancType and ancStartStop */
 1335|  34.1k|    ancType = (MPEGS_ANCTYPE)FDKreadBits(hBs, 2);
 1336|  34.1k|    ancStartStop = (MPEGS_ANCSTARTSTOP)FDKreadBits(hBs, 2);
 1337|  34.1k|    mpsDataBits -= 4;
 1338|       |
 1339|       |    /* Set valid anc type flag, if ancType signals a payload with either header
 1340|       |     * and frame or frame */
 1341|  34.1k|    if (isValidAncType(pMpegSurroundDecoder, ancType)) {
  ------------------
  |  Branch (1341:9): [True: 24.3k, False: 9.80k]
  ------------------
 1342|       |      /* Set valid anc startstop flag, if transmitted sequence is not illegal */
 1343|  24.3k|      if (isValidAncStartStop(pMpegSurroundDecoder, ancStartStop)) {
  ------------------
  |  Branch (1343:11): [True: 20.0k, False: 4.29k]
  ------------------
 1344|  20.0k|        switch (ancStartStop) {
 1345|  3.46k|          case MPEGS_START:
  ------------------
  |  Branch (1345:11): [True: 3.46k, False: 16.5k]
  ------------------
 1346|       |            /* Assuming that core coder frame size (AAC) is smaller than MPS
 1347|       |               coder frame size. Save audio data for next frame. */
 1348|  3.46k|            if (mpsDataBits > MPS_DATA_BUFFER_SIZE * 8) {
  ------------------
  |  |  109|  3.46k|#define MPS_DATA_BUFFER_SIZE (2048)
  ------------------
  |  Branch (1348:17): [True: 1, False: 3.46k]
  ------------------
 1349|      1|              err = MPS_NOTOK;
 1350|      1|              goto bail;
 1351|      1|            }
 1352|  16.5k|            for (int i = 0; i < mpsDataBits / 8; i++) {
  ------------------
  |  Branch (1352:29): [True: 13.0k, False: 3.46k]
  ------------------
 1353|  13.0k|              pMpegSurroundDecoder->mpsData[i] = FDKreadBits(hBs, 8);
 1354|  13.0k|            }
 1355|  3.46k|            pMpegSurroundDecoder->mpsDataBits = mpsDataBits;
 1356|  3.46k|            break;
 1357|       |
 1358|  2.83k|          case MPEGS_CONTINUE:
  ------------------
  |  Branch (1358:11): [True: 2.83k, False: 17.2k]
  ------------------
 1359|  5.65k|          case MPEGS_STOP:
  ------------------
  |  Branch (1359:11): [True: 2.82k, False: 17.2k]
  ------------------
 1360|       |            /* Assuming that core coder frame size (AAC) is smaller than MPS
 1361|       |               coder frame size. Save audio data for next frame. */
 1362|  5.65k|            if ((pMpegSurroundDecoder->mpsDataBits + mpsDataBits) >
  ------------------
  |  Branch (1362:17): [True: 11, False: 5.64k]
  ------------------
 1363|  5.65k|                MPS_DATA_BUFFER_SIZE * 8) {
  ------------------
  |  |  109|  5.65k|#define MPS_DATA_BUFFER_SIZE (2048)
  ------------------
 1364|     11|              err = MPS_NOTOK;
 1365|     11|              goto bail;
 1366|     11|            }
 1367|  17.7k|            for (int i = 0; i < mpsDataBits / 8; i++) {
  ------------------
  |  Branch (1367:29): [True: 12.1k, False: 5.64k]
  ------------------
 1368|  12.1k|              pMpegSurroundDecoder
 1369|  12.1k|                  ->mpsData[(pMpegSurroundDecoder->mpsDataBits / 8) + i] =
 1370|  12.1k|                  FDKreadBits(hBs, 8);
 1371|  12.1k|            }
 1372|  5.64k|            pMpegSurroundDecoder->mpsDataBits += mpsDataBits;
 1373|  5.64k|            FDKinitBitStream(&mpsBsData, pMpegSurroundDecoder->mpsData,
 1374|  5.64k|                             MAX_BUFSIZE_BYTES,
  ------------------
  |  |  110|  5.64k|#define MAX_BUFSIZE_BYTES (0x10000000)
  ------------------
 1375|  5.64k|                             pMpegSurroundDecoder->mpsDataBits, BS_READER);
 1376|  5.64k|            hMpsBsData = &mpsBsData;
 1377|  5.64k|            break;
 1378|       |
 1379|  10.9k|          case MPEGS_START_STOP:
  ------------------
  |  Branch (1379:11): [True: 10.9k, False: 9.11k]
  ------------------
 1380|  10.9k|            pMpegSurroundDecoder->mpsDataBits = mpsDataBits;
 1381|  10.9k|            hMpsBsData = hBs;
 1382|  10.9k|            break;
 1383|       |
 1384|      0|          default:
  ------------------
  |  Branch (1384:11): [True: 0, False: 20.0k]
  ------------------
 1385|      0|            FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1385:13): [Folded, False: 0]
  ------------------
 1386|  20.0k|        }
 1387|       |
 1388|  20.0k|        if ((ancStartStop == MPEGS_STOP) ||
  ------------------
  |  Branch (1388:13): [True: 2.81k, False: 17.2k]
  ------------------
 1389|  17.2k|            (ancStartStop == MPEGS_START_STOP)) {
  ------------------
  |  Branch (1389:13): [True: 10.9k, False: 6.28k]
  ------------------
 1390|  13.7k|          switch (ancType) {
 1391|  6.02k|            case MPEGS_ANCTYPE_HEADER_AND_FRAME: {
  ------------------
  |  Branch (1391:13): [True: 6.02k, False: 7.71k]
  ------------------
 1392|  6.02k|              int parseResult, bitsRead;
 1393|  6.02k|              SPATIAL_SPECIFIC_CONFIG spatialSpecificConfigTmp =
 1394|  6.02k|                  pMpegSurroundDecoder->spatialSpecificConfigBackup;
 1395|       |
 1396|       |              /* Parse spatial specific config */
 1397|  6.02k|              bitsRead = (INT)FDKgetValidBits(hMpsBsData);
 1398|       |
 1399|  6.02k|              err = SpatialDecParseSpecificConfigHeader(
 1400|  6.02k|                  hMpsBsData,
 1401|  6.02k|                  &pMpegSurroundDecoder->spatialSpecificConfigBackup, coreCodec,
 1402|  6.02k|                  pMpegSurroundDecoder->upmixType);
 1403|       |
 1404|  6.02k|              bitsRead = (bitsRead - (INT)FDKgetValidBits(hMpsBsData));
 1405|  6.02k|              parseResult = ((err == MPS_OK) ? bitsRead : -bitsRead);
  ------------------
  |  Branch (1405:30): [True: 4.64k, False: 1.37k]
  ------------------
 1406|       |
 1407|  6.02k|              if (parseResult < 0) {
  ------------------
  |  Branch (1407:19): [True: 1.37k, False: 4.64k]
  ------------------
 1408|  1.37k|                parseResult = -parseResult;
 1409|  1.37k|                err = MPS_PARSE_ERROR;
 1410|  4.64k|              } else if (err == MPS_OK) {
  ------------------
  |  Branch (1410:26): [True: 4.64k, False: 0]
  ------------------
 1411|       |                /* Check SSC for consistency (e.g. bit errors could cause
 1412|       |                 * trouble) */
 1413|  4.64k|                err = sscCheckInBand(
 1414|  4.64k|                    &pMpegSurroundDecoder->spatialSpecificConfigBackup,
 1415|  4.64k|                    frameSize, sampleRate);
 1416|  4.64k|              }
 1417|  6.02k|              if (err != MPS_OK) {
  ------------------
  |  Branch (1417:19): [True: 2.45k, False: 3.56k]
  ------------------
 1418|  2.45k|                pMpegSurroundDecoder->spatialSpecificConfigBackup =
 1419|  2.45k|                    spatialSpecificConfigTmp;
 1420|  2.45k|                break;
 1421|  2.45k|              }
 1422|       |
 1423|  3.56k|              pMpegSurroundDecoder->mpsDataBits -= parseResult;
 1424|       |
 1425|       |              /* Initiate re-initialization, if header has changed */
 1426|  3.56k|              if (FDK_SpatialDecCompareSpatialSpecificConfigHeader(
  ------------------
  |  Branch (1426:19): [True: 3.07k, False: 492]
  ------------------
 1427|  3.56k|                      &pMpegSurroundDecoder->spatialSpecificConfigBackup,
 1428|  3.56k|                      sscParse) == MPS_UNEQUAL_SSC) {
 1429|  3.07k|                pMpegSurroundDecoder
 1430|  3.07k|                    ->initFlags[pMpegSurroundDecoder->bsFrameParse] |=
 1431|  3.07k|                    MPEGS_INIT_CHANGE_HEADER;
 1432|  3.07k|                SpatialDecInitParserContext(pMpegSurroundDecoder->pSpatialDec);
 1433|       |                /* We found a valid in-band configuration. Therefore any
 1434|       |                 * previous config is invalid now. */
 1435|  3.07k|                pMpegSurroundDecoder->mpegSurroundSscIsGlobalCfg = 0;
 1436|  3.07k|              }
 1437|  3.56k|            }
 1438|  3.56k|              FDK_FALLTHROUGH;
  ------------------
  |  |  386|  3.56k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1439|  11.2k|            case MPEGS_ANCTYPE_FRAME:
  ------------------
  |  Branch (1439:13): [True: 7.71k, False: 6.02k]
  ------------------
 1440|       |
 1441|  11.2k|              if (pMpegSurroundDecoder
  ------------------
  |  Branch (1441:19): [True: 4.33k, False: 6.94k]
  ------------------
 1442|  11.2k|                      ->initFlags[pMpegSurroundDecoder->bsFrameParse] &
 1443|  11.2k|                  MPEGS_INIT_ERROR_PAYLOAD) {
 1444|  4.33k|                err = MPS_PARSE_ERROR;
 1445|  4.33k|                break;
 1446|  4.33k|              }
 1447|       |
 1448|       |              /* First spatial specific config is parsed into
 1449|       |               * spatialSpecificConfigBackup, second spatialSpecificConfigBackup
 1450|       |               * is copied into spatialSpecificConfig[bsFrameDecode] */
 1451|  6.94k|              if (pMpegSurroundDecoder
  ------------------
  |  Branch (1451:19): [True: 2.07k, False: 4.87k]
  ------------------
 1452|  6.94k|                      ->initFlags[pMpegSurroundDecoder->bsFrameParse]) {
 1453|  2.07k|                FDKmemcpy(sscParse,
 1454|  2.07k|                          &pMpegSurroundDecoder->spatialSpecificConfigBackup,
 1455|  2.07k|                          sizeof(SPATIAL_SPECIFIC_CONFIG));
 1456|  2.07k|                pMpegSurroundDecoder
 1457|  2.07k|                    ->fOnSync[pMpegSurroundDecoder->bsFrameParse] =
 1458|  2.07k|                    MPEGS_SYNC_FOUND;
 1459|  2.07k|              }
 1460|       |
 1461|  6.94k|              if (pMpegSurroundDecoder
  ------------------
  |  Branch (1461:19): [True: 6.91k, False: 34]
  ------------------
 1462|  6.94k|                      ->fOnSync[pMpegSurroundDecoder->bsFrameParse] >=
 1463|  6.94k|                  MPEGS_SYNC_FOUND) {
 1464|  6.91k|                int nbits = 0, bitsAvail;
 1465|       |
 1466|  6.91k|                if (err != MPS_OK) {
  ------------------
  |  Branch (1466:21): [True: 0, False: 6.91k]
  ------------------
 1467|      0|                  break;
 1468|      0|                }
 1469|       |
 1470|  6.91k|                bitsAvail = FDKgetValidBits(hMpsBsData);
 1471|       |
 1472|  6.91k|                if (bitsAvail <= 0) {
  ------------------
  |  Branch (1472:21): [True: 63, False: 6.85k]
  ------------------
 1473|     63|                  err = MPS_PARSE_ERROR;
 1474|  6.85k|                } else {
 1475|  6.85k|                  err = SpatialDecParseFrameData(
 1476|  6.85k|                      pMpegSurroundDecoder->pSpatialDec, bsFrame, hMpsBsData,
 1477|  6.85k|                      sscParse, (UPMIXTYPE)pMpegSurroundDecoder->upmixType,
 1478|  6.85k|                      fGlobalIndependencyFlag);
 1479|  6.85k|                  if (err == MPS_OK) {
  ------------------
  |  Branch (1479:23): [True: 2.62k, False: 4.22k]
  ------------------
 1480|  2.62k|                    bsFrame->newBsData = 1;
 1481|  2.62k|                  }
 1482|  6.85k|                }
 1483|       |
 1484|  6.91k|                nbits = bitsAvail - (INT)FDKgetValidBits(hMpsBsData);
 1485|       |
 1486|  6.91k|                if ((nbits > bitsAvail) ||
  ------------------
  |  Branch (1486:21): [True: 1.86k, False: 5.05k]
  ------------------
 1487|  5.05k|                    (nbits > pMpegSurroundDecoder->mpsDataBits) ||
  ------------------
  |  Branch (1487:21): [True: 3.38k, False: 1.66k]
  ------------------
 1488|  1.66k|                    (pMpegSurroundDecoder->mpsDataBits > nbits + 7 &&
  ------------------
  |  Branch (1488:22): [True: 1.29k, False: 371]
  ------------------
 1489|  5.24k|                     !IS_LOWDELAY(coreCodec))) {
  ------------------
  |  |  228|  1.29k|#define IS_LOWDELAY(aot) ((aot) == AOT_ER_AAC_LD || (aot) == AOT_ER_AAC_ELD)
  |  |  ------------------
  |  |  |  Branch (228:27): [True: 0, False: 1.29k]
  |  |  |  Branch (228:53): [True: 1.29k, False: 0]
  |  |  ------------------
  ------------------
 1490|  5.24k|                  bsFrame->newBsData = 0;
 1491|  5.24k|                  err = MPS_PARSE_ERROR;
 1492|  5.24k|                  break;
 1493|  5.24k|                }
 1494|  1.66k|                pMpegSurroundDecoder->mpsDataBits -= nbits;
 1495|  1.66k|              }
 1496|  1.70k|              break;
 1497|       |
 1498|  1.70k|            default: /* added to avoid compiler warning */
  ------------------
  |  Branch (1498:13): [True: 0, False: 13.7k]
  ------------------
 1499|      0|              err = MPS_NOTOK;
 1500|      0|              break; /* added to avoid compiler warning */
 1501|  13.7k|          }          /* switch (ancType) */
 1502|       |
 1503|  13.7k|          if (err == MPS_OK) {
  ------------------
  |  Branch (1503:15): [True: 618, False: 13.1k]
  ------------------
 1504|    618|            pMpegSurroundDecoder->ancStartStopPrev = ancStartStop;
 1505|  13.1k|          } else {
 1506|  13.1k|            updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
 1507|  13.1k|                                            MPEGS_INIT_ERROR_PAYLOAD,
 1508|  13.1k|                                            MPEGS_SYNC_LOST, MPEGS_STOP);
 1509|  13.1k|            pMpegSurroundDecoder->mpsDataBits = 0;
 1510|  13.1k|          }
 1511|  13.7k|        } /* (ancStartStop == MPEGS_STOP) || (ancStartStop == MPEGS_START_STOP)
 1512|       |           */
 1513|  20.0k|      }   /* validAncStartStop */
 1514|  24.3k|    }     /* validAncType */
 1515|  34.1k|  }
 1516|       |
 1517|  34.1k|bail:
 1518|       |
 1519|  34.1k|  *pMpsDataBits -= (mpsBsBits - (INT)FDKgetValidBits(hBs));
 1520|       |
 1521|  34.1k|  return err;
 1522|  34.1k|}
mpegSurroundDecoder_Apply:
 1532|   158k|                              const INT inDataHeadroom, INT *outDataHeadroom) {
 1533|   158k|  SACDEC_ERROR err = MPS_OK;
 1534|   158k|  PCM_MPS *pTimeOut = pTimeData;
  ------------------
  |  |  252|   158k|#define PCM_MPS LONG
  |  |  ------------------
  |  |  |  |  181|   158k|#define LONG INT
  |  |  ------------------
  ------------------
 1535|   158k|  PCM_MPS *TDinput = NULL;
  ------------------
  |  |  252|   158k|#define PCM_MPS LONG
  |  |  ------------------
  |  |  |  |  181|   158k|#define LONG INT
  |  |  ------------------
  ------------------
 1536|   158k|  UINT initControlFlags = 0, controlFlags = 0;
 1537|   158k|  int timeDataRequiredSize = 0;
 1538|   158k|  int newData;
 1539|       |
 1540|   158k|  if (pMpegSurroundDecoder == NULL) {
  ------------------
  |  Branch (1540:7): [True: 0, False: 158k]
  ------------------
 1541|      0|    return MPS_INVALID_HANDLE;
 1542|      0|  }
 1543|       |
 1544|   158k|  FDK_ASSERT(pMpegSurroundDecoder->pSpatialDec);
  ------------------
  |  |  221|   158k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1544:3): [True: 158k, False: 0]
  ------------------
 1545|       |
 1546|   158k|  if (!FDK_chMapDescr_isValid(mapDescr)) {
  ------------------
  |  Branch (1546:7): [True: 0, False: 158k]
  ------------------
 1547|      0|    return MPS_INVALID_HANDLE;
 1548|      0|  }
 1549|       |
 1550|   158k|  if ((*nChannels <= 0) || (*nChannels > 2)) {
  ------------------
  |  Branch (1550:7): [True: 0, False: 158k]
  |  Branch (1550:28): [True: 0, False: 158k]
  ------------------
 1551|      0|    return MPS_NOTOK;
 1552|      0|  }
 1553|       |
 1554|   158k|  pMpegSurroundDecoder->pSpatialDec->sacInDataHeadroom = inDataHeadroom;
 1555|   158k|  *outDataHeadroom = (INT)(8);
 1556|       |
 1557|   158k|  pMpegSurroundDecoder->pSpatialDec->pConfigCurrent =
 1558|   158k|      &pMpegSurroundDecoder
 1559|   158k|           ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameDecode];
 1560|   158k|  newData = pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameParse]
 1561|   158k|                .newBsData;
 1562|       |
 1563|   158k|  switch (mpegSurroundOperationMode(pMpegSurroundDecoder, 1000)) {
 1564|   158k|    case MPEGS_OPMODE_MPS_PAYLOAD:
  ------------------
  |  Branch (1564:5): [True: 158k, False: 0]
  ------------------
 1565|   158k|      if (pMpegSurroundDecoder
  ------------------
  |  Branch (1565:11): [True: 50.5k, False: 108k]
  ------------------
 1566|   158k|              ->initFlags[pMpegSurroundDecoder->bsFrameDecode]) {
 1567|  50.5k|        err = initMpegSurroundDecoder(pMpegSurroundDecoder);
 1568|  50.5k|      }
 1569|       |
 1570|   158k|      if (err == MPS_OK) {
  ------------------
  |  Branch (1570:11): [True: 158k, False: 706]
  ------------------
 1571|   158k|        if ((pMpegSurroundDecoder
  ------------------
  |  Branch (1571:13): [True: 63.1k, False: 94.9k]
  ------------------
 1572|   158k|                 ->fOnSync[pMpegSurroundDecoder->bsFrameDecode] !=
 1573|   158k|             MPEGS_SYNC_COMPLETE) &&
 1574|  63.1k|            (pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameDecode]
  ------------------
  |  Branch (1574:13): [True: 30.9k, False: 32.2k]
  ------------------
 1575|  63.1k|                 .bsIndependencyFlag == 1)) {
 1576|       |          /* We got a valid header and independently decodeable frame data.
 1577|       |              -> Go to the next sync level and start processing. */
 1578|  30.9k|          pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
 1579|  30.9k|              MPEGS_SYNC_COMPLETE;
 1580|  30.9k|        }
 1581|   158k|      } else {
 1582|       |        /* We got a valid config header but found an error while parsing the
 1583|       |           bitstream. Wait for the next independent frame and apply error
 1584|       |           conealment in the meantime. */
 1585|    706|        pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
 1586|    706|            MPEGS_SYNC_FOUND;
 1587|    706|        controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|    706|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1588|    706|        err = MPS_OK;
 1589|    706|      }
 1590|       |      /*
 1591|       |         Concealment:
 1592|       |         - Bitstream is available, no sync found during bitstream processing
 1593|       |         - Bitstream is available, sync lost due to corrupted bitstream
 1594|       |         - Bitstream is available, sync found but no independent frame
 1595|       |      */
 1596|   158k|      if (pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] !=
  ------------------
  |  Branch (1596:11): [True: 32.9k, False: 125k]
  ------------------
 1597|   158k|          MPEGS_SYNC_COMPLETE) {
 1598|  32.9k|        controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|  32.9k|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1599|  32.9k|      }
 1600|   158k|      break;
 1601|       |
 1602|      0|    case MPEGS_OPMODE_NO_MPS_PAYLOAD:
  ------------------
  |  Branch (1602:5): [True: 0, False: 158k]
  ------------------
 1603|       |      /* Concealment: No bitstream is available */
 1604|      0|      controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|      0|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1605|      0|      break;
 1606|       |
 1607|      0|    default:
  ------------------
  |  Branch (1607:5): [True: 0, False: 158k]
  ------------------
 1608|      0|      err = MPS_NOTOK;
 1609|   158k|  }
 1610|       |
 1611|   158k|  if (err != MPS_OK) {
  ------------------
  |  Branch (1611:7): [True: 0, False: 158k]
  ------------------
 1612|      0|    goto bail;
 1613|      0|  }
 1614|       |
 1615|       |  /*
 1616|       |   * Force BypassMode if choosen by user
 1617|       |   */
 1618|   158k|  if (pMpegSurroundDecoder->mpegSurroundUserParams.bypassMode) {
  ------------------
  |  Branch (1618:7): [True: 0, False: 158k]
  ------------------
 1619|      0|    controlFlags |= MPEGS_BYPASSMODE;
  ------------------
  |  |  185|      0|#define MPEGS_BYPASSMODE (0x00000001)
  ------------------
 1620|      0|  }
 1621|       |
 1622|   158k|  if (pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode]) {
  ------------------
  |  Branch (1622:7): [True: 706, False: 158k]
  ------------------
 1623|    706|    int startWithDfltCfg = 0;
 1624|       |    /*
 1625|       |     * Init with a default configuration if we came here and are still not
 1626|       |     * initialized.
 1627|       |     */
 1628|    706|    if (pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] &
  ------------------
  |  Branch (1628:9): [True: 702, False: 4]
  ------------------
 1629|    706|        MPEGS_INIT_ENFORCE_REINIT) {
 1630|       |      /* Get default spatial specific config */
 1631|    702|      if (FDK_SpatialDecInitDefaultSpatialSpecificConfig(
  ------------------
  |  Branch (1631:11): [True: 0, False: 702]
  ------------------
 1632|    702|              &pMpegSurroundDecoder->spatialSpecificConfigBackup, coreCodec,
 1633|    702|              *nChannels, sampleRate,
 1634|    702|              *frameSize /
 1635|    702|                  mpegSurroundDecoder_GetNrOfQmfBands(NULL, sampleRate),
 1636|    702|              pMpegSurroundDecoder->mpegSurroundDecoderLevel,
 1637|    702|              pMpegSurroundDecoder->mpegSurroundUserParams.blindEnable)) {
 1638|      0|        err = MPS_NOTOK;
 1639|      0|        goto bail;
 1640|      0|      }
 1641|       |
 1642|       |      /* Initiate re-initialization, if header has changed */
 1643|    702|      if (FDK_SpatialDecCompareSpatialSpecificConfigHeader(
  ------------------
  |  Branch (1643:11): [True: 702, False: 0]
  ------------------
 1644|    702|              &pMpegSurroundDecoder->spatialSpecificConfigBackup,
 1645|    702|              &pMpegSurroundDecoder->spatialSpecificConfig
 1646|    702|                   [pMpegSurroundDecoder->bsFrameDecode]) == MPS_UNEQUAL_SSC) {
 1647|    702|        pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
 1648|    702|            MPEGS_INIT_CHANGE_HEADER;
 1649|    702|        SpatialDecInitParserContext(pMpegSurroundDecoder->pSpatialDec);
 1650|    702|      }
 1651|       |
 1652|    702|      startWithDfltCfg = 1;
 1653|    702|    }
 1654|       |
 1655|       |    /* First spatial specific config is parsed into spatialSpecificConfigBackup,
 1656|       |     * second spatialSpecificConfigBackup is copied into spatialSpecificConfig
 1657|       |     */
 1658|    706|    err = initMpegSurroundDecoder(pMpegSurroundDecoder);
 1659|       |
 1660|    706|    if (startWithDfltCfg) {
  ------------------
  |  Branch (1660:9): [True: 702, False: 4]
  ------------------
 1661|       |      /* initialized with default config, but no sync found */
 1662|       |      /* maybe use updateMpegSurroundDecoderStatus later on */
 1663|    702|      pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
 1664|    702|          MPEGS_SYNC_LOST;
 1665|    702|    }
 1666|       |
 1667|       |    /* Since we do not have state MPEGS_SYNC_COMPLETE apply concealment */
 1668|    706|    controlFlags |= MPEGS_CONCEAL;
  ------------------
  |  |  186|    706|#define MPEGS_CONCEAL (0x00000002)
  ------------------
 1669|       |
 1670|    706|    if (err != MPS_OK) {
  ------------------
  |  Branch (1670:9): [True: 4, False: 702]
  ------------------
 1671|      4|      goto bail;
 1672|      4|    }
 1673|    706|  }
 1674|       |
 1675|       |  /*
 1676|       |   * Process MPEG Surround Audio
 1677|       |   */
 1678|   158k|  initControlFlags = controlFlags;
 1679|       |
 1680|       |  /* Check that provided output buffer is large enough. */
 1681|   158k|  if (pMpegSurroundDecoder->pQmfDomain->globalConf.nBandsAnalysis == 0) {
  ------------------
  |  Branch (1681:7): [True: 0, False: 158k]
  ------------------
 1682|      0|    err = MPS_UNSUPPORTED_FORMAT;
 1683|      0|    goto bail;
 1684|      0|  }
 1685|   158k|  timeDataRequiredSize =
 1686|   158k|      (timeDataFrameSize *
 1687|   158k|       pMpegSurroundDecoder->pSpatialDec->numOutputChannelsAT *
 1688|   158k|       pMpegSurroundDecoder->pQmfDomain->globalConf.nBandsSynthesis) /
 1689|   158k|      pMpegSurroundDecoder->pQmfDomain->globalConf.nBandsAnalysis;
 1690|   158k|  if (timeDataSize < timeDataRequiredSize) {
  ------------------
  |  Branch (1690:7): [True: 0, False: 158k]
  ------------------
 1691|      0|    err = MPS_OUTPUT_BUFFER_TOO_SMALL;
 1692|      0|    goto bail;
 1693|      0|  }
 1694|       |
 1695|   158k|  if ((pMpegSurroundDecoder->pSpatialDec->pConfigCurrent->syntaxFlags &
  ------------------
  |  Branch (1695:7): [True: 121k, False: 37.4k]
  ------------------
 1696|   158k|       SACDEC_SYNTAX_USAC) &&
  ------------------
  |  |  532|   158k|#define SACDEC_SYNTAX_USAC 2
  ------------------
 1697|   121k|      (pMpegSurroundDecoder->pSpatialDec->stereoConfigIndex > 1)) {
  ------------------
  |  Branch (1697:7): [True: 15.8k, False: 105k]
  ------------------
 1698|  15.8k|    FDK_ASSERT(timeDataRequiredSize >= timeDataFrameSize * *nChannels);
  ------------------
  |  |  221|  15.8k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1698:5): [True: 15.8k, False: 0]
  ------------------
 1699|       |    /* Place samples comprising QMF time slots spaced at QMF output Band raster
 1700|       |     * to allow slot wise processing */
 1701|  15.8k|    int timeDataFrameSizeOut =
 1702|  15.8k|        (timeDataFrameSize *
 1703|  15.8k|         pMpegSurroundDecoder->pQmfDomain->globalConf.nBandsSynthesis) /
 1704|  15.8k|        pMpegSurroundDecoder->pQmfDomain->globalConf.nBandsAnalysis;
 1705|  15.8k|    TDinput = pTimeData + timeDataFrameSizeOut - timeDataFrameSize;
 1706|  47.5k|    for (int i = *nChannels - 1; i >= 0; i--) {
  ------------------
  |  Branch (1706:34): [True: 31.7k, False: 15.8k]
  ------------------
 1707|  31.7k|      FDKmemmove(pTimeData + (i + 1) * timeDataFrameSizeOut - timeDataFrameSize,
 1708|  31.7k|                 pTimeData + timeDataFrameSize * i,
 1709|  31.7k|                 sizeof(PCM_MPS) * timeDataFrameSize);
 1710|  31.7k|      FDKmemclear(pTimeData + i * timeDataFrameSizeOut,
 1711|  31.7k|                  sizeof(PCM_MPS) * (timeDataFrameSizeOut - timeDataFrameSize));
 1712|  31.7k|    }
 1713|   142k|  } else {
 1714|   142k|    if (pMpegSurroundDecoder->mpegSurroundUseTimeInterface) {
  ------------------
  |  Branch (1714:9): [True: 36.4k, False: 106k]
  ------------------
 1715|  36.4k|      FDKmemcpy(input, pTimeData,
 1716|  36.4k|                sizeof(PCM_MPS) * (*nChannels) * (*frameSize));
 1717|  36.4k|      TDinput = input;
 1718|  36.4k|    }
 1719|   142k|  }
 1720|       |
 1721|       |  /*
 1722|       |   * Process MPEG Surround Audio
 1723|       |   */
 1724|   158k|  err = SpatialDecApplyFrame(
 1725|   158k|      pMpegSurroundDecoder->pSpatialDec,
 1726|   158k|      &pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameDecode],
 1727|   158k|      pMpegSurroundDecoder->mpegSurroundUseTimeInterface ? INPUTMODE_TIME
  ------------------
  |  Branch (1727:7): [True: 48.6k, False: 110k]
  ------------------
 1728|   158k|                                                         : INPUTMODE_QMF_SBR,
 1729|   158k|      TDinput, NULL, NULL, pTimeOut, *frameSize, &controlFlags, *nChannels,
 1730|   158k|      mapDescr);
 1731|   158k|  *nChannels = pMpegSurroundDecoder->pSpatialDec->numOutputChannelsAT;
 1732|       |
 1733|   158k|  if (err !=
  ------------------
  |  Branch (1733:7): [True: 0, False: 158k]
  ------------------
 1734|   158k|      MPS_OK) { /* A fatal error occured. Go back to start and try again: */
 1735|      0|    updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
 1736|      0|                                    MPEGS_INIT_ENFORCE_REINIT, MPEGS_SYNC_LOST,
 1737|      0|                                    MPEGS_STOP);
 1738|      0|    *frameSize =
 1739|      0|        0; /* Declare that framework can not use the data in pTimeOut. */
 1740|   158k|  } else {
 1741|   158k|    if (((controlFlags & MPEGS_CONCEAL) &&
  ------------------
  |  |  186|   158k|#define MPEGS_CONCEAL (0x00000002)
  ------------------
  |  Branch (1741:10): [True: 62.9k, False: 95.8k]
  ------------------
 1742|  62.9k|         !(initControlFlags & MPEGS_CONCEAL)) ||
  ------------------
  |  |  186|  62.9k|#define MPEGS_CONCEAL (0x00000002)
  ------------------
  |  Branch (1742:10): [True: 30.0k, False: 32.9k]
  ------------------
 1743|   128k|        (pMpegSurroundDecoder->pSpatialDec->errInt !=
  ------------------
  |  Branch (1743:9): [True: 0, False: 128k]
  ------------------
 1744|   128k|         MPS_OK)) { /* Account for errors that occured in
 1745|       |                       SpatialDecApplyFrame(): */
 1746|  30.0k|      updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
 1747|  30.0k|                                      MPEGS_INIT_ERROR_PAYLOAD, MPEGS_SYNC_LOST,
 1748|  30.0k|                                      MPEGS_STOP);
 1749|  30.0k|    }
 1750|   158k|  }
 1751|       |
 1752|   158k|  if ((err == MPS_OK) && !(controlFlags & MPEGS_BYPASSMODE) &&
  ------------------
  |  |  185|   158k|#define MPEGS_BYPASSMODE (0x00000001)
  ------------------
  |  Branch (1752:7): [True: 158k, False: 0]
  |  Branch (1752:26): [True: 158k, False: 0]
  ------------------
 1753|   158k|      !(pMpegSurroundDecoder->upmixType == UPMIX_TYPE_BYPASS)) {
  ------------------
  |  Branch (1753:7): [True: 158k, False: 0]
  ------------------
 1754|   158k|    SpatialDecChannelProperties(pMpegSurroundDecoder->pSpatialDec, channelType,
 1755|   158k|                                channelIndices, mapDescr);
 1756|   158k|  }
 1757|       |
 1758|   158k|bail:
 1759|       |
 1760|   158k|  if (newData) {
  ------------------
  |  Branch (1760:7): [True: 97.2k, False: 61.6k]
  ------------------
 1761|       |    /* numParameterSetsPrev shall only be read in the decode process, because of
 1762|       |       that we can update this state variable here */
 1763|  97.2k|    pMpegSurroundDecoder->pSpatialDec->numParameterSetsPrev =
 1764|  97.2k|        pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameDecode]
 1765|  97.2k|            .numParameterSets;
 1766|  97.2k|  }
 1767|       |
 1768|   158k|  return (err);
 1769|   158k|}
mpegSurroundDecoder_FreeMem:
 1775|   311k|    CMpegSurroundDecoder *pMpegSurroundDecoder) {
 1776|   311k|  SACDEC_ERROR err = MPS_OK;
 1777|       |
 1778|   311k|  if (pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (1778:7): [True: 311k, False: 0]
  ------------------
 1779|   311k|    FDK_SpatialDecClose(pMpegSurroundDecoder->pSpatialDec);
 1780|   311k|    pMpegSurroundDecoder->pSpatialDec = NULL;
 1781|   311k|  }
 1782|       |
 1783|   311k|  return err;
 1784|   311k|}
mpegSurroundDecoder_Close:
 1789|  21.8k|void mpegSurroundDecoder_Close(CMpegSurroundDecoder *pMpegSurroundDecoder) {
 1790|  21.8k|  if (pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (1790:7): [True: 21.8k, False: 0]
  ------------------
 1791|  21.8k|    FDK_SpatialDecClose(pMpegSurroundDecoder->pSpatialDec);
 1792|  21.8k|    pMpegSurroundDecoder->pSpatialDec = NULL;
 1793|       |
 1794|  43.7k|    for (int i = 0; i < 1; i++) {
  ------------------
  |  Branch (1794:21): [True: 21.8k, False: 21.8k]
  ------------------
 1795|  21.8k|      SpatialDecCloseBsFrame(&pMpegSurroundDecoder->bsFrames[i]);
 1796|  21.8k|    }
 1797|       |
 1798|       |    FDK_FREE_MEMORY_1D(pMpegSurroundDecoder);
  ------------------
  |  |  171|  21.8k|  do {                           \
  |  |  172|  21.8k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.8k|    (a) = NULL;                  \
  |  |  174|  21.8k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.8k]
  |  |  ------------------
  ------------------
 1799|  21.8k|  }
 1800|  21.8k|}
mpegSurroundDecoder_GetLibInfo:
 1806|   159k|int mpegSurroundDecoder_GetLibInfo(LIB_INFO *info) {
 1807|   159k|  int i;
 1808|       |
 1809|   159k|  if (info == NULL) {
  ------------------
  |  Branch (1809:7): [True: 0, False: 159k]
  ------------------
 1810|      0|    return -1;
 1811|      0|  }
 1812|       |
 1813|       |  /* search for next free tab */
 1814|   159k|  for (i = 0; i < FDK_MODULE_LAST; i++) {
  ------------------
  |  Branch (1814:15): [True: 159k, False: 0]
  ------------------
 1815|   159k|    if (info[i].module_id == FDK_NONE) break;
  ------------------
  |  Branch (1815:9): [True: 159k, False: 0]
  ------------------
 1816|   159k|  }
 1817|   159k|  if (i == FDK_MODULE_LAST) return -1;
  ------------------
  |  Branch (1817:7): [True: 0, False: 159k]
  ------------------
 1818|       |
 1819|   159k|  info += i;
 1820|       |
 1821|   159k|  info->module_id = FDK_MPSDEC;
 1822|       |#ifdef SUPPRESS_BUILD_DATE_INFO
 1823|       |  info->build_date = "";
 1824|       |  info->build_time = "";
 1825|       |#else
 1826|   159k|  info->build_date = __DATE__;
 1827|   159k|  info->build_time = __TIME__;
 1828|   159k|#endif
 1829|   159k|  info->title = "MPEG Surround Decoder";
 1830|   159k|  info->version = LIB_VERSION(SACDEC_VL0, SACDEC_VL1, SACDEC_VL2);
  ------------------
  |  |  704|   159k|  ((lev0 << 24 & 0xff000000) | (lev1 << 16 & 0x00ff0000) | \
  |  |  705|   159k|   (lev2 << 8 & 0x0000ff00))
  ------------------
 1831|   159k|  LIB_VERSION_STRING(info);
  ------------------
  |  |  711|   159k|  FDKsprintf((info)->versionStr, "%d.%d.%d", (((info)->version >> 24) & 0xff), \
  |  |  712|   159k|             (((info)->version >> 16) & 0xff),                                 \
  |  |  713|   159k|             (((info)->version >> 8) & 0xff))
  ------------------
 1832|   159k|  info->flags = 0 | CAPF_MPS_LD | CAPF_MPS_USAC | CAPF_MPS_HQ |
  ------------------
  |  |  661|   159k|  0x00000002 /**< Support flag for Low Delay MPEG Surround. \
  ------------------
                info->flags = 0 | CAPF_MPS_LD | CAPF_MPS_USAC | CAPF_MPS_HQ |
  ------------------
  |  |  664|   159k|  0x00000004 /**< Support flag for USAC MPEG Surround.      */
  ------------------
                info->flags = 0 | CAPF_MPS_LD | CAPF_MPS_USAC | CAPF_MPS_HQ |
  ------------------
  |  |  666|   159k|  0x00000010 /**< Support flag indicating if high quality processing is \
  ------------------
 1833|   159k|                CAPF_MPS_1CH_IN | CAPF_MPS_2CH_OUT; /* end flags */
  ------------------
  |  |  682|   159k|  0x00001000 /**< Support flag indicating if 1ch dmx input is possible   */
  ------------------
                              CAPF_MPS_1CH_IN | CAPF_MPS_2CH_OUT; /* end flags */
  ------------------
  |  |  676|   159k|  0x00000100 /**< Support flag indicating if 2ch output is possible      */
  ------------------
 1834|       |
 1835|   159k|  return 0;
 1836|   159k|}
mpegSurroundDecoder_SetParam:
 1840|   318k|    const INT value) {
 1841|   318k|  SACDEC_ERROR err = MPS_OK;
 1842|   318k|  SPATIALDEC_PARAM *pUserParams = NULL;
 1843|       |
 1844|       |  /* check decoder handle */
 1845|   318k|  if (pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (1845:7): [True: 318k, False: 0]
  ------------------
 1846|       |    /* init local shortcuts */
 1847|   318k|    pUserParams = &pMpegSurroundDecoder->mpegSurroundUserParams;
 1848|   318k|  } else {
 1849|      0|    err = MPS_INVALID_HANDLE;
 1850|       |    /* check the parameter values before exiting. */
 1851|      0|  }
 1852|       |
 1853|       |  /* apply param value */
 1854|   318k|  switch (param) {
 1855|      0|    case SACDEC_OUTPUT_MODE:
  ------------------
  |  Branch (1855:5): [True: 0, False: 318k]
  ------------------
 1856|      0|      switch ((SAC_DEC_OUTPUT_MODE)value) {
 1857|      0|        case SACDEC_OUT_MODE_NORMAL:
  ------------------
  |  Branch (1857:9): [True: 0, False: 0]
  ------------------
 1858|      0|        case SACDEC_OUT_MODE_STEREO:
  ------------------
  |  Branch (1858:9): [True: 0, False: 0]
  ------------------
 1859|      0|          break;
 1860|      0|        default:
  ------------------
  |  Branch (1860:9): [True: 0, False: 0]
  ------------------
 1861|      0|          err = MPS_INVALID_PARAMETER;
 1862|      0|      }
 1863|      0|      if (err == MPS_OK) {
  ------------------
  |  Branch (1863:11): [True: 0, False: 0]
  ------------------
 1864|      0|        if (0) {
  ------------------
  |  Branch (1864:13): [Folded, False: 0]
  ------------------
 1865|      0|          err = MPS_INVALID_PARAMETER;
 1866|      0|        } else if (pUserParams->outputMode != (UCHAR)value) {
  ------------------
  |  Branch (1866:20): [True: 0, False: 0]
  ------------------
 1867|      0|          pUserParams->outputMode = (UCHAR)value;
 1868|      0|          pMpegSurroundDecoder
 1869|      0|              ->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
 1870|      0|              MPEGS_INIT_CHANGE_OUTPUT_MODE;
 1871|      0|        }
 1872|      0|      }
 1873|      0|      break;
 1874|       |
 1875|   158k|    case SACDEC_INTERFACE:
  ------------------
  |  Branch (1875:5): [True: 158k, False: 159k]
  ------------------
 1876|   158k|      if (value < 0 || value > 1) {
  ------------------
  |  Branch (1876:11): [True: 0, False: 158k]
  |  Branch (1876:24): [True: 0, False: 158k]
  ------------------
 1877|      0|        err = MPS_INVALID_PARAMETER;
 1878|      0|      }
 1879|   158k|      if (err != MPS_OK) {
  ------------------
  |  Branch (1879:11): [True: 0, False: 158k]
  ------------------
 1880|      0|        goto bail;
 1881|      0|      }
 1882|   158k|      if (pMpegSurroundDecoder->mpegSurroundUseTimeInterface != (UCHAR)value) {
  ------------------
  |  Branch (1882:11): [True: 4.39k, False: 154k]
  ------------------
 1883|  4.39k|        pMpegSurroundDecoder->mpegSurroundUseTimeInterface = (UCHAR)value;
 1884|  4.39k|        pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
 1885|  4.39k|            MPEGS_INIT_CHANGE_TIME_FREQ_INTERFACE;
 1886|  4.39k|      }
 1887|   158k|      break;
 1888|       |
 1889|      0|    case SACDEC_BS_INTERRUPTION:
  ------------------
  |  Branch (1889:5): [True: 0, False: 318k]
  ------------------
 1890|      0|      if ((err == MPS_OK) && (value != 0)) {
  ------------------
  |  Branch (1890:11): [True: 0, False: 0]
  |  Branch (1890:30): [True: 0, False: 0]
  ------------------
 1891|      0|        updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
 1892|      0|                                        MPEGS_INIT_BS_INTERRUPTION,
 1893|      0|                                        MPEGS_SYNC_LOST, MPEGS_STOP);
 1894|      0|      }
 1895|      0|      break;
 1896|       |
 1897|      0|    case SACDEC_CLEAR_HISTORY:
  ------------------
  |  Branch (1897:5): [True: 0, False: 318k]
  ------------------
 1898|      0|      if ((err == MPS_OK) && (value != 0)) {
  ------------------
  |  Branch (1898:11): [True: 0, False: 0]
  |  Branch (1898:30): [True: 0, False: 0]
  ------------------
 1899|       |        /* Just reset the states and go on. */
 1900|      0|        updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
 1901|      0|                                        MPEGS_INIT_CLEAR_HISTORY,
 1902|      0|                                        MPEGS_SYNC_LOST, MPEGS_STOP);
 1903|      0|      }
 1904|      0|      break;
 1905|       |
 1906|      0|    case SACDEC_CONCEAL_NUM_KEEP_FRAMES:
  ------------------
  |  Branch (1906:5): [True: 0, False: 318k]
  ------------------
 1907|      0|      if (value < 0) { /* Check valid value range */
  ------------------
  |  Branch (1907:11): [True: 0, False: 0]
  ------------------
 1908|      0|        err = MPS_INVALID_PARAMETER;
 1909|      0|      }
 1910|      0|      if (err != MPS_OK) {
  ------------------
  |  Branch (1910:11): [True: 0, False: 0]
  ------------------
 1911|      0|        goto bail;
 1912|      0|      }
 1913|      0|      if (pUserParams->concealNumKeepFrames != (UINT)value) {
  ------------------
  |  Branch (1913:11): [True: 0, False: 0]
  ------------------
 1914|      0|        pUserParams->concealNumKeepFrames = (UINT)value;
 1915|      0|        pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
 1916|      0|            MPEGS_INIT_CHANGE_CONCEAL_PARAMS;
 1917|      0|      }
 1918|      0|      break;
 1919|       |
 1920|      0|    case SACDEC_CONCEAL_FADE_OUT_SLOPE_LENGTH:
  ------------------
  |  Branch (1920:5): [True: 0, False: 318k]
  ------------------
 1921|      0|      if (value < 0) { /* Check valid value range */
  ------------------
  |  Branch (1921:11): [True: 0, False: 0]
  ------------------
 1922|      0|        err = MPS_INVALID_PARAMETER;
 1923|      0|      }
 1924|      0|      if (err != MPS_OK) {
  ------------------
  |  Branch (1924:11): [True: 0, False: 0]
  ------------------
 1925|      0|        goto bail;
 1926|      0|      }
 1927|      0|      if (pUserParams->concealFadeOutSlopeLength != (UINT)value) {
  ------------------
  |  Branch (1927:11): [True: 0, False: 0]
  ------------------
 1928|      0|        pUserParams->concealFadeOutSlopeLength = (UINT)value;
 1929|      0|        pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
 1930|      0|            MPEGS_INIT_CHANGE_CONCEAL_PARAMS;
 1931|      0|      }
 1932|      0|      break;
 1933|       |
 1934|      0|    case SACDEC_CONCEAL_FADE_IN_SLOPE_LENGTH:
  ------------------
  |  Branch (1934:5): [True: 0, False: 318k]
  ------------------
 1935|      0|      if (value < 0) { /* Check valid value range */
  ------------------
  |  Branch (1935:11): [True: 0, False: 0]
  ------------------
 1936|      0|        err = MPS_INVALID_PARAMETER;
 1937|      0|      }
 1938|      0|      if (err != MPS_OK) {
  ------------------
  |  Branch (1938:11): [True: 0, False: 0]
  ------------------
 1939|      0|        goto bail;
 1940|      0|      }
 1941|      0|      if (pUserParams->concealFadeInSlopeLength != (UINT)value) {
  ------------------
  |  Branch (1941:11): [True: 0, False: 0]
  ------------------
 1942|      0|        pUserParams->concealFadeInSlopeLength = (UINT)value;
 1943|      0|        pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
 1944|      0|            MPEGS_INIT_CHANGE_CONCEAL_PARAMS;
 1945|      0|      }
 1946|      0|      break;
 1947|       |
 1948|      0|    case SACDEC_CONCEAL_NUM_RELEASE_FRAMES:
  ------------------
  |  Branch (1948:5): [True: 0, False: 318k]
  ------------------
 1949|      0|      if (value < 0) { /* Check valid value range */
  ------------------
  |  Branch (1949:11): [True: 0, False: 0]
  ------------------
 1950|      0|        err = MPS_INVALID_PARAMETER;
 1951|      0|      }
 1952|      0|      if (err != MPS_OK) {
  ------------------
  |  Branch (1952:11): [True: 0, False: 0]
  ------------------
 1953|      0|        goto bail;
 1954|      0|      }
 1955|      0|      if (pUserParams->concealNumReleaseFrames != (UINT)value) {
  ------------------
  |  Branch (1955:11): [True: 0, False: 0]
  ------------------
 1956|      0|        pUserParams->concealNumReleaseFrames = (UINT)value;
 1957|      0|        pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
 1958|      0|            MPEGS_INIT_CHANGE_CONCEAL_PARAMS;
 1959|      0|      }
 1960|      0|      break;
 1961|       |
 1962|   159k|    default:
  ------------------
  |  Branch (1962:5): [True: 159k, False: 158k]
  ------------------
 1963|   159k|      err = MPS_INVALID_PARAMETER;
 1964|   159k|      break;
 1965|   318k|  } /* switch(param) */
 1966|       |
 1967|   318k|bail:
 1968|   318k|  return err;
 1969|   318k|}
mpegSurroundDecoder_IsPseudoLR:
 1972|   221k|    CMpegSurroundDecoder *pMpegSurroundDecoder, int *bsPseudoLr) {
 1973|   221k|  if (pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (1973:7): [True: 221k, False: 0]
  ------------------
 1974|   221k|    const SPATIAL_SPECIFIC_CONFIG *sscDecode =
 1975|   221k|        &pMpegSurroundDecoder
 1976|   221k|             ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameDecode];
 1977|   221k|    *bsPseudoLr = (int)sscDecode->bsPseudoLr;
 1978|   221k|    return MPS_OK;
 1979|   221k|  } else
 1980|      0|    return MPS_INVALID_HANDLE;
 1981|   221k|}
mpegSurroundDecoder_GetDelay:
 1986|   158k|UINT mpegSurroundDecoder_GetDelay(const CMpegSurroundDecoder *self) {
 1987|   158k|  INT outputDelay = 0;
 1988|       |
 1989|   158k|  if (self != NULL) {
  ------------------
  |  Branch (1989:7): [True: 158k, False: 0]
  ------------------
 1990|   158k|    const SPATIAL_SPECIFIC_CONFIG *sscDecode =
 1991|   158k|        &self->spatialSpecificConfig[self->bsFrameDecode];
 1992|   158k|    AUDIO_OBJECT_TYPE coreCodec = sscDecode->coreCodec;
 1993|       |
 1994|       |    /* See chapter 4.5 (delay and synchronization) of ISO/IEC FDIS 23003-1 and
 1995|       |       chapter 5.4.3 of ISO/IEC FDIS 23003-2 for details on the following
 1996|       |       figures. */
 1997|       |
 1998|   158k|    if (coreCodec > AOT_NULL_OBJECT) {
  ------------------
  |  Branch (1998:9): [True: 158k, False: 0]
  ------------------
 1999|   158k|      if (IS_LOWDELAY(coreCodec)) {
  ------------------
  |  |  228|   158k|#define IS_LOWDELAY(aot) ((aot) == AOT_ER_AAC_LD || (aot) == AOT_ER_AAC_ELD)
  |  |  ------------------
  |  |  |  Branch (228:27): [True: 0, False: 158k]
  |  |  |  Branch (228:53): [True: 37.4k, False: 121k]
  |  |  ------------------
  ------------------
 2000|       |        /* All low delay variants (ER-AAC-(E)LD): */
 2001|  37.4k|        outputDelay += 256;
 2002|   121k|      } else if (!IS_USAC(coreCodec)) {
  ------------------
  |  |  226|   121k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  ------------------
  |  Branch (2002:18): [True: 0, False: 121k]
  ------------------
 2003|       |        /* By the method of elimination this is the GA (AAC-LC, HE-AAC, ...)
 2004|       |         * branch: */
 2005|      0|        outputDelay += 320 + 257; /* cos to exp delay + QMF synthesis */
 2006|      0|        if (self->mpegSurroundUseTimeInterface) {
  ------------------
  |  Branch (2006:13): [True: 0, False: 0]
  ------------------
 2007|      0|          outputDelay += 320 + 384; /* QMF and hybrid analysis */
 2008|      0|        }
 2009|      0|      }
 2010|   158k|    }
 2011|   158k|  }
 2012|       |
 2013|   158k|  return (outputDelay);
 2014|   158k|}
sac_dec_lib.cpp:_ZL23initMpegSurroundDecoderP19MpegSurroundDecoder:
  511|  51.2k|    CMpegSurroundDecoder *pMpegSurroundDecoder) {
  512|  51.2k|  SACDEC_ERROR err;
  513|  51.2k|  int initFlags = MPEGS_INIT_NONE, initFlagsDec;
  514|  51.2k|  int upmixTypeCurr = pMpegSurroundDecoder->upmixType;
  515|       |
  516|  51.2k|  FDK_ASSERT(pMpegSurroundDecoder != NULL);
  ------------------
  |  |  221|  51.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (516:3): [True: 51.2k, False: 0]
  ------------------
  517|       |
  518|  51.2k|  SPATIAL_SPECIFIC_CONFIG *const pSSCinput =
  519|  51.2k|      &pMpegSurroundDecoder->spatialSpecificConfigBackup;
  520|  51.2k|  SPATIAL_SPECIFIC_CONFIG *const pSSCtarget =
  521|  51.2k|      &pMpegSurroundDecoder
  522|  51.2k|           ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameDecode];
  523|  51.2k|  initFlagsDec =
  524|  51.2k|      pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode];
  525|       |
  526|  51.2k|  if (pSSCinput->coreCodec != AOT_USAC) {
  ------------------
  |  Branch (526:7): [True: 27.9k, False: 23.2k]
  ------------------
  527|       |    /* here we check if we have a valid Ssc */
  528|  27.9k|    err = sscParseCheck(pSSCinput);
  529|  27.9k|    if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (529:9): [True: 0, False: 27.9k]
  ------------------
  530|  27.9k|  }
  531|       |
  532|       |  /* here we check if Ssc matches build; also check UParams and DecConfig */
  533|       |  /* if desired upmixType is changes                                      */
  534|  51.2k|  err = check_UParam_Build_DecConfig(
  535|  51.2k|      &pMpegSurroundDecoder->mpegSurroundUserParams,
  536|  51.2k|      &pMpegSurroundDecoder->decConfig, pSSCinput,
  537|  51.2k|      &pMpegSurroundDecoder->upmixType);
  538|  51.2k|  if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (538:7): [True: 0, False: 51.2k]
  ------------------
  539|       |
  540|       |  /* init config */
  541|  51.2k|  if (initFlagsDec & MPEGS_INIT_CHANGE_HEADER) {
  ------------------
  |  Branch (541:7): [True: 15.5k, False: 35.6k]
  ------------------
  542|  15.5k|    initFlags |= MPEGS_INIT_CONFIG;
  543|  15.5k|  }
  544|       |  /* init all states */
  545|  51.2k|  if (initFlagsDec & MPEGS_INIT_CLEAR_HISTORY) {
  ------------------
  |  Branch (545:7): [True: 0, False: 51.2k]
  ------------------
  546|      0|    initFlags |= MASK_MPEGS_INIT_ALL_STATES;
  ------------------
  |  |  239|      0|#define MASK_MPEGS_INIT_ALL_STATES (0x000FFF00)
  ------------------
  547|      0|  }
  548|  51.2k|  if (initFlagsDec & MPEGS_INIT_CHANGE_CONCEAL_PARAMS) {
  ------------------
  |  Branch (548:7): [True: 0, False: 51.2k]
  ------------------
  549|      0|    initFlags |= MPEGS_INIT_PARAMS_ERROR_CONCEALMENT;
  550|      0|  }
  551|       |
  552|  51.2k|  if (initFlagsDec & MPEGS_INIT_ENFORCE_REINIT) {
  ------------------
  |  Branch (552:7): [True: 9.97k, False: 41.2k]
  ------------------
  553|       |    /* init all states */
  554|  9.97k|    initFlags |= MASK_MPEGS_INIT_ALL_STATES;
  ------------------
  |  |  239|  9.97k|#define MASK_MPEGS_INIT_ALL_STATES (0x000FFF00)
  ------------------
  555|  9.97k|    initFlags |= MASK_MPEGS_INIT_ALL_PARAMS;
  ------------------
  |  |  240|  9.97k|#define MASK_MPEGS_INIT_ALL_PARAMS (0x00F00000)
  ------------------
  556|  41.2k|  } else {
  557|       |    /* analyse states which have to be initialized */
  558|  41.2k|    mpegSurroundDecoder_CalcInitFlags(
  559|  41.2k|        pSSCtarget, pSSCinput,
  560|  41.2k|        (upmixTypeCurr !=
  561|  41.2k|         pMpegSurroundDecoder->upmixType), /* upmixType changed */
  562|  41.2k|        0, (initFlagsDec & MPEGS_INIT_CHANGE_PARTIALLY_COMPLEX) ? 1 : 0,
  ------------------
  |  Branch (562:12): [True: 0, False: 41.2k]
  ------------------
  563|  41.2k|        &initFlags);
  564|  41.2k|  }
  565|       |
  566|  51.2k|  {
  567|  51.2k|    int nrOfQmfBands;
  568|  51.2k|    FDKmemcpy(pSSCtarget, pSSCinput, sizeof(SPATIAL_SPECIFIC_CONFIG));
  569|       |
  570|  51.2k|    nrOfQmfBands = mpegSurroundDecoder_GetNrOfQmfBands(
  571|  51.2k|        pSSCtarget, pSSCtarget->samplingFreq);
  572|  51.2k|    err = FDK_SpatialDecInit(
  573|  51.2k|        pMpegSurroundDecoder->pSpatialDec,
  574|  51.2k|        &pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameDecode],
  575|  51.2k|        pSSCtarget, nrOfQmfBands, pMpegSurroundDecoder->upmixType,
  576|  51.2k|        &pMpegSurroundDecoder->mpegSurroundUserParams, initFlags);
  577|       |
  578|  51.2k|    if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (578:9): [True: 710, False: 50.5k]
  ------------------
  579|       |
  580|       |    /* Signal that we got a header and can go on decoding */
  581|  50.5k|    if (err == MPS_OK) {
  ------------------
  |  Branch (581:9): [True: 50.5k, False: 0]
  ------------------
  582|  50.5k|      initFlagsDec = MPEGS_INIT_OK;
  583|  50.5k|      {
  584|  50.5k|        pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
  585|  50.5k|            MPEGS_SYNC_FOUND;
  586|  50.5k|      }
  587|  50.5k|    }
  588|  50.5k|  }
  589|       |
  590|  51.2k|bail:
  591|  51.2k|  pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] =
  592|  51.2k|      initFlagsDec;
  593|  51.2k|  return err;
  594|  50.5k|}
sac_dec_lib.cpp:_ZL13sscParseCheckPK25T_SPATIAL_SPECIFIC_CONFIG:
  848|   154k|static SACDEC_ERROR sscParseCheck(const SPATIAL_SPECIFIC_CONFIG *pSsc) {
  849|   154k|  if (pSsc->samplingFreq > 96000) return MPS_PARSE_ERROR;
  ------------------
  |  Branch (849:7): [True: 421, False: 153k]
  ------------------
  850|   153k|  if (pSsc->samplingFreq < 8000) return MPS_PARSE_ERROR;
  ------------------
  |  Branch (850:7): [True: 1.13k, False: 152k]
  ------------------
  851|       |
  852|   152k|  if ((pSsc->treeConfig < 0) || (pSsc->treeConfig > 7)) {
  ------------------
  |  Branch (852:7): [True: 0, False: 152k]
  |  Branch (852:33): [True: 0, False: 152k]
  ------------------
  853|      0|    return MPS_PARSE_ERROR;
  854|      0|  }
  855|       |
  856|   152k|  if ((pSsc->quantMode < 0) || (pSsc->quantMode > 2)) {
  ------------------
  |  Branch (856:7): [True: 0, False: 152k]
  |  Branch (856:32): [True: 940, False: 151k]
  ------------------
  857|    940|    return MPS_PARSE_ERROR;
  858|    940|  }
  859|       |
  860|       |  /* now we are sure there were no parsing errors */
  861|       |
  862|   151k|  return MPS_OK;
  863|   152k|}
sac_dec_lib.cpp:_ZL28check_UParam_Build_DecConfigPK16SPATIALDEC_PARAMPK18SPATIAL_DEC_CONFIGPK25T_SPATIAL_SPECIFIC_CONFIGP22SPATIAL_DEC_UPMIX_TYPE:
  417|  51.2k|    const SPATIAL_SPECIFIC_CONFIG *pSsc, SPATIAL_DEC_UPMIX_TYPE *pUpmixType) {
  418|  51.2k|  int dmxChannels, outChannels, maxNumOutChannels;
  419|       |
  420|  51.2k|  FDK_ASSERT(pUserParams != NULL);
  ------------------
  |  |  221|  51.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (420:3): [True: 51.2k, False: 0]
  ------------------
  421|  51.2k|  FDK_ASSERT(pUpmixType != NULL);
  ------------------
  |  |  221|  51.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (421:3): [True: 51.2k, False: 0]
  ------------------
  422|       |
  423|       |  /* checks if implementation can handle the Ssc */
  424|       |
  425|  51.2k|  switch (pSsc->treeConfig) {
  426|  51.2k|    case SPATIALDEC_MODE_RSVD7: /* 212 */
  ------------------
  |  Branch (426:5): [True: 51.2k, False: 0]
  ------------------
  427|  51.2k|      dmxChannels = 1;
  428|  51.2k|      outChannels = 2;
  429|  51.2k|      break;
  430|      0|    default:
  ------------------
  |  Branch (430:5): [True: 0, False: 51.2k]
  ------------------
  431|      0|      return MPS_UNSUPPORTED_CONFIG;
  432|  51.2k|  }
  433|       |
  434|       |  /* ------------------------------------------- */
  435|       |
  436|       |  /* Analyse pDecConfig params */
  437|  51.2k|  switch (pDecConfig->binauralMode) {
  438|  51.2k|    case BINAURAL_NONE:
  ------------------
  |  Branch (438:5): [True: 51.2k, False: 0]
  ------------------
  439|  51.2k|      break;
  440|      0|    default:
  ------------------
  |  Branch (440:5): [True: 0, False: 51.2k]
  ------------------
  441|      0|      return MPS_UNSUPPORTED_CONFIG;
  442|  51.2k|  }
  443|       |
  444|  51.2k|  switch (pDecConfig->decoderMode) {
  445|  51.2k|    case EXT_HQ_ONLY:
  ------------------
  |  Branch (445:5): [True: 51.2k, False: 0]
  ------------------
  446|  51.2k|      break;
  447|      0|    default:
  ------------------
  |  Branch (447:5): [True: 0, False: 51.2k]
  ------------------
  448|      0|      return MPS_UNSUPPORTED_CONFIG;
  449|  51.2k|  }
  450|       |
  451|  51.2k|  switch (pDecConfig->maxNumOutputChannels) {
  452|  51.2k|    case OUTPUT_CHANNELS_DEFAULT:
  ------------------
  |  Branch (452:5): [True: 51.2k, False: 0]
  ------------------
  453|       |      /* No special restrictions -> Get the level restriction: */
  454|  51.2k|      switch (pDecConfig->decoderLevel) {
  455|  51.2k|        case DECODER_LEVEL_0:
  ------------------
  |  Branch (455:9): [True: 51.2k, False: 0]
  ------------------
  456|  51.2k|          maxNumOutChannels = 2;
  457|  51.2k|          break;
  458|      0|        default:
  ------------------
  |  Branch (458:9): [True: 0, False: 51.2k]
  ------------------
  459|      0|          return MPS_UNSUPPORTED_CONFIG;
  460|  51.2k|      }
  461|  51.2k|      break;
  462|  51.2k|    case OUTPUT_CHANNELS_2_0:
  ------------------
  |  Branch (462:5): [True: 0, False: 51.2k]
  ------------------
  463|      0|      maxNumOutChannels = 2;
  464|      0|      break;
  465|      0|    default:
  ------------------
  |  Branch (465:5): [True: 0, False: 51.2k]
  ------------------
  466|      0|      return MPS_UNSUPPORTED_CONFIG;
  467|  51.2k|  }
  468|       |  /* ------------------------- */
  469|       |
  470|       |  /* check if we can handle user params */
  471|  51.2k|  if (pUserParams->blindEnable == 1) {
  ------------------
  |  Branch (471:7): [True: 0, False: 51.2k]
  ------------------
  472|      0|    return MPS_UNSUPPORTED_CONFIG;
  473|      0|  }
  474|  51.2k|  {
  475|  51.2k|    switch ((SAC_DEC_OUTPUT_MODE)pUserParams->outputMode) {
  476|  51.2k|      case SACDEC_OUT_MODE_NORMAL:
  ------------------
  |  Branch (476:7): [True: 51.2k, False: 0]
  ------------------
  477|  51.2k|        if (maxNumOutChannels >= outChannels) {
  ------------------
  |  Branch (477:13): [True: 51.2k, False: 0]
  ------------------
  478|  51.2k|          *pUpmixType = UPMIX_TYPE_NORMAL;
  479|  51.2k|        } else {
  480|      0|          { *pUpmixType = UPMIX_TYPE_BYPASS; }
  481|      0|        }
  482|  51.2k|        break;
  483|      0|      case SACDEC_OUT_MODE_STEREO:
  ------------------
  |  Branch (483:7): [True: 0, False: 51.2k]
  ------------------
  484|      0|        if (dmxChannels == 1) {
  ------------------
  |  Branch (484:13): [True: 0, False: 0]
  ------------------
  485|      0|          if (outChannels == 2) {
  ------------------
  |  Branch (485:15): [True: 0, False: 0]
  ------------------
  486|      0|            *pUpmixType = UPMIX_TYPE_NORMAL;
  487|      0|          }
  488|      0|        } else {
  489|      0|          *pUpmixType = UPMIX_TYPE_BYPASS;
  490|      0|        }
  491|      0|        break;
  492|      0|      case SACDEC_OUT_MODE_6CHANNEL:
  ------------------
  |  Branch (492:7): [True: 0, False: 51.2k]
  ------------------
  493|      0|        if (outChannels > 6) {
  ------------------
  |  Branch (493:13): [True: 0, False: 0]
  ------------------
  494|      0|          { *pUpmixType = UPMIX_TYPE_BYPASS; }
  495|      0|        } else {
  496|      0|          *pUpmixType = UPMIX_TYPE_NORMAL;
  497|      0|        }
  498|      0|        break;
  499|      0|      default:
  ------------------
  |  Branch (499:7): [True: 0, False: 51.2k]
  ------------------
  500|      0|        return MPS_UNSUPPORTED_CONFIG;
  501|  51.2k|    }
  502|  51.2k|  }
  503|       |
  504|  51.2k|  return MPS_OK;
  505|  51.2k|}
sac_dec_lib.cpp:_ZL33mpegSurroundDecoder_CalcInitFlagsP25T_SPATIAL_SPECIFIC_CONFIGS0_iiiPi:
  291|  41.2k|                                             int *ctrlFlags) {
  292|       |  /* Analyse core coder */
  293|  41.2k|  if (pSsc1->coreCodec != pSsc2->coreCodec) {
  ------------------
  |  Branch (293:7): [True: 0, False: 41.2k]
  ------------------
  294|      0|    *ctrlFlags |= MASK_MPEGS_INIT_ALL_STATES;
  ------------------
  |  |  239|      0|#define MASK_MPEGS_INIT_ALL_STATES (0x000FFF00)
  ------------------
  295|      0|    *ctrlFlags |= MASK_MPEGS_INIT_ALL_PARAMS;
  ------------------
  |  |  240|      0|#define MASK_MPEGS_INIT_ALL_PARAMS (0x00F00000)
  ------------------
  296|  41.2k|  } else {
  297|       |    /* Analyse elements for initialization of space analysis qmf filterbank */
  298|  41.2k|    if ((partiallyComplexFlag) || (pSsc1->treeConfig != pSsc2->treeConfig) ||
  ------------------
  |  Branch (298:9): [True: 0, False: 41.2k]
  |  Branch (298:35): [True: 0, False: 41.2k]
  ------------------
  299|  41.2k|        (pSsc1->samplingFreq != pSsc2->samplingFreq)) {
  ------------------
  |  Branch (299:9): [True: 0, False: 41.2k]
  ------------------
  300|      0|      *ctrlFlags |= MPEGS_INIT_STATES_ANA_QMF_FILTER;
  301|      0|      *ctrlFlags |= MPEGS_INIT_STATES_ANA_HYB_FILTER;
  302|      0|    }
  303|       |
  304|       |    /* Analyse elements for initialization of space synthesis qmf filterbank */
  305|  41.2k|    if ((upmixTypeFlag) || (partiallyComplexFlag) ||
  ------------------
  |  Branch (305:9): [True: 0, False: 41.2k]
  |  Branch (305:28): [True: 0, False: 41.2k]
  ------------------
  306|  41.2k|        (pSsc1->treeConfig != pSsc2->treeConfig) ||
  ------------------
  |  Branch (306:9): [True: 0, False: 41.2k]
  ------------------
  307|  41.2k|        (pSsc1->samplingFreq != pSsc2->samplingFreq) ||
  ------------------
  |  Branch (307:9): [True: 0, False: 41.2k]
  ------------------
  308|  41.2k|        (pSsc1->bsFixedGainDMX != pSsc2->bsFixedGainDMX)) {
  ------------------
  |  Branch (308:9): [True: 1.62k, False: 39.6k]
  ------------------
  309|  1.62k|      *ctrlFlags |= MPEGS_INIT_STATES_SYN_QMF_FILTER;
  310|  1.62k|    }
  311|       |
  312|       |    /* Analyse elements for initialization of decorrelator */
  313|  41.2k|    if ((upmixTypeFlag) || (partiallyComplexFlag) ||
  ------------------
  |  Branch (313:9): [True: 0, False: 41.2k]
  |  Branch (313:28): [True: 0, False: 41.2k]
  ------------------
  314|  41.2k|        (pSsc1->treeConfig != pSsc2->treeConfig) ||
  ------------------
  |  Branch (314:9): [True: 0, False: 41.2k]
  ------------------
  315|  41.2k|        (pSsc1->samplingFreq != pSsc2->samplingFreq) ||
  ------------------
  |  Branch (315:9): [True: 0, False: 41.2k]
  ------------------
  316|  41.2k|        (pSsc1->decorrConfig != pSsc2->decorrConfig)) {
  ------------------
  |  Branch (316:9): [True: 458, False: 40.7k]
  ------------------
  317|    458|      *ctrlFlags |= MPEGS_INIT_STATES_DECORRELATOR;
  318|    458|    }
  319|       |
  320|       |    /* Analyse elements for initialization of m1 and m2 calculation */
  321|  41.2k|    if ((upmixTypeFlag) || (binauralQualityFlag) ||
  ------------------
  |  Branch (321:9): [True: 0, False: 41.2k]
  |  Branch (321:28): [True: 0, False: 41.2k]
  ------------------
  322|  41.2k|        (pSsc1->treeConfig != pSsc2->treeConfig) ||
  ------------------
  |  Branch (322:9): [True: 0, False: 41.2k]
  ------------------
  323|  41.2k|        (pSsc1->samplingFreq != pSsc2->samplingFreq))
  ------------------
  |  Branch (323:9): [True: 0, False: 41.2k]
  ------------------
  324|       |
  325|      0|    {
  326|      0|      *ctrlFlags |= MPEGS_INIT_STATES_M1M2;
  327|      0|    }
  328|       |
  329|       |    /* Analyse elements for initialization of GES */
  330|  41.2k|    if ((upmixTypeFlag) || (pSsc1->treeConfig != pSsc2->treeConfig) ||
  ------------------
  |  Branch (330:9): [True: 0, False: 41.2k]
  |  Branch (330:28): [True: 0, False: 41.2k]
  ------------------
  331|  41.2k|        (pSsc1->tempShapeConfig != pSsc2->tempShapeConfig)) {
  ------------------
  |  Branch (331:9): [True: 854, False: 40.3k]
  ------------------
  332|    854|      *ctrlFlags |= MPEGS_INIT_STATES_GES;
  333|    854|    }
  334|       |
  335|       |    /* Analyse elements for initialization of FDreverb */
  336|  41.2k|    if ((upmixTypeFlag) || (binauralQualityFlag) || (partiallyComplexFlag) ||
  ------------------
  |  Branch (336:9): [True: 0, False: 41.2k]
  |  Branch (336:28): [True: 0, False: 41.2k]
  |  Branch (336:53): [True: 0, False: 41.2k]
  ------------------
  337|  41.2k|        (pSsc1->samplingFreq != pSsc2->samplingFreq) ||
  ------------------
  |  Branch (337:9): [True: 0, False: 41.2k]
  ------------------
  338|  41.2k|        (pSsc1->nTimeSlots != pSsc2->nTimeSlots)) {
  ------------------
  |  Branch (338:9): [True: 838, False: 40.4k]
  ------------------
  339|    838|      *ctrlFlags |= MPEGS_INIT_STATES_REVERB;
  340|    838|    }
  341|       |
  342|       |    /* Reset previous frame data whenever the config changes */
  343|  41.2k|    if (*ctrlFlags & MPEGS_INIT_CONFIG) {
  ------------------
  |  Branch (343:9): [True: 6.58k, False: 34.6k]
  ------------------
  344|  6.58k|      *ctrlFlags |= MPEGS_INIT_STATES_PARAM;
  345|  6.58k|    }
  346|  41.2k|  }
  347|       |
  348|  41.2k|  return MPS_OK;
  349|  41.2k|}
sac_dec_lib.cpp:_ZL26mpegSurroundDecoder_CreatePP19MpegSurroundDecoderiP14FDK_QMF_DOMAIN:
  614|  44.0k|    HANDLE_FDK_QMF_DOMAIN pQmfDomain) {
  615|  44.0k|  SACDEC_ERROR err = MPS_OK;
  616|  44.0k|  CMpegSurroundDecoder *sacDec = NULL;
  617|  44.0k|  spatialDec *self = NULL;
  618|       |
  619|       |  /* decoderLevel  decoderMode  maxNumOutputChannels  binauralMode */
  620|  44.0k|  static const SPATIAL_DEC_CONFIG decConfig = {
  621|  44.0k|      (CFG_LEVEL)(0), EXT_HQ_ONLY, OUTPUT_CHANNELS_DEFAULT, BINAURAL_NONE};
  622|       |
  623|  44.0k|  if (*pMpegSurroundDecoder == NULL) {
  ------------------
  |  Branch (623:7): [True: 21.8k, False: 22.2k]
  ------------------
  624|  21.8k|    FDK_ALLOCATE_MEMORY_1D(*pMpegSurroundDecoder, 1, CMpegSurroundDecoder)
  ------------------
  |  |  149|  21.8k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.8k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  625|       |
  626|  43.7k|    for (int i = 0; i < 1; i++) {
  ------------------
  |  Branch (626:21): [True: 21.8k, False: 21.8k]
  ------------------
  627|  21.8k|      err = SpatialDecCreateBsFrame(&(*pMpegSurroundDecoder)->bsFrames[i],
  628|  21.8k|                                    &(*pMpegSurroundDecoder)->llState);
  629|  21.8k|      if (err != MPS_OK) {
  ------------------
  |  Branch (629:11): [True: 0, False: 21.8k]
  ------------------
  630|      0|        sacDec = *pMpegSurroundDecoder;
  631|      0|        goto bail;
  632|      0|      }
  633|  21.8k|    }
  634|  21.8k|    (*pMpegSurroundDecoder)->pQmfDomain = pQmfDomain;
  635|       |
  636|  21.8k|    (*pMpegSurroundDecoder)->bsFrameDelay = 1;
  637|  21.8k|    (*pMpegSurroundDecoder)->bsFrameParse = 0;
  638|  21.8k|    (*pMpegSurroundDecoder)->bsFrameDecode = 0;
  639|       |
  640|  21.8k|    return err;
  641|  22.2k|  } else {
  642|  22.2k|    sacDec = *pMpegSurroundDecoder;
  643|  22.2k|  }
  644|       |
  645|  22.2k|  if (sacDec->pSpatialDec == NULL) {
  ------------------
  |  Branch (645:7): [True: 21.2k, False: 968]
  ------------------
  646|  21.2k|    if ((self = FDK_SpatialDecOpen(&decConfig, stereoConfigIndex)) == NULL) {
  ------------------
  |  Branch (646:9): [True: 0, False: 21.2k]
  ------------------
  647|      0|      err = MPS_OUTOFMEMORY;
  648|      0|      goto bail;
  649|      0|    }
  650|  21.2k|  } else {
  651|    968|    self = sacDec->pSpatialDec;
  652|    968|  }
  653|       |
  654|  22.2k|  self->pQmfDomain = sacDec->pQmfDomain;
  655|       |
  656|  22.2k|  sacDec->pSpatialDec = self;
  657|       |
  658|       |  /* default parameter set */
  659|  22.2k|  sacDec->mpegSurroundUserParams.outputMode = SACDEC_OUT_MODE_NORMAL;
  660|  22.2k|  sacDec->mpegSurroundUserParams.blindEnable = 0;
  661|  22.2k|  sacDec->mpegSurroundUserParams.bypassMode = 0;
  662|  22.2k|  sacDec->mpegSurroundUserParams.concealMethod = 1;
  663|  22.2k|  sacDec->mpegSurroundUserParams.concealNumKeepFrames = 10;
  664|  22.2k|  sacDec->mpegSurroundUserParams.concealFadeOutSlopeLength = 5;
  665|  22.2k|  sacDec->mpegSurroundUserParams.concealFadeInSlopeLength = 5;
  666|  22.2k|  sacDec->mpegSurroundUserParams.concealNumReleaseFrames = 3;
  667|  22.2k|  sacDec->mpegSurroundSscIsGlobalCfg = 0;
  668|  22.2k|  sacDec->mpegSurroundUseTimeInterface = 1;
  669|  22.2k|  sacDec->mpegSurroundDecoderLevel = decConfig.decoderLevel;
  670|       |
  671|  22.2k|  sacDec->upmixType = UPMIX_TYPE_NORMAL;
  672|       |
  673|       |  /* signalize spatial decoder re-initalization */
  674|  22.2k|  updateMpegSurroundDecoderStatus(sacDec, MPEGS_INIT_ENFORCE_REINIT,
  675|  22.2k|                                  MPEGS_SYNC_LOST, MPEGS_STOP);
  676|       |
  677|       |  /* return decoder instance */
  678|  22.2k|  *pMpegSurroundDecoder = sacDec;
  679|  22.2k|  sacDec->decConfig = decConfig;
  680|       |
  681|  22.2k|  SpatialDecInitParserContext(sacDec->pSpatialDec);
  682|       |
  683|  22.2k|  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|  97.8k|    const SPATIAL_SPECIFIC_CONFIG *pSsc, UINT sampleRate) {
  252|  97.8k|  UINT samplingFrequency = sampleRate;
  253|  97.8k|  int qmfBands = 64;
  254|       |
  255|  97.8k|  if (pSsc != NULL) {
  ------------------
  |  Branch (255:7): [True: 95.9k, False: 1.90k]
  ------------------
  256|  95.9k|    switch (pSsc->coreCodec) {
  257|  23.2k|      case AOT_USAC:
  ------------------
  |  Branch (257:7): [True: 23.2k, False: 72.6k]
  ------------------
  258|  23.2k|        if ((pSsc->stereoConfigIndex == 3)) {
  ------------------
  |  Branch (258:13): [True: 3.68k, False: 19.6k]
  ------------------
  259|  3.68k|          static const UCHAR mapIdx2QmfBands[3] = {24, 32, 16};
  260|  3.68k|          FDK_ASSERT((pSsc->coreSbrFrameLengthIndex >= 2) &&
  ------------------
  |  |  221|  3.68k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (260:11): [True: 3.68k, False: 0]
  |  Branch (260:11): [True: 3.68k, False: 0]
  |  Branch (260:11): [True: 3.68k, False: 0]
  ------------------
  261|  3.68k|                     (pSsc->coreSbrFrameLengthIndex <= 4));
  262|  3.68k|          qmfBands = mapIdx2QmfBands[pSsc->coreSbrFrameLengthIndex - 2];
  263|  3.68k|        }
  264|  23.2k|        return qmfBands;
  265|  72.6k|      default:
  ------------------
  |  Branch (265:7): [True: 72.6k, False: 23.2k]
  ------------------
  266|  72.6k|        samplingFrequency = pSsc->samplingFreq;
  267|  72.6k|        break;
  268|  95.9k|    }
  269|  95.9k|  }
  270|       |
  271|       |  /* number of QMF bands depend on sampling frequency, see FDIS 23003-1:2006
  272|       |   * Chapter 6.3.3 */
  273|  74.5k|  if (samplingFrequency < 27713) {
  ------------------
  |  Branch (273:7): [True: 44.4k, False: 30.1k]
  ------------------
  274|  44.4k|    qmfBands = 32;
  275|  44.4k|  }
  276|  74.5k|  if (samplingFrequency > 55426) {
  ------------------
  |  Branch (276:7): [True: 491, False: 74.0k]
  ------------------
  277|    491|    qmfBands = 128;
  278|    491|  }
  279|       |
  280|  74.5k|  return qmfBands;
  281|  97.8k|}
sac_dec_lib.cpp:_ZL17sscCheckOutOfBandPK25T_SPATIAL_SPECIFIC_CONFIGiii:
 1115|   121k|                  const INT sampleRate, const INT frameSize) {
 1116|   121k|  FDK_ASSERT(pSsc != NULL);
  ------------------
  |  |  221|   121k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1116:3): [True: 121k, False: 0]
  ------------------
 1117|   121k|  int qmfBands = 0;
 1118|       |
 1119|       |  /* check ssc for parse errors */
 1120|   121k|  if (sscParseCheck(pSsc) != MPS_OK) {
  ------------------
  |  Branch (1120:7): [True: 1.53k, False: 120k]
  ------------------
 1121|  1.53k|    return MPS_PARSE_ERROR;
 1122|  1.53k|  }
 1123|       |
 1124|   120k|  switch (coreCodec) {
 1125|  75.9k|    case AOT_USAC:
  ------------------
  |  Branch (1125:5): [True: 75.9k, False: 44.2k]
  ------------------
 1126|  75.9k|    case AOT_DRM_USAC:
  ------------------
  |  Branch (1126:5): [True: 0, False: 120k]
  ------------------
 1127|       |      /* ISO/IEC 23003-1:2007(E), Chapter 6.3.3, Support for lower and higher
 1128|       |       * sampling frequencies */
 1129|  75.9k|      if (pSsc->samplingFreq >= 55426) {
  ------------------
  |  Branch (1129:11): [True: 235, False: 75.6k]
  ------------------
 1130|    235|        return MPS_PARSE_ERROR;
 1131|    235|      }
 1132|  75.6k|      break;
 1133|  75.6k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1133:5): [True: 0, False: 120k]
  ------------------
 1134|  44.2k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1134:5): [True: 44.2k, False: 75.9k]
  ------------------
 1135|       |      /* core fs and mps fs must match */
 1136|  44.2k|      if (pSsc->samplingFreq != sampleRate) {
  ------------------
  |  Branch (1136:11): [True: 7.69k, False: 36.6k]
  ------------------
 1137|  7.69k|        return MPS_PARSE_ERROR;
 1138|  7.69k|      }
 1139|       |
 1140|       |      /* ISO/IEC 14496-3:2009 FDAM 3: Chapter 1.5.2.3, Levels for the Low Delay
 1141|       |       * AAC v2 profile */
 1142|  36.6k|      if (pSsc->samplingFreq > 48000) {
  ------------------
  |  Branch (1142:11): [True: 69, False: 36.5k]
  ------------------
 1143|     69|        return MPS_PARSE_ERROR;
 1144|     69|      }
 1145|       |
 1146|  36.5k|      qmfBands = mpegSurroundDecoder_GetNrOfQmfBands(pSsc, pSsc->samplingFreq);
 1147|  36.5k|      switch (frameSize) {
 1148|  3.80k|        case 480:
  ------------------
  |  Branch (1148:9): [True: 3.80k, False: 32.7k]
  ------------------
 1149|  3.80k|          if (!((qmfBands == 32) && (pSsc->nTimeSlots == 15))) {
  ------------------
  |  Branch (1149:17): [True: 3.44k, False: 358]
  |  Branch (1149:37): [True: 3.25k, False: 192]
  ------------------
 1150|    550|            return MPS_PARSE_ERROR;
 1151|    550|          }
 1152|  3.25k|          break;
 1153|  3.25k|        case 960:
  ------------------
  |  Branch (1153:9): [True: 1.53k, False: 35.0k]
  ------------------
 1154|  1.53k|          if (!((qmfBands == 64) && (pSsc->nTimeSlots == 15))) {
  ------------------
  |  Branch (1154:17): [True: 966, False: 569]
  |  Branch (1154:37): [True: 788, False: 178]
  ------------------
 1155|    747|            return MPS_PARSE_ERROR;
 1156|    747|          }
 1157|    788|          break;
 1158|  30.0k|        case 512:
  ------------------
  |  Branch (1158:9): [True: 30.0k, False: 6.49k]
  ------------------
 1159|  30.0k|          if (!(((qmfBands == 32) && (pSsc->nTimeSlots == 16)) ||
  ------------------
  |  Branch (1159:18): [True: 6.57k, False: 23.4k]
  |  Branch (1159:38): [True: 6.37k, False: 197]
  ------------------
 1160|  23.6k|                ((qmfBands == 64) && (pSsc->nTimeSlots == 8)))) {
  ------------------
  |  Branch (1160:18): [True: 23.4k, False: 197]
  |  Branch (1160:38): [True: 21.3k, False: 2.15k]
  ------------------
 1161|  2.35k|            return MPS_PARSE_ERROR;
 1162|  2.35k|          }
 1163|  27.6k|          break;
 1164|  27.6k|        case 1024:
  ------------------
  |  Branch (1164:9): [True: 1.16k, False: 35.3k]
  ------------------
 1165|  1.16k|          if (!((qmfBands == 64) && (pSsc->nTimeSlots == 16))) {
  ------------------
  |  Branch (1165:17): [True: 920, False: 240]
  |  Branch (1165:37): [True: 689, False: 231]
  ------------------
 1166|    471|            return MPS_PARSE_ERROR;
 1167|    471|          }
 1168|    689|          break;
 1169|    689|        default:
  ------------------
  |  Branch (1169:9): [True: 0, False: 36.5k]
  ------------------
 1170|      0|          return MPS_PARSE_ERROR;
 1171|  36.5k|      }
 1172|  32.4k|      break;
 1173|  32.4k|    default:
  ------------------
  |  Branch (1173:5): [True: 0, False: 120k]
  ------------------
 1174|      0|      return MPS_PARSE_ERROR;
 1175|      0|      break;
 1176|   120k|  }
 1177|       |
 1178|   108k|  return MPS_OK;
 1179|   120k|}
sac_dec_lib.cpp:_ZL14isValidAncTypeP19MpegSurroundDecoderi:
 1241|  34.1k|                          int ancType) {
 1242|  34.1k|  int ret = 1;
 1243|       |
 1244|  34.1k|  if ((ancType != MPEGS_ANCTYPE_HEADER_AND_FRAME) &&
  ------------------
  |  Branch (1244:7): [True: 25.4k, False: 8.71k]
  ------------------
 1245|  25.4k|      (ancType != MPEGS_ANCTYPE_FRAME)) {
  ------------------
  |  Branch (1245:7): [True: 9.80k, False: 15.6k]
  ------------------
 1246|  9.80k|    ret = 0;
 1247|  9.80k|  }
 1248|       |
 1249|  34.1k|  if (ret == 0) {
  ------------------
  |  Branch (1249:7): [True: 9.80k, False: 24.3k]
  ------------------
 1250|  9.80k|    updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
 1251|  9.80k|                                    MPEGS_INIT_ERROR_PAYLOAD, MPEGS_SYNC_LOST,
 1252|  9.80k|                                    MPEGS_STOP);
 1253|  9.80k|  }
 1254|       |
 1255|  34.1k|  return (ret);
 1256|  34.1k|}
sac_dec_lib.cpp:_ZL19isValidAncStartStopP19MpegSurroundDecoderi:
 1262|  24.3k|                               int ancStartStop) {
 1263|  24.3k|  int ret = 1;
 1264|       |
 1265|  24.3k|  switch (ancStartStop) {
  ------------------
  |  Branch (1265:11): [True: 24.3k, False: 0]
  ------------------
 1266|  4.42k|    case MPEGS_START:
  ------------------
  |  Branch (1266:5): [True: 4.42k, False: 19.9k]
  ------------------
 1267|       |      /* Sequence start - start and continue - start not allowed */
 1268|  4.42k|      if ((pMpegSurroundDecoder->ancStartStopPrev == MPEGS_START) ||
  ------------------
  |  Branch (1268:11): [True: 233, False: 4.18k]
  ------------------
 1269|  4.18k|          (pMpegSurroundDecoder->ancStartStopPrev == MPEGS_CONTINUE)) {
  ------------------
  |  Branch (1269:11): [True: 728, False: 3.46k]
  ------------------
 1270|    961|        ret = 0;
 1271|    961|      }
 1272|  4.42k|      break;
 1273|       |
 1274|  6.15k|    case MPEGS_STOP:
  ------------------
  |  Branch (1274:5): [True: 6.15k, False: 18.1k]
  ------------------
 1275|       |      /* MPS payload of the previous frame must be valid if current type is stop
 1276|       |         Sequence startstop - stop and stop - stop not allowed
 1277|       |         Sequence startstop - continue and stop - continue are allowed */
 1278|  6.15k|      if ((pMpegSurroundDecoder->ancStartStopPrev == MPEGS_STOP) ||
  ------------------
  |  Branch (1278:11): [True: 3.27k, False: 2.87k]
  ------------------
 1279|  3.33k|          (pMpegSurroundDecoder->ancStartStopPrev == MPEGS_START_STOP)) {
  ------------------
  |  Branch (1279:11): [True: 56, False: 2.82k]
  ------------------
 1280|  3.33k|        ret = 0;
 1281|  3.33k|      }
 1282|  6.15k|      break;
 1283|       |
 1284|  2.83k|    case MPEGS_CONTINUE:
  ------------------
  |  Branch (1284:5): [True: 2.83k, False: 21.4k]
  ------------------
 1285|  13.7k|    case MPEGS_START_STOP:
  ------------------
  |  Branch (1285:5): [True: 10.9k, False: 13.4k]
  ------------------
 1286|       |      /* No error detection possible for this states */
 1287|  13.7k|      break;
 1288|  24.3k|  }
 1289|       |
 1290|  24.3k|  if (ret == 0) {
  ------------------
  |  Branch (1290:7): [True: 4.29k, False: 20.0k]
  ------------------
 1291|  4.29k|    updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
 1292|  4.29k|                                    MPEGS_INIT_ERROR_PAYLOAD, MPEGS_SYNC_LOST,
 1293|  4.29k|                                    MPEGS_STOP);
 1294|  20.0k|  } else {
 1295|  20.0k|    pMpegSurroundDecoder->ancStartStopPrev = (MPEGS_ANCSTARTSTOP)ancStartStop;
 1296|  20.0k|  }
 1297|       |
 1298|  24.3k|  return (ret);
 1299|  24.3k|}
sac_dec_lib.cpp:_ZL14sscCheckInBandP25T_SPATIAL_SPECIFIC_CONFIGii:
 1024|  4.64k|                                   int frameLength, int sampleRate) {
 1025|  4.64k|  SACDEC_ERROR err = MPS_OK;
 1026|  4.64k|  int qmfBands;
 1027|       |
 1028|  4.64k|  FDK_ASSERT(pSsc != NULL);
  ------------------
  |  |  221|  4.64k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1028:3): [True: 4.64k, False: 0]
  ------------------
 1029|       |
 1030|       |  /* check ssc for parse errors */
 1031|  4.64k|  if (sscParseCheck(pSsc) != MPS_OK) {
  ------------------
  |  Branch (1031:7): [True: 967, False: 3.67k]
  ------------------
 1032|    967|    err = MPS_PARSE_ERROR;
 1033|    967|  }
 1034|       |
 1035|       |  /* core fs and mps fs must match */
 1036|  4.64k|  if (pSsc->samplingFreq != sampleRate) {
  ------------------
  |  Branch (1036:7): [True: 1.03k, False: 3.61k]
  ------------------
 1037|  1.03k|    err = MPS_PARSE_ERROR /* MPEGSDEC_SSC_PARSE_ERROR */;
 1038|  1.03k|  }
 1039|       |
 1040|  4.64k|  qmfBands = mpegSurroundDecoder_GetNrOfQmfBands(pSsc, pSsc->samplingFreq);
 1041|       |
 1042|  4.64k|  if (checkTimeSlots(frameLength, qmfBands, pSsc->nTimeSlots) != MPS_OK) {
  ------------------
  |  Branch (1042:7): [True: 1.02k, False: 3.61k]
  ------------------
 1043|  1.02k|    err = MPS_PARSE_ERROR;
 1044|  1.02k|  }
 1045|       |
 1046|  4.64k|  return err;
 1047|  4.64k|}
sac_dec_lib.cpp:_ZL31updateMpegSurroundDecoderStatusP19MpegSurroundDecoderi15MPEGS_SYNCSTATE18MPEGS_ANCSTARTSTOP:
  356|  79.4k|    MPEGS_SYNCSTATE fOnSync, MPEGS_ANCSTARTSTOP ancStartStopPrev) {
  357|  79.4k|  pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
  358|  79.4k|      initFlags;
  359|  79.4k|  if ((pMpegSurroundDecoder->mpegSurroundSscIsGlobalCfg != 0) &&
  ------------------
  |  Branch (359:7): [True: 36.7k, False: 42.7k]
  ------------------
  360|  36.7k|      (pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] >=
  ------------------
  |  Branch (360:7): [True: 33.9k, False: 2.79k]
  ------------------
  361|  36.7k|       MPEGS_SYNC_FOUND) &&
  362|  33.9k|      (fOnSync < MPEGS_SYNC_FOUND)) {
  ------------------
  |  Branch (362:7): [True: 33.9k, False: 0]
  ------------------
  363|  33.9k|    pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
  364|  33.9k|        MPEGS_SYNC_FOUND;
  365|  45.5k|  } else {
  366|  45.5k|    pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
  367|  45.5k|        fOnSync;
  368|  45.5k|  }
  369|  79.4k|  pMpegSurroundDecoder->ancStartStopPrev = ancStartStopPrev;
  370|  79.4k|}
sac_dec_lib.cpp:_ZL25mpegSurroundOperationModeP19MpegSurroundDecoderi:
  819|   158k|    CMpegSurroundDecoder *pMpegSurroundDecoder, int mpsDataBits) {
  820|   158k|  MPEGS_OPMODE mode;
  821|       |
  822|   158k|  {
  823|   158k|    if ((mpsDataBits > 0) &&
  ------------------
  |  Branch (823:9): [True: 158k, False: 0]
  ------------------
  824|   158k|        (pMpegSurroundDecoder->mpegSurroundUserParams.blindEnable == 0)) {
  ------------------
  |  Branch (824:9): [True: 158k, False: 0]
  ------------------
  825|   158k|      mode = MPEGS_OPMODE_MPS_PAYLOAD; /* Mode: Normal, Stereo or Binaural */
  826|   158k|    } else {
  827|      0|      mode = MPEGS_OPMODE_NO_MPS_PAYLOAD; /* Mode: No MPEG Surround Payload */
  828|      0|      updateMpegSurroundDecoderStatus(pMpegSurroundDecoder,
  829|      0|                                      MPEGS_INIT_ERROR_PAYLOAD, MPEGS_SYNC_LOST,
  830|      0|                                      MPEGS_STOP);
  831|      0|    }
  832|   158k|  }
  833|       |
  834|   158k|  return (mode);
  835|   158k|}

_Z9getChGainP17spatialDec_structjPi:
  151|   101k|FIXP_DBL getChGain(spatialDec *self, UINT ch, INT *scale) {
  152|       |  /* init no gain modifier */
  153|   101k|  FIXP_DBL gain = 0x80000000;
  154|   101k|  *scale = 0;
  155|       |
  156|   101k|  if ((!isTwoChMode(self->upmixType)) &&
  ------------------
  |  Branch (156:7): [True: 101k, False: 0]
  ------------------
  157|   101k|      (self->upmixType != UPMIXTYPE_BYPASS)) {
  ------------------
  |  Branch (157:7): [True: 101k, False: 0]
  ------------------
  158|   101k|    if ((ch == 0) || (ch == 1) || (ch == 2)) {
  ------------------
  |  Branch (158:9): [True: 50.5k, False: 50.5k]
  |  Branch (158:22): [True: 50.5k, False: 0]
  |  Branch (158:35): [True: 0, False: 0]
  ------------------
  159|       |      /* no modifier */
  160|   101k|    }
  161|   101k|  }
  162|       |
  163|   101k|  return gain;
  164|   101k|}
_Z21SpatialDecQMFAnalysisP17spatialDec_structPKiiiPPiS4_i:
  169|  1.26M|                                   const int numInputChannels) {
  170|  1.26M|  SACDEC_ERROR err = MPS_OK;
  171|  1.26M|  int ch, offset;
  172|       |
  173|  1.26M|  offset = self->pQmfDomain->globalConf.nBandsSynthesis *
  174|  1.26M|           self->pQmfDomain->globalConf.nQmfTimeSlots;
  175|       |
  176|  1.26M|  {
  177|  2.53M|    for (ch = 0; ch < numInputChannels; ch++) {
  ------------------
  |  Branch (177:18): [True: 1.26M, False: 1.26M]
  ------------------
  178|  1.26M|      const PCM_MPS *inSamples =
  179|  1.26M|          &inData[ts * self->pQmfDomain->globalConf.nBandsAnalysis];
  180|  1.26M|      FIXP_DBL *pQmfRealAnalysis = qmfReal[ch]; /* no delay in blind mode */
  181|  1.26M|      FIXP_DBL *pQmfImagAnalysis = qmfImag[ch];
  182|       |
  183|  1.26M|      CalculateSpaceAnalysisQmf(&self->pQmfDomain->QmfDomainIn[ch].fb,
  184|  1.26M|                                inSamples + (ch * offset), pQmfRealAnalysis,
  185|  1.26M|                                pQmfImagAnalysis);
  186|       |
  187|  1.26M|      if (!isTwoChMode(self->upmixType) && !bypassMode) {
  ------------------
  |  Branch (187:11): [True: 1.26M, False: 0]
  |  Branch (187:44): [True: 1.26M, False: 0]
  ------------------
  188|  1.26M|        int i;
  189|  32.0M|        for (i = 0; i < self->qmfBands; i++) {
  ------------------
  |  Branch (189:21): [True: 30.8M, False: 1.26M]
  ------------------
  190|  30.8M|          qmfReal[ch][i] = fMult(
  191|  30.8M|              scaleValueSaturate(qmfReal[ch][i], self->sacInDataHeadroom - (1)),
  192|  30.8M|              self->clipProtectGain__FDK);
  193|  30.8M|          qmfImag[ch][i] = fMult(
  194|  30.8M|              scaleValueSaturate(qmfImag[ch][i], self->sacInDataHeadroom - (1)),
  195|  30.8M|              self->clipProtectGain__FDK);
  196|  30.8M|        }
  197|  1.26M|      }
  198|  1.26M|    }
  199|  1.26M|  }
  200|       |
  201|  1.26M|  self->qmfInputDelayBufPos =
  202|  1.26M|      (self->qmfInputDelayBufPos + 1) % self->pc_filterdelay;
  203|       |
  204|  1.26M|  return err;
  205|  1.26M|}
_Z17SpatialDecFeedQMFP17spatialDec_structPPiS2_iiS2_S2_i:
  211|  3.54M|                               const INT numInputChannels) {
  212|  3.54M|  SACDEC_ERROR err = MPS_OK;
  213|  3.54M|  int ch;
  214|       |
  215|  3.54M|  {
  216|  7.09M|    for (ch = 0; ch < numInputChannels; ch++) {
  ------------------
  |  Branch (216:18): [True: 3.54M, False: 3.54M]
  ------------------
  217|  3.54M|      FIXP_DBL *pQmfRealAnalysis =
  218|  3.54M|          qmfReal__FDK[ch]; /* no delay in blind mode */
  219|  3.54M|      FIXP_DBL *pQmfImagAnalysis = qmfImag__FDK[ch];
  220|       |
  221|       |      /* Write Input data to pQmfRealAnalysis. */
  222|  3.54M|      if (self->bShareDelayWithSBR) {
  ------------------
  |  Branch (222:11): [True: 3.53M, False: 15.1k]
  ------------------
  223|  3.53M|        FDK_QmfDomain_GetSlot(&self->pQmfDomain->QmfDomainIn[ch],
  224|  3.53M|                              ts + HYBRID_FILTER_DELAY, 0,
  ------------------
  |  |  144|  3.53M|#define HYBRID_FILTER_DELAY (6)
  ------------------
  225|  3.53M|                              MAX_QMF_BANDS_TO_HYBRID, pQmfRealAnalysis,
  ------------------
  |  |  161|  3.53M|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  226|  3.53M|                              pQmfImagAnalysis, 15 + (1));
  227|  3.53M|        FDK_QmfDomain_GetSlot(&self->pQmfDomain->QmfDomainIn[ch], ts,
  228|  3.53M|                              MAX_QMF_BANDS_TO_HYBRID, self->qmfBands,
  ------------------
  |  |  161|  3.53M|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  229|  3.53M|                              pQmfRealAnalysis, pQmfImagAnalysis, 15 + (1));
  230|  3.53M|      } else {
  231|  15.1k|        FDK_QmfDomain_GetSlot(&self->pQmfDomain->QmfDomainIn[ch], ts, 0,
  232|  15.1k|                              self->qmfBands, pQmfRealAnalysis,
  233|  15.1k|                              pQmfImagAnalysis, 15 + (1));
  234|  15.1k|      }
  235|  3.54M|      if (ts == self->pQmfDomain->globalConf.nQmfTimeSlots - 1) {
  ------------------
  |  Branch (235:11): [True: 110k, False: 3.43M]
  ------------------
  236|       |        /* Is currently also needed in case we dont have any overlap. We need to
  237|       |         * save lb_scale to ov_lb_scale */
  238|   110k|        FDK_QmfDomain_SaveOverlap(&self->pQmfDomain->QmfDomainIn[ch], 0);
  239|   110k|      }
  240|       |
  241|       |      /* Apply clip protection to output. */
  242|  3.54M|      if (!isTwoChMode(self->upmixType) && !bypassMode) {
  ------------------
  |  Branch (242:11): [True: 3.54M, False: 0]
  |  Branch (242:44): [True: 3.54M, False: 0]
  ------------------
  243|  3.54M|        int i;
  244|   230M|        for (i = 0; i < self->qmfBands; i++) {
  ------------------
  |  Branch (244:21): [True: 226M, False: 3.54M]
  ------------------
  245|   226M|          qmfReal__FDK[ch][i] =
  246|   226M|              fMult(qmfReal__FDK[ch][i], self->clipProtectGain__FDK);
  247|   226M|          qmfImag__FDK[ch][i] =
  248|   226M|              fMult(qmfImag__FDK[ch][i], self->clipProtectGain__FDK);
  249|   226M|        }
  250|  3.54M|      }
  251|       |
  252|  3.54M|    } /* End of loop over numInputChannels */
  253|  3.54M|  }
  254|       |
  255|  3.54M|  self->qmfInputDelayBufPos =
  256|  3.54M|      (self->qmfInputDelayBufPos + 1) % self->pc_filterdelay;
  257|       |
  258|  3.54M|  return err;
  259|  3.54M|}
_Z24SpatialDecHybridAnalysisP17spatialDec_structPPiS2_S2_S2_ii:
  286|  4.81M|                                      const INT numInputChannels) {
  287|  4.81M|  SACDEC_ERROR err = MPS_OK;
  288|  4.81M|  int ch;
  289|       |
  290|  9.62M|  for (ch = 0; ch < numInputChannels;
  ------------------
  |  Branch (290:16): [True: 4.81M, False: 4.81M]
  ------------------
  291|  4.81M|       ch++) /* hybrid filtering for down-mix signals */
  292|  4.81M|  {
  293|  4.81M|    if (self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD) {
  ------------------
  |  |  536|  4.81M|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (293:9): [True: 584k, False: 4.22M]
  ------------------
  294|   584k|      int k;
  295|       |      /* No hybrid filtering. Just copy the QMF data. */
  296|  19.8M|      for (k = 0; k < self->hybridBands; k += 1) {
  ------------------
  |  Branch (296:19): [True: 19.3M, False: 584k]
  ------------------
  297|  19.3M|        hybOutputReal[ch][k] = qmfInputReal[ch][k];
  298|  19.3M|        hybOutputImag[ch][k] = qmfInputImag[ch][k];
  299|  19.3M|      }
  300|  4.22M|    } else {
  301|  4.22M|      self->hybridAnalysis[ch].hfMode = self->bShareDelayWithSBR;
  302|       |
  303|  4.22M|      if (self->stereoConfigIndex == 3)
  ------------------
  |  Branch (303:11): [True: 695k, False: 3.53M]
  ------------------
  304|  4.22M|        FDK_ASSERT(self->hybridAnalysis[ch].hfMode == 0);
  ------------------
  |  |  221|  4.22M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (304:9): [True: 695k, False: 0]
  ------------------
  305|  4.22M|      FDKhybridAnalysisApply(&self->hybridAnalysis[ch], qmfInputReal[ch],
  306|  4.22M|                             qmfInputImag[ch], hybOutputReal[ch],
  307|  4.22M|                             hybOutputImag[ch]);
  308|  4.22M|    }
  309|  4.81M|  }
  310|       |
  311|  4.81M|  if ((self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_USAC) &&
  ------------------
  |  |  532|  4.81M|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (311:7): [True: 4.22M, False: 584k]
  ------------------
  312|  4.22M|      self->residualCoding) {
  ------------------
  |  Branch (312:7): [True: 824k, False: 3.40M]
  ------------------
  313|   824k|    self->hybridAnalysis[numInputChannels].hfMode = 0;
  314|   824k|    FDKhybridAnalysisApply(
  315|   824k|        &self->hybridAnalysis[numInputChannels],
  316|   824k|        self->qmfResidualReal__FDK[0][0], self->qmfResidualImag__FDK[0][0],
  317|   824k|        self->hybResidualReal__FDK[0], self->hybResidualImag__FDK[0]);
  318|   824k|  }
  319|       |
  320|  4.81M|  return err;
  321|  4.81M|}
_Z17SpatialDecCreateXP17spatialDec_structPPiS2_S2_S2_:
  325|  4.81M|                               FIXP_DBL **pxImag) {
  326|  4.81M|  SACDEC_ERROR err = MPS_OK;
  327|  4.81M|  int row;
  328|       |
  329|       |  /* Creating wDry */
  330|  9.62M|  for (row = 0; row < self->numInputChannels; row++) {
  ------------------
  |  Branch (330:17): [True: 4.81M, False: 4.81M]
  ------------------
  331|       |    /* pointer to direct signals */
  332|  4.81M|    pxReal[row] = hybInputReal[row];
  333|  4.81M|    pxImag[row] = hybInputImag[row];
  334|  4.81M|  }
  335|       |
  336|  4.81M|  return err;
  337|  4.81M|}
_Z33SpatialDecApplyM1_CreateW_Mode212P17spatialDec_structPK23SPATIAL_BS_FRAME_structPPiS5_S5_S5_:
  367|  4.81M|    FIXP_DBL **xImag, FIXP_DBL **vReal, FIXP_DBL **vImag) {
  368|  4.81M|  SACDEC_ERROR err = MPS_OK;
  369|  4.81M|  int res;
  370|  4.81M|  FIXP_DBL *decorrInReal = vReal[0];
  371|  4.81M|  FIXP_DBL *decorrInImag = vImag[0];
  372|       |
  373|       |  /* M1 does not do anything in 212 mode, so use simplified processing */
  374|  4.81M|  FDK_ASSERT(self->numVChannels == 2);
  ------------------
  |  |  221|  4.81M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (374:3): [True: 4.81M, False: 0]
  ------------------
  375|  4.81M|  FDK_ASSERT(self->numDirektSignals == 1);
  ------------------
  |  |  221|  4.81M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (375:3): [True: 4.81M, False: 0]
  ------------------
  376|  4.81M|  FDK_ASSERT(self->numDecorSignals == 1);
  ------------------
  |  |  221|  4.81M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (376:3): [True: 4.81M, False: 0]
  ------------------
  377|  4.81M|  FDKmemcpy(vReal[0], xReal[0], self->hybridBands * sizeof(FIXP_DBL));
  378|  4.81M|  FDKmemcpy(vImag[0], xImag[0], self->hybridBands * sizeof(FIXP_DBL));
  379|       |
  380|  4.81M|  if (isTsdActive(frame->TsdData)) {
  ------------------
  |  Branch (380:7): [True: 27.1k, False: 4.78M]
  ------------------
  381|       |    /* Generate v_{x,nonTr} as input for allpass based decorrelator */
  382|  27.1k|    TsdGenerateNonTr(self->hybridBands, frame->TsdData, self->TsdTs, vReal[0],
  383|  27.1k|                     vImag[0], vReal[1], vImag[1], &decorrInReal,
  384|  27.1k|                     &decorrInImag);
  385|  27.1k|  }
  386|       |  /* - Decorrelate */
  387|  4.81M|  res = SpatialDecGetResidualIndex(self, 1);
  388|  4.81M|  if (FDKdecorrelateApply(&self->apDecor[0], decorrInReal, decorrInImag,
  ------------------
  |  Branch (388:7): [True: 0, False: 4.81M]
  ------------------
  389|  4.81M|                          vReal[1], vImag[1],
  390|  4.81M|                          self->param2hyb[self->residualBands[res]])) {
  391|      0|    return MPS_NOTOK;
  392|      0|  }
  393|  4.81M|  if (isTsdActive(frame->TsdData)) {
  ------------------
  |  Branch (393:7): [True: 27.1k, False: 4.78M]
  ------------------
  394|       |    /* Generate v_{x,Tr}, apply transient decorrelator and add to allpass based
  395|       |     * decorrelator output */
  396|  27.1k|    TsdApply(self->hybridBands, frame->TsdData, &self->TsdTs,
  397|  27.1k|             vReal[0], /* input: v_x */
  398|  27.1k|             vImag[0],
  399|  27.1k|             vReal[1], /* input: d_{x,nonTr}; output: d_{x,nonTr} + d_{x,Tr} */
  400|  27.1k|             vImag[1]);
  401|  27.1k|  }
  402|       |
  403|       |  /* Write residual signal in approriate parameter bands */
  404|  4.81M|  if (self->residualBands[res] > 0) {
  ------------------
  |  Branch (404:7): [True: 748k, False: 4.06M]
  ------------------
  405|   748k|    int stopBand = self->param2hyb[self->residualBands[res]];
  406|   748k|    FDKmemcpy(vReal[1], self->hybResidualReal__FDK[res],
  407|   748k|              fixMin(stopBand, self->hybridBands) * sizeof(FIXP_DBL));
  ------------------
  |  |  306|   748k|#define fixMin(a, b) fMin(a, b)
  ------------------
  408|   748k|    FDKmemcpy(vImag[1], self->hybResidualImag__FDK[res],
  409|   748k|              fixMin(stopBand, self->hybridBands) * sizeof(FIXP_DBL));
  ------------------
  |  |  306|   748k|#define fixMin(a, b) fMin(a, b)
  ------------------
  410|   748k|  } /* (self->residualBands[res]>0) */
  411|       |
  412|  4.81M|  return err;
  413|  4.81M|}
_Z25SpatialDecApplyM2_Mode212P17spatialDec_structisPPiS2_S2_S2_:
  419|   653k|                                       FIXP_DBL **hybOutputImagDry) {
  420|   653k|  SACDEC_ERROR err = MPS_OK;
  421|   653k|  INT row;
  422|       |
  423|   653k|  INT *pWidth = self->kernels_width;
  424|       |  /* for stereoConfigIndex == 3 case hybridBands is < 71 */
  425|   653k|  INT pb_max = self->kernels[self->hybridBands - 1] + 1;
  426|   653k|  INT max_row = self->numOutputChannels;
  427|       |
  428|   653k|  INT M2_exp = 0;
  429|   653k|  if (self->residualCoding) M2_exp = 3;
  ------------------
  |  Branch (429:7): [True: 575k, False: 78.6k]
  ------------------
  430|       |
  431|  1.96M|  for (row = 0; row < max_row; row++)  // 2 times
  ------------------
  |  Branch (431:17): [True: 1.30M, False: 653k]
  ------------------
  432|  1.30M|  {
  433|  1.30M|    FIXP_DBL *Mparam0 = self->M2Real__FDK[row][0];
  434|  1.30M|    FIXP_DBL *Mparam1 = self->M2Real__FDK[row][1];
  435|  1.30M|    FIXP_DBL *MparamPrev0 = self->M2RealPrev__FDK[row][0];
  436|  1.30M|    FIXP_DBL *MparamPrev1 = self->M2RealPrev__FDK[row][1];
  437|       |
  438|  1.30M|    FIXP_DBL *RESTRICT pHybOutRealDry = hybOutputRealDry[row];
  439|  1.30M|    FIXP_DBL *RESTRICT pHybOutImagDry = hybOutputImagDry[row];
  440|       |
  441|  1.30M|    FIXP_DBL *RESTRICT pWReal0 = wReal[0];
  442|  1.30M|    FIXP_DBL *RESTRICT pWReal1 = wReal[1];
  443|  1.30M|    FIXP_DBL *RESTRICT pWImag0 = wImag[0];
  444|  1.30M|    FIXP_DBL *RESTRICT pWImag1 = wImag[1];
  445|  13.5M|    for (INT pb = 0; pb < pb_max; pb++) {
  ------------------
  |  Branch (445:22): [True: 12.2M, False: 1.30M]
  ------------------
  446|  12.2M|      FIXP_DBL tmp0, tmp1;
  447|       |
  448|  12.2M|      tmp0 = interpolateParameter(alpha, Mparam0[pb], MparamPrev0[pb]);
  449|  12.2M|      tmp1 = interpolateParameter(alpha, Mparam1[pb], MparamPrev1[pb]);
  450|       |
  451|  12.2M|      INT i = pWidth[pb];
  452|       |
  453|  12.2M|      do  // about 3-4 times
  454|  45.0M|      {
  455|  45.0M|        FIXP_DBL var0, var1, real, imag;
  456|       |
  457|  45.0M|        var0 = *pWReal0++;
  458|  45.0M|        var1 = *pWReal1++;
  459|  45.0M|        real = fMultDiv2(var0, tmp0);
  460|  45.0M|        var0 = *pWImag0++;
  461|  45.0M|        real = fMultAddDiv2(real, var1, tmp1);
  462|  45.0M|        var1 = *pWImag1++;
  463|  45.0M|        imag = fMultDiv2(var0, tmp0);
  464|  45.0M|        *pHybOutRealDry++ = real << (1 + M2_exp);
  465|  45.0M|        imag = fMultAddDiv2(imag, var1, tmp1);
  466|  45.0M|        *pHybOutImagDry++ = imag << (1 + M2_exp);
  467|  45.0M|      } while (--i != 0);
  ------------------
  |  Branch (467:16): [True: 32.8M, False: 12.2M]
  ------------------
  468|  12.2M|    }
  469|  1.30M|  }
  470|   653k|  return err;
  471|   653k|}
_Z50SpatialDecApplyM2_Mode212_ResidualsPlusPhaseCodingP17spatialDec_structisPPiS2_S2_S2_:
  476|  60.0k|    FIXP_DBL **hybOutputImagDry) {
  477|  60.0k|  SACDEC_ERROR err = MPS_OK;
  478|  60.0k|  INT row;
  479|  60.0k|  INT scale_param_m2;
  480|  60.0k|  INT *pWidth = self->kernels_width;
  481|  60.0k|  INT pb_max = self->kernels[self->hybridBands - 1] + 1;
  482|       |
  483|  60.0k|  scale_param_m2 = SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2;
  ------------------
  |  |  116|  60.0k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
                scale_param_m2 = SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2;
  ------------------
  |  |  119|  60.0k|#define SCALE_DATA_APPLY_M2 (1)
  ------------------
  484|       |
  485|   180k|  for (row = 0; row < self->numM2rows; row++) {
  ------------------
  |  Branch (485:17): [True: 120k, False: 60.0k]
  ------------------
  486|   120k|    INT qs, pb;
  487|       |
  488|   120k|    FIXP_DBL *RESTRICT pWReal0 = wReal[0];
  489|   120k|    FIXP_DBL *RESTRICT pWImag0 = wImag[0];
  490|   120k|    FIXP_DBL *RESTRICT pWReal1 = wReal[1];
  491|   120k|    FIXP_DBL *RESTRICT pWImag1 = wImag[1];
  492|       |
  493|   120k|    FIXP_DBL *MReal0 = self->M2Real__FDK[row][0];
  494|   120k|    FIXP_DBL *MImag0 = self->M2Imag__FDK[row][0];
  495|   120k|    FIXP_DBL *MReal1 = self->M2Real__FDK[row][1];
  496|   120k|    FIXP_DBL *MRealPrev0 = self->M2RealPrev__FDK[row][0];
  497|   120k|    FIXP_DBL *MImagPrev0 = self->M2ImagPrev__FDK[row][0];
  498|   120k|    FIXP_DBL *MRealPrev1 = self->M2RealPrev__FDK[row][1];
  499|       |
  500|   120k|    FIXP_DBL *RESTRICT pHybOutRealDry = hybOutputRealDry[row];
  501|   120k|    FIXP_DBL *RESTRICT pHybOutImagDry = hybOutputImagDry[row];
  502|       |
  503|   120k|    FDK_ASSERT(!(self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD));
  ------------------
  |  |  221|   120k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (503:5): [True: 120k, False: 0]
  ------------------
  504|   120k|    FDK_ASSERT((pWidth[0] + pWidth[1]) >= 3);
  ------------------
  |  |  221|   120k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (504:5): [True: 120k, False: 0]
  ------------------
  505|       |
  506|   360k|    for (pb = 0, qs = 3; pb < 2; pb++) {
  ------------------
  |  Branch (506:26): [True: 240k, False: 120k]
  ------------------
  507|   240k|      INT s;
  508|   240k|      FIXP_DBL maxVal;
  509|   240k|      FIXP_DBL mReal1;
  510|   240k|      FIXP_DBL mReal0, mImag0;
  511|   240k|      FIXP_DBL iReal0, iImag0, iReal1;
  512|       |
  513|   240k|      iReal0 = interpolateParameter(alpha, MReal0[pb], MRealPrev0[pb]);
  514|   240k|      iImag0 = -interpolateParameter(alpha, MImag0[pb], MImagPrev0[pb]);
  515|   240k|      iReal1 = interpolateParameter(alpha, MReal1[pb], MRealPrev1[pb]);
  516|       |
  517|   240k|      maxVal = fAbs(iReal0) | fAbs(iImag0);
  518|   240k|      maxVal |= fAbs(iReal1);
  519|       |
  520|   240k|      s = fMin(CntLeadingZeros(maxVal) - 2, scale_param_m2);
  ------------------
  |  |  308|   240k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  521|       |
  522|   240k|      mReal0 = scaleValue(iReal0, s);
  523|   240k|      mImag0 = scaleValue(iImag0, s);
  524|   240k|      mReal1 = scaleValue(iReal1, s);
  525|       |
  526|   240k|      s = scale_param_m2 - s;
  527|       |
  528|   240k|      INT i = pWidth[pb];
  529|       |
  530|   774k|      do {
  531|   774k|        FIXP_DBL real, imag, wReal0, wImag0, wReal1, wImag1;
  532|       |
  533|   774k|        wReal0 = *pWReal0++;
  534|   774k|        wImag0 = *pWImag0++;
  535|   774k|        wReal1 = *pWReal1++;
  536|   774k|        wImag1 = *pWImag1++;
  537|       |
  538|   774k|        cplxMultDiv2(&real, &imag, wReal0, wImag0, mReal0, mImag0);
  539|       |
  540|   774k|        *pHybOutRealDry++ = fMultAddDiv2(real, wReal1, mReal1) << s;
  541|   774k|        *pHybOutImagDry++ = fMultAddDiv2(imag, wImag1, mReal1) << s;
  542|       |
  543|   774k|        if (qs > 0) {
  ------------------
  |  Branch (543:13): [True: 360k, False: 414k]
  ------------------
  544|   360k|          mImag0 = -mImag0;
  545|   360k|          qs--;
  546|   360k|        }
  547|   774k|      } while (--i != 0);
  ------------------
  |  Branch (547:16): [True: 534k, False: 240k]
  ------------------
  548|   240k|    }
  549|       |
  550|  1.47M|    for (; pb < pb_max; pb++) {
  ------------------
  |  Branch (550:12): [True: 1.34M, False: 120k]
  ------------------
  551|  1.34M|      INT s;
  552|  1.34M|      FIXP_DBL maxVal;
  553|  1.34M|      FIXP_SGL mReal1;
  554|  1.34M|      FIXP_SGL mReal0, mImag0;
  555|  1.34M|      FIXP_DBL iReal0, iImag0, iReal1;
  556|       |
  557|  1.34M|      iReal0 = interpolateParameter(alpha, MReal0[pb], MRealPrev0[pb]);
  558|  1.34M|      iImag0 = interpolateParameter(alpha, MImag0[pb], MImagPrev0[pb]);
  559|  1.34M|      iReal1 = interpolateParameter(alpha, MReal1[pb], MRealPrev1[pb]);
  560|       |
  561|  1.34M|      maxVal = fAbs(iReal0) | fAbs(iImag0);
  562|  1.34M|      maxVal |= fAbs(iReal1);
  563|       |
  564|  1.34M|      s = fMin(CntLeadingZeros(maxVal) - 2, scale_param_m2);
  ------------------
  |  |  308|  1.34M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  565|       |
  566|  1.34M|      mReal0 = FX_DBL2FX_SGL(scaleValue(iReal0, s));
  ------------------
  |  |  220|  1.34M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.34M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.34M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  567|  1.34M|      mImag0 = FX_DBL2FX_SGL(scaleValue(iImag0, s));
  ------------------
  |  |  220|  1.34M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.34M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.34M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  568|  1.34M|      mReal1 = FX_DBL2FX_SGL(scaleValue(iReal1, s));
  ------------------
  |  |  220|  1.34M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.34M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.34M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  569|       |
  570|  1.34M|      s = scale_param_m2 - s;
  571|       |
  572|  1.34M|      INT i = pWidth[pb];
  573|       |
  574|  4.24M|      do {
  575|  4.24M|        FIXP_DBL real, imag, wReal0, wImag0, wReal1, wImag1;
  576|       |
  577|  4.24M|        wReal0 = *pWReal0++;
  578|  4.24M|        wImag0 = *pWImag0++;
  579|  4.24M|        wReal1 = *pWReal1++;
  580|  4.24M|        wImag1 = *pWImag1++;
  581|       |
  582|  4.24M|        cplxMultDiv2(&real, &imag, wReal0, wImag0, mReal0, mImag0);
  583|       |
  584|  4.24M|        *pHybOutRealDry++ = fMultAddDiv2(real, wReal1, mReal1) << s;
  585|  4.24M|        *pHybOutImagDry++ = fMultAddDiv2(imag, wImag1, mReal1) << s;
  586|  4.24M|      } while (--i != 0);
  ------------------
  |  Branch (586:16): [True: 2.89M, False: 1.34M]
  ------------------
  587|  1.34M|    }
  588|   120k|  }
  589|       |
  590|  60.0k|  return err;
  591|  60.0k|}
_Z17SpatialDecApplyM2P17spatialDec_structisPPiS2_S2_S2_S2_S2_:
  598|  4.09M|                               FIXP_DBL **hybOutputImagWet) {
  599|  4.09M|  SACDEC_ERROR err = MPS_OK;
  600|       |
  601|  4.09M|  {
  602|  4.09M|    int qs, row, col;
  603|  4.09M|    int complexHybBands;
  604|  4.09M|    int complexParBands;
  605|  4.09M|    int scale_param_m2 = 0;
  606|  4.09M|    int toolsDisabled;
  607|       |
  608|  4.09M|    UCHAR activParamBands;
  609|  4.09M|    FIXP_DBL *RESTRICT pWReal, *RESTRICT pWImag, *RESTRICT pHybOutRealDry,
  610|  4.09M|        *RESTRICT pHybOutImagDry, *RESTRICT pHybOutRealWet,
  611|  4.09M|        *RESTRICT pHybOutImagWet;
  612|  4.09M|    C_ALLOC_SCRATCH_START(pKernel, FIXP_SGL, MAX_HYBRID_BANDS);
  ------------------
  |  |  324|  4.09M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  613|       |
  614|       |    /* The wet signal is added to the dry signal directly in applyM2 if GES and
  615|       |     * STP are disabled */
  616|  4.09M|    toolsDisabled =
  617|  4.09M|        ((self->tempShapeConfig == 1) || (self->tempShapeConfig == 2)) ? 0 : 1;
  ------------------
  |  Branch (617:10): [True: 626k, False: 3.47M]
  |  Branch (617:42): [True: 3.32M, False: 144k]
  ------------------
  618|       |
  619|  4.09M|    {
  620|  4.09M|      complexHybBands = self->hybridBands;
  621|  4.09M|      complexParBands = self->numParameterBands;
  622|  4.09M|    }
  623|       |
  624|  4.09M|    FDKmemclear(hybOutputImagDry[0],
  625|  4.09M|                self->createParams.maxNumOutputChannels *
  626|  4.09M|                    self->createParams.maxNumCmplxHybBands * sizeof(FIXP_DBL));
  627|  4.09M|    FDKmemclear(hybOutputRealDry[0], self->createParams.maxNumOutputChannels *
  628|  4.09M|                                         self->createParams.maxNumHybridBands *
  629|  4.09M|                                         sizeof(FIXP_DBL));
  630|       |
  631|  4.09M|    if (!toolsDisabled) {
  ------------------
  |  Branch (631:9): [True: 3.95M, False: 144k]
  ------------------
  632|  3.95M|      FDKmemclear(hybOutputRealWet[0],
  633|  3.95M|                  self->createParams.maxNumOutputChannels *
  634|  3.95M|                      self->createParams.maxNumHybridBands * sizeof(FIXP_DBL));
  635|  3.95M|      FDKmemclear(hybOutputImagWet[0],
  636|  3.95M|                  self->createParams.maxNumOutputChannels *
  637|  3.95M|                      self->createParams.maxNumCmplxHybBands *
  638|  3.95M|                      sizeof(FIXP_DBL));
  639|  3.95M|    }
  640|       |
  641|  4.09M|    if (self->phaseCoding == 3) {
  ------------------
  |  Branch (641:9): [True: 81.8k, False: 4.01M]
  ------------------
  642|  81.8k|      scale_param_m2 = -(SCALE_DATA_APPLY_M2_PC - 1);
  ------------------
  |  |  122|  81.8k|#define SCALE_DATA_APPLY_M2_PC (2)
  ------------------
  643|  81.8k|    }
  644|       |
  645|  12.2M|    for (row = 0; row < self->numM2rows; row++) {
  ------------------
  |  Branch (645:19): [True: 8.19M, False: 4.09M]
  ------------------
  646|  8.19M|      pHybOutRealDry = hybOutputRealDry[row];
  647|  8.19M|      pHybOutImagDry = hybOutputImagDry[row];
  648|       |
  649|  8.19M|      if (toolsDisabled) {
  ------------------
  |  Branch (649:11): [True: 288k, False: 7.90M]
  ------------------
  650|   288k|        pHybOutRealWet = hybOutputRealDry[row];
  651|   288k|        pHybOutImagWet = hybOutputImagDry[row];
  652|  7.90M|      } else {
  653|  7.90M|        pHybOutRealWet = hybOutputRealWet[row];
  654|  7.90M|        pHybOutImagWet = hybOutputImagWet[row];
  655|  7.90M|      }
  656|       |
  657|  16.3M|      for (col = 0; col < self->numDirektSignals; col++) {
  ------------------
  |  Branch (657:21): [True: 8.19M, False: 8.19M]
  ------------------
  658|  8.19M|        if (self->pActivM2ParamBands ==
  ------------------
  |  Branch (658:13): [True: 8.19M, False: 0]
  ------------------
  659|  8.19M|            0) { /* default setting, calculate all rows and columns */
  660|  8.19M|          activParamBands = 1;
  661|  8.19M|        } else {
  662|      0|          if (self->pActivM2ParamBands[MAX_M2_INPUT * row +
  ------------------
  |  |  158|      0|#define MAX_M2_INPUT (MAX_OUTPUT_CHANNELS) /* 3 direct + 5 diffuse */
  |  |  ------------------
  |  |  |  |  112|      0|  2 /* CAUTION: This does NOT restrict the number of                    \
  |  |  ------------------
  ------------------
  |  Branch (662:15): [True: 0, False: 0]
  ------------------
  663|      0|                                       col]) /* table with activ and inactiv
  664|       |                                                bands exists for current
  665|       |                                                configuration */
  666|      0|            activParamBands = 1;
  667|      0|          else
  668|      0|            activParamBands = 0;
  669|      0|        }
  670|  8.19M|        if (activParamBands) {
  ------------------
  |  Branch (670:13): [True: 8.19M, False: 0]
  ------------------
  671|  8.19M|          pWReal = wReal[col];
  672|  8.19M|          pWImag = wImag[col];
  673|       |
  674|  8.19M|          M2ParamToKernelMult(pKernel, self->M2Real__FDK[row][col],
  675|  8.19M|                              self->M2RealPrev__FDK[row][col],
  676|  8.19M|                              self->kernels_width, alpha,
  677|  8.19M|                              self->numParameterBands);
  678|       |
  679|  8.19M|          if (1 && (self->phaseCoding != 3)) {
  ------------------
  |  Branch (679:15): [True: 8.19M, Folded]
  |  Branch (679:20): [True: 8.03M, False: 163k]
  ------------------
  680|       |            /* direct signals */
  681|  8.03M|            {
  682|       |              /* only one sample will be assigned to each row, hence
  683|       |               * accumulation is not neccessary; that is valid for all
  684|       |               * configurations */
  685|   523M|              for (qs = 0; qs < complexHybBands; qs++) {
  ------------------
  |  Branch (685:28): [True: 515M, False: 8.03M]
  ------------------
  686|   515M|                pHybOutRealDry[qs] = fMult(pWReal[qs], pKernel[qs]);
  687|   515M|                pHybOutImagDry[qs] = fMult(pWImag[qs], pKernel[qs]);
  688|   515M|              }
  689|  8.03M|            }
  690|  8.03M|          } else { /*  isBinauralMode(self->upmixType)  */
  691|       |
  692|  8.69M|            for (qs = 0; qs < complexHybBands; qs++) {
  ------------------
  |  Branch (692:26): [True: 8.52M, False: 163k]
  ------------------
  693|  8.52M|              pHybOutRealDry[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  8.52M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  694|  8.52M|                  fMultDiv2(pWReal[qs], pKernel[qs]), scale_param_m2);
  695|  8.52M|              pHybOutImagDry[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  8.52M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  696|  8.52M|                  fMultDiv2(pWImag[qs], pKernel[qs]), scale_param_m2);
  697|  8.52M|            }
  698|       |
  699|   163k|            M2ParamToKernelMult(pKernel, self->M2Imag__FDK[row][col],
  700|   163k|                                self->M2ImagPrev__FDK[row][col],
  701|   163k|                                self->kernels_width, alpha, complexParBands);
  702|       |
  703|       |            /* direct signals sign is -1 for qs = 0,2 */
  704|   163k|            pHybOutRealDry[0] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  705|   163k|                fMultDiv2(pWImag[0], pKernel[0]), scale_param_m2);
  706|   163k|            pHybOutImagDry[0] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  707|   163k|                fMultDiv2(pWReal[0], pKernel[0]), scale_param_m2);
  708|       |
  709|   163k|            pHybOutRealDry[2] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  710|   163k|                fMultDiv2(pWImag[2], pKernel[2]), scale_param_m2);
  711|   163k|            pHybOutImagDry[2] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  712|   163k|                fMultDiv2(pWReal[2], pKernel[2]), scale_param_m2);
  713|       |
  714|       |            /* direct signals sign is +1 for qs = 1,3,4,5,...,complexHybBands */
  715|   163k|            pHybOutRealDry[1] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  716|   163k|                fMultDiv2(pWImag[1], pKernel[1]), scale_param_m2);
  717|   163k|            pHybOutImagDry[1] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  718|   163k|                fMultDiv2(pWReal[1], pKernel[1]), scale_param_m2);
  719|       |
  720|  8.20M|            for (qs = 3; qs < complexHybBands; qs++) {
  ------------------
  |  Branch (720:26): [True: 8.03M, False: 163k]
  ------------------
  721|  8.03M|              pHybOutRealDry[qs] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  8.03M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  722|  8.03M|                  fMultDiv2(pWImag[qs], pKernel[qs]), scale_param_m2);
  723|  8.03M|              pHybOutImagDry[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  8.03M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  724|  8.03M|                  fMultDiv2(pWReal[qs], pKernel[qs]), scale_param_m2);
  725|  8.03M|            }
  726|   163k|          } /* self->upmixType */
  727|  8.19M|        }   /* if (activParamBands) */
  728|  8.19M|      }     /* self->numDirektSignals */
  729|       |
  730|  16.3M|      for (; col < self->numVChannels; col++) {
  ------------------
  |  Branch (730:14): [True: 8.19M, False: 8.19M]
  ------------------
  731|  8.19M|        if (self->pActivM2ParamBands ==
  ------------------
  |  Branch (731:13): [True: 8.19M, False: 0]
  ------------------
  732|  8.19M|            0) { /* default setting, calculate all rows and columns */
  733|  8.19M|          activParamBands = 1;
  734|  8.19M|        } else {
  735|      0|          if (self->pActivM2ParamBands[MAX_M2_INPUT * row +
  ------------------
  |  |  158|      0|#define MAX_M2_INPUT (MAX_OUTPUT_CHANNELS) /* 3 direct + 5 diffuse */
  |  |  ------------------
  |  |  |  |  112|      0|  2 /* CAUTION: This does NOT restrict the number of                    \
  |  |  ------------------
  ------------------
  |  Branch (735:15): [True: 0, False: 0]
  ------------------
  736|      0|                                       col]) /* table with activ and inactiv
  737|       |                                                bands exists for current
  738|       |                                                configuration */
  739|      0|            activParamBands = 1;
  740|      0|          else
  741|      0|            activParamBands = 0;
  742|      0|        }
  743|       |
  744|  8.19M|        if (activParamBands) {
  ------------------
  |  Branch (744:13): [True: 8.19M, False: 0]
  ------------------
  745|  8.19M|          int resBandIndex;
  746|  8.19M|          int resHybIndex;
  747|       |
  748|  8.19M|          resBandIndex =
  749|  8.19M|              self->residualBands[SpatialDecGetResidualIndex(self, col)];
  750|  8.19M|          resHybIndex = self->param2hyb[resBandIndex];
  751|       |
  752|  8.19M|          pWReal = wReal[col];
  753|  8.19M|          pWImag = wImag[col];
  754|       |
  755|  8.19M|          M2ParamToKernelMult(pKernel, self->M2Real__FDK[row][col],
  756|  8.19M|                              self->M2RealPrev__FDK[row][col],
  757|  8.19M|                              self->kernels_width, alpha,
  758|  8.19M|                              self->numParameterBands);
  759|       |
  760|  8.19M|          if (1 && (self->phaseCoding != 3)) {
  ------------------
  |  Branch (760:15): [True: 8.19M, Folded]
  |  Branch (760:20): [True: 8.03M, False: 163k]
  ------------------
  761|       |            /* residual signals */
  762|  10.4M|            for (qs = 0; qs < resHybIndex; qs++) {
  ------------------
  |  Branch (762:26): [True: 2.36M, False: 8.03M]
  ------------------
  763|  2.36M|              pHybOutRealDry[qs] += fMult(pWReal[qs], pKernel[qs]);
  764|  2.36M|              pHybOutImagDry[qs] += fMult(pWImag[qs], pKernel[qs]);
  765|  2.36M|            }
  766|       |            /* decor signals */
  767|   521M|            for (; qs < complexHybBands; qs++) {
  ------------------
  |  Branch (767:20): [True: 513M, False: 8.03M]
  ------------------
  768|   513M|              pHybOutRealWet[qs] += fMult(pWReal[qs], pKernel[qs]);
  769|   513M|              pHybOutImagWet[qs] += fMult(pWImag[qs], pKernel[qs]);
  770|   513M|            }
  771|  8.03M|          } else { /* self->upmixType */
  772|       |            /* residual signals */
  773|   163k|            FIXP_DBL *RESTRICT pHybOutReal;
  774|   163k|            FIXP_DBL *RESTRICT pHybOutImag;
  775|       |
  776|   821k|            for (qs = 0; qs < resHybIndex; qs++) {
  ------------------
  |  Branch (776:26): [True: 658k, False: 163k]
  ------------------
  777|   658k|              pHybOutRealDry[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   658k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  778|   658k|                  fMultDiv2(pWReal[qs], pKernel[qs]), scale_param_m2);
  779|   658k|              pHybOutImagDry[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   658k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  780|   658k|                  fMultDiv2(pWImag[qs], pKernel[qs]), scale_param_m2);
  781|   658k|            }
  782|       |            /* decor signals */
  783|  8.03M|            for (; qs < complexHybBands; qs++) {
  ------------------
  |  Branch (783:20): [True: 7.87M, False: 163k]
  ------------------
  784|  7.87M|              pHybOutRealWet[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  7.87M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  785|  7.87M|                  fMultDiv2(pWReal[qs], pKernel[qs]), scale_param_m2);
  786|  7.87M|              pHybOutImagWet[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  7.87M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  787|  7.87M|                  fMultDiv2(pWImag[qs], pKernel[qs]), scale_param_m2);
  788|  7.87M|            }
  789|       |
  790|   163k|            M2ParamToKernelMult(pKernel, self->M2Imag__FDK[row][col],
  791|   163k|                                self->M2ImagPrev__FDK[row][col],
  792|   163k|                                self->kernels_width, alpha, complexParBands);
  793|       |
  794|       |            /* direct signals sign is -1 for qs = 0,2 */
  795|       |            /* direct signals sign is +1 for qs = 1,3.. */
  796|   163k|            if (toolsDisabled) {
  ------------------
  |  Branch (796:17): [True: 0, False: 163k]
  ------------------
  797|      0|              pHybOutRealDry[0] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|      0|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  798|      0|                  fMultDiv2(pWImag[0], pKernel[0]), scale_param_m2);
  799|      0|              pHybOutImagDry[0] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|      0|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  800|      0|                  fMultDiv2(pWReal[0], pKernel[0]), scale_param_m2);
  801|       |
  802|      0|              pHybOutRealDry[1] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|      0|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  803|      0|                  fMultDiv2(pWImag[1], pKernel[1]), scale_param_m2);
  804|      0|              pHybOutImagDry[1] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|      0|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  805|      0|                  fMultDiv2(pWReal[1], pKernel[1]), scale_param_m2);
  806|       |
  807|      0|              pHybOutRealDry[2] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|      0|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  808|      0|                  fMultDiv2(pWImag[2], pKernel[2]), scale_param_m2);
  809|      0|              pHybOutImagDry[2] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|      0|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  810|      0|                  fMultDiv2(pWReal[2], pKernel[2]), scale_param_m2);
  811|   163k|            } else {
  812|   163k|              pHybOutReal = &pHybOutRealDry[0];
  813|   163k|              pHybOutImag = &pHybOutImagDry[0];
  814|   163k|              if (0 == resHybIndex) {
  ------------------
  |  Branch (814:19): [True: 85.0k, False: 78.7k]
  ------------------
  815|  85.0k|                pHybOutReal = &pHybOutRealWet[0];
  816|  85.0k|                pHybOutImag = &pHybOutImagWet[0];
  817|  85.0k|              }
  818|   163k|              pHybOutReal[0] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  819|   163k|                  fMultDiv2(pWImag[0], pKernel[0]), scale_param_m2);
  820|   163k|              pHybOutImag[0] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  821|   163k|                  fMultDiv2(pWReal[0], pKernel[0]), scale_param_m2);
  822|       |
  823|   163k|              if (1 == resHybIndex) {
  ------------------
  |  Branch (823:19): [True: 0, False: 163k]
  ------------------
  824|      0|                pHybOutReal = &pHybOutRealWet[0];
  825|      0|                pHybOutImag = &pHybOutImagWet[0];
  826|      0|              }
  827|   163k|              pHybOutReal[1] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  828|   163k|                  fMultDiv2(pWImag[1], pKernel[1]), scale_param_m2);
  829|   163k|              pHybOutImag[1] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  830|   163k|                  fMultDiv2(pWReal[1], pKernel[1]), scale_param_m2);
  831|       |
  832|   163k|              if (2 == resHybIndex) {
  ------------------
  |  Branch (832:19): [True: 13.4k, False: 150k]
  ------------------
  833|  13.4k|                pHybOutReal = &pHybOutRealWet[0];
  834|  13.4k|                pHybOutImag = &pHybOutImagWet[0];
  835|  13.4k|              }
  836|   163k|              pHybOutReal[2] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  837|   163k|                  fMultDiv2(pWImag[2], pKernel[2]), scale_param_m2);
  838|   163k|              pHybOutImag[2] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   163k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  839|   163k|                  fMultDiv2(pWReal[2], pKernel[2]), scale_param_m2);
  840|   163k|            }
  841|       |
  842|   599k|            for (qs = 3; qs < resHybIndex; qs++) {
  ------------------
  |  Branch (842:26): [True: 435k, False: 163k]
  ------------------
  843|   435k|              pHybOutRealDry[qs] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   435k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  844|   435k|                  fMultDiv2(pWImag[qs], pKernel[qs]), scale_param_m2);
  845|   435k|              pHybOutImagDry[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|   435k|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  846|   435k|                  fMultDiv2(pWReal[qs], pKernel[qs]), scale_param_m2);
  847|   435k|            }
  848|       |            /* decor signals */
  849|  7.76M|            for (; qs < complexHybBands; qs++) {
  ------------------
  |  Branch (849:20): [True: 7.60M, False: 163k]
  ------------------
  850|  7.60M|              pHybOutRealWet[qs] -= SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  7.60M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  851|  7.60M|                  fMultDiv2(pWImag[qs], pKernel[qs]), scale_param_m2);
  852|  7.60M|              pHybOutImagWet[qs] += SAC_DEC_APPLY_M2_SCALE(
  ------------------
  |  |  116|  7.60M|#define SAC_DEC_APPLY_M2_SCALE(spec, s) ((spec) >> (-(s)))
  ------------------
  853|  7.60M|                  fMultDiv2(pWReal[qs], pKernel[qs]), scale_param_m2);
  854|  7.60M|            }
  855|   163k|          } /* self->upmixType */
  856|  8.19M|        }   /* if (activParamBands) { */
  857|  8.19M|      }     /*  self->numVChannels */
  858|       |
  859|  8.19M|      if (self->phaseCoding == 3) {
  ------------------
  |  Branch (859:11): [True: 163k, False: 8.03M]
  ------------------
  860|   163k|        scaleValuesSaturate(pHybOutRealDry, complexHybBands,
  861|   163k|                            SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  116|   163k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
                                          SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  122|   163k|#define SCALE_DATA_APPLY_M2_PC (2)
  ------------------
  862|   163k|        scaleValuesSaturate(pHybOutImagDry, complexHybBands,
  863|   163k|                            SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  116|   163k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
                                          SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  122|   163k|#define SCALE_DATA_APPLY_M2_PC (2)
  ------------------
  864|       |
  865|   163k|        if (!toolsDisabled) {
  ------------------
  |  Branch (865:13): [True: 163k, False: 0]
  ------------------
  866|   163k|          scaleValuesSaturate(pHybOutRealWet, complexHybBands,
  867|   163k|                              SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  116|   163k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
                                            SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  122|   163k|#define SCALE_DATA_APPLY_M2_PC (2)
  ------------------
  868|   163k|          scaleValuesSaturate(pHybOutImagWet, complexHybBands,
  869|   163k|                              SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  116|   163k|#define SCALE_PARAM_M2_212_PRED (3)
  ------------------
                                            SCALE_PARAM_M2_212_PRED + SCALE_DATA_APPLY_M2_PC);
  ------------------
  |  |  122|   163k|#define SCALE_DATA_APPLY_M2_PC (2)
  ------------------
  870|   163k|        }
  871|   163k|      }
  872|  8.19M|    }
  873|       |
  874|  4.09M|    C_ALLOC_SCRATCH_END(pKernel, FIXP_SGL, MAX_HYBRID_BANDS);
  875|  4.09M|  }
  876|       |
  877|  4.09M|  return err;
  878|  4.09M|}
_Z19SpatialDecSynthesisP17spatialDec_structiPPiS2_S1_iPK19FDK_channelMapDescr:
  884|  4.81M|                                 const FDK_channelMapDescr *const mapDescr) {
  885|  4.81M|  SACDEC_ERROR err = MPS_OK;
  886|       |
  887|  4.81M|  int ch;
  888|  4.81M|  int stride, offset;
  889|       |
  890|  4.81M|  stride = self->numOutputChannelsAT;
  891|  4.81M|  offset = 1;
  892|       |
  893|  4.81M|  PCM_MPS *pTimeOut__FDK =
  ------------------
  |  |  252|  4.81M|#define PCM_MPS LONG
  |  |  ------------------
  |  |  |  |  181|  4.81M|#define LONG INT
  |  |  ------------------
  ------------------
  894|  4.81M|      &timeOut[stride * self->pQmfDomain->globalConf.nBandsSynthesis * ts];
  895|  4.81M|  C_ALLOC_SCRATCH_START(pQmfReal, FIXP_DBL, QMF_MAX_SYNTHESIS_BANDS);
  ------------------
  |  |  324|  4.81M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  896|  4.81M|  C_ALLOC_SCRATCH_START(pQmfImag, FIXP_DBL, QMF_MAX_SYNTHESIS_BANDS);
  ------------------
  |  |  324|  4.81M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  897|       |
  898|  14.4M|  for (ch = 0; ch < self->numOutputChannelsAT; ch++) {
  ------------------
  |  Branch (898:16): [True: 9.62M, False: 4.81M]
  ------------------
  899|  9.62M|    if (self->pConfigCurrent->syntaxFlags & SACDEC_SYNTAX_LD) {
  ------------------
  |  |  536|  9.62M|#define SACDEC_SYNTAX_LD 32
  ------------------
  |  Branch (899:9): [True: 1.16M, False: 8.45M]
  ------------------
  900|  1.16M|      int k;
  901|       |      /* No hybrid filtering. Just copy the QMF data. */
  902|  39.7M|      for (k = 0; k < self->hybridBands; k += 1) {
  ------------------
  |  Branch (902:19): [True: 38.6M, False: 1.16M]
  ------------------
  903|  38.6M|        pQmfReal[k] = hybOutputReal[ch][k];
  904|  38.6M|        pQmfImag[k] = hybOutputImag[ch][k];
  905|  38.6M|      }
  906|  8.45M|    } else {
  907|  8.45M|      FDKhybridSynthesisApply(&self->hybridSynthesis[ch], hybOutputReal[ch],
  908|  8.45M|                              hybOutputImag[ch], pQmfReal, pQmfImag);
  909|  8.45M|    }
  910|       |
  911|       |    /* Map channel indices from MPEG Surround -> PCE style -> channelMapping[]
  912|       |     */
  913|  9.62M|    FDK_ASSERT(self->numOutputChannelsAT <= 6);
  ------------------
  |  |  221|  9.62M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (913:5): [True: 9.62M, False: 0]
  ------------------
  914|  9.62M|    int outCh = FDK_chMapDescr_getMapValue(mapDescr, mapChannel(self, ch),
  915|  9.62M|                                           self->numOutputChannelsAT);
  916|       |
  917|  9.62M|    {
  918|  9.62M|      if (self->stereoConfigIndex == 3) {
  ------------------
  |  Branch (918:11): [True: 1.39M, False: 8.23M]
  ------------------
  919|       |        /* MPS -> SBR */
  920|  1.39M|        int i;
  921|  1.39M|        FIXP_DBL *pWorkBufReal, *pWorkBufImag;
  922|  1.39M|        FDK_ASSERT((self->pQmfDomain->QmfDomainOut[outCh].fb.outGain_m ==
  ------------------
  |  |  221|  1.39M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (922:9): [True: 1.39M, False: 0]
  |  Branch (922:9): [True: 1.39M, False: 0]
  |  Branch (922:9): [True: 1.39M, False: 0]
  ------------------
  923|  1.39M|                    (FIXP_DBL)0x80000000) &&
  924|  1.39M|                   (self->pQmfDomain->QmfDomainOut[outCh].fb.outGain_e == 0));
  925|  1.39M|        FDK_QmfDomain_GetWorkBuffer(&self->pQmfDomain->QmfDomainIn[outCh], ts,
  926|  1.39M|                                    &pWorkBufReal, &pWorkBufImag);
  927|  1.39M|        FDK_ASSERT(self->qmfBands <=
  ------------------
  |  |  221|  1.39M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (927:9): [True: 1.39M, False: 0]
  ------------------
  928|  1.39M|                   self->pQmfDomain->QmfDomainIn[outCh].workBuf_nBands);
  929|  25.8M|        for (i = 0; i < self->qmfBands; i++) {
  ------------------
  |  Branch (929:21): [True: 24.4M, False: 1.39M]
  ------------------
  930|  24.4M|          pWorkBufReal[i] = pQmfReal[i];
  931|  24.4M|          pWorkBufImag[i] = pQmfImag[i];
  932|  24.4M|        }
  933|  1.39M|        self->pQmfDomain->QmfDomainIn[outCh].scaling.lb_scale =
  934|  1.39M|            -7; /*-ALGORITHMIC_SCALING_IN_ANALYSIS_FILTERBANK;*/
  935|  1.39M|        self->pQmfDomain->QmfDomainIn[outCh].scaling.lb_scale -=
  936|  1.39M|            self->pQmfDomain->QmfDomainIn[outCh].fb.filterScale;
  937|  1.39M|        self->pQmfDomain->QmfDomainIn[outCh].scaling.lb_scale -=
  938|  1.39M|            self->clipProtectGainSF__FDK;
  939|       |
  940|  1.39M|        self->pQmfDomain->QmfDomainIn[outCh].scaling.lb_scale -= (1);
  941|  8.23M|      } else {
  942|       |        /* Call the QMF synthesis for dry. */
  943|  8.23M|        err = CalculateSpaceSynthesisQmf(&self->pQmfDomain->QmfDomainOut[outCh],
  944|  8.23M|                                         pQmfReal, pQmfImag, stride,
  945|  8.23M|                                         pTimeOut__FDK + (offset * outCh));
  946|  8.23M|      }
  947|  9.62M|      if (err != MPS_OK) goto bail;
  ------------------
  |  Branch (947:11): [True: 0, False: 9.62M]
  ------------------
  948|  9.62M|    }
  949|  9.62M|  } /* ch loop */
  950|       |
  951|  4.81M|bail:
  952|  4.81M|  C_ALLOC_SCRATCH_END(pQmfImag, FIXP_DBL, QMF_MAX_SYNTHESIS_BANDS);
  953|  4.81M|  C_ALLOC_SCRATCH_END(pQmfReal, FIXP_DBL, QMF_MAX_SYNTHESIS_BANDS);
  954|       |
  955|  4.81M|  return err;
  956|  4.81M|}
_Z24SpatialDecBufferMatricesP17spatialDec_struct:
  958|   206k|void SpatialDecBufferMatrices(spatialDec *self) {
  959|   206k|  int row, col;
  960|   206k|  int complexParBands;
  961|   206k|  complexParBands = self->numParameterBands;
  962|       |
  963|       |  /*
  964|       |    buffer matrices M2
  965|       |  */
  966|   619k|  for (row = 0; row < self->numM2rows; row++) {
  ------------------
  |  Branch (966:17): [True: 412k, False: 206k]
  ------------------
  967|  1.23M|    for (col = 0; col < self->numVChannels; col++) {
  ------------------
  |  Branch (967:19): [True: 825k, False: 412k]
  ------------------
  968|   825k|      FDKmemcpy(self->M2RealPrev__FDK[row][col], self->M2Real__FDK[row][col],
  969|   825k|                self->numParameterBands * sizeof(FIXP_DBL));
  970|   825k|      if (0 || (self->phaseCoding == 3)) {
  ------------------
  |  Branch (970:11): [Folded, False: 825k]
  |  Branch (970:16): [True: 19.9k, False: 805k]
  ------------------
  971|  19.9k|        FDKmemcpy(self->M2ImagPrev__FDK[row][col], self->M2Imag__FDK[row][col],
  972|  19.9k|                  complexParBands * sizeof(FIXP_DBL));
  973|  19.9k|      }
  974|   825k|    }
  975|   412k|  }
  976|       |
  977|       |  /* buffer phase */
  978|   206k|  FDKmemcpy(self->PhasePrevLeft__FDK, self->PhaseLeft__FDK,
  979|   206k|            self->numParameterBands * sizeof(FIXP_DBL));
  980|   206k|  FDKmemcpy(self->PhasePrevRight__FDK, self->PhaseRight__FDK,
  981|   206k|            self->numParameterBands * sizeof(FIXP_DBL));
  982|   206k|}
_Z20SpatialDecApplyPhaseP17spatialDec_structsi:
 1004|   350k|                          int lastSlotOfParamSet) {
 1005|   350k|  int pb, qs;
 1006|   350k|  FIXP_DBL ppb[MAX_PARAMETER_BANDS *
 1007|   350k|               4]; /* left real, imag - right real, imag interleaved */
 1008|       |
 1009|   350k|  const FIXP_DBL pi_x2 = PIx2__IPD;
  ------------------
  |  |  145|   350k|  (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << (IPD_SCALE - 1))))
  |  |  ------------------
  |  |  |  |  192|   350k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   350k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   350k|          ? ((((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|   350k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   350k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   350k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 350k]
  |  |  |  |  ------------------
  |  |  |  |  199|   350k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|   350k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|   350k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|   350k|                 ? (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|   350k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   350k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   350k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1010|  3.80M|  for (pb = 0; pb < self->numParameterBands; pb++) {
  ------------------
  |  Branch (1010:16): [True: 3.45M, False: 350k]
  ------------------
 1011|  3.45M|    FIXP_DBL pl, pr;
 1012|       |
 1013|  3.45M|    pl = interp_angle__FDK(self->PhasePrevLeft__FDK[pb],
 1014|  3.45M|                           self->PhaseLeft__FDK[pb], alpha__FDK, pi_x2);
 1015|  3.45M|    pr = interp_angle__FDK(self->PhasePrevRight__FDK[pb],
 1016|  3.45M|                           self->PhaseRight__FDK[pb], alpha__FDK, pi_x2);
 1017|       |
 1018|  3.45M|    inline_fixp_cos_sin(pl, pr, IPD_SCALE, &ppb[4 * pb]);
  ------------------
  |  |  141|  3.45M|#define IPD_SCALE (5)
  ------------------
 1019|  3.45M|  }
 1020|       |
 1021|       |  /* sign is -1 for qs = 0,2 and +1 for qs = 1 */
 1022|       |
 1023|   350k|  const SCHAR *kernels = &self->kernels[0];
 1024|       |
 1025|   350k|  FIXP_DBL *Dry_real0 = &self->hybOutputRealDry__FDK[0][0];
 1026|   350k|  FIXP_DBL *Dry_imag0 = &self->hybOutputImagDry__FDK[0][0];
 1027|   350k|  FIXP_DBL *Dry_real1 = &self->hybOutputRealDry__FDK[1][0];
 1028|   350k|  FIXP_DBL *Dry_imag1 = &self->hybOutputImagDry__FDK[1][0];
 1029|       |
 1030|  1.40M|  for (qs = 2; qs >= 0; qs--) {
  ------------------
  |  Branch (1030:16): [True: 1.05M, False: 350k]
  ------------------
 1031|  1.05M|    FIXP_DBL out_re, out_im;
 1032|       |
 1033|  1.05M|    pb = *kernels++;
 1034|  1.05M|    if (qs == 1) /* sign[qs] >= 0 */
  ------------------
  |  Branch (1034:9): [True: 350k, False: 700k]
  ------------------
 1035|   350k|    {
 1036|   350k|      cplxMultDiv2(&out_re, &out_im, *Dry_real0, *Dry_imag0, ppb[4 * pb + 0],
 1037|   350k|                   ppb[4 * pb + 1]);
 1038|   350k|      out_re <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   350k|#define PHASE_SCALE 2
  ------------------
 1039|   350k|      out_im <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   350k|#define PHASE_SCALE 2
  ------------------
 1040|   350k|      *Dry_real0++ = out_re;
 1041|   350k|      *Dry_imag0++ = out_im;
 1042|       |
 1043|   350k|      cplxMultDiv2(&out_re, &out_im, *Dry_real1, *Dry_imag1, ppb[4 * pb + 2],
 1044|   350k|                   ppb[4 * pb + 3]);
 1045|   350k|      out_re <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   350k|#define PHASE_SCALE 2
  ------------------
 1046|   350k|      out_im <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   350k|#define PHASE_SCALE 2
  ------------------
 1047|   350k|      *Dry_real1++ = out_re;
 1048|   350k|      *Dry_imag1++ = out_im;
 1049|   700k|    } else {
 1050|   700k|      cplxMultDiv2(&out_re, &out_im, *Dry_real0, *Dry_imag0, ppb[4 * pb + 0],
 1051|   700k|                   -ppb[4 * pb + 1]);
 1052|   700k|      out_re <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   700k|#define PHASE_SCALE 2
  ------------------
 1053|   700k|      out_im <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   700k|#define PHASE_SCALE 2
  ------------------
 1054|   700k|      *Dry_real0++ = out_re;
 1055|   700k|      *Dry_imag0++ = out_im;
 1056|       |
 1057|   700k|      cplxMultDiv2(&out_re, &out_im, *Dry_real1, *Dry_imag1, ppb[4 * pb + 2],
 1058|   700k|                   -ppb[4 * pb + 3]);
 1059|   700k|      out_re <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   700k|#define PHASE_SCALE 2
  ------------------
 1060|   700k|      out_im <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|   700k|#define PHASE_SCALE 2
  ------------------
 1061|   700k|      *Dry_real1++ = out_re;
 1062|   700k|      *Dry_imag1++ = out_im;
 1063|   700k|    }
 1064|  1.05M|  }
 1065|       |
 1066|       |  /* sign is +1 for qs >=3 */
 1067|  24.1M|  for (qs = self->hybridBands - 3; qs--;) {
  ------------------
  |  Branch (1067:36): [True: 23.8M, False: 350k]
  ------------------
 1068|  23.8M|    FIXP_DBL out_re, out_im;
 1069|       |
 1070|  23.8M|    pb = *kernels++;
 1071|  23.8M|    cplxMultDiv2(&out_re, &out_im, *Dry_real0, *Dry_imag0, ppb[4 * pb + 0],
 1072|  23.8M|                 ppb[4 * pb + 1]);
 1073|  23.8M|    out_re <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|  23.8M|#define PHASE_SCALE 2
  ------------------
 1074|  23.8M|    out_im <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|  23.8M|#define PHASE_SCALE 2
  ------------------
 1075|  23.8M|    *Dry_real0++ = out_re;
 1076|  23.8M|    *Dry_imag0++ = out_im;
 1077|       |
 1078|  23.8M|    cplxMultDiv2(&out_re, &out_im, *Dry_real1, *Dry_imag1, ppb[4 * pb + 2],
 1079|  23.8M|                 ppb[4 * pb + 3]);
 1080|  23.8M|    out_re <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|  23.8M|#define PHASE_SCALE 2
  ------------------
 1081|  23.8M|    out_im <<= PHASE_SCALE - 1;
  ------------------
  |  |  984|  23.8M|#define PHASE_SCALE 2
  ------------------
 1082|  23.8M|    *Dry_real1++ = out_re;
 1083|  23.8M|    *Dry_imag1++ = out_im;
 1084|  23.8M|  }
 1085|   350k|}
sac_process.cpp:_ZL20interpolateParametersii:
  130|   197M|                                         const FIXP_DBL b) {
  131|   197M|  return (b - fMult(alpha, b) + fMult(alpha, a));
  132|   197M|}
sac_process.cpp:_ZL19M2ParamToKernelMultPsPiS0_S0_si:
  343|  16.7M|                                int nBands) {
  344|  16.7M|  int pb;
  345|       |
  346|   177M|  for (pb = 0; pb < nBands; pb++) {
  ------------------
  |  Branch (346:16): [True: 161M, False: 16.7M]
  ------------------
  347|   161M|    FIXP_SGL tmp = FX_DBL2FX_SGL(
  ------------------
  |  |  220|   161M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   161M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   161M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  348|   161M|        interpolateParameter(alpha__FDK, Mparam[pb], MparamPrev[pb]));
  349|       |
  350|   161M|    int i = pWidth[pb];
  351|   161M|    if (i & 1) *pKernel++ = tmp;
  ------------------
  |  Branch (351:9): [True: 84.5M, False: 76.6M]
  ------------------
  352|   161M|    if (i & 2) {
  ------------------
  |  Branch (352:9): [True: 71.0M, False: 90.2M]
  ------------------
  353|  71.0M|      *pKernel++ = tmp;
  354|  71.0M|      *pKernel++ = tmp;
  355|  71.0M|    }
  356|   371M|    for (i >>= 2; i--;) {
  ------------------
  |  Branch (356:19): [True: 209M, False: 161M]
  ------------------
  357|   209M|      *pKernel++ = tmp;
  358|   209M|      *pKernel++ = tmp;
  359|   209M|      *pKernel++ = tmp;
  360|   209M|      *pKernel++ = tmp;
  361|   209M|    }
  362|   161M|  }
  363|  16.7M|}
sac_process.cpp:_ZL10mapChannelP17spatialDec_structj:
  141|  9.62M|static UINT mapChannel(spatialDec *self, UINT ch) {
  142|  9.62M|  static const UCHAR chanelIdx[][8] = {
  143|  9.62M|      {0, 1, 2, 3, 4, 5, 6, 7}, /*  binaural, TREE_212, arbitrary tree */
  144|  9.62M|  };
  145|       |
  146|  9.62M|  int idx = 0;
  147|       |
  148|  9.62M|  return (chanelIdx[idx][ch]);
  149|  9.62M|}
sac_process.cpp:_ZL17interp_angle__FDKiisi:
  992|  6.91M|                                  FIXP_SGL alpha, FIXP_DBL pi_x2) {
  993|  6.91M|  if (angle2 - angle1 > (pi_x2 >> 1)) angle2 -= pi_x2;
  ------------------
  |  Branch (993:7): [True: 101k, False: 6.81M]
  ------------------
  994|       |
  995|  6.91M|  if (angle1 - angle2 > (pi_x2 >> 1)) angle1 -= pi_x2;
  ------------------
  |  Branch (995:7): [True: 86.8k, False: 6.82M]
  ------------------
  996|       |
  997|  6.91M|  return interpolateParameter(alpha, angle2, angle1);
  998|  6.91M|}

_Z26CalculateSpaceSynthesisQmfP18FDK_QMF_DOMAIN_OUTPKiS2_iPi:
  113|  8.23M|    const FIXP_DBL *Si, const INT stride, PCM_MPS *timeSig) {
  114|  8.23M|  SACDEC_ERROR err = MPS_OK;
  115|       |
  116|  8.23M|  if (hQmfDomainOutCh == NULL) {
  ------------------
  |  Branch (116:7): [True: 0, False: 8.23M]
  ------------------
  117|      0|    err = MPS_INVALID_HANDLE;
  118|  8.23M|  } else {
  119|  8.23M|    HANDLE_SPACE_SYNTHESIS_QMF hSpaceSynthesisQmf = &hQmfDomainOutCh->fb;
  ------------------
  |  |  112|  8.23M|#define HANDLE_SPACE_SYNTHESIS_QMF HANDLE_QMF_FILTER_BANK
  ------------------
  120|  8.23M|#if (QMF_MAX_SYNTHESIS_BANDS <= 64)
  121|  8.23M|    C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL,
  ------------------
  |  |  319|  8.23M|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  8.23M|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  8.23M|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  8.23M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  8.23M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  8.23M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  8.23M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  8.23M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  8.23M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  8.23M|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  122|  8.23M|                           (QMF_MAX_SYNTHESIS_BANDS << 1));
  123|       |#else
  124|       |    C_AALLOC_STACK_START(pWorkBuffer, FIXP_DBL, (QMF_MAX_SYNTHESIS_BANDS << 1));
  125|       |#endif
  126|       |
  127|  8.23M|    qmfSynthesisFilteringSlot(hSpaceSynthesisQmf, Sr, Si, 0, 0, timeSig, stride,
  128|  8.23M|                              pWorkBuffer);
  129|       |
  130|  8.23M|#if (QMF_MAX_SYNTHESIS_BANDS <= 64)
  131|  8.23M|    C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, (QMF_MAX_SYNTHESIS_BANDS << 1));
  ------------------
  |  |  327|  8.23M|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
  132|       |#else
  133|       |    C_AALLOC_STACK_END(pWorkBuffer, FIXP_DBL, (QMF_MAX_SYNTHESIS_BANDS << 1));
  134|       |#endif
  135|  8.23M|  }
  136|       |
  137|  8.23M|  return err;
  138|  8.23M|}
_Z25CalculateSpaceAnalysisQmfP15QMF_FILTER_BANKPKiPiS3_:
  142|  2.08M|    FIXP_DBL *Sr, FIXP_DBL *Si) {
  143|  2.08M|  SACDEC_ERROR err = MPS_OK;
  144|       |
  145|  2.08M|  if (hSpaceAnalysisQmf == NULL) {
  ------------------
  |  Branch (145:7): [True: 0, False: 2.08M]
  ------------------
  146|      0|    err = MPS_INVALID_HANDLE;
  147|  2.08M|  } else {
  148|  2.08M|    C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL, (64 << 1));
  ------------------
  |  |  319|  2.08M|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  2.08M|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  2.08M|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  2.08M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  2.08M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  2.08M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  2.08M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  2.08M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  2.08M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  2.08M|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  149|       |
  150|  2.08M|    qmfAnalysisFilteringSlot(hSpaceAnalysisQmf, Sr, Si, timeSig, 1,
  151|  2.08M|                             pWorkBuffer);
  152|  2.08M|    C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, (64 << 1));
  ------------------
  |  |  327|  2.08M|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
  153|  2.08M|  }
  154|       |
  155|  2.08M|  return err;
  156|  2.08M|}

_Z9initBBEnvP17spatialDec_structi:
  124|  50.5k|void initBBEnv(spatialDec *self, int initStatesFlag) {
  125|  50.5k|  INT ch, k;
  126|       |
  127|   151k|  for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (127:16): [True: 101k, False: 50.5k]
  ------------------
  128|   101k|    k = row2channelGES[self->treeConfig][ch];
  129|   101k|    self->row2channelDmxGES[ch] = k;
  130|   101k|    if (k == -1) continue;
  ------------------
  |  Branch (130:9): [True: 0, False: 101k]
  ------------------
  131|       |
  132|   101k|    switch (self->treeConfig) {
  133|   101k|      case TREE_212:
  ------------------
  |  Branch (133:7): [True: 101k, False: 0]
  ------------------
  134|   101k|        self->row2channelDmxGES[ch] = 0;
  135|   101k|        break;
  136|      0|      default:;
  ------------------
  |  Branch (136:7): [True: 0, False: 101k]
  ------------------
  137|   101k|    }
  138|   101k|  }
  139|       |
  140|  50.5k|  if (initStatesFlag) {
  ------------------
  |  Branch (140:7): [True: 10.1k, False: 40.3k]
  ------------------
  141|  60.7k|    for (k = 0; k < 2 * MAX_OUTPUT_CHANNELS + MAX_INPUT_CHANNELS; k++) {
  ------------------
  |  |  112|  60.7k|  2 /* CAUTION: This does NOT restrict the number of                    \
  ------------------
                  for (k = 0; k < 2 * MAX_OUTPUT_CHANNELS + MAX_INPUT_CHANNELS; k++) {
  ------------------
  |  |  110|  60.7k|#define MAX_INPUT_CHANNELS 1
  ------------------
  |  Branch (141:17): [True: 50.6k, False: 10.1k]
  ------------------
  142|  50.6k|      self->reshapeBBEnvState->normNrgPrev__FDK[k] =
  143|  50.6k|          FL2FXCONST_DBL(0.5f); /* 32768.f*32768.f */
  ------------------
  |  |  192|  50.6k|  (FIXP_DBL)(                                                                \
  |  |  193|  50.6k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 50.6k, Folded]
  |  |  ------------------
  |  |  194|  50.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  50.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 50.6k]
  |  |  ------------------
  |  |  195|  50.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  50.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  50.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  50.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  50.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  50.6k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  50.6k|      self->reshapeBBEnvState->normNrgPrevSF[k] = DFRACT_BITS - 1;
  ------------------
  |  |  113|  50.6k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  145|  50.6k|      self->reshapeBBEnvState->partNrgPrevSF[k] = 0;
  146|  50.6k|      self->reshapeBBEnvState->partNrgPrev2SF[k] = 0;
  147|  50.6k|      self->reshapeBBEnvState->frameNrgPrevSF[k] = 0;
  148|  50.6k|    }
  149|  10.1k|  }
  150|       |
  151|  50.5k|  self->reshapeBBEnvState->alpha__FDK =
  152|  50.5k|      FL2FXCONST_DBL(0.99637845575f); /* FDKexp(-64 / (0.4f  * 44100)) */
  ------------------
  |  |  192|  50.5k|  (FIXP_DBL)(                                                                \
  |  |  193|  50.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 50.5k, Folded]
  |  |  ------------------
  |  |  194|  50.5k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  50.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 50.5k]
  |  |  ------------------
  |  |  195|  50.5k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  50.5k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  50.5k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  50.5k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  50.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  50.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|  50.5k|  self->reshapeBBEnvState->beta__FDK =
  154|  50.5k|      FL2FXCONST_DBL(0.96436909488f); /* FDKexp(-64 / (0.04f * 44100)) */
  ------------------
  |  |  192|  50.5k|  (FIXP_DBL)(                                                                \
  |  |  193|  50.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 50.5k, Folded]
  |  |  ------------------
  |  |  194|  50.5k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  50.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 50.5k]
  |  |  ------------------
  |  |  195|  50.5k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  50.5k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  50.5k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  50.5k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  50.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  50.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  50.5k|}
_Z22SpatialDecReshapeBBEnvP17spatialDec_structPK23SPATIAL_BS_FRAME_structi:
  560|  3.32M|                            INT ts) {
  561|  3.32M|  INT ch, scale;
  562|  3.32M|  INT dryFacSF, slotAmpSF;
  563|  3.32M|  INT slotAmp_dry_e, slotAmp_wet_e;
  564|  3.32M|  FIXP_DBL tmp, dryFac, envShape;
  565|  3.32M|  FIXP_DBL slotAmp_dry, slotAmp_wet, slotAmp_ratio;
  566|  3.32M|  FIXP_DBL envDry[MAX_OUTPUT_CHANNELS], envDmx[2];
  567|       |
  568|  3.32M|  INT cplxBands;
  569|  3.32M|  INT hybBands = self->hybridBands - 6;
  570|       |
  571|  3.32M|  cplxBands = self->hybridBands - 6;
  572|       |
  573|       |  /* extract downmix envelope(s) */
  574|  3.32M|  switch (self->treeConfig) {
  575|  3.32M|    default:
  ------------------
  |  Branch (575:5): [True: 3.32M, False: 0]
  ------------------
  576|  3.32M|      extractBBEnv(self, INP_DMX, 0, fMin(self->numInputChannels, 2), envDmx,
  ------------------
  |  |  112|  3.32M|#define INP_DMX 1
  ------------------
  577|  3.32M|                   frame);
  578|  3.32M|  }
  579|       |
  580|       |  /* extract dry and wet envelopes */
  581|  3.32M|  extractBBEnv(self, INP_DRY_WET, 0, self->numOutputChannels, envDry, frame);
  ------------------
  |  |  111|  3.32M|#define INP_DRY_WET 0
  ------------------
  582|       |
  583|  9.98M|  for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (583:16): [True: 6.65M, False: 3.32M]
  ------------------
  584|  6.65M|    INT ch2;
  585|       |
  586|  6.65M|    ch2 = row2channelGES[self->treeConfig][ch];
  587|       |
  588|  6.65M|    if (ch2 == -1) continue;
  ------------------
  |  Branch (588:9): [True: 0, False: 6.65M]
  ------------------
  589|       |
  590|  6.65M|    if (frame->tempShapeEnableChannelGES[ch2]) {
  ------------------
  |  Branch (590:9): [True: 84.0k, False: 6.57M]
  ------------------
  591|  84.0k|      INT sc;
  592|       |
  593|       |      /* reshape dry and wet signals according to transmitted envelope */
  594|       |
  595|       |      /* De-quantize GES data */
  596|  84.0k|      FDK_ASSERT((frame->bsEnvShapeData[ch2][ts] >= 0) &&
  ------------------
  |  |  221|  84.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (596:7): [True: 84.0k, False: 0]
  |  Branch (596:7): [True: 84.0k, False: 0]
  |  Branch (596:7): [True: 84.0k, False: 0]
  ------------------
  597|  84.0k|                 (frame->bsEnvShapeData[ch2][ts] <= 4));
  598|  84.0k|      FDK_ASSERT((self->envQuantMode == 0) || (self->envQuantMode == 1));
  ------------------
  |  |  221|  84.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (598:7): [True: 84.0k, False: 0]
  |  Branch (598:7): [True: 0, False: 0]
  |  Branch (598:7): [True: 84.0k, False: 0]
  ------------------
  599|  84.0k|      envShape =
  600|  84.0k|          FX_CFG2FX_DBL(envShapeDataTable__FDK[frame->bsEnvShapeData[ch2][ts]]
  601|  84.0k|                                              [self->envQuantMode]);
  602|       |
  603|       |      /* get downmix channel */
  604|  84.0k|      ch2 = self->row2channelDmxGES[ch];
  605|       |
  606|       |      /* multiply ratio with dmx envelope; tmp is scaled by SF_DIV32/2+SF_SHAPE
  607|       |       * bits */
  608|  84.0k|      if (ch2 == 2) {
  ------------------
  |  Branch (608:11): [True: 0, False: 84.0k]
  ------------------
  609|      0|        tmp = fMultDiv2(envShape, envDmx[0]) + fMultDiv2(envShape, envDmx[1]);
  610|  84.0k|      } else {
  611|  84.0k|        tmp = fMult(envShape, envDmx[ch2]);
  612|  84.0k|      }
  613|       |
  614|       |      /* weighting factors */
  615|  84.0k|      dryFacSF = slotAmpSF = 0;
  616|  84.0k|      dryFac = slotAmp_ratio = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  84.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  84.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 84.0k, Folded]
  |  |  ------------------
  |  |  194|  84.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 84.0k]
  |  |  ------------------
  |  |  195|  84.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  84.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  84.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  84.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  84.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  617|       |
  618|       |      /* dryFac will be scaled by dryFacSF bits */
  619|  84.0k|      if (envDry[ch] != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  84.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  84.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 84.0k, Folded]
  |  |  ------------------
  |  |  194|  84.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 84.0k]
  |  |  ------------------
  |  |  195|  84.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  84.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  84.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  84.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  84.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (619:11): [True: 43.7k, False: 40.3k]
  ------------------
  620|  43.7k|        envDry[ch] = invSqrtNorm2(envDry[ch], &dryFacSF);
  621|  43.7k|        dryFac = fMultDiv2(tmp, fPow2Div2(envDry[ch])) << 2;
  622|  43.7k|        dryFacSF = SF_SHAPE + 2 * dryFacSF;
  ------------------
  |  |  114|  43.7k|#define SF_SHAPE 1
  ------------------
  623|  43.7k|      }
  624|       |
  625|  84.0k|      slotAmp_dry_e = slotAmp_wet_e = 0;
  626|       |
  627|       |      /* calculate slotAmp_dry and slotAmp_wet */
  628|  84.0k|      slotAmp(&slotAmp_dry, &slotAmp_dry_e, &slotAmp_wet, &slotAmp_wet_e,
  629|  84.0k|              &self->hybOutputRealDry__FDK[ch][6],
  630|  84.0k|              &self->hybOutputImagDry__FDK[ch][6],
  631|  84.0k|              &self->hybOutputRealWet__FDK[ch][6],
  632|  84.0k|              &self->hybOutputImagWet__FDK[ch][6], cplxBands, hybBands);
  633|       |
  634|       |      /* exponents must be even due to subsequent square root calculation */
  635|  84.0k|      FDK_ASSERT(((slotAmp_dry_e & 1) == 0) && ((slotAmp_wet_e & 1) == 0));
  ------------------
  |  |  221|  84.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (635:7): [True: 84.0k, False: 0]
  |  Branch (635:7): [True: 84.0k, False: 0]
  |  Branch (635:7): [True: 84.0k, False: 0]
  ------------------
  636|       |
  637|       |      /* slotAmp_ratio will be scaled by slotAmpSF bits */
  638|  84.0k|      if (slotAmp_dry != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  84.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  84.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 84.0k, Folded]
  |  |  ------------------
  |  |  194|  84.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 84.0k]
  |  |  ------------------
  |  |  195|  84.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  84.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  84.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  84.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  84.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (638:11): [True: 42.6k, False: 41.4k]
  ------------------
  639|  42.6k|        slotAmp_wet = sqrtFixp(slotAmp_wet);
  640|  42.6k|        slotAmp_dry = invSqrtNorm2(slotAmp_dry, &slotAmpSF);
  641|       |
  642|  42.6k|        slotAmp_ratio = fMult(slotAmp_wet, slotAmp_dry);
  643|  42.6k|        slotAmpSF = slotAmpSF + (slotAmp_wet_e >> 1) - (slotAmp_dry_e >> 1);
  644|  42.6k|      }
  645|       |
  646|       |      /* calculate common scale factor */
  647|  84.0k|      scale =
  648|  84.0k|          fixMax(3, fixMax(dryFacSF, slotAmpSF)); /* scale is at least with 3
  ------------------
  |  |  307|  84.0k|#define fixMax(a, b) fMax(a, b)
  ------------------
  649|       |                                                     bits to avoid overflows
  650|       |                                                     when calculating dryFac  */
  651|  84.0k|      dryFac = dryFac >> fixMin(scale - dryFacSF, DFRACT_BITS - 1);
  ------------------
  |  |  306|  84.0k|#define fixMin(a, b) fMin(a, b)
  ------------------
  652|  84.0k|      slotAmp_ratio =
  653|  84.0k|          slotAmp_ratio >> fixMin(scale - slotAmpSF, DFRACT_BITS - 1);
  ------------------
  |  |  306|  84.0k|#define fixMin(a, b) fMin(a, b)
  ------------------
  654|       |
  655|       |      /* limit dryFac */
  656|  84.0k|      dryFac = fixMax(
  ------------------
  |  |  307|   336k|#define fixMax(a, b) fMax(a, b)
  |  |  ------------------
  |  |  |  Branch (307:27): [Folded, False: 84.0k]
  |  |  |  Branch (307:27): [Folded, False: 0]
  |  |  |  Branch (307:27): [True: 84.0k, Folded]
  |  |  ------------------
  ------------------
  657|  84.0k|          FL2FXCONST_DBL(0.25f) >> (INT)fixMin(2 * scale, DFRACT_BITS - 1),
  658|  84.0k|          fMult(dryFac, slotAmp_ratio) -
  659|  84.0k|              (slotAmp_ratio >> fixMin(scale, DFRACT_BITS - 1)) +
  660|  84.0k|              (dryFac >> fixMin(scale, DFRACT_BITS - 1)));
  661|  84.0k|      dryFac = fixMin(
  ------------------
  |  |  306|   336k|#define fixMin(a, b) fMin(a, b)
  |  |  ------------------
  |  |  |  Branch (306:27): [Folded, False: 84.0k]
  |  |  |  Branch (306:27): [Folded, False: 0]
  |  |  |  Branch (306:27): [True: 84.0k, Folded]
  |  |  ------------------
  ------------------
  662|  84.0k|          FL2FXCONST_DBL(0.50f) >> (INT)fixMin(2 * scale - 3, DFRACT_BITS - 1),
  663|  84.0k|          dryFac); /* reduce shift bits by 3, because upper
  664|       |                      limit 4.0 is scaled with 3 bits */
  665|  84.0k|      scale = 2 * scale + 1;
  666|       |
  667|       |      /* improve precision for dryFac */
  668|  84.0k|      sc = fixMax(0, CntLeadingZeros(dryFac) - 1);
  ------------------
  |  |  307|  84.0k|#define fixMax(a, b) fMax(a, b)
  ------------------
  669|  84.0k|      dryFac = dryFac << (INT)fixMin(scale, sc);
  ------------------
  |  |  306|  84.0k|#define fixMin(a, b) fMin(a, b)
  ------------------
  670|  84.0k|      scale = scale - fixMin(scale, sc);
  ------------------
  |  |  306|  84.0k|#define fixMin(a, b) fMin(a, b)
  ------------------
  671|       |
  672|       |      /* shaping */
  673|  84.0k|      shapeBBEnv(&self->hybOutputRealDry__FDK[ch][6],
  674|  84.0k|                 &self->hybOutputImagDry__FDK[ch][6], dryFac,
  675|  84.0k|                 fixMin(scale, DFRACT_BITS - 1), cplxBands, hybBands);
  ------------------
  |  |  306|  84.0k|#define fixMin(a, b) fMin(a, b)
  ------------------
  676|  84.0k|    }
  677|  6.65M|  }
  678|  3.32M|}
sac_reshapeBBEnv.cpp:_ZL12extractBBEnvP17spatialDec_structiiiPiPK23SPATIAL_BS_FRAME_struct:
  327|  6.65M|                         FIXP_DBL *pEnv, const SPATIAL_BS_FRAME *frame) {
  328|  6.65M|  INT ch, pb, prevChOffs;
  329|  6.65M|  INT clz, scale, scale_min, envSF;
  330|  6.65M|  INT scaleCur, scalePrev, commonScale;
  331|  6.65M|  INT slotNrgSF, partNrgSF, frameNrgSF;
  332|  6.65M|  INT *pPartNrgPrevSF, *pFrameNrgPrevSF;
  333|  6.65M|  INT *pNormNrgPrevSF, *pPartNrgPrev2SF;
  334|       |
  335|  6.65M|  FIXP_DBL maxVal, env, frameNrg, normNrg;
  336|  6.65M|  FIXP_DBL *pReal, *pImag;
  337|  6.65M|  FIXP_DBL *partNrg, *partNrgPrev;
  338|       |
  339|  6.65M|  C_ALLOC_SCRATCH_START(pScratchBuffer, FIXP_DBL,
  ------------------
  |  |  324|  6.65M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  340|  6.65M|                        (2 * 42 + MAX_PARAMETER_BANDS));
  341|  6.65M|  C_ALLOC_SCRATCH_START(resPb, FIXP_DBL, (END_BB_ENV - START_BB_ENV));
  ------------------
  |  |  324|  6.65M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  342|  6.65M|  C_ALLOC_SCRATCH_START(resPbSF, INT, (END_BB_ENV - START_BB_ENV));
  ------------------
  |  |  324|  6.65M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  343|       |
  344|  6.65M|  FIXP_DBL *slotNrg = pScratchBuffer + (2 * 42);
  345|       |
  346|  6.65M|  RESHAPE_BBENV_STATE *pBBEnvState = self->reshapeBBEnvState;
  347|       |
  348|  6.65M|  FIXP_DBL alpha = pBBEnvState->alpha__FDK;
  349|       |  /*FIXP_DBL  alpha1 = (FL2FXCONST_DBL(1.0f) - alpha) << SF_ALPHA1;*/
  350|  6.65M|  FIXP_DBL alpha1 = ((FIXP_DBL)MAXVAL_DBL - alpha) << SF_ALPHA1;
  ------------------
  |  |  156|  6.65M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
                FIXP_DBL alpha1 = ((FIXP_DBL)MAXVAL_DBL - alpha) << SF_ALPHA1;
  ------------------
  |  |  121|  6.65M|#define SF_ALPHA1 8
  ------------------
  351|  6.65M|  FIXP_DBL beta = pBBEnvState->beta__FDK;
  352|       |  /*FIXP_DBL  beta1  = (FL2FXCONST_DBL(1.0f) - beta) << SF_BETA1;*/
  353|  6.65M|  FIXP_DBL beta1 = ((FIXP_DBL)MAXVAL_DBL - beta) << SF_BETA1;
  ------------------
  |  |  156|  6.65M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
                FIXP_DBL beta1 = ((FIXP_DBL)MAXVAL_DBL - beta) << SF_BETA1;
  ------------------
  |  |  122|  6.65M|#define SF_BETA1 4
  ------------------
  354|       |
  355|  6.65M|  INT shapeActiv = 1;
  356|  6.65M|  INT hybBands = fixMin(42, self->hybridBands);
  ------------------
  |  |  306|  6.65M|#define fixMin(a, b) fMin(a, b)
  ------------------
  357|  6.65M|  INT staticScale = self->staticDecScale + (1);
  358|  6.65M|  INT cplxBands;
  359|  6.65M|  cplxBands = fixMin(42, self->hybridBands);
  ------------------
  |  |  306|  6.65M|#define fixMin(a, b) fMin(a, b)
  ------------------
  360|       |
  361|  16.6M|  for (ch = start; ch < channels; ch++) {
  ------------------
  |  Branch (361:20): [True: 9.98M, False: 6.65M]
  ------------------
  362|  9.98M|    if (inp == INP_DRY_WET) {
  ------------------
  |  |  111|  9.98M|#define INP_DRY_WET 0
  ------------------
  |  Branch (362:9): [True: 6.65M, False: 3.32M]
  ------------------
  363|  6.65M|      INT ch2 = row2channelGES[self->treeConfig][ch];
  364|  6.65M|      if (ch2 == -1) {
  ------------------
  |  Branch (364:11): [True: 0, False: 6.65M]
  ------------------
  365|      0|        continue;
  366|  6.65M|      } else {
  367|  6.65M|        if (frame->tempShapeEnableChannelGES[ch2]) {
  ------------------
  |  Branch (367:13): [True: 84.0k, False: 6.57M]
  ------------------
  368|  84.0k|          shapeActiv = 1;
  369|  6.57M|        } else {
  370|  6.57M|          shapeActiv = 0;
  371|  6.57M|        }
  372|  6.65M|      }
  373|  6.65M|      prevChOffs = ch;
  374|  6.65M|      pReal = pScratchBuffer;
  375|  6.65M|      pImag = pScratchBuffer + 42;
  376|  6.65M|      combineDryWet(pReal, pImag, self->hybOutputRealDry__FDK[ch],
  377|  6.65M|                    self->hybOutputImagDry__FDK[ch],
  378|  6.65M|                    self->hybOutputRealWet__FDK[ch],
  379|  6.65M|                    self->hybOutputImagWet__FDK[ch], cplxBands, hybBands);
  380|  6.65M|      clz = fMin(getScalefactor(&pReal[12], fMax(0, hybBands - 12)),
  381|  6.65M|                 getScalefactor(&pImag[12], fMax(0, cplxBands - 12)));
  382|  6.65M|    } else {
  383|  3.32M|      prevChOffs = ch + self->numOutputChannels;
  384|  3.32M|      pReal = self->hybInputReal__FDK[ch];
  385|  3.32M|      pImag = self->hybInputImag__FDK[ch];
  386|  3.32M|      clz = fMin(getScalefactor(&pReal[12], fMax(0, hybBands - 12)),
  387|  3.32M|                 getScalefactor(&pImag[12], fMax(0, cplxBands - 12)));
  388|  3.32M|    }
  389|       |
  390|  9.98M|    partNrg = partNrgPrev = pBBEnvState->partNrgPrev__FDK[prevChOffs];
  391|  9.98M|    pPartNrgPrevSF = &pBBEnvState->partNrgPrevSF[prevChOffs];
  392|  9.98M|    pFrameNrgPrevSF = &pBBEnvState->frameNrgPrevSF[prevChOffs];
  393|  9.98M|    pNormNrgPrevSF = &pBBEnvState->normNrgPrevSF[prevChOffs];
  394|  9.98M|    pPartNrgPrev2SF = &pBBEnvState->partNrgPrev2SF[prevChOffs];
  395|       |
  396|       |    /* calculate slot energy */
  397|  9.98M|    {
  398|  9.98M|      getSlotNrgHQ(&pReal[12], &pImag[12], slotNrg, clz,
  399|  9.98M|                   fixMin(42, self->hybridBands)); /* scale slotNrg:
  ------------------
  |  |  306|  9.98M|#define fixMin(a, b) fMin(a, b)
  ------------------
  400|       |                                                      2*(staticScale-clz) +
  401|       |                                                      SF_FACTOR_SLOT */
  402|  9.98M|    }
  403|       |
  404|  9.98M|    slotNrgSF = 2 * (staticScale - clz + ((inp == INP_DRY_WET) ? 1 : 0)) +
  ------------------
  |  |  111|  9.98M|#define INP_DRY_WET 0
  ------------------
  |  Branch (404:43): [True: 6.65M, False: 3.32M]
  ------------------
  405|  9.98M|                SF_FACTOR_SLOT;
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  406|  9.98M|    frameNrgSF = 2 * (staticScale - clz + ((inp == INP_DRY_WET) ? 1 : 0)) +
  ------------------
  |  |  111|  9.98M|#define INP_DRY_WET 0
  ------------------
  |  Branch (406:44): [True: 6.65M, False: 3.32M]
  ------------------
  407|  9.98M|                 SF_FACTOR_SLOT;
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  408|       |
  409|  9.98M|    partNrgSF = fixMax(slotNrgSF - SF_ALPHA1 + 1,
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  410|  9.98M|                       pPartNrgPrevSF[0] - pPartNrgPrev2SF[0] + 1);
  411|  9.98M|    scalePrev = fixMax(fixMin(partNrgSF - pPartNrgPrevSF[0], DFRACT_BITS - 1),
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  412|  9.98M|                       -(DFRACT_BITS - 1));
  413|  9.98M|    scaleCur =
  414|  9.98M|        fixMax(fixMin(partNrgSF - slotNrgSF + SF_ALPHA1, DFRACT_BITS - 1),
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  415|  9.98M|               -(DFRACT_BITS - 1));
  416|       |
  417|  9.98M|    maxVal = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  9.98M|  (FIXP_DBL)(                                                                \
  |  |  193|  9.98M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 9.98M, Folded]
  |  |  ------------------
  |  |  194|  9.98M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 9.98M]
  |  |  ------------------
  |  |  195|  9.98M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  9.98M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  9.98M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  9.98M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  9.98M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  418|  9.98M|    frameNrg = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  9.98M|  (FIXP_DBL)(                                                                \
  |  |  193|  9.98M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 9.98M, Folded]
  |  |  ------------------
  |  |  194|  9.98M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 9.98M]
  |  |  ------------------
  |  |  195|  9.98M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  9.98M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  9.98M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  9.98M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  9.98M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  419|  9.98M|    if ((scaleCur < 0) && (scalePrev < 0)) {
  ------------------
  |  Branch (419:9): [True: 0, False: 9.98M]
  |  Branch (419:27): [True: 0, False: 0]
  ------------------
  420|      0|      scaleCur = -scaleCur;
  421|      0|      scalePrev = -scalePrev;
  422|      0|      for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  118|      0|#define START_BB_ENV 0 /* 10 */
  ------------------
                    for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  119|      0|#define END_BB_ENV 9   /* 18 */
  ------------------
  |  Branch (422:31): [True: 0, False: 0]
  ------------------
  423|      0|        partNrg[pb] = ((fMultDiv2(alpha1, slotNrg[pb]) << scaleCur) +
  424|      0|                       (fMultDiv2(alpha, partNrgPrev[pb]) << scalePrev))
  425|      0|                      << 1;
  426|      0|        maxVal |= partNrg[pb];
  427|      0|        frameNrg += slotNrg[pb] >> 3;
  428|      0|      }
  429|  9.98M|    } else if ((scaleCur >= 0) && (scalePrev >= 0)) {
  ------------------
  |  Branch (429:16): [True: 9.98M, False: 0]
  |  Branch (429:35): [True: 9.76M, False: 214k]
  ------------------
  430|  97.6M|      for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  118|  9.76M|#define START_BB_ENV 0 /* 10 */
  ------------------
                    for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  119|  97.6M|#define END_BB_ENV 9   /* 18 */
  ------------------
  |  Branch (430:31): [True: 87.9M, False: 9.76M]
  ------------------
  431|  87.9M|        partNrg[pb] = ((fMultDiv2(alpha1, slotNrg[pb]) >> scaleCur) +
  432|  87.9M|                       (fMultDiv2(alpha, partNrgPrev[pb]) >> scalePrev))
  433|  87.9M|                      << 1;
  434|  87.9M|        maxVal |= partNrg[pb];
  435|  87.9M|        frameNrg += slotNrg[pb] >> 3;
  436|  87.9M|      }
  437|  9.76M|    } else if ((scaleCur < 0) && (scalePrev >= 0)) {
  ------------------
  |  Branch (437:16): [True: 0, False: 214k]
  |  Branch (437:34): [True: 0, False: 0]
  ------------------
  438|      0|      scaleCur = -scaleCur;
  439|      0|      for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  118|      0|#define START_BB_ENV 0 /* 10 */
  ------------------
                    for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  119|      0|#define END_BB_ENV 9   /* 18 */
  ------------------
  |  Branch (439:31): [True: 0, False: 0]
  ------------------
  440|      0|        partNrg[pb] = ((fMultDiv2(alpha1, slotNrg[pb]) << scaleCur) +
  441|      0|                       (fMultDiv2(alpha, partNrgPrev[pb]) >> scalePrev))
  442|      0|                      << 1;
  443|      0|        maxVal |= partNrg[pb];
  444|      0|        frameNrg += slotNrg[pb] >> 3;
  445|      0|      }
  446|   214k|    } else { /* if ( (scaleCur >= 0) && (scalePrev < 0) ) */
  447|   214k|      scalePrev = -scalePrev;
  448|  2.14M|      for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  118|   214k|#define START_BB_ENV 0 /* 10 */
  ------------------
                    for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  119|  2.14M|#define END_BB_ENV 9   /* 18 */
  ------------------
  |  Branch (448:31): [True: 1.93M, False: 214k]
  ------------------
  449|  1.93M|        partNrg[pb] = ((fMultDiv2(alpha1, slotNrg[pb]) >> scaleCur) +
  450|  1.93M|                       (fMultDiv2(alpha, partNrgPrev[pb]) << scalePrev))
  451|  1.93M|                      << 1;
  452|  1.93M|        maxVal |= partNrg[pb];
  453|  1.93M|        frameNrg += slotNrg[pb] >> 3;
  454|  1.93M|      }
  455|   214k|    }
  456|       |
  457|       |    /* frameNrg /= (END_BB_ENV - START_BB_ENV); 0.88888888888f =
  458|       |     * (1/(END_BB_ENV-START_BB_ENV)<<3; shift with 3 is compensated in loop
  459|       |     * above */
  460|  9.98M|    frameNrg = fMult(frameNrg, FL2FXCONST_DBL(0.88888888888f));
  ------------------
  |  |  192|  9.98M|  (FIXP_DBL)(                                                                \
  |  |  193|  9.98M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 9.98M, Folded]
  |  |  ------------------
  |  |  194|  9.98M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 9.98M]
  |  |  ------------------
  |  |  195|  9.98M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  9.98M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  9.98M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  9.98M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  9.98M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  461|       |
  462|       |    /* store scalefactor and headroom for part nrg prev */
  463|  9.98M|    pPartNrgPrevSF[0] = partNrgSF;
  464|  9.98M|    pPartNrgPrev2SF[0] = fixMax(0, CntLeadingZeros(maxVal) - 1);
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  465|       |
  466|  9.98M|    commonScale = fixMax(frameNrgSF - SF_ALPHA1 + 1, pFrameNrgPrevSF[0] + 1);
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  467|  9.98M|    scalePrev = fixMin(commonScale - pFrameNrgPrevSF[0], DFRACT_BITS - 1);
  ------------------
  |  |  306|  9.98M|#define fixMin(a, b) fMin(a, b)
  ------------------
  468|  9.98M|    scaleCur = fixMin(commonScale - frameNrgSF + SF_ALPHA1, DFRACT_BITS - 1);
  ------------------
  |  |  306|  9.98M|#define fixMin(a, b) fMin(a, b)
  ------------------
  469|  9.98M|    frameNrgSF = commonScale;
  470|       |
  471|  9.98M|    frameNrg = ((fMultDiv2(alpha1, frameNrg) >> scaleCur) +
  472|  9.98M|                (fMultDiv2(alpha, pBBEnvState->frameNrgPrev__FDK[prevChOffs]) >>
  473|  9.98M|                 scalePrev))
  474|  9.98M|               << 1;
  475|       |
  476|  9.98M|    clz = fixMax(0, CntLeadingZeros(frameNrg) - 1);
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  477|  9.98M|    pBBEnvState->frameNrgPrev__FDK[prevChOffs] = frameNrg << clz;
  478|  9.98M|    pFrameNrgPrevSF[0] = frameNrgSF - clz;
  479|       |
  480|  9.98M|    env = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  9.98M|  (FIXP_DBL)(                                                                \
  |  |  193|  9.98M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 9.98M, Folded]
  |  |  ------------------
  |  |  194|  9.98M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 9.98M]
  |  |  ------------------
  |  |  195|  9.98M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  9.98M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  9.98M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  9.98M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  9.98M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  9.98M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  481|  9.98M|    scale = clz + partNrgSF - frameNrgSF;
  482|  9.98M|    scale_min = DFRACT_BITS - 1;
  ------------------
  |  |  113|  9.98M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  483|  99.8M|    for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  118|  9.98M|#define START_BB_ENV 0 /* 10 */
  ------------------
                  for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  119|  99.8M|#define END_BB_ENV 9   /* 18 */
  ------------------
  |  Branch (483:29): [True: 89.8M, False: 9.98M]
  ------------------
  484|  89.8M|      if ((partNrg[pb] | slotNrg[pb]) != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  89.8M|  (FIXP_DBL)(                                                                \
  |  |  193|  89.8M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 89.8M, Folded]
  |  |  ------------------
  |  |  194|  89.8M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  89.8M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  89.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 89.8M]
  |  |  ------------------
  |  |  195|  89.8M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  89.8M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  89.8M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  89.8M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  89.8M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  89.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  89.8M|          : ((((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 (484:11): [True: 80.3M, False: 9.51M]
  ------------------
  485|  80.3M|        INT s;
  486|  80.3M|        INT sc = 0;
  487|  80.3M|        INT sn = fixMax(0, CntLeadingZeros(slotNrg[pb]) - 1);
  ------------------
  |  |  307|  80.3M|#define fixMax(a, b) fMax(a, b)
  ------------------
  488|  80.3M|        FIXP_DBL inv_sqrt = invSqrtNorm2(partNrg[pb], &sc);
  489|  80.3M|        FIXP_DBL res = fMult(slotNrg[pb] << sn, fPow2(inv_sqrt));
  490|       |
  491|  80.3M|        s = fixMax(0, CntLeadingZeros(res) - 1);
  ------------------
  |  |  307|  80.3M|#define fixMax(a, b) fMax(a, b)
  ------------------
  492|  80.3M|        res = res << s;
  493|       |
  494|  80.3M|        sc = scale - (2 * sc - sn - s);
  495|  80.3M|        scale_min = fixMin(scale_min, sc);
  ------------------
  |  |  306|  80.3M|#define fixMin(a, b) fMin(a, b)
  ------------------
  496|       |
  497|  80.3M|        resPb[pb] = res;
  498|  80.3M|        resPbSF[pb] = sc;
  499|  80.3M|      } else {
  500|  9.51M|        resPb[pb] = (FIXP_DBL)0;
  501|  9.51M|        resPbSF[pb] = 0;
  502|  9.51M|      }
  503|  89.8M|    }
  504|       |
  505|  9.98M|    scale_min = 4 - scale_min;
  506|       |
  507|  99.8M|    for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  118|  9.98M|#define START_BB_ENV 0 /* 10 */
  ------------------
                  for (pb = START_BB_ENV; pb < END_BB_ENV; pb++) {
  ------------------
  |  |  119|  99.8M|#define END_BB_ENV 9   /* 18 */
  ------------------
  |  Branch (507:29): [True: 89.8M, False: 9.98M]
  ------------------
  508|  89.8M|      INT sc = fixMax(fixMin(resPbSF[pb] + scale_min, DFRACT_BITS - 1),
  ------------------
  |  |  307|  89.8M|#define fixMax(a, b) fMax(a, b)
  ------------------
  509|  89.8M|                      -(DFRACT_BITS - 1));
  510|       |
  511|  89.8M|      if (sc < 0) {
  ------------------
  |  Branch (511:11): [True: 6.07M, False: 83.7M]
  ------------------
  512|  6.07M|        env += resPb[pb] << (-sc);
  513|  83.7M|      } else {
  514|  83.7M|        env += resPb[pb] >> (sc);
  515|  83.7M|      }
  516|  89.8M|    }
  517|       |
  518|  9.98M|    env = fMultDiv2(env, pBBEnvState->frameNrgPrev__FDK[prevChOffs]);
  519|  9.98M|    envSF = slotNrgSF + scale_min + 1;
  520|       |
  521|  9.98M|    commonScale = fixMax(envSF - SF_BETA1 + 1, pNormNrgPrevSF[0] + 1);
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  522|  9.98M|    scalePrev = fixMin(commonScale - pNormNrgPrevSF[0], DFRACT_BITS - 1);
  ------------------
  |  |  306|  9.98M|#define fixMin(a, b) fMin(a, b)
  ------------------
  523|  9.98M|    scaleCur = fixMin(commonScale - envSF + SF_BETA1, DFRACT_BITS - 1);
  ------------------
  |  |  306|  9.98M|#define fixMin(a, b) fMin(a, b)
  ------------------
  524|       |
  525|  9.98M|    normNrg = ((fMultDiv2(beta1, env) >> scaleCur) +
  526|  9.98M|               (fMultDiv2(beta, pBBEnvState->normNrgPrev__FDK[prevChOffs]) >>
  527|  9.98M|                scalePrev))
  528|  9.98M|              << 1;
  529|       |
  530|  9.98M|    clz = fixMax(0, CntLeadingZeros(normNrg) - 1);
  ------------------
  |  |  307|  9.98M|#define fixMax(a, b) fMax(a, b)
  ------------------
  531|  9.98M|    pBBEnvState->normNrgPrev__FDK[prevChOffs] = normNrg << clz;
  532|  9.98M|    pNormNrgPrevSF[0] = commonScale - clz;
  533|       |
  534|  9.98M|    if (shapeActiv) {
  ------------------
  |  Branch (534:9): [True: 3.41M, False: 6.57M]
  ------------------
  535|  3.41M|      if ((env | normNrg) != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  3.41M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.41M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.41M, Folded]
  |  |  ------------------
  |  |  194|  3.41M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.41M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.41M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.41M]
  |  |  ------------------
  |  |  195|  3.41M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.41M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.41M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.41M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.41M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.41M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.41M|          : ((((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 (535:11): [True: 3.39M, False: 15.3k]
  ------------------
  536|  3.39M|        INT sc, se, sn;
  537|  3.39M|        se = fixMax(0, CntLeadingZeros(env) - 1);
  ------------------
  |  |  307|  3.39M|#define fixMax(a, b) fMax(a, b)
  ------------------
  538|  3.39M|        sc = commonScale + SF_DIV32 - envSF + se;
  ------------------
  |  |  115|  3.39M|#define SF_DIV32 6
  ------------------
  539|  3.39M|        env = fMult(sqrtFixp((env << se) >> (sc & 0x1)),
  540|  3.39M|                    invSqrtNorm2(normNrg, &sn));
  541|       |
  542|  3.39M|        sc = fixMin((sc >> 1) - sn, DFRACT_BITS - 1);
  ------------------
  |  |  306|  3.39M|#define fixMin(a, b) fMin(a, b)
  ------------------
  543|  3.39M|        if (sc < 0) {
  ------------------
  |  Branch (543:13): [True: 2.49k, False: 3.39M]
  ------------------
  544|  2.49k|          env <<= (-sc);
  545|  3.39M|        } else {
  546|  3.39M|          env >>= (sc);
  547|  3.39M|        }
  548|  3.39M|      }
  549|       |      /* env is scaled by SF_DIV32/2 bits */
  550|  3.41M|    }
  551|  9.98M|    pEnv[ch] = env;
  552|  9.98M|  }
  553|       |
  554|  6.65M|  C_ALLOC_SCRATCH_END(resPbSF, INT, (END_BB_ENV - START_BB_ENV));
  555|  6.65M|  C_ALLOC_SCRATCH_END(resPb, FIXP_DBL, (END_BB_ENV - START_BB_ENV));
  556|  6.65M|  C_ALLOC_SCRATCH_END(pScratchBuffer, FIXP_DBL, (2 * 42 + MAX_PARAMETER_BANDS));
  557|  6.65M|}
sac_reshapeBBEnv.cpp:_ZL13combineDryWetPiS_S_S_S_S_ii:
  232|  6.65M|                                 INT cplxBands, INT hybBands) {
  233|  6.65M|  INT qs;
  234|       |
  235|   205M|  for (qs = 12; qs < cplxBands; qs++) {
  ------------------
  |  Branch (235:17): [True: 198M, False: 6.65M]
  ------------------
  236|   198M|    pReal[qs] = (pHybOutputRealDry[qs] >> 1) + (pHybOutputRealWet[qs] >> 1);
  237|   198M|    pImag[qs] = (pHybOutputImagDry[qs] >> 1) + (pHybOutputImagWet[qs] >> 1);
  238|   198M|  }
  239|  6.65M|  for (; qs < hybBands; qs++) {
  ------------------
  |  Branch (239:10): [True: 0, False: 6.65M]
  ------------------
  240|      0|    pReal[qs] = (pHybOutputRealDry[qs] >> 1) + (pHybOutputRealWet[qs] >> 1);
  241|      0|  }
  242|  6.65M|}
sac_reshapeBBEnv.cpp:_ZL12getSlotNrgHQPiS_S_ii:
  160|  9.98M|                                INT hybBands) {
  161|  9.98M|  INT qs;
  162|  9.98M|  FIXP_DBL nrg;
  163|       |
  164|       |  /* qs = 12, 13, 14 */
  165|  9.98M|  slotNrg[0] = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  166|  9.98M|                (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  167|  9.98M|  slotNrg[1] = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  168|  9.98M|                (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  169|  9.98M|  slotNrg[2] = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  170|  9.98M|                (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  171|       |  /* qs = 15 */
  172|  9.98M|  slotNrg[3] = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  173|  9.98M|                (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  174|       |  /* qs = 16, 17 */
  175|  9.98M|  nrg = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  176|  9.98M|         (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  177|  9.98M|  slotNrg[4] =
  178|  9.98M|      nrg + ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  179|  9.98M|             (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  180|       |  /* qs = 18, 19, 20 */
  181|  9.98M|  nrg = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  182|  9.98M|         (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  183|  9.98M|  nrg += ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  184|  9.98M|          (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  185|  9.98M|  slotNrg[5] =
  186|  9.98M|      nrg + ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  187|  9.98M|             (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  188|       |  /* qs = 21, 22 */
  189|  9.98M|  nrg = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  190|  9.98M|         (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  191|  9.98M|  slotNrg[6] =
  192|  9.98M|      nrg + ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  193|  9.98M|             (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.98M|#define SF_FACTOR_SLOT 5
  ------------------
  194|       |  /* qs = 23, 24 */
  195|  9.98M|  if (hybBands > 23) {
  ------------------
  |  Branch (195:7): [True: 9.97M, False: 12.4k]
  ------------------
  196|  9.97M|    slotNrg[6] += ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  197|  9.97M|                   (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  198|  9.97M|    slotNrg[6] += ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  199|  9.97M|                   (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  200|       |    /* qs = 25, 26, 29, 28, 29 */
  201|  9.97M|    nrg = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  202|  9.97M|           (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  203|  9.97M|    nrg += ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  204|  9.97M|            (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  205|  9.97M|    nrg += ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  206|  9.97M|            (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  207|  9.97M|    nrg += ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  208|  9.97M|            (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  209|  9.97M|    slotNrg[7] =
  210|  9.97M|        nrg + ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  211|  9.97M|               (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  212|       |    /* qs = 30 ... min(41,hybBands-1) */
  213|  9.97M|    nrg = ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  214|  9.97M|           (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|  9.97M|#define SF_FACTOR_SLOT 5
  ------------------
  215|   118M|    for (qs = 31; qs < hybBands; qs++) {
  ------------------
  |  Branch (215:19): [True: 108M, False: 9.97M]
  ------------------
  216|   108M|      nrg += ((fPow2Div2((*pReal++) << maxValSF) >> (SF_FACTOR_SLOT - 1)) +
  ------------------
  |  |  116|   108M|#define SF_FACTOR_SLOT 5
  ------------------
  217|   108M|              (fPow2Div2((*pImag++) << maxValSF) >> (SF_FACTOR_SLOT - 1)));
  ------------------
  |  |  116|   108M|#define SF_FACTOR_SLOT 5
  ------------------
  218|   108M|    }
  219|  9.97M|    slotNrg[8] = nrg;
  220|  9.97M|  } else {
  221|  12.4k|    slotNrg[7] = (FIXP_DBL)0;
  222|  12.4k|    slotNrg[8] = (FIXP_DBL)0;
  223|  12.4k|  }
  224|  9.98M|}
sac_reshapeBBEnv.cpp:_ZL7slotAmpPiS_S_S_S_S_S_S_ii:
  249|  84.0k|    INT cplxBands, INT hybBands) {
  250|  84.0k|  INT qs, s1, s2, headroom_dry, headroom_wet;
  251|  84.0k|  FIXP_DBL dry, wet;
  252|       |
  253|       |  /* headroom can be reduced by 1 bit due to use of fPow2Div2 */
  254|  84.0k|  s1 = DFRACT_BITS - 1 - CntLeadingZeros(hybBands + cplxBands);
  ------------------
  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                s1 = DFRACT_BITS - 1 - CntLeadingZeros(hybBands + cplxBands);
  ------------------
  |  |  308|  84.0k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  255|  84.0k|  headroom_dry = fMin(getScalefactor(pHybOutputRealDry, hybBands),
  256|  84.0k|                      getScalefactor(pHybOutputImagDry, cplxBands));
  257|  84.0k|  headroom_wet = fMin(getScalefactor(pHybOutputRealWet, hybBands),
  258|  84.0k|                      getScalefactor(pHybOutputImagWet, cplxBands));
  259|       |
  260|  84.0k|  dry = wet = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  84.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  84.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 84.0k, Folded]
  |  |  ------------------
  |  |  194|  84.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 84.0k]
  |  |  ------------------
  |  |  195|  84.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  84.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  84.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  84.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  84.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  84.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  84.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|  5.48M|  for (qs = 0; qs < cplxBands; qs++) {
  ------------------
  |  Branch (261:16): [True: 5.40M, False: 84.0k]
  ------------------
  262|       |    /* sum up dry part */
  263|  5.40M|    dry += (fPow2Div2(pHybOutputRealDry[qs] << headroom_dry) >> s1);
  264|  5.40M|    dry += (fPow2Div2(pHybOutputImagDry[qs] << headroom_dry) >> s1);
  265|       |    /* sum up wet part */
  266|  5.40M|    wet += (fPow2Div2(pHybOutputRealWet[qs] << headroom_wet) >> s1);
  267|  5.40M|    wet += (fPow2Div2(pHybOutputImagWet[qs] << headroom_wet) >> s1);
  268|  5.40M|  }
  269|  84.0k|  for (; qs < hybBands; qs++) {
  ------------------
  |  Branch (269:10): [True: 0, False: 84.0k]
  ------------------
  270|      0|    dry += (fPow2Div2(pHybOutputRealDry[qs] << headroom_dry) >> s1);
  271|      0|    wet += (fPow2Div2(pHybOutputRealWet[qs] << headroom_wet) >> s1);
  272|      0|  }
  273|       |
  274|       |  /* consider fPow2Div2() */
  275|  84.0k|  s1 += 1;
  276|       |
  277|       |  /* normalize dry part, ensure that exponent is even */
  278|  84.0k|  s2 = fixMax(0, CntLeadingZeros(dry) - 1);
  ------------------
  |  |  307|  84.0k|#define fixMax(a, b) fMax(a, b)
  ------------------
  279|  84.0k|  *slotAmp_dry = dry << s2;
  280|  84.0k|  *slotAmp_dry_e = s1 - s2 - 2 * headroom_dry;
  281|  84.0k|  if (*slotAmp_dry_e & 1) {
  ------------------
  |  Branch (281:7): [True: 62.6k, False: 21.4k]
  ------------------
  282|  62.6k|    *slotAmp_dry = *slotAmp_dry >> 1;
  283|  62.6k|    *slotAmp_dry_e += 1;
  284|  62.6k|  }
  285|       |
  286|       |  /* normalize wet part, ensure that exponent is even */
  287|  84.0k|  s2 = fixMax(0, CntLeadingZeros(wet) - 1);
  ------------------
  |  |  307|  84.0k|#define fixMax(a, b) fMax(a, b)
  ------------------
  288|  84.0k|  *slotAmp_wet = wet << s2;
  289|  84.0k|  *slotAmp_wet_e = s1 - s2 - 2 * headroom_wet;
  290|  84.0k|  if (*slotAmp_wet_e & 1) {
  ------------------
  |  Branch (290:7): [True: 69.3k, False: 14.6k]
  ------------------
  291|  69.3k|    *slotAmp_wet = *slotAmp_wet >> 1;
  292|  69.3k|    *slotAmp_wet_e += 1;
  293|  69.3k|  }
  294|  84.0k|}
sac_reshapeBBEnv.cpp:_ZL10shapeBBEnvPiS_iiii:
  301|  84.0k|           FIXP_DBL dryFac, INT scale, INT cplxBands, INT hybBands) {
  302|  84.0k|  INT qs;
  303|       |
  304|  84.0k|  if (scale == 0) {
  ------------------
  |  Branch (304:7): [True: 45.0k, False: 39.0k]
  ------------------
  305|  2.95M|    for (qs = 0; qs < cplxBands; qs++) {
  ------------------
  |  Branch (305:18): [True: 2.90M, False: 45.0k]
  ------------------
  306|  2.90M|      pHybOutputRealDry[qs] = fMultDiv2(pHybOutputRealDry[qs], dryFac);
  307|  2.90M|      pHybOutputImagDry[qs] = fMultDiv2(pHybOutputImagDry[qs], dryFac);
  308|  2.90M|    }
  309|  45.0k|    for (; qs < hybBands; qs++) {
  ------------------
  |  Branch (309:12): [True: 0, False: 45.0k]
  ------------------
  310|      0|      pHybOutputRealDry[qs] = fMultDiv2(pHybOutputRealDry[qs], dryFac);
  311|      0|    }
  312|  45.0k|  } else {
  313|  2.53M|    for (qs = 0; qs < cplxBands; qs++) {
  ------------------
  |  Branch (313:18): [True: 2.49M, False: 39.0k]
  ------------------
  314|  2.49M|      pHybOutputRealDry[qs] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  2.49M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 2.71k, False: 2.49M]
  |  |  ------------------
  |  |  252|  2.49M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  2.49M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 2.32k, False: 2.48M]
  |  |  ------------------
  |  |  254|  2.49M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  2.49M|             : ((LONG)(src) << (scale)))
  ------------------
  315|  2.49M|          fMultDiv2(pHybOutputRealDry[qs], dryFac), scale, DFRACT_BITS);
  316|  2.49M|      pHybOutputImagDry[qs] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  2.49M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 2.63k, False: 2.49M]
  |  |  ------------------
  |  |  252|  2.49M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  2.49M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 2.33k, False: 2.48M]
  |  |  ------------------
  |  |  254|  2.49M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  2.49M|             : ((LONG)(src) << (scale)))
  ------------------
  317|  2.49M|          fMultDiv2(pHybOutputImagDry[qs], dryFac), scale, DFRACT_BITS);
  318|  2.49M|    }
  319|  39.0k|    for (; qs < hybBands; qs++) {
  ------------------
  |  Branch (319:12): [True: 0, False: 39.0k]
  ------------------
  320|      0|      pHybOutputRealDry[qs] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|      0|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  252|      0|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|      0|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  254|      0|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|      0|             : ((LONG)(src) << (scale)))
  ------------------
  321|      0|          fMultDiv2(pHybOutputRealDry[qs], dryFac), scale, DFRACT_BITS);
  322|      0|    }
  323|  39.0k|  }
  324|  84.0k|}

_Z27SpatialDequantGetCLD2ValuesiPi:
 4459|   140k|void SpatialDequantGetCLD2Values(int idx, FIXP_DBL* x) {
 4460|   140k|  *x = FX_CFG2FX_DBL(dequantCLD__FDK[idx]);
 4461|   140k|}

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

_Z23SpatialDecSmoothM1andM2P17spatialDec_structPK23SPATIAL_BS_FRAME_structi:
  161|   213k|                             int ps) {
  162|   213k|  FIXP_DBL delta__FDK;
  163|   213k|  FIXP_DBL one_minus_delta__FDK;
  164|       |
  165|   213k|  int pb, row, col;
  166|   213k|  int residualBands = 0;
  167|       |
  168|   213k|  if (self->residualCoding) {
  ------------------
  |  Branch (168:7): [True: 16.4k, False: 196k]
  ------------------
  169|  16.4k|    int i;
  170|  16.4k|    int boxes = self->numOttBoxes;
  171|  32.9k|    for (i = 0; i < boxes; i++) {
  ------------------
  |  Branch (171:17): [True: 16.4k, False: 16.4k]
  ------------------
  172|  16.4k|      if (self->residualBands[i] > residualBands) {
  ------------------
  |  Branch (172:11): [True: 14.3k, False: 2.15k]
  ------------------
  173|  14.3k|        residualBands = self->residualBands[i];
  174|  14.3k|      }
  175|  16.4k|    }
  176|  16.4k|  }
  177|       |
  178|   213k|  delta__FDK = calcFilterCoeff__FDK(self, ps, frame);
  179|   213k|  if (delta__FDK == /*FL2FXCONST_DBL(1.0f)*/ (FIXP_DBL)MAXVAL_DBL)
  ------------------
  |  |  156|   213k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (179:7): [True: 169, False: 212k]
  ------------------
  180|    169|    one_minus_delta__FDK = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|    169|  (FIXP_DBL)(                                                                \
  |  |  193|    169|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 169, Folded]
  |  |  ------------------
  |  |  194|    169|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    169|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    169|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 169]
  |  |  ------------------
  |  |  195|    169|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    169|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    169|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    169|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    169|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    169|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    169|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|   212k|  else if (delta__FDK == FL2FXCONST_DBL(0.0f))
  ------------------
  |  |  192|   212k|  (FIXP_DBL)(                                                                \
  |  |  193|   212k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 212k, Folded]
  |  |  ------------------
  |  |  194|   212k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   212k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   212k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 212k]
  |  |  ------------------
  |  |  195|   212k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   212k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   212k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   212k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   212k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   212k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   212k|          : ((((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 (181:12): [True: 0, False: 212k]
  ------------------
  182|      0|    one_minus_delta__FDK = /*FL2FXCONST_DBL(1.0f)*/ (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  183|   212k|  else
  184|   212k|    one_minus_delta__FDK = (FL2FXCONST_DBL(0.5f) - (delta__FDK >> 1)) << 1;
  ------------------
  |  |  192|   212k|  (FIXP_DBL)(                                                                \
  |  |  193|   212k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 212k, Folded]
  |  |  ------------------
  |  |  194|   212k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   212k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   212k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 212k]
  |  |  ------------------
  |  |  195|   212k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   212k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   212k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   212k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   212k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   212k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   212k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|       |
  186|  2.26M|  for (pb = 0; pb < self->numParameterBands; pb++) {
  ------------------
  |  Branch (186:16): [True: 2.05M, False: 213k]
  ------------------
  187|  2.05M|    int smoothBand;
  188|       |
  189|  2.05M|    smoothBand = getSmoothOnOff(self, ps, pb);
  190|       |
  191|  2.05M|    if (smoothBand && (pb >= residualBands)) {
  ------------------
  |  Branch (191:9): [True: 162k, False: 1.89M]
  |  Branch (191:23): [True: 161k, False: 1.45k]
  ------------------
  192|   483k|      for (row = 0; row < self->numM2rows; row++) {
  ------------------
  |  Branch (192:21): [True: 322k, False: 161k]
  ------------------
  193|   967k|        for (col = 0; col < self->numVChannels; col++) {
  ------------------
  |  Branch (193:23): [True: 644k, False: 322k]
  ------------------
  194|   644k|          self->M2Real__FDK[row][col][pb] =
  195|   644k|              ((fMultDiv2(delta__FDK, self->M2Real__FDK[row][col][pb]) +
  196|   644k|                fMultDiv2(one_minus_delta__FDK,
  197|   644k|                          self->M2RealPrev__FDK[row][col][pb]))
  198|   644k|               << 1);
  199|   644k|          if (0 || (self->phaseCoding == 3)) {
  ------------------
  |  Branch (199:15): [Folded, False: 644k]
  |  Branch (199:20): [True: 5.97k, False: 638k]
  ------------------
  200|  5.97k|            self->M2Imag__FDK[row][col][pb] =
  201|  5.97k|                ((fMultDiv2(delta__FDK, self->M2Imag__FDK[row][col][pb]) +
  202|  5.97k|                  fMultDiv2(one_minus_delta__FDK,
  203|  5.97k|                            self->M2ImagPrev__FDK[row][col][pb]))
  204|  5.97k|                 << 1);
  205|  5.97k|          }
  206|   644k|        }
  207|   322k|      }
  208|   161k|    }
  209|  2.05M|  }
  210|   213k|  self->smoothState->prevParamSlot = frame->paramSlot[ps];
  211|   213k|}
_Z22initParameterSmoothingP17spatialDec_struct:
  214|  77.4k|void initParameterSmoothing(spatialDec *self) {
  215|  77.4k|  self->smoothState->prevParamSlot = 0;
  216|  77.4k|}
_Z19SpatialDecSmoothOPDP17spatialDec_structPK23SPATIAL_BS_FRAME_structi:
  219|  48.5k|                         int ps) {
  220|  48.5k|  int pb;
  221|  48.5k|  int dSlots;
  222|  48.5k|  FIXP_DBL delta__FDK;
  223|  48.5k|  FIXP_DBL one_minus_delta__FDK;
  224|  48.5k|  FIXP_DBL *phaseLeftSmooth__FDK = self->smoothState->opdLeftState__FDK;
  225|  48.5k|  FIXP_DBL *phaseRightSmooth__FDK = self->smoothState->opdRightState__FDK;
  226|  48.5k|  int quantCoarse;
  227|       |
  228|  48.5k|  quantCoarse = frame->IPDLosslessData[0].bsQuantCoarseXXX[ps];
  229|       |
  230|  48.5k|  if (frame->OpdSmoothingMode == 0) {
  ------------------
  |  Branch (230:7): [True: 32.4k, False: 16.1k]
  ------------------
  231|  32.4k|    FDKmemcpy(phaseLeftSmooth__FDK, self->PhaseLeft__FDK,
  232|  32.4k|              self->numParameterBands * sizeof(FIXP_DBL));
  233|  32.4k|    FDKmemcpy(phaseRightSmooth__FDK, self->PhaseRight__FDK,
  234|  32.4k|              self->numParameterBands * sizeof(FIXP_DBL));
  235|  32.4k|  } else {
  236|  16.1k|    if (ps == 0) {
  ------------------
  |  Branch (236:9): [True: 2.49k, False: 13.6k]
  ------------------
  237|  2.49k|      dSlots = frame->paramSlot[ps] + 1;
  238|  13.6k|    } else {
  239|  13.6k|      dSlots = frame->paramSlot[ps] - frame->paramSlot[ps - 1];
  240|  13.6k|    }
  241|       |
  242|  16.1k|    delta__FDK = (FIXP_DBL)((INT)(FL2FXCONST_DBL(0.0078125f)) * dSlots);
  ------------------
  |  |  192|  16.1k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.1k, Folded]
  |  |  ------------------
  |  |  194|  16.1k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.1k]
  |  |  ------------------
  |  |  195|  16.1k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.1k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.1k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  243|       |
  244|  16.1k|    if (delta__FDK == (FIXP_DBL)MAXVAL_DBL /*FL2FXCONST_DBL(1.0f)*/)
  ------------------
  |  |  156|  16.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (244:9): [True: 0, False: 16.1k]
  ------------------
  245|      0|      one_minus_delta__FDK = 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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  246|  16.1k|    else if (delta__FDK == FL2FXCONST_DBL(0.0f))
  ------------------
  |  |  192|  16.1k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.1k, Folded]
  |  |  ------------------
  |  |  194|  16.1k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.1k]
  |  |  ------------------
  |  |  195|  16.1k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.1k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.1k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (246:14): [True: 0, False: 16.1k]
  ------------------
  247|      0|      one_minus_delta__FDK = (FIXP_DBL)MAXVAL_DBL /*FL2FXCONST_DBL(1.0f)*/;
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  248|  16.1k|    else
  249|  16.1k|      one_minus_delta__FDK = (FL2FXCONST_DBL(0.5f) - (delta__FDK >> 1)) << 1;
  ------------------
  |  |  192|  16.1k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.1k, Folded]
  |  |  ------------------
  |  |  194|  16.1k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.1k]
  |  |  ------------------
  |  |  195|  16.1k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.1k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.1k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  250|       |
  251|   182k|    for (pb = 0; pb < self->numParameterBands; pb++) {
  ------------------
  |  Branch (251:18): [True: 166k, False: 16.1k]
  ------------------
  252|   166k|      FIXP_DBL tmpL, tmpR, tmp;
  253|       |
  254|   166k|      tmpL = self->PhaseLeft__FDK[pb];
  255|   166k|      tmpR = self->PhaseRight__FDK[pb];
  256|       |
  257|   178k|      while (tmpL > phaseLeftSmooth__FDK[pb] + PI__IPD) tmpL -= PI__IPD << 1;
  ------------------
  |  |  142|   178k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   178k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   178k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 178k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   178k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   178k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   178k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 178k]
  |  |  |  |  ------------------
  |  |  |  |  195|   178k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   178k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   178k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   178k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   178k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   178k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   178k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    while (tmpL > phaseLeftSmooth__FDK[pb] + PI__IPD) tmpL -= PI__IPD << 1;
  ------------------
  |  |  142|  11.8k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  11.8k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  11.8k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 11.8k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  11.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  11.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  11.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 11.8k]
  |  |  |  |  ------------------
  |  |  |  |  195|  11.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  11.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  11.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  11.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  11.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  11.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  11.8k|          : ((((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 (257:14): [True: 11.8k, False: 166k]
  ------------------
  258|   203k|      while (tmpL < phaseLeftSmooth__FDK[pb] - PI__IPD) tmpL += PI__IPD << 1;
  ------------------
  |  |  142|   203k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   203k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   203k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 203k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   203k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   203k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   203k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 203k]
  |  |  |  |  ------------------
  |  |  |  |  195|   203k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   203k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   203k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   203k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   203k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   203k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   203k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    while (tmpL < phaseLeftSmooth__FDK[pb] - PI__IPD) tmpL += PI__IPD << 1;
  ------------------
  |  |  142|  37.1k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  37.1k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  37.1k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 37.1k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  37.1k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  37.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  37.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 37.1k]
  |  |  |  |  ------------------
  |  |  |  |  195|  37.1k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  37.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  37.1k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  37.1k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  37.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  37.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  37.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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (258:14): [True: 37.1k, False: 166k]
  ------------------
  259|   178k|      while (tmpR > phaseRightSmooth__FDK[pb] + PI__IPD) tmpR -= PI__IPD << 1;
  ------------------
  |  |  142|   178k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   178k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   178k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 178k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   178k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   178k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   178k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 178k]
  |  |  |  |  ------------------
  |  |  |  |  195|   178k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   178k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   178k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   178k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   178k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   178k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   178k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    while (tmpR > phaseRightSmooth__FDK[pb] + PI__IPD) tmpR -= PI__IPD << 1;
  ------------------
  |  |  142|  12.3k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  12.3k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  12.3k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 12.3k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  12.3k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  12.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  12.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 12.3k]
  |  |  |  |  ------------------
  |  |  |  |  195|  12.3k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  12.3k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  12.3k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  12.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  12.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  12.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  12.3k|          : ((((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 (259:14): [True: 12.3k, False: 166k]
  ------------------
  260|   204k|      while (tmpR < phaseRightSmooth__FDK[pb] - PI__IPD) tmpR += PI__IPD << 1;
  ------------------
  |  |  142|   204k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   204k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   204k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 204k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   204k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   204k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   204k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 204k]
  |  |  |  |  ------------------
  |  |  |  |  195|   204k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   204k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   204k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   204k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   204k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   204k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   204k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    while (tmpR < phaseRightSmooth__FDK[pb] - PI__IPD) tmpR += PI__IPD << 1;
  ------------------
  |  |  142|  38.6k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  38.6k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  38.6k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 38.6k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  38.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  38.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  38.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 38.6k]
  |  |  |  |  ------------------
  |  |  |  |  195|  38.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  38.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  38.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  38.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  38.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  38.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  38.6k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (260:14): [True: 38.6k, False: 166k]
  ------------------
  261|       |
  262|   166k|      phaseLeftSmooth__FDK[pb] =
  263|   166k|          fMult(delta__FDK, tmpL) +
  264|   166k|          fMult(one_minus_delta__FDK, phaseLeftSmooth__FDK[pb]);
  265|   166k|      phaseRightSmooth__FDK[pb] =
  266|   166k|          fMult(delta__FDK, tmpR) +
  267|   166k|          fMult(one_minus_delta__FDK, phaseRightSmooth__FDK[pb]);
  268|       |
  269|   166k|      tmp = (((tmpL >> 1) - (tmpR >> 1)) - ((phaseLeftSmooth__FDK[pb] >> 1) -
  270|   166k|                                            (phaseRightSmooth__FDK[pb] >> 1)))
  271|   166k|            << 1;
  272|   167k|      while (tmp > PI__IPD) tmp -= PI__IPD << 1;
  ------------------
  |  |  142|   167k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   167k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   167k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 167k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   167k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   167k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   167k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 167k]
  |  |  |  |  ------------------
  |  |  |  |  195|   167k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   167k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   167k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   167k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   167k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   167k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   167k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    while (tmp > PI__IPD) tmp -= PI__IPD << 1;
  ------------------
  |  |  142|  1.23k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  1.23k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  1.23k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 1.23k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  1.23k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.23k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.23k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |  195|  1.23k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.23k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  1.23k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  1.23k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.23k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.23k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  1.23k|          : ((((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 (272:14): [True: 1.23k, False: 166k]
  ------------------
  273|   168k|      while (tmp < -PI__IPD) tmp += PI__IPD << 1;
  ------------------
  |  |  142|   168k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   168k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   168k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 168k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   168k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   168k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   168k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 168k]
  |  |  |  |  ------------------
  |  |  |  |  195|   168k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   168k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   168k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   168k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   168k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   168k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   168k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    while (tmp < -PI__IPD) tmp += PI__IPD << 1;
  ------------------
  |  |  142|  2.53k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  2.53k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  2.53k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 2.53k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  2.53k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  2.53k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  2.53k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  195|  2.53k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  2.53k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  2.53k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  2.53k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  2.53k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  2.53k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  2.53k|          : ((((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 (273:14): [True: 2.53k, False: 166k]
  ------------------
  274|   166k|      if (fixp_abs(tmp) > fMult((quantCoarse ? FL2FXCONST_DBL(50.f / 180.f)
  ------------------
  |  |  305|   166k|#define fixp_abs(x) fAbs(x)
  ------------------
                    if (fixp_abs(tmp) > fMult((quantCoarse ? FL2FXCONST_DBL(50.f / 180.f)
  ------------------
  |  |  192|  47.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  47.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 166k, Folded]
  |  |  ------------------
  |  |  194|   166k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   166k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   166k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 166k]
  |  |  ------------------
  |  |  195|   166k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   166k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   166k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   166k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   166k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   166k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  18.4E|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  18.4E|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  18.4E|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 18.4E]
  |  |  ------------------
  |  |  199|  18.4E|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  18.4E|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  18.4E|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  18.4E|                 ? (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|  18.4E|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  18.4E|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  18.4E|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (274:11): [True: 65.9k, False: 100k]
  |  Branch (274:34): [True: 47.0k, False: 119k]
  ------------------
  275|   166k|                                             : FL2FXCONST_DBL(25.f / 180.f)),
  ------------------
  |  |  192|   119k|  (FIXP_DBL)(                                                                \
  |  |  193|   119k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 166k, Folded]
  |  |  ------------------
  |  |  194|   166k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   166k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   166k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 166k]
  |  |  ------------------
  |  |  195|   166k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   166k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   166k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   166k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   166k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   166k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  18.4E|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  18.4E|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  18.4E|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 18.4E]
  |  |  ------------------
  |  |  199|  18.4E|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  18.4E|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  18.4E|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  18.4E|                 ? (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|  18.4E|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  18.4E|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  18.4E|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  276|   166k|                                PI__IPD)) {
  ------------------
  |  |  142|   166k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   166k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   166k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 166k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   166k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   166k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   166k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 166k]
  |  |  |  |  ------------------
  |  |  |  |  195|   166k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   166k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   166k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   166k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   166k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   166k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   166k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  277|  65.9k|        phaseLeftSmooth__FDK[pb] = tmpL;
  278|  65.9k|        phaseRightSmooth__FDK[pb] = tmpR;
  279|  65.9k|      }
  280|       |
  281|   176k|      while (phaseLeftSmooth__FDK[pb] > PI__IPD << 1)
  ------------------
  |  |  142|   176k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   176k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   176k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 176k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   176k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   176k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   176k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 176k]
  |  |  |  |  ------------------
  |  |  |  |  195|   176k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   176k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   176k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   176k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   176k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   176k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   176k|          : ((((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 (281:14): [True: 10.2k, False: 166k]
  ------------------
  282|  10.2k|        phaseLeftSmooth__FDK[pb] -= PI__IPD << 1;
  ------------------
  |  |  142|  10.2k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  10.2k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  10.2k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 10.2k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  10.2k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  10.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  10.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 10.2k]
  |  |  |  |  ------------------
  |  |  |  |  195|  10.2k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  10.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  10.2k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  10.2k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  10.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  10.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  10.2k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|   177k|      while (phaseLeftSmooth__FDK[pb] < (FIXP_DBL)0)
  ------------------
  |  Branch (283:14): [True: 11.6k, False: 166k]
  ------------------
  284|  11.6k|        phaseLeftSmooth__FDK[pb] += PI__IPD << 1;
  ------------------
  |  |  142|  11.6k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  11.6k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  11.6k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 11.6k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  11.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  11.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  11.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 11.6k]
  |  |  |  |  ------------------
  |  |  |  |  195|  11.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  11.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  11.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  11.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  11.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  11.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  11.6k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|   175k|      while (phaseRightSmooth__FDK[pb] > PI__IPD << 1)
  ------------------
  |  |  142|   175k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|   175k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   175k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 175k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   175k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   175k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   175k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 175k]
  |  |  |  |  ------------------
  |  |  |  |  195|   175k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   175k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   175k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   175k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   175k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   175k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   175k|          : ((((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 (285:14): [True: 8.85k, False: 166k]
  ------------------
  286|  8.85k|        phaseRightSmooth__FDK[pb] -= PI__IPD << 1;
  ------------------
  |  |  142|  8.85k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  8.85k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  8.85k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 8.85k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  8.85k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  8.85k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  8.85k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 8.85k]
  |  |  |  |  ------------------
  |  |  |  |  195|  8.85k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  8.85k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  8.85k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  8.85k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  8.85k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  8.85k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  8.85k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  287|   178k|      while (phaseRightSmooth__FDK[pb] < (FIXP_DBL)0)
  ------------------
  |  Branch (287:14): [True: 12.2k, False: 166k]
  ------------------
  288|  12.2k|        phaseRightSmooth__FDK[pb] += PI__IPD << 1;
  ------------------
  |  |  142|  12.2k|#define PI__IPD (FL2FXCONST_DBL(3.1415926535897932f / (float)(1 << IPD_SCALE)))
  |  |  ------------------
  |  |  |  |  192|  12.2k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  12.2k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 12.2k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  12.2k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  12.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  12.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 12.2k]
  |  |  |  |  ------------------
  |  |  |  |  195|  12.2k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  12.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  12.2k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  12.2k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  12.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  12.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  12.2k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|       |
  290|   166k|      self->PhaseLeft__FDK[pb] = phaseLeftSmooth__FDK[pb];
  291|   166k|      self->PhaseRight__FDK[pb] = phaseRightSmooth__FDK[pb];
  292|   166k|    }
  293|  16.1k|  }
  294|  48.5k|  return;
  295|  48.5k|}
sac_smoothing.cpp:_ZL20calcFilterCoeff__FDKP17spatialDec_structiPK23SPATIAL_BS_FRAME_struct:
  123|   213k|                                     const SPATIAL_BS_FRAME *frame) {
  124|   213k|  int dSlots;
  125|   213k|  FIXP_DBL delta;
  126|       |
  127|   213k|  dSlots = frame->paramSlot[ps] - self->smoothState->prevParamSlot;
  128|       |
  129|   213k|  if (dSlots <= 0) {
  ------------------
  |  Branch (129:7): [True: 90.5k, False: 122k]
  ------------------
  130|  90.5k|    dSlots += self->timeSlots;
  131|  90.5k|  }
  132|       |
  133|   213k|  delta = fDivNorm(dSlots, self->smgTime[ps]);
  134|       |
  135|   213k|  return delta;
  136|   213k|}
sac_smoothing.cpp:_ZL14getSmoothOnOffP17spatialDec_structii:
  152|  2.05M|static int getSmoothOnOff(spatialDec *self, int ps, int pb) {
  153|  2.05M|  int smoothBand = 0;
  154|       |
  155|  2.05M|  smoothBand = self->smgData[ps][pb];
  156|       |
  157|  2.05M|  return smoothBand;
  158|  2.05M|}

_Z15subbandTPCreatePP7STP_DEC:
  267|  21.2k|SACDEC_ERROR subbandTPCreate(HANDLE_STP_DEC *hStpDec) {
  268|  21.2k|  HANDLE_STP_DEC self = NULL;
  269|  21.2k|  FDK_ALLOCATE_MEMORY_1D(self, 1, struct STP_DEC)
  ------------------
  |  |  149|  21.2k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 21.2k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  270|  21.2k|  if (hStpDec != NULL) {
  ------------------
  |  Branch (270:7): [True: 21.2k, False: 0]
  ------------------
  271|  21.2k|    *hStpDec = self;
  272|  21.2k|  }
  273|       |
  274|  21.2k|  return MPS_OK;
  275|      0|bail:
  276|      0|  return MPS_OUTOFMEMORY;
  277|  21.2k|}
_Z13subbandTPInitP7STP_DEC:
  279|  50.5k|SACDEC_ERROR subbandTPInit(HANDLE_STP_DEC self) {
  280|  50.5k|  SACDEC_ERROR err = MPS_OK;
  281|  50.5k|  int ch;
  282|       |
  283|   151k|  for (ch = 0; ch < MAX_OUTPUT_CHANNELS; ch++) {
  ------------------
  |  |  112|   151k|  2 /* CAUTION: This does NOT restrict the number of                    \
  ------------------
  |  Branch (283:16): [True: 101k, False: 50.5k]
  ------------------
  284|   101k|    self->prev_tp_scale[ch] = FL2FXCONST_DBL(1.0f / (1 << SF_SCALE));
  ------------------
  |  |  192|   101k|  (FIXP_DBL)(                                                                \
  |  |  193|   101k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 101k, Folded]
  |  |  ------------------
  |  |  194|   101k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   101k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   101k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 101k]
  |  |  ------------------
  |  |  195|   101k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   101k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   101k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   101k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   101k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   101k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   101k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|   101k|    self->oldWetEnerLD64[ch] = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|   101k|  (FIXP_DBL)(                                                                \
  |  |  193|   101k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 101k, Folded]
  |  |  ------------------
  |  |  194|   101k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   101k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   101k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 101k]
  |  |  ------------------
  |  |  195|   101k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   101k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   101k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   101k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   101k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   101k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   101k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  286|   101k|  }
  287|   101k|  for (ch = 0; ch < MAX_INPUT_CHANNELS; ch++) {
  ------------------
  |  |  110|   101k|#define MAX_INPUT_CHANNELS 1
  ------------------
  |  Branch (287:16): [True: 50.5k, False: 50.5k]
  ------------------
  288|  50.5k|    self->oldDryEnerLD64[ch] = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|  50.5k|  (FIXP_DBL)(                                                                \
  |  |  193|  50.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 50.5k, Folded]
  |  |  ------------------
  |  |  194|  50.5k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  50.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 50.5k]
  |  |  ------------------
  |  |  195|  50.5k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  50.5k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  50.5k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  50.5k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  50.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  50.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  50.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  50.5k|  }
  290|       |
  291|  50.5k|  self->BP = BP__FDK;
  292|  50.5k|  self->BP_GF = BP_GF__FDK;
  293|       |
  294|  50.5k|  self->update_old_ener = 0;
  295|       |
  296|  50.5k|  return err;
  297|  50.5k|}
_Z16subbandTPDestroyPP7STP_DEC:
  302|  21.2k|void subbandTPDestroy(HANDLE_STP_DEC *hStpDec) {
  303|  21.2k|  if (hStpDec != NULL) {
  ------------------
  |  Branch (303:7): [True: 21.2k, False: 0]
  ------------------
  304|       |    FDK_FREE_MEMORY_1D(*hStpDec);
  ------------------
  |  |  171|  21.2k|  do {                           \
  |  |  172|  21.2k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  21.2k|    (a) = NULL;                  \
  |  |  174|  21.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
  305|  21.2k|  }
  306|  21.2k|}
_Z14subbandTPApplyP17spatialDec_structPK23SPATIAL_BS_FRAME_struct:
  311|   626k|SACDEC_ERROR subbandTPApply(spatialDec *self, const SPATIAL_BS_FRAME *frame) {
  312|   626k|  FIXP_DBL *qmfOutputRealDry[MAX_OUTPUT_CHANNELS];
  313|   626k|  FIXP_DBL *qmfOutputImagDry[MAX_OUTPUT_CHANNELS];
  314|   626k|  FIXP_DBL *qmfOutputRealWet[MAX_OUTPUT_CHANNELS];
  315|   626k|  FIXP_DBL *qmfOutputImagWet[MAX_OUTPUT_CHANNELS];
  316|       |
  317|   626k|  FIXP_DBL DryEner[MAX_INPUT_CHANNELS];
  318|   626k|  FIXP_DBL scale[MAX_OUTPUT_CHANNELS];
  319|       |
  320|   626k|  FIXP_DBL DryEnerLD64[MAX_INPUT_CHANNELS];
  321|   626k|  FIXP_DBL WetEnerLD64[MAX_OUTPUT_CHANNELS];
  322|       |
  323|   626k|  FIXP_DBL DryEner0 = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   626k|  (FIXP_DBL)(                                                                \
  |  |  193|   626k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 626k, Folded]
  |  |  ------------------
  |  |  194|   626k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 626k]
  |  |  ------------------
  |  |  195|   626k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   626k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   626k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   626k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   626k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  324|   626k|  FIXP_DBL WetEnerX, damp, tmp;
  325|   626k|  FIXP_DBL dmxReal0, dmxImag0;
  326|   626k|  int skipChannels[MAX_OUTPUT_CHANNELS];
  327|   626k|  int n, ch, cplxBands, cplxHybBands;
  328|   626k|  int dry_scale_dmx, wet_scale_dmx;
  329|   626k|  int i_LF, i_RF;
  330|   626k|  HANDLE_STP_DEC hStpDec;
  331|   626k|  const FIXP_CFG *pBP;
  332|       |
  333|   626k|  int nrgScale = (2 * self->clipProtectGainSF__FDK);
  334|       |
  335|   626k|  hStpDec = self->hStpDec;
  336|       |
  337|       |  /* set scalefactor and loop counter */
  338|   626k|  FDK_ASSERT(SF_DRY >= 1);
  ------------------
  |  |  221|   626k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (338:3): [True: 626k, Folded]
  ------------------
  339|   626k|  {
  340|   626k|    cplxBands = BP_GF_SIZE;
  ------------------
  |  |  112|   626k|#define BP_GF_SIZE 25
  ------------------
  341|   626k|    cplxHybBands = self->hybridBands;
  342|   626k|    if (self->treeConfig == TREE_212) {
  ------------------
  |  Branch (342:9): [True: 626k, False: 0]
  ------------------
  343|   626k|      dry_scale_dmx = 2; /* 2 bits to compensate fMultDiv2() and fPow2Div2()
  344|       |                            used in energy calculation */
  345|   626k|    } else {
  346|      0|      dry_scale_dmx = (2 * SF_DRY) - 2;
  ------------------
  |  |  118|      0|  3 /* SF_DRY == 2 would produce good conformance test results as well */
  ------------------
  347|      0|    }
  348|   626k|    wet_scale_dmx = 2;
  349|   626k|  }
  350|       |
  351|       |  /* setup pointer for forming the direct downmix signal */
  352|  1.87M|  for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (352:16): [True: 1.25M, False: 626k]
  ------------------
  353|  1.25M|    qmfOutputRealDry[ch] = &self->hybOutputRealDry__FDK[ch][7];
  354|  1.25M|    qmfOutputRealWet[ch] = &self->hybOutputRealWet__FDK[ch][7];
  355|  1.25M|    qmfOutputImagDry[ch] = &self->hybOutputImagDry__FDK[ch][7];
  356|  1.25M|    qmfOutputImagWet[ch] = &self->hybOutputImagWet__FDK[ch][7];
  357|  1.25M|  }
  358|       |
  359|       |  /* clear skipping flag for all output channels */
  360|   626k|  FDKmemset(skipChannels, 0, self->numOutputChannels * sizeof(int));
  361|       |
  362|       |  /* set scale values to zero */
  363|   626k|  FDKmemset(scale, 0, self->numOutputChannels * sizeof(FIXP_DBL));
  364|       |
  365|       |  /* update normalisation energy with latest smoothed energy */
  366|   626k|  if (hStpDec->update_old_ener == STP_UPDATE_ENERGY_RATE) {
  ------------------
  |  |  114|   626k|#define STP_UPDATE_ENERGY_RATE 32
  ------------------
  |  Branch (366:7): [True: 7.43k, False: 619k]
  ------------------
  367|  7.43k|    hStpDec->update_old_ener = 1;
  368|  14.8k|    for (ch = 0; ch < self->numInputChannels; ch++) {
  ------------------
  |  Branch (368:18): [True: 7.43k, False: 7.43k]
  ------------------
  369|  7.43k|      hStpDec->oldDryEnerLD64[ch] =
  370|  7.43k|          CalcLdData(fAddSaturate(hStpDec->runDryEner[ch], ABS_THR__FDK));
  ------------------
  |  |  219|  29.7k|#define CalcLdData(op) fLog2(op, 0)
  |  |  ------------------
  |  |  |  Branch (219:30): [Folded, False: 7.43k]
  |  |  |  Branch (219:30): [Folded, False: 0]
  |  |  |  Branch (219:30): [True: 7.43k, Folded]
  |  |  ------------------
  ------------------
  371|  7.43k|    }
  372|  22.2k|    for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (372:18): [True: 14.8k, False: 7.43k]
  ------------------
  373|  14.8k|      if (self->treeConfig == TREE_212)
  ------------------
  |  Branch (373:11): [True: 14.8k, False: 0]
  ------------------
  374|  14.8k|        hStpDec->oldWetEnerLD64[ch] =
  375|  14.8k|            CalcLdData(fAddSaturate(hStpDec->runWetEner[ch], ABS_THR__FDK));
  ------------------
  |  |  219|  59.4k|#define CalcLdData(op) fLog2(op, 0)
  |  |  ------------------
  |  |  |  Branch (219:30): [Folded, False: 14.8k]
  |  |  |  Branch (219:30): [Folded, False: 0]
  |  |  |  Branch (219:30): [True: 14.8k, Folded]
  |  |  ------------------
  ------------------
  376|      0|      else
  377|      0|        hStpDec->oldWetEnerLD64[ch] =
  378|      0|            CalcLdData(fAddSaturate(hStpDec->runWetEner[ch], ABS_THR2__FDK));
  ------------------
  |  |  219|      0|#define CalcLdData(op) fLog2(op, 0)
  |  |  ------------------
  |  |  |  Branch (219:30): [Folded, False: 0]
  |  |  |  Branch (219:30): [Folded, False: 0]
  |  |  |  Branch (219:30): [True: 0, Folded]
  |  |  ------------------
  ------------------
  379|  14.8k|    }
  380|   619k|  } else {
  381|   619k|    hStpDec->update_old_ener++;
  382|   619k|  }
  383|       |
  384|       |  /* get channel configuration */
  385|   626k|  switch (self->treeConfig) {
  386|   626k|    case TREE_212:
  ------------------
  |  Branch (386:5): [True: 626k, False: 0]
  ------------------
  387|   626k|      i_LF = 0;
  388|   626k|      i_RF = 1;
  389|   626k|      break;
  390|      0|    default:
  ------------------
  |  Branch (390:5): [True: 0, False: 626k]
  ------------------
  391|      0|      return MPS_WRONG_TREECONFIG;
  392|   626k|  }
  393|       |
  394|       |  /* form the 'direct' downmix signal */
  395|   626k|  pBP = hStpDec->BP_GF - BP_GF_START;
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  396|   626k|  switch (self->treeConfig) {
  397|   626k|    case TREE_212:
  ------------------
  |  Branch (397:5): [True: 626k, False: 0]
  ------------------
  398|   626k|      INT sMin, sNorm, sReal, sImag;
  399|       |
  400|   626k|      sReal = fMin(getScalefactor(&qmfOutputRealDry[i_LF][BP_GF_START],
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  401|   626k|                                  cplxBands - BP_GF_START),
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  402|   626k|                   getScalefactor(&qmfOutputRealDry[i_RF][BP_GF_START],
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  403|   626k|                                  cplxBands - BP_GF_START));
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  404|   626k|      sImag = fMin(getScalefactor(&qmfOutputImagDry[i_LF][BP_GF_START],
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  405|   626k|                                  cplxBands - BP_GF_START),
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  406|   626k|                   getScalefactor(&qmfOutputImagDry[i_RF][BP_GF_START],
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  407|   626k|                                  cplxBands - BP_GF_START));
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  408|   626k|      sMin = fMin(sReal, sImag) - 1;
  409|       |
  410|  12.5M|      for (n = BP_GF_START; n < cplxBands; n++) {
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  |  Branch (410:29): [True: 11.9M, False: 626k]
  ------------------
  411|  11.9M|        dmxReal0 = scaleValue(qmfOutputRealDry[i_LF][n], sMin) +
  412|  11.9M|                   scaleValue(qmfOutputRealDry[i_RF][n], sMin);
  413|  11.9M|        dmxImag0 = scaleValue(qmfOutputImagDry[i_LF][n], sMin) +
  414|  11.9M|                   scaleValue(qmfOutputImagDry[i_RF][n], sMin);
  415|       |
  416|  11.9M|        DryEner0 += (fMultDiv2(fPow2Div2(dmxReal0), pBP[n]) +
  417|  11.9M|                     fMultDiv2(fPow2Div2(dmxImag0), pBP[n])) >>
  418|  11.9M|                    SF_DRY_NRG;
  ------------------
  |  |  120|  11.9M|  (4 - 1) /* 8.495f = sum(BP_GF__FDK[i])                                     \
  ------------------
  419|  11.9M|      }
  420|       |
  421|   626k|      sNorm = SF_FREQ_DOMAIN_HEADROOM + SF_DRY_NRG + dry_scale_dmx -
  ------------------
  |  |  109|   626k|#define SF_FREQ_DOMAIN_HEADROOM (2 * (1))
  ------------------
                    sNorm = SF_FREQ_DOMAIN_HEADROOM + SF_DRY_NRG + dry_scale_dmx -
  ------------------
  |  |  120|   626k|  (4 - 1) /* 8.495f = sum(BP_GF__FDK[i])                                     \
  ------------------
  422|   626k|              (2 * sMin) + nrgScale;
  423|   626k|      DryEner0 = scaleValueSaturate(
  424|   626k|          DryEner0, fMax(fMin(sNorm, DFRACT_BITS - 1), -(DFRACT_BITS - 1)));
  ------------------
  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                        DryEner0, fMax(fMin(sNorm, DFRACT_BITS - 1), -(DFRACT_BITS - 1)));
  ------------------
  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  425|   626k|      break;
  426|      0|    default:;
  ------------------
  |  Branch (426:5): [True: 0, False: 626k]
  ------------------
  427|   626k|  }
  428|   626k|  DryEner[0] = DryEner0;
  429|       |
  430|       |  /* normalise the 'direct' signals */
  431|  1.25M|  for (ch = 0; ch < self->numInputChannels; ch++) {
  ------------------
  |  Branch (431:16): [True: 626k, False: 626k]
  ------------------
  432|   626k|    if (self->treeConfig != TREE_212) DryEner[ch] = DryEner[ch] << nrgScale;
  ------------------
  |  Branch (432:9): [True: 0, False: 626k]
  ------------------
  433|   626k|    hStpDec->runDryEner[ch] =
  434|   626k|        fMult(STP_LPF_COEFF1__FDK, hStpDec->runDryEner[ch]) +
  ------------------
  |  |  134|   626k|#define STP_LPF_COEFF1__FDK FL2FXCONST_DBL(0.950f) /* 0.95 */
  |  |  ------------------
  |  |  |  |  192|   626k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   626k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 626k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   626k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 626k]
  |  |  |  |  ------------------
  |  |  |  |  195|   626k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   626k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   626k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   626k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   626k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|   626k|        fMult(ONE_MINUS_STP_LPF_COEFF1__FDK, DryEner[ch]);
  ------------------
  |  |  135|   626k|#define ONE_MINUS_STP_LPF_COEFF1__FDK FL2FXCONST_DBL(0.05f) /* 1.0 - 0.95 */
  |  |  ------------------
  |  |  |  |  192|   626k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   626k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 626k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   626k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 626k]
  |  |  |  |  ------------------
  |  |  |  |  195|   626k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   626k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   626k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   626k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   626k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  436|   626k|    if (DryEner[ch] != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   626k|  (FIXP_DBL)(                                                                \
  |  |  193|   626k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 626k, Folded]
  |  |  ------------------
  |  |  194|   626k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 626k]
  |  |  ------------------
  |  |  195|   626k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   626k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   626k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   626k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   626k|          : ((((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 (436:9): [True: 168k, False: 457k]
  ------------------
  437|   168k|      DryEnerLD64[ch] =
  438|   168k|          fixMax((CalcLdData(DryEner[ch]) - hStpDec->oldDryEnerLD64[ch]),
  ------------------
  |  |  307|   674k|#define fixMax(a, b) fMax(a, b)
  |  |  ------------------
  |  |  |  Branch (307:30): [Folded, False: 0]
  |  |  |  Branch (307:30): [Folded, False: 168k]
  |  |  |  Branch (307:30): [Folded, False: 168k]
  |  |  ------------------
  ------------------
  439|   168k|                 FL2FXCONST_DBL(-0.484375f));
  440|   457k|    } else {
  441|   457k|      DryEnerLD64[ch] = FL2FXCONST_DBL(-0.484375f);
  ------------------
  |  |  192|   457k|  (FIXP_DBL)(                                                                \
  |  |  193|   457k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 457k]
  |  |  ------------------
  |  |  194|   457k|          ? ((((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|   457k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   457k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   457k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 457k]
  |  |  ------------------
  |  |  199|   457k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   457k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   457k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   457k|                 ? (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|   457k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   457k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   457k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|   457k|    }
  443|   626k|  }
  444|   626k|  for (; ch < MAX_INPUT_CHANNELS; ch++) {
  ------------------
  |  |  110|   626k|#define MAX_INPUT_CHANNELS 1
  ------------------
  |  Branch (444:10): [True: 0, False: 626k]
  ------------------
  445|      0|    DryEnerLD64[ch] = FL2FXCONST_DBL(-0.484375f);
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  446|      0|  }
  447|       |
  448|       |  /* normalise the 'diffuse' signals */
  449|   626k|  pBP = hStpDec->BP_GF - BP_GF_START;
  ------------------
  |  |  111|   626k|#define BP_GF_START 6
  ------------------
  450|  1.87M|  for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (450:16): [True: 1.25M, False: 626k]
  ------------------
  451|  1.25M|    if (skipChannels[ch]) {
  ------------------
  |  Branch (451:9): [True: 0, False: 1.25M]
  ------------------
  452|      0|      continue;
  453|      0|    }
  454|       |
  455|  1.25M|    WetEnerX = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  ------------------
  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  ------------------
  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.25M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  456|       |
  457|  1.25M|    if (self->treeConfig == TREE_212) {
  ------------------
  |  Branch (457:9): [True: 1.25M, False: 0]
  ------------------
  458|  1.25M|      INT sMin, sNorm;
  459|       |
  460|  1.25M|      sMin = fMin(getScalefactor(&qmfOutputRealWet[ch][BP_GF_START],
  ------------------
  |  |  111|  1.25M|#define BP_GF_START 6
  ------------------
  461|  1.25M|                                 cplxBands - BP_GF_START),
  ------------------
  |  |  111|  1.25M|#define BP_GF_START 6
  ------------------
  462|  1.25M|                  getScalefactor(&qmfOutputImagWet[ch][BP_GF_START],
  ------------------
  |  |  111|  1.25M|#define BP_GF_START 6
  ------------------
  463|  1.25M|                                 cplxBands - BP_GF_START));
  ------------------
  |  |  111|  1.25M|#define BP_GF_START 6
  ------------------
  464|       |
  465|  25.0M|      for (n = BP_GF_START; n < cplxBands; n++) {
  ------------------
  |  |  111|  1.25M|#define BP_GF_START 6
  ------------------
  |  Branch (465:29): [True: 23.8M, False: 1.25M]
  ------------------
  466|  23.8M|        WetEnerX +=
  467|  23.8M|            (fMultDiv2(fPow2Div2(scaleValue(qmfOutputRealWet[ch][n], sMin)),
  468|  23.8M|                       pBP[n]) +
  469|  23.8M|             fMultDiv2(fPow2Div2(scaleValue(qmfOutputImagWet[ch][n], sMin)),
  470|  23.8M|                       pBP[n])) >>
  471|  23.8M|            SF_WET_NRG;
  ------------------
  |  |  125|  23.8M|  (4 - 1) /* 8.495f = sum(BP_GF__FDK[i])                                     \
  ------------------
  472|  23.8M|      }
  473|  1.25M|      sNorm = SF_FREQ_DOMAIN_HEADROOM + SF_WET_NRG + wet_scale_dmx -
  ------------------
  |  |  109|  1.25M|#define SF_FREQ_DOMAIN_HEADROOM (2 * (1))
  ------------------
                    sNorm = SF_FREQ_DOMAIN_HEADROOM + SF_WET_NRG + wet_scale_dmx -
  ------------------
  |  |  125|  1.25M|  (4 - 1) /* 8.495f = sum(BP_GF__FDK[i])                                     \
  ------------------
  474|  1.25M|              (2 * sMin) + nrgScale;
  475|  1.25M|      WetEnerX = scaleValueSaturate(
  476|  1.25M|          WetEnerX, fMax(fMin(sNorm, DFRACT_BITS - 1), -(DFRACT_BITS - 1)));
  ------------------
  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                        WetEnerX, fMax(fMin(sNorm, DFRACT_BITS - 1), -(DFRACT_BITS - 1)));
  ------------------
  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  477|  1.25M|    } else
  478|  1.25M|      FDK_ASSERT(self->treeConfig == TREE_212);
  ------------------
  |  |  221|  1.25M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (478:7): [True: 0, False: 0]
  ------------------
  479|       |
  480|  1.25M|    hStpDec->runWetEner[ch] =
  481|  1.25M|        fMult(STP_LPF_COEFF1__FDK, hStpDec->runWetEner[ch]) +
  ------------------
  |  |  134|  1.25M|#define STP_LPF_COEFF1__FDK FL2FXCONST_DBL(0.950f) /* 0.95 */
  |  |  ------------------
  |  |  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  |  |  ------------------
  |  |  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  1.25M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  482|  1.25M|        fMult(ONE_MINUS_STP_LPF_COEFF1__FDK, WetEnerX);
  ------------------
  |  |  135|  1.25M|#define ONE_MINUS_STP_LPF_COEFF1__FDK FL2FXCONST_DBL(0.05f) /* 1.0 - 0.95 */
  |  |  ------------------
  |  |  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  |  |  ------------------
  |  |  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  1.25M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|       |
  484|  1.25M|    if (WetEnerX == FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  ------------------
  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  ------------------
  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.25M|          : ((((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 (484:9): [True: 1.20M, False: 49.2k]
  ------------------
  485|  1.20M|      WetEnerLD64[ch] = FL2FXCONST_DBL(-0.484375f);
  ------------------
  |  |  192|  1.20M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.20M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 1.20M]
  |  |  ------------------
  |  |  194|  1.20M|          ? ((((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|  1.20M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  1.20M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.20M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 1.20M]
  |  |  ------------------
  |  |  199|  1.20M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  1.20M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  1.20M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  1.20M|                 ? (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|  1.20M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  1.20M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.20M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  1.20M|    } else {
  487|  49.2k|      WetEnerLD64[ch] =
  488|  49.2k|          fixMax((CalcLdData(WetEnerX) - hStpDec->oldWetEnerLD64[ch]),
  ------------------
  |  |  307|   196k|#define fixMax(a, b) fMax(a, b)
  |  |  ------------------
  |  |  |  Branch (307:30): [Folded, False: 0]
  |  |  |  Branch (307:30): [Folded, False: 49.2k]
  |  |  |  Branch (307:30): [Folded, False: 49.2k]
  |  |  ------------------
  ------------------
  489|  49.2k|                 FL2FXCONST_DBL(-0.484375f));
  490|  49.2k|    }
  491|  1.25M|  }
  492|       |
  493|       |  /* compute scale factor for the 'diffuse' signals */
  494|   626k|  switch (self->treeConfig) {
  495|   626k|    case TREE_212:
  ------------------
  |  Branch (495:5): [True: 626k, False: 0]
  ------------------
  496|   626k|      if (DryEner[0] != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   626k|  (FIXP_DBL)(                                                                \
  |  |  193|   626k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 626k, Folded]
  |  |  ------------------
  |  |  194|   626k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 626k]
  |  |  ------------------
  |  |  195|   626k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   626k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   626k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   626k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   626k|          : ((((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 (496:11): [True: 168k, False: 457k]
  ------------------
  497|   168k|        CALC_WET_SCALE(0, i_LF);
  ------------------
  |  |  188|   168k|  if ((DryEnerLD64[dryIdx] - STP_SCALE_LIMIT_HI_LD64) > WetEnerLD64[wetIdx]) { \
  |  |  ------------------
  |  |  |  |  155|   168k|  FL2FXCONST_DBL(0.04986280452) /* see 4. below \
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|   168k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|   168k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 168k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|   168k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   168k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   168k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 168k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|   168k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|   168k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   168k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|   168k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   168k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   168k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|   168k|          : ((((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 (188:7): [True: 138k, False: 29.7k]
  |  |  ------------------
  |  |  189|   138k|    scale[wetIdx] = STP_SCALE_LIMIT_HI;                                        \
  |  |  ------------------
  |  |  |  |  151|   138k|  FL2FXCONST_DBL(3.02222222222 / (1 << SF_SCALE)) /* see 4. below */
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|   138k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|   138k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 138k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|   138k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   138k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   138k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 138k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|   138k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|   138k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   138k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|   138k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   138k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   138k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|   138k|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  190|   138k|  } else if (DryEnerLD64[dryIdx] <                                             \
  |  |  ------------------
  |  |  |  Branch (190:14): [True: 2.90k, False: 26.8k]
  |  |  ------------------
  |  |  191|  29.7k|             (WetEnerLD64[wetIdx] - STP_SCALE_LIMIT_LO_LD64)) {                \
  |  |  ------------------
  |  |  |  |  158|  29.7k|  FL2FXCONST_DBL(0.05692613500) /* see 4. below \
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  29.7k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|  29.7k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 29.7k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  29.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  29.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  29.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 29.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  29.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|  29.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  29.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|  29.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  29.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  29.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|  29.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  192|  2.90k|    scale[wetIdx] = STP_SCALE_LIMIT_LO;                                        \
  |  |  ------------------
  |  |  |  |  153|  2.90k|  FL2FXCONST_DBL(0.28289992119 / (1 << SF_SCALE)) /* see 4. below */
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  2.90k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|  2.90k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 2.90k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  2.90k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  2.90k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  2.90k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 2.90k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  2.90k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|  2.90k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.90k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|  2.90k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  2.90k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  2.90k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|  2.90k|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  193|  26.8k|  } else {                                                                     \
  |  |  194|  26.8k|    tmp = ((DryEnerLD64[dryIdx] - WetEnerLD64[wetIdx]) >> 1) - SF_SCALE_LD64;  \
  |  |  ------------------
  |  |  |  |  133|  26.8k|#define SF_SCALE_LD64 FL2FXCONST_DBL(0.03125)      /* LD64((1<<SF_SCALE))*/
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  26.8k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|  26.8k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 26.8k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  26.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  26.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  26.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 26.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  26.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|  26.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  26.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|  26.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  26.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  26.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|  26.8k|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  195|  26.8k|    scale[wetIdx] = CalcInvLdData(tmp);                                        \
  |  |  196|  26.8k|  }
  ------------------
  498|   168k|        CALC_WET_SCALE(0, i_RF);
  ------------------
  |  |  188|   168k|  if ((DryEnerLD64[dryIdx] - STP_SCALE_LIMIT_HI_LD64) > WetEnerLD64[wetIdx]) { \
  |  |  ------------------
  |  |  |  |  155|   168k|  FL2FXCONST_DBL(0.04986280452) /* see 4. below \
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|   168k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|   168k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 168k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|   168k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   168k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   168k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 168k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|   168k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|   168k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   168k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|   168k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   168k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   168k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|   168k|          : ((((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 (188:7): [True: 138k, False: 29.7k]
  |  |  ------------------
  |  |  189|   138k|    scale[wetIdx] = STP_SCALE_LIMIT_HI;                                        \
  |  |  ------------------
  |  |  |  |  151|   138k|  FL2FXCONST_DBL(3.02222222222 / (1 << SF_SCALE)) /* see 4. below */
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|   138k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|   138k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 138k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|   138k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   138k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   138k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 138k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|   138k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|   138k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   138k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|   138k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|   138k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|   138k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|   138k|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  190|   138k|  } else if (DryEnerLD64[dryIdx] <                                             \
  |  |  ------------------
  |  |  |  Branch (190:14): [True: 2.90k, False: 26.8k]
  |  |  ------------------
  |  |  191|  29.7k|             (WetEnerLD64[wetIdx] - STP_SCALE_LIMIT_LO_LD64)) {                \
  |  |  ------------------
  |  |  |  |  158|  29.7k|  FL2FXCONST_DBL(0.05692613500) /* see 4. below \
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  29.7k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|  29.7k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 29.7k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  29.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  29.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  29.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 29.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  29.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|  29.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  29.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|  29.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  29.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  29.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|  29.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  192|  2.90k|    scale[wetIdx] = STP_SCALE_LIMIT_LO;                                        \
  |  |  ------------------
  |  |  |  |  153|  2.90k|  FL2FXCONST_DBL(0.28289992119 / (1 << SF_SCALE)) /* see 4. below */
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  2.90k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|  2.90k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 2.90k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  2.90k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  2.90k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  2.90k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 2.90k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  2.90k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|  2.90k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.90k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|  2.90k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  2.90k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  2.90k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|  2.90k|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  193|  26.8k|  } else {                                                                     \
  |  |  194|  26.8k|    tmp = ((DryEnerLD64[dryIdx] - WetEnerLD64[wetIdx]) >> 1) - SF_SCALE_LD64;  \
  |  |  ------------------
  |  |  |  |  133|  26.8k|#define SF_SCALE_LD64 FL2FXCONST_DBL(0.03125)      /* LD64((1<<SF_SCALE))*/
  |  |  |  |  ------------------
  |  |  |  |  |  |  192|  26.8k|  (FIXP_DBL)(                                                                \
  |  |  |  |  |  |  193|  26.8k|      ((val) >= 0)                                                           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (193:7): [True: 26.8k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  26.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  26.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  26.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:14): [Folded, False: 26.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  26.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|  26.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  26.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|  26.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|  26.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  113|  26.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|  26.8k|          : ((((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 */
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  195|  26.8k|    scale[wetIdx] = CalcInvLdData(tmp);                                        \
  |  |  196|  26.8k|  }
  ------------------
  499|   168k|      }
  500|   626k|      break;
  501|      0|    default:;
  ------------------
  |  Branch (501:5): [True: 0, False: 626k]
  ------------------
  502|   626k|  }
  503|       |
  504|   626k|  damp = FL2FXCONST_DBL(0.1f / (1 << SF_SCALE));
  ------------------
  |  |  192|   626k|  (FIXP_DBL)(                                                                \
  |  |  193|   626k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 626k, Folded]
  |  |  ------------------
  |  |  194|   626k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 626k]
  |  |  ------------------
  |  |  195|   626k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   626k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   626k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   626k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   626k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   626k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   626k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  505|  1.87M|  for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (505:16): [True: 1.25M, False: 626k]
  ------------------
  506|       |    /* damp the scaling factor */
  507|  1.25M|    scale[ch] = damp + fMult(FL2FXCONST_DBL(0.9f), scale[ch]);
  ------------------
  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  ------------------
  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  ------------------
  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.25M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  508|       |
  509|       |    /* limiting the scale factor */
  510|  1.25M|    if (scale[ch] > STP_SCALE_LIMIT__FDK) {
  ------------------
  |  |  140|  1.25M|  FL2FXCONST_DBL(2.82f / (float)(1 << SF_SCALE)) /* scaled by SF_SCALE */
  |  |  ------------------
  |  |  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  |  |  ------------------
  |  |  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  1.25M|          : ((((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 (510:9): [True: 0, False: 1.25M]
  ------------------
  511|      0|      scale[ch] = STP_SCALE_LIMIT__FDK;
  ------------------
  |  |  140|      0|  FL2FXCONST_DBL(2.82f / (float)(1 << SF_SCALE)) /* scaled by SF_SCALE */
  |  |  ------------------
  |  |  |  |  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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  512|      0|    }
  513|  1.25M|    if (scale[ch] < ONE_DIV_STP_SCALE_LIMIT__FDK) {
  ------------------
  |  |  142|  1.25M|  FL2FXCONST_DBL(1.0f / 2.82f / (float)(1 << SF_SCALE)) /* scaled by SF_SCALE \
  |  |  ------------------
  |  |  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  |  |  ------------------
  |  |  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  1.25M|          : ((((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 (513:9): [True: 921k, False: 331k]
  ------------------
  514|   921k|      scale[ch] = ONE_DIV_STP_SCALE_LIMIT__FDK;
  ------------------
  |  |  142|   921k|  FL2FXCONST_DBL(1.0f / 2.82f / (float)(1 << SF_SCALE)) /* scaled by SF_SCALE \
  |  |  ------------------
  |  |  |  |  192|   921k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|   921k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 921k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|   921k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   921k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   921k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 921k]
  |  |  |  |  ------------------
  |  |  |  |  195|   921k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|   921k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|   921k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|   921k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|   921k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|   921k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|   921k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  515|   921k|    }
  516|       |
  517|       |    /* low pass filter the scaling factor */
  518|  1.25M|    scale[ch] =
  519|  1.25M|        fMult(STP_LPF_COEFF2__FDK, scale[ch]) +
  ------------------
  |  |  136|  1.25M|#define STP_LPF_COEFF2__FDK FL2FXCONST_DBL(0.450f)          /* 0.45 */
  |  |  ------------------
  |  |  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  |  |  ------------------
  |  |  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  1.25M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  520|  1.25M|        fMult(ONE_MINUS_STP_LPF_COEFF2__FDK, hStpDec->prev_tp_scale[ch]);
  ------------------
  |  |  138|  1.25M|  FL2FXCONST_DBL(1.0f - 0.450f) /* 1.0 - 0.45 */
  |  |  ------------------
  |  |  |  |  192|  1.25M|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  1.25M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 1.25M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  1.25M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 1.25M]
  |  |  |  |  ------------------
  |  |  |  |  195|  1.25M|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  1.25M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  1.25M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  1.25M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.25M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  1.25M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  1.25M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  521|  1.25M|    hStpDec->prev_tp_scale[ch] = scale[ch];
  522|  1.25M|  }
  523|       |
  524|       |  /* combine 'direct' and scaled 'diffuse' signal */
  525|   626k|  FDK_ASSERT((HP_SIZE - 3 + 10 - 1) == PC_NUM_HYB_BANDS);
  ------------------
  |  |  221|   626k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (525:3): [True: 626k, Folded]
  ------------------
  526|   626k|  const SCHAR *channlIndex = row2channelSTP[self->treeConfig];
  527|       |
  528|  1.87M|  for (ch = 0; ch < self->numOutputChannels; ch++) {
  ------------------
  |  Branch (528:16): [True: 1.25M, False: 626k]
  ------------------
  529|  1.25M|    int no_scaling;
  530|       |
  531|  1.25M|    no_scaling = !frame->tempShapeEnableChannelSTP[channlIndex[ch]];
  532|  1.25M|    if (no_scaling) {
  ------------------
  |  Branch (532:9): [True: 1.24M, False: 9.24k]
  ------------------
  533|  1.24M|      combineSignalCplx(
  534|  1.24M|          &self->hybOutputRealDry__FDK[ch][self->tp_hybBandBorder],
  535|  1.24M|          &self->hybOutputImagDry__FDK[ch][self->tp_hybBandBorder],
  536|  1.24M|          &self->hybOutputRealWet__FDK[ch][self->tp_hybBandBorder],
  537|  1.24M|          &self->hybOutputImagWet__FDK[ch][self->tp_hybBandBorder],
  538|  1.24M|          cplxHybBands - self->tp_hybBandBorder);
  539|       |
  540|  1.24M|    } else {
  541|  9.24k|      FIXP_DBL scaleX;
  542|  9.24k|      scaleX = scale[ch];
  543|  9.24k|      pBP = hStpDec->BP - self->tp_hybBandBorder;
  544|       |      /* Band[HP_SIZE-3+10-1] needs not to be processed in
  545|       |         combineSignalCplxScale1(), because pB[HP_SIZE-3+10-1] would be 1.0 */
  546|  9.24k|      combineSignalCplxScale1(
  547|  9.24k|          &self->hybOutputRealDry__FDK[ch][self->tp_hybBandBorder],
  548|  9.24k|          &self->hybOutputImagDry__FDK[ch][self->tp_hybBandBorder],
  549|  9.24k|          &self->hybOutputRealWet__FDK[ch][self->tp_hybBandBorder],
  550|  9.24k|          &self->hybOutputImagWet__FDK[ch][self->tp_hybBandBorder],
  551|  9.24k|          &pBP[self->tp_hybBandBorder], scaleX,
  552|  9.24k|          (HP_SIZE - 3 + 10 - 1) - self->tp_hybBandBorder);
  ------------------
  |  |  113|  9.24k|#define HP_SIZE 9
  ------------------
  553|       |
  554|  9.24k|      {
  555|  9.24k|        combineSignalCplxScale2(
  556|  9.24k|            &self->hybOutputRealDry__FDK[ch][HP_SIZE - 3 + 10 - 1],
  ------------------
  |  |  113|  9.24k|#define HP_SIZE 9
  ------------------
  557|  9.24k|            &self->hybOutputImagDry__FDK[ch][HP_SIZE - 3 + 10 - 1],
  ------------------
  |  |  113|  9.24k|#define HP_SIZE 9
  ------------------
  558|  9.24k|            &self->hybOutputRealWet__FDK[ch][HP_SIZE - 3 + 10 - 1],
  ------------------
  |  |  113|  9.24k|#define HP_SIZE 9
  ------------------
  559|  9.24k|            &self->hybOutputImagWet__FDK[ch][HP_SIZE - 3 + 10 - 1], scaleX,
  ------------------
  |  |  113|  9.24k|#define HP_SIZE 9
  ------------------
  560|  9.24k|            cplxHybBands - (HP_SIZE - 3 + 10 - 1));
  ------------------
  |  |  113|  9.24k|#define HP_SIZE 9
  ------------------
  561|  9.24k|      }
  562|  9.24k|    }
  563|  1.25M|  }
  564|       |
  565|   626k|  return (SACDEC_ERROR)MPS_OK;
  566|      0|  ;
  567|      0|}
_Z17combineSignalCplxPiS_S_S_i:
  212|  1.24M|                              FIXP_DBL *hybOutputImagWet, int bands) {
  213|  1.24M|  int n;
  214|       |
  215|  32.1M|  for (n = bands - 1; n >= 0; n--) {
  ------------------
  |  Branch (215:23): [True: 30.8M, False: 1.24M]
  ------------------
  216|  30.8M|    *hybOutputRealDry = fAddSaturate(*hybOutputRealDry, *hybOutputRealWet);
  217|  30.8M|    *hybOutputImagDry = fAddSaturate(*hybOutputImagDry, *hybOutputImagWet);
  218|  30.8M|    hybOutputRealDry++, hybOutputRealWet++;
  219|  30.8M|    hybOutputImagDry++, hybOutputImagWet++;
  220|  30.8M|  }
  221|  1.24M|}
_Z23combineSignalCplxScale1PiS_S_S_PKiii:
  228|  9.24k|                                    int bands) {
  229|  9.24k|  int n;
  230|  9.24k|  FIXP_DBL scaleY;
  231|  36.9k|  for (n = bands - 1; n >= 0; n--) {
  ------------------
  |  Branch (231:23): [True: 27.7k, False: 9.24k]
  ------------------
  232|  27.7k|    scaleY = fMult(scaleX, *pBP);
  233|  27.7k|    *hybOutputRealDry = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  27.7k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 328, False: 27.3k]
  |  |  ------------------
  |  |  252|  27.7k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  27.7k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 326, False: 27.0k]
  |  |  ------------------
  |  |  254|  27.3k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  27.3k|             : ((LONG)(src) << (scale)))
  ------------------
  234|  27.7k|        (*hybOutputRealDry >> SF_SCALE) + fMult(*hybOutputRealWet, scaleY),
  235|  27.7k|        SF_SCALE, DFRACT_BITS);
  236|  27.7k|    *hybOutputImagDry = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  27.7k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 320, False: 27.4k]
  |  |  ------------------
  |  |  252|  27.7k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  27.7k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 320, False: 27.0k]
  |  |  ------------------
  |  |  254|  27.4k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  27.4k|             : ((LONG)(src) << (scale)))
  ------------------
  237|  27.7k|        (*hybOutputImagDry >> SF_SCALE) + fMult(*hybOutputImagWet, scaleY),
  238|  27.7k|        SF_SCALE, DFRACT_BITS);
  239|  27.7k|    hybOutputRealDry++, hybOutputRealWet++;
  240|  27.7k|    hybOutputImagDry++, hybOutputImagWet++;
  241|  27.7k|    pBP++;
  242|  27.7k|  }
  243|  9.24k|}
_Z23combineSignalCplxScale2PiS_S_S_ii:
  249|  9.24k|                                    int bands) {
  250|  9.24k|  int n;
  251|       |
  252|   343k|  for (n = bands - 1; n >= 0; n--) {
  ------------------
  |  Branch (252:23): [True: 334k, False: 9.24k]
  ------------------
  253|   334k|    *hybOutputRealDry = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|   334k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 5.55k, False: 328k]
  |  |  ------------------
  |  |  252|   334k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|   334k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 5.55k, False: 323k]
  |  |  ------------------
  |  |  254|   328k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|   328k|             : ((LONG)(src) << (scale)))
  ------------------
  254|   334k|        (*hybOutputRealDry >> SF_SCALE) + fMult(*hybOutputRealWet, scaleX),
  255|   334k|        SF_SCALE, DFRACT_BITS);
  256|   334k|    *hybOutputImagDry = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|   334k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 5.51k, False: 328k]
  |  |  ------------------
  |  |  252|   334k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|   334k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 5.51k, False: 323k]
  |  |  ------------------
  |  |  254|   328k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|   328k|             : ((LONG)(src) << (scale)))
  ------------------
  257|   334k|        (*hybOutputImagDry >> SF_SCALE) + fMult(*hybOutputImagWet, scaleX),
  258|   334k|        SF_SCALE, DFRACT_BITS);
  259|   334k|    hybOutputRealDry++, hybOutputRealWet++;
  260|   334k|    hybOutputImagDry++, hybOutputImagWet++;
  261|   334k|  }
  262|  9.24k|}

_Z7TsdReadP13FDK_BITSTREAMiP8TSD_DATA:
  209|  7.45k|int TsdRead(HANDLE_FDK_BITSTREAM hBs, const int numSlots, TSD_DATA *pTsdData) {
  210|  7.45k|  int nBitsTrSlots = 0;
  211|  7.45k|  int bsTsdNumTrSlots;
  212|  7.45k|  const UCHAR *nBitsTsdCW_tab = NULL;
  213|       |
  214|  7.45k|  switch (numSlots) {
  215|    606|    case 32:
  ------------------
  |  Branch (215:5): [True: 606, False: 6.84k]
  ------------------
  216|    606|      nBitsTrSlots = 4;
  217|    606|      nBitsTsdCW_tab = nBitsTsdCW_32slots;
  218|    606|      break;
  219|  6.84k|    case 64:
  ------------------
  |  Branch (219:5): [True: 6.84k, False: 606]
  ------------------
  220|  6.84k|      nBitsTrSlots = 5;
  221|  6.84k|      nBitsTsdCW_tab = nBitsTsdCW_64slots;
  222|  6.84k|      break;
  223|      0|    default:
  ------------------
  |  Branch (223:5): [True: 0, False: 7.45k]
  ------------------
  224|      0|      return 1;
  225|  7.45k|  }
  226|       |
  227|       |  /*** Read TempShapeData for bsTempShapeConfig == 3 ***/
  228|  7.45k|  pTsdData->bsTsdEnable = FDKreadBit(hBs);
  229|  7.45k|  if (!pTsdData->bsTsdEnable) {
  ------------------
  |  Branch (229:7): [True: 6.86k, False: 592]
  ------------------
  230|  6.86k|    return 0;
  231|  6.86k|  }
  232|       |
  233|       |  /*** Parse/Decode TsdData() ***/
  234|    592|  pTsdData->numSlots = numSlots;
  235|       |
  236|    592|  bsTsdNumTrSlots = FDKreadBits(hBs, nBitsTrSlots);
  237|       |
  238|       |  /* Decode transient slot positions */
  239|    592|  {
  240|    592|    int nBitsTsdCW = (int)nBitsTsdCW_tab[bsTsdNumTrSlots];
  241|    592|    SCHAR *phaseData = pTsdData->bsTsdTrPhaseData;
  242|    592|    int p = bsTsdNumTrSlots + 1;
  243|    592|    int k, h;
  244|    592|    USHORT s[SIZE_S] = {0};
  245|    592|    USHORT c[SIZE_C] = {0};
  246|    592|    USHORT r[1];
  247|       |
  248|       |    /* Init with TsdSepData[k] = 0 */
  249|  29.9k|    for (k = 0; k < numSlots; k++) {
  ------------------
  |  Branch (249:17): [True: 29.3k, False: 592]
  ------------------
  250|  29.3k|      phaseData[k] = -1; /* means TsdSepData[] = 0 */
  251|  29.3k|    }
  252|       |
  253|  2.96k|    for (h = (SIZE_S - 1); h >= 0; h--) {
  ------------------
  |  |  106|    592|#define SIZE_S (4)
  ------------------
  |  Branch (253:28): [True: 2.36k, False: 592]
  ------------------
  254|  2.36k|      if (nBitsTsdCW > h * 16) {
  ------------------
  |  Branch (254:11): [True: 1.39k, False: 971]
  ------------------
  255|  1.39k|        s[h] = (USHORT)FDKreadBits(hBs, nBitsTsdCW - h * 16);
  256|  1.39k|        nBitsTsdCW = h * 16;
  257|  1.39k|      }
  258|  2.36k|    }
  259|       |
  260|       |    /* c = prod_{h=1}^{p} (k-p+h)/h */
  261|    592|    k = numSlots - 1;
  262|    592|    c[0] = k - p + 1;
  263|  7.49k|    for (h = 2; h <= p; h++) {
  ------------------
  |  Branch (263:17): [True: 6.90k, False: 592]
  ------------------
  264|  6.90k|      longmult1(c, (k - p + h), c, 5); /* c *= k - p + h; */
  265|  6.90k|      longdiv(c, h, c, r, 5);          /* c /= h; */
  266|  6.90k|      FDK_ASSERT(*r == 0);
  ------------------
  |  |  221|  6.90k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (266:7): [True: 6.90k, False: 0]
  ------------------
  267|  6.90k|    }
  268|       |
  269|       |    /* go through all slots */
  270|  26.1k|    for (; k >= 0; k--) {
  ------------------
  |  Branch (270:12): [True: 26.1k, False: 0]
  ------------------
  271|  26.1k|      if (p > k) {
  ------------------
  |  Branch (271:11): [True: 210, False: 25.9k]
  ------------------
  272|    661|        for (; k >= 0; k--) {
  ------------------
  |  Branch (272:16): [True: 451, False: 210]
  ------------------
  273|    451|          phaseData[k] = 1; /* means TsdSepData[] = 1 */
  274|    451|        }
  275|    210|        break;
  276|    210|      }
  277|  25.9k|      if (longcompare(s, c, 4)) { /* (s >= c) */
  ------------------
  |  Branch (277:11): [True: 7.04k, False: 18.8k]
  ------------------
  278|  7.04k|        longsub(s, c, 4, 4);      /* s -= c; */
  279|  7.04k|        phaseData[k] = 1;         /* means TsdSepData[] = 1 */
  280|  7.04k|        if (p == 1) {
  ------------------
  |  Branch (280:13): [True: 382, False: 6.66k]
  ------------------
  281|    382|          break;
  282|    382|        }
  283|       |        /* Update c for next iteration: c_new = c_old * p / k */
  284|  6.66k|        longmult1(c, p, c, 5);
  285|  6.66k|        p--;
  286|  18.8k|      } else {
  287|       |        /* Update c for next iteration: c_new = c_old * (k-p) / k */
  288|  18.8k|        longmult1(c, (k - p), c, 5);
  289|  18.8k|      }
  290|  25.5k|      longdiv(c, k, c, r, 5);
  291|  25.5k|      FDK_ASSERT(*r == 0);
  ------------------
  |  |  221|  25.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (291:7): [True: 25.5k, False: 0]
  ------------------
  292|  25.5k|    }
  293|       |
  294|       |    /* Read phase data */
  295|  29.9k|    for (k = 0; k < numSlots; k++) {
  ------------------
  |  Branch (295:17): [True: 29.3k, False: 592]
  ------------------
  296|  29.3k|      if (phaseData[k] == 1) {
  ------------------
  |  Branch (296:11): [True: 7.49k, False: 21.8k]
  ------------------
  297|  7.49k|        phaseData[k] = FDKreadBits(hBs, 3);
  298|  7.49k|      }
  299|  29.3k|    }
  300|    592|  }
  301|       |
  302|      0|  return 0;
  303|    592|}
_Z16TsdGenerateNonTriPK8TSD_DATAiPiS2_S2_S2_PS2_S3_:
  309|  27.1k|                      FIXP_DBL **ppDecorrInImag) {
  310|  27.1k|  int k = 0;
  311|       |
  312|  27.1k|  if (!isTrSlot(pTsdData, ts)) {
  ------------------
  |  Branch (312:7): [True: 20.2k, False: 6.89k]
  ------------------
  313|       |    /* Let allpass based decorrelator read from direct input. */
  314|  20.2k|    *ppDecorrInReal = pVdirectReal;
  315|  20.2k|    *ppDecorrInImag = pVdirectImag;
  316|  20.2k|    return;
  317|  20.2k|  }
  318|       |
  319|       |  /* Generate nonTr input signal for allpass based decorrelator */
  320|  55.1k|  for (; k < TSD_START_BAND; k++) {
  ------------------
  |  |  105|  55.1k|#define TSD_START_BAND (7)
  ------------------
  |  Branch (320:10): [True: 48.2k, False: 6.89k]
  ------------------
  321|  48.2k|    pVnonTrReal[k] = pVdirectReal[k];
  322|  48.2k|    pVnonTrImag[k] = pVdirectImag[k];
  323|  48.2k|  }
  324|   340k|  for (; k < numHybridBands; k++) {
  ------------------
  |  Branch (324:10): [True: 333k, False: 6.89k]
  ------------------
  325|   333k|    pVnonTrReal[k] = (FIXP_DBL)0;
  326|   333k|    pVnonTrImag[k] = (FIXP_DBL)0;
  327|   333k|  }
  328|  6.89k|  *ppDecorrInReal = pVnonTrReal;
  329|  6.89k|  *ppDecorrInImag = pVnonTrImag;
  330|  6.89k|}
_Z8TsdApplyiPK8TSD_DATAPiPKiS4_S2_S2_:
  334|  27.1k|              FIXP_DBL *pDnonTrReal, FIXP_DBL *pDnonTrImag) {
  335|  27.1k|  const int ts = *pTsdTs;
  336|       |
  337|  27.1k|  if (isTrSlot(pTsdData, ts)) {
  ------------------
  |  Branch (337:7): [True: 6.89k, False: 20.2k]
  ------------------
  338|  6.89k|    int k;
  339|  6.89k|    const FIXP_DPK *phi = &phiTsd[pTsdData->bsTsdTrPhaseData[ts]];
  340|  6.89k|    FDK_ASSERT((pTsdData->bsTsdTrPhaseData[ts] >= 0) &&
  ------------------
  |  |  221|  6.89k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (340:5): [True: 6.89k, False: 0]
  |  Branch (340:5): [True: 6.89k, False: 0]
  |  Branch (340:5): [True: 6.89k, False: 0]
  ------------------
  341|  6.89k|               (pTsdData->bsTsdTrPhaseData[ts] < 8));
  342|       |
  343|       |    /* d = d_nonTr + v_direct * exp(j * bsTsdTrPhaseData[ts]/4 * pi ) */
  344|   340k|    for (k = TSD_START_BAND; k < numHybridBands; k++) {
  ------------------
  |  |  105|  6.89k|#define TSD_START_BAND (7)
  ------------------
  |  Branch (344:30): [True: 333k, False: 6.89k]
  ------------------
  345|   333k|      FIXP_DBL tempReal, tempImag;
  346|   333k|      cplxMultDiv2(&tempReal, &tempImag, pVdirectReal[k], pVdirectImag[k],
  347|   333k|                   *phi);
  348|   333k|      pDnonTrReal[k] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|   333k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 358, False: 332k]
  |  |  ------------------
  |  |  252|   333k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|   333k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 226, False: 332k]
  |  |  ------------------
  |  |  254|   332k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|   332k|             : ((LONG)(src) << (scale)))
  ------------------
  349|   333k|          (pDnonTrReal[k] >> 2) + (tempReal >> 1), 2, DFRACT_BITS);
  350|   333k|      pDnonTrImag[k] = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|   333k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 227, False: 332k]
  |  |  ------------------
  |  |  252|   333k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|   333k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 288, False: 332k]
  |  |  ------------------
  |  |  254|   332k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|   332k|             : ((LONG)(src) << (scale)))
  ------------------
  351|   333k|          (pDnonTrImag[k] >> 2) + (tempImag >> 1), 2, DFRACT_BITS);
  352|   333k|    }
  353|  6.89k|  }
  354|       |
  355|       |  /* The modulo MAX_TSD_TIME_SLOTS operation is to avoid illegal memory accesses
  356|       |   * in case of errors. */
  357|  27.1k|  *pTsdTs = (ts + 1) & (MAX_TSD_TIME_SLOTS - 1);
  ------------------
  |  |  109|  27.1k|#define MAX_TSD_TIME_SLOTS (64)
  ------------------
  358|  27.1k|  return;
  359|  27.1k|}
sac_tsd.cpp:_ZL9longmult1PttS_i:
  137|  32.4k|static void longmult1(USHORT a[], USHORT b, USHORT d[], int len) {
  138|  32.4k|  int k;
  139|  32.4k|  ULONG tmp;
  ------------------
  |  |  182|  32.4k|#define ULONG UINT
  ------------------
  140|  32.4k|  ULONG b0 = (ULONG)b;
  ------------------
  |  |  182|  32.4k|#define ULONG UINT
  ------------------
  141|       |
  142|  32.4k|  tmp = ((ULONG)a[0]) * b0;
  143|  32.4k|  d[0] = (USHORT)tmp;
  144|       |
  145|   162k|  for (k = 1; k < len; k++) {
  ------------------
  |  Branch (145:15): [True: 129k, False: 32.4k]
  ------------------
  146|   129k|    tmp = (tmp >> 16) + ((ULONG)a[k]) * b0;
  147|   129k|    d[k] = (USHORT)tmp;
  148|   129k|  }
  149|  32.4k|}
sac_tsd.cpp:_ZL7longdivPttS_S_i:
  151|  32.4k|static void longdiv(USHORT b[], USHORT a, USHORT d[], USHORT *pr, int len) {
  152|  32.4k|  ULONG r;
  ------------------
  |  |  182|  32.4k|#define ULONG UINT
  ------------------
  153|  32.4k|  ULONG tmp;
  ------------------
  |  |  182|  32.4k|#define ULONG UINT
  ------------------
  154|  32.4k|  int k;
  155|       |
  156|  32.4k|  FDK_ASSERT(a != 0);
  ------------------
  |  |  221|  32.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (156:3): [True: 32.4k, False: 0]
  ------------------
  157|       |
  158|  32.4k|  r = 0;
  159|       |
  160|   194k|  for (k = len - 1; k >= 0; k--) {
  ------------------
  |  Branch (160:21): [True: 162k, False: 32.4k]
  ------------------
  161|   162k|    tmp = ((ULONG)b[k]) + (r << 16);
  162|       |
  163|   162k|    if (tmp) {
  ------------------
  |  Branch (163:9): [True: 67.2k, False: 94.9k]
  ------------------
  164|  67.2k|      d[k] = (USHORT)(tmp / a);
  165|  67.2k|      r = tmp - d[k] * a;
  166|  94.9k|    } else {
  167|  94.9k|      d[k] = 0;
  168|  94.9k|    }
  169|   162k|  }
  170|  32.4k|  *pr = (USHORT)r;
  171|  32.4k|}
sac_tsd.cpp:_ZL11longcomparePtS_i:
  195|  25.9k|static int longcompare(USHORT a[], USHORT b[], int len) {
  196|  25.9k|  int i;
  197|       |
  198|  84.4k|  for (i = len - 1; i > 0; i--) {
  ------------------
  |  Branch (198:21): [True: 69.0k, False: 15.3k]
  ------------------
  199|  69.0k|    if (a[i] != b[i]) break;
  ------------------
  |  Branch (199:9): [True: 10.5k, False: 58.5k]
  ------------------
  200|  69.0k|  }
  201|  25.9k|  return (a[i] >= b[i]) ? 1 : 0;
  ------------------
  |  Branch (201:10): [True: 7.04k, False: 18.8k]
  ------------------
  202|  25.9k|}
sac_tsd.cpp:_ZL7longsubPtS_ii:
  173|  7.04k|static void longsub(USHORT a[], USHORT b[], int lena, int lenb) {
  174|  7.04k|  int h;
  175|  7.04k|  LONG carry = 0;
  ------------------
  |  |  181|  7.04k|#define LONG INT
  ------------------
  176|       |
  177|  7.04k|  FDK_ASSERT(lena >= lenb);
  ------------------
  |  |  221|  7.04k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 7.04k, False: 0]
  ------------------
  178|  35.2k|  for (h = 0; h < lenb; h++) {
  ------------------
  |  Branch (178:15): [True: 28.1k, False: 7.04k]
  ------------------
  179|  28.1k|    carry += ((LONG)a[h]) - ((LONG)b[h]);
  180|  28.1k|    a[h] = (USHORT)carry;
  181|  28.1k|    carry = carry >> 16;
  182|  28.1k|  }
  183|       |
  184|  7.04k|  for (; h < lena; h++) {
  ------------------
  |  Branch (184:10): [True: 0, False: 7.04k]
  ------------------
  185|      0|    carry = ((LONG)a[h]) + carry;
  186|      0|    a[h] = (USHORT)carry;
  187|      0|    carry = carry >> 16;
  188|      0|  }
  189|       |
  190|  7.04k|  FDK_ASSERT(carry ==
  ------------------
  |  |  221|  7.04k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (190:3): [True: 7.04k, False: 0]
  ------------------
  191|  7.04k|             0); /* carry != 0 indicates subtraction underflow, e.g. b > a */
  192|  7.04k|  return;
  193|  7.04k|}
sac_tsd.cpp:_ZL8isTrSlotPK8TSD_DATAi:
  204|  54.3k|FDK_INLINE int isTrSlot(const TSD_DATA *pTsdData, const int ts) {
  205|  54.3k|  return (pTsdData->bsTsdTrPhaseData[ts] >= 0);
  206|  54.3k|}

sac_process.cpp:_ZL11isTsdActivePK8TSD_DATA:
  121|  9.62M|FDK_INLINE int isTsdActive(const TSD_DATA *pTsdData) {
  122|  9.62M|  return (int)pTsdData->bsTsdEnable;
  123|  9.62M|}

_Z27sbrDecoder_calculateGainVecPPiS0_iiiS_S_iii:
  868|  32.6k|                                 const int stopSample) {
  869|  32.6k|  FIXP_DBL p[POLY_ORDER + 1];
  870|  32.6k|  FIXP_DBL meanNrg;
  871|  32.6k|  FIXP_DBL LowEnv[MAXLOWBANDS];
  872|  32.6k|  FIXP_DBL invNumBands = GetInvInt(numBands);
  873|  32.6k|  FIXP_DBL invNumSlots = GetInvInt(stopSample - startSample);
  874|  32.6k|  int i, loBand, exp, scale_nrg, scale_nrg_ov;
  875|  32.6k|  int sum_scale = 5, sum_scale_ov = 3;
  876|       |
  877|  32.6k|  if (overlap > 8) {
  ------------------
  |  Branch (877:7): [True: 7.79k, False: 24.8k]
  ------------------
  878|  7.79k|    FDK_ASSERT(overlap <= 16);
  ------------------
  |  |  221|  7.79k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (878:5): [True: 7.79k, False: 0]
  ------------------
  879|  7.79k|    sum_scale_ov += 1;
  880|  7.79k|    sum_scale += 1;
  881|  7.79k|  }
  882|       |
  883|       |  /* exponents of energy values */
  884|  32.6k|  sourceBuf_e_overlap = sourceBuf_e_overlap * 2 + sum_scale_ov;
  885|  32.6k|  sourceBuf_e_current = sourceBuf_e_current * 2 + sum_scale;
  886|  32.6k|  exp = fMax(sourceBuf_e_overlap, sourceBuf_e_current);
  887|  32.6k|  scale_nrg = sourceBuf_e_current - exp;
  888|  32.6k|  scale_nrg_ov = sourceBuf_e_overlap - exp;
  889|       |
  890|  32.6k|  meanNrg = (FIXP_DBL)0;
  891|       |  /* Calculate the spectral envelope in dB over the current copy-up frame. */
  892|   651k|  for (loBand = 0; loBand < numBands; loBand++) {
  ------------------
  |  Branch (892:20): [True: 618k, False: 32.6k]
  ------------------
  893|   618k|    FIXP_DBL nrg_ov, nrg;
  894|   618k|    INT reserve = 0, exp_new;
  895|   618k|    FIXP_DBL maxVal = FL2FX_DBL(0.0f);
  ------------------
  |  |  210|   618k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 618k]
  |  |  ------------------
  |  |  211|   618k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   618k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   618k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  896|       |
  897|  23.8M|    for (i = startSample; i < stopSample; i++) {
  ------------------
  |  Branch (897:27): [True: 23.2M, False: 618k]
  ------------------
  898|  23.2M|      maxVal |=
  899|  23.2M|          (FIXP_DBL)((LONG)(sourceBufferReal[i][loBand]) ^
  900|  23.2M|                     ((LONG)sourceBufferReal[i][loBand] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  23.2M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  901|  23.2M|      maxVal |=
  902|  23.2M|          (FIXP_DBL)((LONG)(sourceBufferImag[i][loBand]) ^
  903|  23.2M|                     ((LONG)sourceBufferImag[i][loBand] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  23.2M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  904|  23.2M|    }
  905|       |
  906|   618k|    if (maxVal != FL2FX_DBL(0.0f)) {
  ------------------
  |  |  210|   618k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 618k]
  |  |  ------------------
  |  |  211|   618k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   618k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   618k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (906:9): [True: 452k, False: 166k]
  ------------------
  907|   452k|      reserve = CntLeadingZeros(maxVal) - 2;
  ------------------
  |  |  308|   452k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  908|   452k|    }
  909|       |
  910|   618k|    nrg_ov = nrg = (FIXP_DBL)0;
  911|   618k|    if (scale_nrg_ov > -31) {
  ------------------
  |  Branch (911:9): [True: 616k, False: 1.44k]
  ------------------
  912|  4.05M|      for (i = startSample; i < overlap; i++) {
  ------------------
  |  Branch (912:29): [True: 3.43M, False: 616k]
  ------------------
  913|  3.43M|        nrg_ov +=
  914|  3.43M|            (fPow2Div2(scaleValue(sourceBufferReal[i][loBand], reserve)) +
  915|  3.43M|             fPow2Div2(scaleValue(sourceBufferImag[i][loBand], reserve))) >>
  916|  3.43M|            sum_scale_ov;
  917|  3.43M|      }
  918|   616k|    } else {
  919|  1.44k|      scale_nrg_ov = 0;
  920|  1.44k|    }
  921|   618k|    if (scale_nrg > -31) {
  ------------------
  |  Branch (921:9): [True: 616k, False: 2.03k]
  ------------------
  922|  20.3M|      for (i = overlap; i < stopSample; i++) {
  ------------------
  |  Branch (922:25): [True: 19.7M, False: 616k]
  ------------------
  923|  19.7M|        nrg += (fPow2Div2(scaleValue(sourceBufferReal[i][loBand], reserve)) +
  924|  19.7M|                fPow2Div2(scaleValue(sourceBufferImag[i][loBand], reserve))) >>
  925|  19.7M|               sum_scale;
  926|  19.7M|      }
  927|   616k|    } else {
  928|  2.03k|      scale_nrg = 0;
  929|  2.03k|    }
  930|       |
  931|   618k|    nrg = (scaleValue(nrg_ov, scale_nrg_ov) >> 1) +
  932|   618k|          (scaleValue(nrg, scale_nrg) >> 1);
  933|   618k|    nrg = fMult(nrg, invNumSlots);
  934|       |
  935|   618k|    exp_new =
  936|   618k|        exp - (2 * reserve) +
  937|   618k|        2; /* +1 for addition directly above, +1 for fPow2Div2 in loops above */
  938|       |
  939|       |    /* LowEnv = 10*log10(nrg) = log2(nrg) * 10/log2(10) */
  940|       |    /* exponent of logarithmic energy is 8 */
  941|   618k|    if (nrg > (FIXP_DBL)0) {
  ------------------
  |  Branch (941:9): [True: 438k, False: 179k]
  ------------------
  942|   438k|      int exp_log2;
  943|   438k|      nrg = CalcLog2(nrg, exp_new, &exp_log2);
  944|   438k|      nrg = scaleValue(nrg, exp_log2 - 6);
  945|   438k|      nrg = fMult(FL2FXCONST_SGL(LOG10FAC), nrg);
  ------------------
  |  |  180|   438k|  (FIXP_SGL)(                                                                \
  |  |  181|   438k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 438k, Folded]
  |  |  ------------------
  |  |  182|   438k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   438k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   438k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 438k]
  |  |  ------------------
  |  |  183|   438k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   438k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   438k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   438k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   438k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   438k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   438k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  946|   438k|    } else {
  947|   179k|      nrg = (FIXP_DBL)0;
  948|   179k|    }
  949|   618k|    LowEnv[loBand] = nrg;
  950|   618k|    meanNrg += fMult(nrg, invNumBands);
  951|   618k|  }
  952|  32.6k|  exp = 6 + 2; /* exponent of LowEnv: +2 is exponent of LOG10FAC */
  953|       |
  954|       |  /* subtract mean before polynomial approximation to reduce dynamic of p[] */
  955|   651k|  for (loBand = 0; loBand < numBands; loBand++) {
  ------------------
  |  Branch (955:20): [True: 618k, False: 32.6k]
  ------------------
  956|   618k|    LowEnv[loBand] = meanNrg - LowEnv[loBand];
  957|   618k|  }
  958|       |
  959|       |  /* For numBands < BSD_IDX_OFFSET (== POLY_ORDER+2) we dont get an
  960|       |     overdetermined equation system. The calculated polynomial will exactly fit
  961|       |     the input data and evaluating the polynomial will lead to the same vector
  962|       |     than the original input vector: lowEnvSlope[] == lowEnv[]
  963|       |  */
  964|  32.6k|  if (numBands > POLY_ORDER + 1) {
  ------------------
  |  |  108|  32.6k|#define POLY_ORDER 3
  ------------------
  |  Branch (964:7): [True: 32.5k, False: 156]
  ------------------
  965|       |    /* Find polynomial approximation of LowEnv */
  966|  32.5k|    int p_sf[POLY_ORDER + 1];
  967|       |
  968|  32.5k|    polyfit(numBands, LowEnv, exp, p, p_sf);
  969|       |
  970|   650k|    for (i = 0; i < numBands; i++) {
  ------------------
  |  Branch (970:17): [True: 617k, False: 32.5k]
  ------------------
  971|   617k|      int sf;
  972|       |
  973|       |      /* lowBandEnvSlope[i] = tmp; */
  974|   617k|      FIXP_DBL tmp = polyval(p, p_sf, i, &sf);
  975|       |
  976|       |      /* GainVec = 10^((mean(y)-y)/20) = 2^( (mean(y)-y) * log2(10)/20 ) */
  977|   617k|      tmp = fMult(tmp, FL2FXCONST_SGL(LOG10FAC_INV));
  ------------------
  |  |  180|   617k|  (FIXP_SGL)(                                                                \
  |  |  181|   617k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 617k, Folded]
  |  |  ------------------
  |  |  182|   617k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   617k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   617k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 617k]
  |  |  ------------------
  |  |  183|   617k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   617k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   617k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   617k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   617k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   617k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   617k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  978|   617k|      GainVec[i] = f2Pow(tmp, sf - 2,
  979|   617k|                         &GainVec_exp[i]); /* -2 is exponent of LOG10FAC_INV */
  980|   617k|    }
  981|  32.5k|  } else { /* numBands <= POLY_ORDER+1 */
  982|    780|    for (i = 0; i < numBands; i++) {
  ------------------
  |  Branch (982:17): [True: 624, False: 156]
  ------------------
  983|    624|      int sf = exp; /* exponent of LowEnv[] */
  984|       |
  985|       |      /* lowBandEnvSlope[i] = LowEnv[i]; */
  986|    624|      FIXP_DBL tmp = LowEnv[i];
  987|       |
  988|       |      /* GainVec = 10^((mean(y)-y)/20) = 2^( (mean(y)-y) * log2(10)/20 ) */
  989|    624|      tmp = fMult(tmp, FL2FXCONST_SGL(LOG10FAC_INV));
  ------------------
  |  |  180|    624|  (FIXP_SGL)(                                                                \
  |  |  181|    624|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 624, Folded]
  |  |  ------------------
  |  |  182|    624|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|    624|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    624|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 624]
  |  |  ------------------
  |  |  183|    624|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|    624|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|    624|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|    624|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|    624|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    624|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|    624|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  990|    624|      GainVec[i] = f2Pow(tmp, sf - 2,
  991|    624|                         &GainVec_exp[i]); /* -2 is exponent of LOG10FAC_INV */
  992|    624|    }
  993|    156|  }
  994|  32.6k|}
HFgen_preFlat.cpp:_ZL7polyfitiPKiiPiS1_:
  728|  32.5k|                    FIXP_DBL *RESTRICT p, int *RESTRICT p_sf) {
  729|  32.5k|  int i, k;
  730|  32.5k|  LONG v[POLY_ORDER + 1];
  ------------------
  |  |  181|  32.5k|#define LONG INT
  ------------------
  731|  32.5k|  int sum_saftey = getLog2[numBands - 1];
  732|       |
  733|  32.5k|  FDK_ASSERT((numBands >= BSD_IDX_OFFSET) && (numBands <= MAXLOWBANDS));
  ------------------
  |  |  221|  32.5k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (733:3): [True: 32.5k, False: 0]
  |  Branch (733:3): [True: 32.5k, False: 0]
  |  Branch (733:3): [True: 32.5k, False: 0]
  ------------------
  734|       |
  735|       |  /* construct vector b[] temporarily stored in array p[] */
  736|  32.5k|  FDKmemclear(p, (POLY_ORDER + 1) * sizeof(FIXP_DBL));
  ------------------
  |  |  108|  32.5k|#define POLY_ORDER 3
  ------------------
  737|       |
  738|       |  /* p[] are the sums over n values and each p[i] has its own sf */
  739|   162k|  for (i = 0; i <= POLY_ORDER; ++i) p_sf[i] = 1 - DFRACT_BITS;
  ------------------
  |  |  108|   162k|#define POLY_ORDER 3
  ------------------
                for (i = 0; i <= POLY_ORDER; ++i) p_sf[i] = 1 - DFRACT_BITS;
  ------------------
  |  |  113|   162k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (739:15): [True: 130k, False: 32.5k]
  ------------------
  740|       |
  741|   650k|  for (k = 0; k < numBands; k++) {
  ------------------
  |  Branch (741:15): [True: 617k, False: 32.5k]
  ------------------
  742|   617k|    v[0] = (LONG)1;
  743|  2.47M|    for (i = 1; i <= POLY_ORDER; i++) {
  ------------------
  |  |  108|  2.47M|#define POLY_ORDER 3
  ------------------
  |  Branch (743:17): [True: 1.85M, False: 617k]
  ------------------
  744|  1.85M|      v[i] = k * v[i - 1];
  745|  1.85M|    }
  746|       |
  747|  3.08M|    for (i = 0; i <= POLY_ORDER; i++) {
  ------------------
  |  |  108|  3.08M|#define POLY_ORDER 3
  ------------------
  |  Branch (747:17): [True: 2.47M, False: 617k]
  ------------------
  748|  2.47M|      if (v[POLY_ORDER - i] != 0 && y[k] != FIXP_DBL(0)) {
  ------------------
  |  |  108|  2.47M|#define POLY_ORDER 3
  ------------------
  |  Branch (748:11): [True: 2.37M, False: 97.5k]
  |  Branch (748:37): [True: 1.77M, False: 600k]
  ------------------
  749|  1.77M|        int e;
  750|  1.77M|        FIXP_DBL mult = fMultNorm((FIXP_DBL)v[POLY_ORDER - i], y[k], &e);
  ------------------
  |  |  108|  1.77M|#define POLY_ORDER 3
  ------------------
  751|  1.77M|        int sf = DFRACT_BITS - 1 + y_sf + e;
  ------------------
  |  |  113|  1.77M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  752|       |
  753|       |        /* check if the new summand has a different sf than the sum p[i]
  754|       |         * currently has */
  755|  1.77M|        int diff = sf - p_sf[i];
  756|       |
  757|  1.77M|        if (diff > 0) {
  ------------------
  |  Branch (757:13): [True: 456k, False: 1.31M]
  ------------------
  758|       |          /* yes, and it requires the sum p[i] to be adjusted (scaled down) */
  759|   456k|          p[i] >>= fMin(DFRACT_BITS - 1, diff);
  ------------------
  |  |  113|   456k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  760|   456k|          p_sf[i] = sf;
  761|  1.31M|        } else if (diff < 0) {
  ------------------
  |  Branch (761:20): [True: 805k, False: 511k]
  ------------------
  762|       |          /* yes, but here mult needs to be scaled down */
  763|   805k|          mult >>= -diff;
  764|   805k|        }
  765|       |
  766|       |        /* mult has now the same sf than what it is about to be added to.
  767|       |           scale mult down additionally so that building the sum is
  768|       |           overflow-safe. */
  769|  1.77M|        p[i] += mult >> sum_saftey;
  770|  1.77M|      }
  771|  2.47M|    }
  772|   617k|  }
  773|       |
  774|  32.5k|  p_sf[0] += sum_saftey;
  775|  32.5k|  p_sf[1] += sum_saftey;
  776|  32.5k|  p_sf[2] += sum_saftey;
  777|  32.5k|  p_sf[3] += sum_saftey;
  778|       |
  779|  32.5k|  choleskySolve(numBands, p, p_sf);
  780|  32.5k|}
HFgen_preFlat.cpp:_ZL13choleskySolveiPiS_:
  686|  32.5k|                          int *RESTRICT b_sf) {
  687|  32.5k|  int i, e;
  688|       |
  689|  32.5k|  const FIXP_CHB *RESTRICT pBmul0 = bsd[numBands - BSD_IDX_OFFSET].Bmul0;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  690|  32.5k|  const SCHAR *RESTRICT pBmul0_sf = bsd[numBands - BSD_IDX_OFFSET].Bmul0_sf;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  691|  32.5k|  const FIXP_CHB *RESTRICT pBmul1 = bsd[numBands - BSD_IDX_OFFSET].Bmul1;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  692|  32.5k|  const SCHAR *RESTRICT pBmul1_sf = bsd[numBands - BSD_IDX_OFFSET].Bmul1_sf;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  693|       |
  694|       |  /* normalize b */
  695|  32.5k|  FIXP_DBL bnormed[POLY_ORDER + 1];
  696|   162k|  for (i = 0; i <= POLY_ORDER; ++i) {
  ------------------
  |  |  108|   162k|#define POLY_ORDER 3
  ------------------
  |  Branch (696:15): [True: 130k, False: 32.5k]
  ------------------
  697|   130k|    bnormed[i] = fMultNorm(b[i], FX_CHB2FX_DBL(pBmul0[i]), &e);
  ------------------
  |  |  115|   130k|#define FX_CHB2FX_DBL(a) FX_SGL2FX_DBL(a)
  |  |  ------------------
  |  |  |  |  219|   130k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   130k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   130k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  698|   130k|    b_sf[i] += pBmul0_sf[i] + e;
  699|   130k|  }
  700|       |
  701|  32.5k|  backsubst_fw(numBands, bnormed, b, b_sf);
  702|       |
  703|       |  /* normalize b again */
  704|   162k|  for (i = 0; i <= POLY_ORDER; ++i) {
  ------------------
  |  |  108|   162k|#define POLY_ORDER 3
  ------------------
  |  Branch (704:15): [True: 130k, False: 32.5k]
  ------------------
  705|   130k|    bnormed[i] = fMultNorm(b[i], FX_CHB2FX_DBL(pBmul1[i]), &e);
  ------------------
  |  |  115|   130k|#define FX_CHB2FX_DBL(a) FX_SGL2FX_DBL(a)
  |  |  ------------------
  |  |  |  |  219|   130k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   130k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   130k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  706|   130k|    b_sf[i] += pBmul1_sf[i] + e;
  707|   130k|  }
  708|       |
  709|  32.5k|  backsubst_bw(numBands, bnormed, b, b_sf);
  710|  32.5k|}
HFgen_preFlat.cpp:_ZL12backsubst_fwiPKiPiS1_:
  568|  32.5k|                         FIXP_DBL *RESTRICT x, int *RESTRICT x_sf) {
  569|  32.5k|  int i, k;
  570|  32.5k|  int m; /* the trip counter that indexes incrementally through Lnorm1d[] */
  571|       |
  572|  32.5k|  const FIXP_CHB *RESTRICT pLnorm1d = bsd[numBands - BSD_IDX_OFFSET].Lnorm1d;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  573|  32.5k|  const SCHAR *RESTRICT pLnorm1d_sf = bsd[numBands - BSD_IDX_OFFSET].Lnorm1d_sf;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  574|  32.5k|  const FIXP_CHB *RESTRICT pLnormii = bsd[numBands - BSD_IDX_OFFSET].Lnormii;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  575|  32.5k|  const SCHAR *RESTRICT pLnormii_sf = bsd[numBands - BSD_IDX_OFFSET].Lnormii_sf;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  576|       |
  577|  32.5k|  x[0] = b[0];
  578|       |
  579|   130k|  for (i = 1, m = 0; i <= POLY_ORDER; ++i) {
  ------------------
  |  |  108|   130k|#define POLY_ORDER 3
  ------------------
  |  Branch (579:22): [True: 97.5k, False: 32.5k]
  ------------------
  580|  97.5k|    FIXP_DBL sum = b[i] >> SUM_SAFETY;
  ------------------
  |  |  551|  97.5k|#define SUM_SAFETY 2
  ------------------
  581|  97.5k|    int sum_sf = x_sf[i];
  582|   195k|    for (k = i - 1; k > 0; --k, ++m) {
  ------------------
  |  Branch (582:21): [True: 97.5k, False: 97.5k]
  ------------------
  583|  97.5k|      int e;
  584|  97.5k|      FIXP_DBL mult = fMultNorm(FX_CHB2FX_DBL(pLnorm1d[m]), x[k], &e);
  ------------------
  |  |  115|  97.5k|#define FX_CHB2FX_DBL(a) FX_SGL2FX_DBL(a)
  |  |  ------------------
  |  |  |  |  219|  97.5k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  97.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  97.5k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  585|  97.5k|      int mult_sf = pLnorm1d_sf[m] + x_sf[k] + e;
  586|       |
  587|       |      /* check if the new summand mult has a different sf than the sum currently
  588|       |       * has */
  589|  97.5k|      int diff = mult_sf - sum_sf;
  590|       |
  591|  97.5k|      if (diff > 0) {
  ------------------
  |  Branch (591:11): [True: 42.2k, False: 55.2k]
  ------------------
  592|       |        /* yes, and it requires the sum to be adjusted (scaled down) */
  593|  42.2k|        sum >>= diff;
  594|  42.2k|        sum_sf = mult_sf;
  595|  55.2k|      } else if (diff < 0) {
  ------------------
  |  Branch (595:18): [True: 51.3k, False: 3.86k]
  ------------------
  596|       |        /* yes, but here mult needs to be scaled down */
  597|  51.3k|        mult >>= -diff;
  598|  51.3k|      }
  599|  97.5k|      sum -= (mult >> SUM_SAFETY);
  ------------------
  |  |  551|  97.5k|#define SUM_SAFETY 2
  ------------------
  600|  97.5k|    }
  601|       |
  602|       |    /* - x[0] */
  603|  97.5k|    if (x_sf[0] > sum_sf) {
  ------------------
  |  Branch (603:9): [True: 26.6k, False: 70.8k]
  ------------------
  604|  26.6k|      sum >>= (x_sf[0] - sum_sf);
  605|  26.6k|      sum_sf = x_sf[0];
  606|  26.6k|    }
  607|  97.5k|    sum -= (x[0] >> (sum_sf - x_sf[0] + SUM_SAFETY));
  ------------------
  |  |  551|  97.5k|#define SUM_SAFETY 2
  ------------------
  608|       |
  609|       |    /* instead of the division /L[i][i], we multiply by the inverse */
  610|  97.5k|    int e;
  611|  97.5k|    x[i] = fMultNorm(sum, FX_CHB2FX_DBL(pLnormii[i - 1]), &e);
  ------------------
  |  |  115|  97.5k|#define FX_CHB2FX_DBL(a) FX_SGL2FX_DBL(a)
  |  |  ------------------
  |  |  |  |  219|  97.5k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  97.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  97.5k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|  97.5k|    x_sf[i] = sum_sf + pLnormii_sf[i - 1] + e + SUM_SAFETY;
  ------------------
  |  |  551|  97.5k|#define SUM_SAFETY 2
  ------------------
  613|  97.5k|  }
  614|  32.5k|}
HFgen_preFlat.cpp:_ZL12backsubst_bwiPKiPiS1_:
  631|  32.5k|                         FIXP_DBL *RESTRICT x, int *RESTRICT x_sf) {
  632|  32.5k|  int i, k;
  633|  32.5k|  int m; /* the trip counter that indexes incrementally through LnormInv1d[] */
  634|       |
  635|  32.5k|  const FIXP_CHB *RESTRICT pLnormInv1d =
  636|  32.5k|      bsd[numBands - BSD_IDX_OFFSET].LnormInv1d;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  637|  32.5k|  const SCHAR *RESTRICT pLnormInv1d_sf =
  638|  32.5k|      bsd[numBands - BSD_IDX_OFFSET].LnormInv1d_sf;
  ------------------
  |  |  143|  32.5k|#define BSD_IDX_OFFSET 5
  ------------------
  639|       |
  640|  32.5k|  x[POLY_ORDER] = b[POLY_ORDER];
  ------------------
  |  |  108|  32.5k|#define POLY_ORDER 3
  ------------------
                x[POLY_ORDER] = b[POLY_ORDER];
  ------------------
  |  |  108|  32.5k|#define POLY_ORDER 3
  ------------------
  641|       |
  642|   130k|  for (i = POLY_ORDER - 1, m = 0; i >= 0; i--) {
  ------------------
  |  |  108|  32.5k|#define POLY_ORDER 3
  ------------------
  |  Branch (642:35): [True: 97.5k, False: 32.5k]
  ------------------
  643|  97.5k|    FIXP_DBL sum = b[i] >> SUM_SAFETY;
  ------------------
  |  |  551|  97.5k|#define SUM_SAFETY 2
  ------------------
  644|  97.5k|    int sum_sf = x_sf[i]; /* sum's sf but disregarding SUM_SAFETY (added at the
  645|       |                             iteration's end) */
  646|       |
  647|   292k|    for (k = i + 1; k <= POLY_ORDER; ++k, ++m) {
  ------------------
  |  |  108|   292k|#define POLY_ORDER 3
  ------------------
  |  Branch (647:21): [True: 195k, False: 97.5k]
  ------------------
  648|   195k|      int e;
  649|   195k|      FIXP_DBL mult = fMultNorm(FX_CHB2FX_DBL(pLnormInv1d[m]), x[k], &e);
  ------------------
  |  |  115|   195k|#define FX_CHB2FX_DBL(a) FX_SGL2FX_DBL(a)
  |  |  ------------------
  |  |  |  |  219|   195k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   195k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   195k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  650|   195k|      int mult_sf = pLnormInv1d_sf[m] + x_sf[k] + e;
  651|       |
  652|       |      /* check if the new summand mult has a different sf than sum currently has
  653|       |       */
  654|   195k|      int diff = mult_sf - sum_sf;
  655|       |
  656|   195k|      if (diff > 0) {
  ------------------
  |  Branch (656:11): [True: 95.4k, False: 99.5k]
  ------------------
  657|       |        /* yes, and it requires the sum v to be adjusted (scaled down) */
  658|  95.4k|        sum >>= diff;
  659|  95.4k|        sum_sf = mult_sf;
  660|  99.5k|      } else if (diff < 0) {
  ------------------
  |  Branch (660:18): [True: 77.5k, False: 22.0k]
  ------------------
  661|       |        /* yes, but here mult needs to be scaled down */
  662|  77.5k|        mult >>= -diff;
  663|  77.5k|      }
  664|       |
  665|       |      /* mult has now the same sf than what it is about to be added to. */
  666|       |      /* scale mult down additionally so that building the sum is overflow-safe.
  667|       |       */
  668|   195k|      sum -= (mult >> SUM_SAFETY);
  ------------------
  |  |  551|   195k|#define SUM_SAFETY 2
  ------------------
  669|   195k|    }
  670|       |
  671|  97.5k|    x_sf[i] = sum_sf + SUM_SAFETY;
  ------------------
  |  |  551|  97.5k|#define SUM_SAFETY 2
  ------------------
  672|  97.5k|    x[i] = sum;
  673|  97.5k|  }
  674|  32.5k|}
HFgen_preFlat.cpp:_ZL7polyvalPKiS0_iPi:
  801|   617k|                        const int x_int, int *out_sf) {
  802|   617k|  FDK_ASSERT(x_int <= 31); /* otherwise getLog2[] needs more elements */
  ------------------
  |  |  221|   617k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (802:3): [True: 617k, False: 0]
  ------------------
  803|       |
  804|   617k|  int k, x_sf;
  805|   617k|  int result_sf;   /* working space to compute return value *out_sf */
  806|   617k|  FIXP_DBL x;      /* fractional value of x_int */
  807|   617k|  FIXP_DBL result; /* return value */
  808|       |
  809|       |  /* if x == 0, then y(x) is just p3 */
  810|   617k|  if (x_int != 0) {
  ------------------
  |  Branch (810:7): [True: 585k, False: 32.5k]
  ------------------
  811|   585k|    x_sf = getLog2[x_int];
  812|   585k|    x = (FIXP_DBL)x_int << (DFRACT_BITS - 1 - x_sf);
  ------------------
  |  |  113|   585k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  813|   585k|  } else {
  814|  32.5k|    *out_sf = p_sf[3];
  815|  32.5k|    return p[3];
  816|  32.5k|  }
  817|       |
  818|   585k|  result = p[0];
  819|   585k|  result_sf = p_sf[0];
  820|       |
  821|  2.34M|  for (k = 1; k <= POLY_ORDER; ++k) {
  ------------------
  |  |  108|  2.34M|#define POLY_ORDER 3
  ------------------
  |  Branch (821:15): [True: 1.75M, False: 585k]
  ------------------
  822|  1.75M|    FIXP_DBL mult = fMult(x, result);
  823|  1.75M|    int mult_sf = x_sf + result_sf;
  824|       |
  825|  1.75M|    int room = CountLeadingBits(mult);
  ------------------
  |  |  309|  1.75M|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  826|  1.75M|    mult <<= room;
  827|  1.75M|    mult_sf -= room;
  828|       |
  829|  1.75M|    FIXP_DBL pp = p[k];
  830|  1.75M|    int pp_sf = p_sf[k];
  831|       |
  832|       |    /* equalize the shift factors of pp and mult so that we can sum them up */
  833|  1.75M|    int diff = pp_sf - mult_sf;
  834|       |
  835|  1.75M|    if (diff > 0) {
  ------------------
  |  Branch (835:9): [True: 1.02M, False: 728k]
  ------------------
  836|  1.02M|      diff = fMin(diff, DFRACT_BITS - 1);
  ------------------
  |  |  113|  1.02M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  837|  1.02M|      mult >>= diff;
  838|  1.02M|    } else if (diff < 0) {
  ------------------
  |  Branch (838:16): [True: 443k, False: 285k]
  ------------------
  839|   443k|      diff = fMax(diff, 1 - DFRACT_BITS);
  ------------------
  |  |  113|   443k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  840|   443k|      pp >>= -diff;
  841|   443k|    }
  842|       |
  843|       |    /* downshift by 1 to ensure safe summation */
  844|  1.75M|    mult >>= 1;
  845|  1.75M|    mult_sf++;
  846|  1.75M|    pp >>= 1;
  847|  1.75M|    pp_sf++;
  848|       |
  849|  1.75M|    result_sf = fMax(pp_sf, mult_sf);
  850|       |
  851|  1.75M|    result = mult + pp;
  852|       |    /* rarely, mult and pp happen to be almost equal except their sign,
  853|       |    and then upon summation, result becomes so small, that it is within
  854|       |    the inaccuracy range of a few bits, and then the relative error
  855|       |    produced by this function may become HUGE */
  856|  1.75M|  }
  857|       |
  858|   585k|  *out_sf = result_sf;
  859|   585k|  return result;
  860|   617k|}

_Z15mapSineFlagsPvcPhiPjS0_PaiS1_i:
  343|  84.6k|{
  344|       |  /* Reset the output vector first */
  345|  84.6k|  FDKmemset(sineMapped, 32, MAX_FREQ_COEFFS); /* 32 means 'no sine' */
  ------------------
  |  |  140|  84.6k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  84.6k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  346|       |
  347|  84.6k|  if (trailingSbrFrame) {
  ------------------
  |  Branch (347:7): [True: 70.0k, False: 14.6k]
  ------------------
  348|       |    /* restore sineMapped[] of previous frame */
  349|  70.0k|    int i;
  350|  70.0k|    const int lsb = freqBandTable[0];
  351|  70.0k|    const int usb = freqBandTable[nSfb];
  352|  1.54M|    for (i = lsb; i < usb; i++) {
  ------------------
  |  Branch (352:19): [True: 1.47M, False: 70.0k]
  ------------------
  353|  1.47M|      const int qmfBandDiv32 = i >> 5;
  354|  1.47M|      const int maskQmfBand =
  355|  1.47M|          1 << (i & 31); /* mask to extract harmonic flag from prevFlags */
  356|       |
  357|       |      /* Two cases need to be distinguished ... */
  358|  1.47M|      if (harmFlagsPrevActive[qmfBandDiv32] & maskQmfBand) {
  ------------------
  |  Branch (358:11): [True: 1.14k, False: 1.47M]
  ------------------
  359|       |        /* the sine mapping already started last PVC frame -> seamlessly
  360|       |         * continue */
  361|  1.14k|        sineMapped[i - lsb] = 0;
  362|  1.47M|      } else if (harmFlagsPrev[qmfBandDiv32] & maskQmfBand) {
  ------------------
  |  Branch (362:18): [True: 778, False: 1.47M]
  ------------------
  363|       |        /* sinusoidalPos of prev PVC frame was >= PVC_NTIMESLOT -> sine starts
  364|       |         * in this frame */
  365|    778|        sineMapped[i - lsb] =
  366|    778|            *sinusoidalPosPrev - PVC_NTIMESLOT; /* we are 16 sbr time slots
  ------------------
  |  |  114|    778|#define PVC_NTIMESLOT 16
  ------------------
  367|       |                                                   ahead of last frame now */
  368|    778|      }
  369|  1.47M|    }
  370|  70.0k|  }
  371|  84.6k|  *sinusoidalPosPrev = sinusoidalPos;
  372|  84.6k|}
_Z17aliasingReductionPiP13ENV_CALC_NRGSPhi:
  384|  48.9k|{
  385|  48.9k|  FIXP_DBL *nrgGain = nrgs->nrgGain; /*!< subband gains to be modified */
  386|  48.9k|  SCHAR *nrgGain_e =
  387|  48.9k|      nrgs->nrgGain_e; /*!< subband gains to be modified (exponents) */
  388|  48.9k|  FIXP_DBL *nrgEst = nrgs->nrgEst; /*!< subband energy before amplification */
  389|  48.9k|  SCHAR *nrgEst_e =
  390|  48.9k|      nrgs->nrgEst_e; /*!< subband energy before amplification (exponents) */
  391|  48.9k|  int grouping = 0, index = 0, noGroups, k;
  392|  48.9k|  int groupVector[MAX_FREQ_COEFFS];
  393|       |
  394|       |  /* Calculate grouping*/
  395|   603k|  for (k = 0; k < noSubbands - 1; k++) {
  ------------------
  |  Branch (395:15): [True: 554k, False: 48.9k]
  ------------------
  396|   554k|    if ((degreeAlias[k + 1] != FL2FXCONST_DBL(0.0f)) && useAliasReduction[k]) {
  ------------------
  |  |  192|   554k|  (FIXP_DBL)(                                                                \
  |  |  193|   554k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 554k, Folded]
  |  |  ------------------
  |  |  194|   554k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   554k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   554k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 554k]
  |  |  ------------------
  |  |  195|   554k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   554k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   554k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   554k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   554k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   554k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   554k|          : ((((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 (396:9): [True: 56.0k, False: 498k]
  |  Branch (396:57): [True: 53.6k, False: 2.35k]
  ------------------
  397|  53.6k|      if (grouping == 0) {
  ------------------
  |  Branch (397:11): [True: 35.3k, False: 18.2k]
  ------------------
  398|  35.3k|        groupVector[index++] = k;
  399|  35.3k|        grouping = 1;
  400|  35.3k|      } else {
  401|  18.2k|        if (groupVector[index - 1] + 3 == k) {
  ------------------
  |  Branch (401:13): [True: 0, False: 18.2k]
  ------------------
  402|      0|          groupVector[index++] = k + 1;
  403|      0|          grouping = 0;
  404|      0|        }
  405|  18.2k|      }
  406|   501k|    } else {
  407|   501k|      if (grouping) {
  ------------------
  |  Branch (407:11): [True: 26.3k, False: 474k]
  ------------------
  408|  26.3k|        if (useAliasReduction[k])
  ------------------
  |  Branch (408:13): [True: 25.9k, False: 408]
  ------------------
  409|  25.9k|          groupVector[index++] = k + 1;
  410|    408|        else
  411|    408|          groupVector[index++] = k;
  412|  26.3k|        grouping = 0;
  413|  26.3k|      }
  414|   501k|    }
  415|   554k|  }
  416|       |
  417|  48.9k|  if (grouping) {
  ------------------
  |  Branch (417:7): [True: 9.00k, False: 39.9k]
  ------------------
  418|  9.00k|    groupVector[index++] = noSubbands;
  419|  9.00k|  }
  420|  48.9k|  noGroups = index >> 1;
  421|       |
  422|       |  /*Calculate new gain*/
  423|  84.3k|  for (int group = 0; group < noGroups; group++) {
  ------------------
  |  Branch (423:23): [True: 35.3k, False: 48.9k]
  ------------------
  424|  35.3k|    FIXP_DBL nrgOrig = FL2FXCONST_DBL(
  ------------------
  |  |  192|  35.3k|  (FIXP_DBL)(                                                                \
  |  |  193|  35.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 35.3k, Folded]
  |  |  ------------------
  |  |  194|  35.3k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  35.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  35.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 35.3k]
  |  |  ------------------
  |  |  195|  35.3k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  35.3k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  35.3k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  35.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  35.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  35.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  35.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  425|  35.3k|        0.0f); /* Original signal energy in current group of bands */
  426|  35.3k|    SCHAR nrgOrig_e = 0;
  427|  35.3k|    FIXP_DBL nrgAmp = FL2FXCONST_DBL(
  ------------------
  |  |  192|  35.3k|  (FIXP_DBL)(                                                                \
  |  |  193|  35.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 35.3k, Folded]
  |  |  ------------------
  |  |  194|  35.3k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  35.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  35.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 35.3k]
  |  |  ------------------
  |  |  195|  35.3k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  35.3k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  35.3k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  35.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  35.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  35.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  35.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  428|  35.3k|        0.0f); /* Amplified signal energy in group (using current gains) */
  429|  35.3k|    SCHAR nrgAmp_e = 0;
  430|  35.3k|    FIXP_DBL nrgMod = FL2FXCONST_DBL(
  ------------------
  |  |  192|  35.3k|  (FIXP_DBL)(                                                                \
  |  |  193|  35.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 35.3k, Folded]
  |  |  ------------------
  |  |  194|  35.3k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  35.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  35.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 35.3k]
  |  |  ------------------
  |  |  195|  35.3k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  35.3k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  35.3k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  35.3k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  35.3k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  35.3k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  35.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  431|  35.3k|        0.0f); /* Signal energy in group when applying modified gains */
  432|  35.3k|    SCHAR nrgMod_e = 0;
  433|  35.3k|    FIXP_DBL groupGain; /* Total energy gain in group */
  434|  35.3k|    SCHAR groupGain_e;
  435|  35.3k|    FIXP_DBL compensation; /* Compensation factor for the energy change when
  436|       |                              applying modified gains */
  437|  35.3k|    SCHAR compensation_e;
  438|       |
  439|  35.3k|    int startGroup = groupVector[2 * group];
  440|  35.3k|    int stopGroup = groupVector[2 * group + 1];
  441|       |
  442|       |    /* Calculate total energy in group before and after amplification with
  443|       |     * current gains: */
  444|   123k|    for (k = startGroup; k < stopGroup; k++) {
  ------------------
  |  Branch (444:26): [True: 88.6k, False: 35.3k]
  ------------------
  445|       |      /* Get original band energy */
  446|  88.6k|      FIXP_DBL tmp = nrgEst[k];
  447|  88.6k|      SCHAR tmp_e = nrgEst_e[k];
  448|       |
  449|  88.6k|      FDK_add_MantExp(tmp, tmp_e, nrgOrig, nrgOrig_e, &nrgOrig, &nrgOrig_e);
  450|       |
  451|       |      /* Multiply band energy with current gain */
  452|  88.6k|      tmp = fMult(tmp, nrgGain[k]);
  453|  88.6k|      tmp_e = tmp_e + nrgGain_e[k];
  454|       |
  455|  88.6k|      FDK_add_MantExp(tmp, tmp_e, nrgAmp, nrgAmp_e, &nrgAmp, &nrgAmp_e);
  456|  88.6k|    }
  457|       |
  458|       |    /* Calculate total energy gain in group */
  459|  35.3k|    FDK_divide_MantExp(nrgAmp, nrgAmp_e, nrgOrig, nrgOrig_e, &groupGain,
  460|  35.3k|                       &groupGain_e);
  461|       |
  462|   123k|    for (k = startGroup; k < stopGroup; k++) {
  ------------------
  |  Branch (462:26): [True: 88.6k, False: 35.3k]
  ------------------
  463|  88.6k|      FIXP_DBL tmp;
  464|  88.6k|      SCHAR tmp_e;
  465|       |
  466|  88.6k|      FIXP_DBL alpha = degreeAlias[k];
  467|  88.6k|      if (k < noSubbands - 1) {
  ------------------
  |  Branch (467:11): [True: 79.6k, False: 9.00k]
  ------------------
  468|  79.6k|        if (degreeAlias[k + 1] > alpha) alpha = degreeAlias[k + 1];
  ------------------
  |  Branch (468:13): [True: 42.9k, False: 36.6k]
  ------------------
  469|  79.6k|      }
  470|       |
  471|       |      /* Modify gain depending on the degree of aliasing */
  472|  88.6k|      FDK_add_MantExp(
  473|  88.6k|          fMult(alpha, groupGain), groupGain_e,
  474|  88.6k|          fMult(/*FL2FXCONST_DBL(1.0f)*/ (FIXP_DBL)MAXVAL_DBL - alpha,
  ------------------
  |  |  156|  88.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  475|  88.6k|                nrgGain[k]),
  476|  88.6k|          nrgGain_e[k], &nrgGain[k], &nrgGain_e[k]);
  477|       |
  478|       |      /* Apply modified gain to original energy */
  479|  88.6k|      tmp = fMult(nrgGain[k], nrgEst[k]);
  480|  88.6k|      tmp_e = nrgGain_e[k] + nrgEst_e[k];
  481|       |
  482|       |      /* Accumulate energy with modified gains applied */
  483|  88.6k|      FDK_add_MantExp(tmp, tmp_e, nrgMod, nrgMod_e, &nrgMod, &nrgMod_e);
  484|  88.6k|    }
  485|       |
  486|       |    /* Calculate compensation factor to retain the energy of the amplified
  487|       |     * signal */
  488|  35.3k|    FDK_divide_MantExp(nrgAmp, nrgAmp_e, nrgMod, nrgMod_e, &compensation,
  489|  35.3k|                       &compensation_e);
  490|       |
  491|       |    /* Apply compensation factor to all gains of the group */
  492|   123k|    for (k = startGroup; k < stopGroup; k++) {
  ------------------
  |  Branch (492:26): [True: 88.6k, False: 35.3k]
  ------------------
  493|  88.6k|      nrgGain[k] = fMult(nrgGain[k], compensation);
  494|  88.6k|      nrgGain_e[k] = nrgGain_e[k] + compensation_e;
  495|  88.6k|    }
  496|  35.3k|  }
  497|  48.9k|}
_Z20calculateSbrEnvelopeP16QMF_SCALE_FACTORP22SBR_CALCULATE_ENVELOPEP15SBR_HEADER_DATAP14SBR_FRAME_DATAP16PVC_DYNAMIC_DATAPPiSA_iS9_ji:
  876|   259k|    const UINT flags, const int frameErrorFlag) {
  877|   259k|  int c, i, i_stop, j, envNoise = 0;
  878|   259k|  UCHAR *borders = hFrameData->frameInfo.borders;
  879|   259k|  UCHAR *bordersPvc = hFrameData->frameInfo.pvcBorders;
  880|   259k|  int pvc_mode = pPvcDynamicData->pvc_mode;
  881|   259k|  int first_start =
  882|   259k|      ((pvc_mode > 0) ? bordersPvc[0] : borders[0]) * hHeaderData->timeStep;
  ------------------
  |  Branch (882:8): [True: 84.6k, False: 174k]
  ------------------
  883|   259k|  FIXP_SGL *noiseLevels = hFrameData->sbrNoiseFloorLevel;
  884|   259k|  HANDLE_FREQ_BAND_DATA hFreq = &hHeaderData->freqBandData;
  885|   259k|  UCHAR **pFreqBandTable = hFreq->freqBandTable;
  886|   259k|  UCHAR *pFreqBandTableNoise = hFreq->freqBandTableNoise;
  887|       |
  888|   259k|  int lowSubband = hFreq->lowSubband;
  889|   259k|  int highSubband = hFreq->highSubband;
  890|   259k|  int noSubbands = highSubband - lowSubband;
  891|       |
  892|       |  /* old high subband before headerchange
  893|       |     we asume no headerchange here        */
  894|   259k|  int ov_highSubband = hFreq->highSubband;
  895|       |
  896|   259k|  int noNoiseBands = hFreq->nNfb;
  897|   259k|  UCHAR *noSubFrameBands = hFreq->nSfb;
  898|   259k|  int no_cols = hHeaderData->numberTimeSlots * hHeaderData->timeStep;
  899|       |
  900|   259k|  SCHAR sineMapped[MAX_FREQ_COEFFS];
  901|   259k|  SCHAR ov_adj_e = SCALE2EXP(sbrScaleFactor->ov_hb_scale);
  ------------------
  |  |  414|   259k|#define SCALE2EXP(s) (15 - (s))
  ------------------
  902|   259k|  SCHAR adj_e = 0;
  903|   259k|  SCHAR output_e;
  904|   259k|  SCHAR final_e = 0;
  905|       |  /* inter-TES is active in one or more envelopes of the current SBR frame */
  906|   259k|  const int iTES_enable = hFrameData->iTESactive;
  907|   259k|  const int iTES_scale_change = (iTES_enable) ? INTER_TES_SF_CHANGE : 0;
  ------------------
  |  |  499|  25.9k|#define INTER_TES_SF_CHANGE 4
  ------------------
  |  Branch (907:33): [True: 25.9k, False: 233k]
  ------------------
  908|   259k|  SCHAR maxGainLimit_e = (frameErrorFlag) ? MAX_GAIN_CONCEAL_EXP : MAX_GAIN_EXP;
  ------------------
  |  |  150|   134k|#define MAX_GAIN_CONCEAL_EXP 1
  ------------------
                SCHAR maxGainLimit_e = (frameErrorFlag) ? MAX_GAIN_CONCEAL_EXP : MAX_GAIN_EXP;
  ------------------
  |  |  147|   384k|#define MAX_GAIN_EXP 34
  ------------------
  |  Branch (908:26): [True: 134k, False: 124k]
  ------------------
  909|       |
  910|   259k|  UCHAR smooth_length = 0;
  911|       |
  912|   259k|  FIXP_SGL *pIenv = hFrameData->iEnvelope;
  913|       |
  914|   259k|  C_ALLOC_SCRATCH_START(useAliasReduction, UCHAR, 64)
  ------------------
  |  |  324|   259k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  915|       |
  916|       |  /* if values differ we had a headerchange; if old highband is bigger then new
  917|       |     one we need to patch overlap-highband-scaling for this frame (see use of
  918|       |     ov_highSubband) as overlap contains higher frequency components which would
  919|       |     get lost */
  920|   259k|  if (hFreq->highSubband < hFreq->ov_highSubband) {
  ------------------
  |  Branch (920:7): [True: 17.4k, False: 242k]
  ------------------
  921|  17.4k|    ov_highSubband = hFreq->ov_highSubband;
  922|  17.4k|  }
  923|       |
  924|   259k|  if (pvc_mode > 0) {
  ------------------
  |  Branch (924:7): [True: 84.6k, False: 174k]
  ------------------
  925|  84.6k|    if (hFrameData->frameInfo.bordersNoise[0] > bordersPvc[0]) {
  ------------------
  |  Branch (925:9): [True: 70.0k, False: 14.6k]
  ------------------
  926|       |      /* noise envelope of previous frame is trailing into current PVC frame */
  927|  70.0k|      envNoise = -1;
  928|  70.0k|      noiseLevels = h_sbr_cal_env->prevSbrNoiseFloorLevel;
  929|  70.0k|      noNoiseBands = h_sbr_cal_env->prevNNfb;
  930|  70.0k|      noSubFrameBands = h_sbr_cal_env->prevNSfb;
  931|  70.0k|      lowSubband = h_sbr_cal_env->prevLoSubband;
  932|  70.0k|      highSubband = h_sbr_cal_env->prevHiSubband;
  933|       |
  934|  70.0k|      noSubbands = highSubband - lowSubband;
  935|  70.0k|      ov_highSubband = highSubband;
  936|  70.0k|      if (highSubband < h_sbr_cal_env->prev_ov_highSubband) {
  ------------------
  |  Branch (936:11): [True: 7.18k, False: 62.8k]
  ------------------
  937|  7.18k|        ov_highSubband = h_sbr_cal_env->prev_ov_highSubband;
  938|  7.18k|      }
  939|       |
  940|  70.0k|      pFreqBandTable[0] = h_sbr_cal_env->prevFreqBandTableLo;
  941|  70.0k|      pFreqBandTable[1] = h_sbr_cal_env->prevFreqBandTableHi;
  942|  70.0k|      pFreqBandTableNoise = h_sbr_cal_env->prevFreqBandTableNoise;
  943|  70.0k|    }
  944|       |
  945|  84.6k|    mapSineFlagsPvc(pFreqBandTable[1], noSubFrameBands[1],
  946|  84.6k|                    h_sbr_cal_env->harmFlagsPrev,
  947|  84.6k|                    h_sbr_cal_env->harmFlagsPrevActive, sineMapped,
  948|  84.6k|                    hFrameData->sinusoidal_position,
  949|  84.6k|                    &h_sbr_cal_env->sinusoidal_positionPrev,
  950|  84.6k|                    (borders[0] > bordersPvc[0]) ? 1 : 0);
  ------------------
  |  Branch (950:21): [True: 70.0k, False: 14.6k]
  ------------------
  951|   174k|  } else {
  952|       |    /*
  953|       |      Extract sine flags for all QMF bands
  954|       |    */
  955|   174k|    mapSineFlags(pFreqBandTable[1], noSubFrameBands[1],
  956|   174k|                 hFrameData->addHarmonics, h_sbr_cal_env->harmFlagsPrev,
  957|   174k|                 h_sbr_cal_env->harmFlagsPrevActive,
  958|   174k|                 hFrameData->frameInfo.tranEnv, sineMapped);
  959|   174k|  }
  960|       |
  961|       |  /*
  962|       |    Scan for maximum in bufferd noise levels.
  963|       |    This is needed in case that we had strong noise in the previous frame
  964|       |    which is smoothed into the current frame.
  965|       |    The resulting exponent is used as start value for the maximum search
  966|       |    in reference energies
  967|       |  */
  968|   259k|  if (!useLP)
  ------------------
  |  Branch (968:7): [True: 216k, False: 42.7k]
  ------------------
  969|   216k|    adj_e = h_sbr_cal_env->filtBufferNoise_e -
  970|   216k|            getScalefactor(h_sbr_cal_env->filtBufferNoise, noSubbands) +
  971|   216k|            (INT)MAX_SFB_NRG_HEADROOM;
  ------------------
  |  |  154|   216k|#define MAX_SFB_NRG_HEADROOM (1)
  ------------------
  972|       |
  973|       |  /*
  974|       |    Scan for maximum reference energy to be able
  975|       |    to select appropriate values for adj_e and final_e.
  976|       |  */
  977|   259k|  if (pvc_mode > 0) {
  ------------------
  |  Branch (977:7): [True: 84.6k, False: 174k]
  ------------------
  978|  84.6k|    INT maxSfbNrg_e = pPvcDynamicData->predEsg_expMax;
  979|       |
  980|       |    /* Energy -> magnitude (sqrt halfens exponent) */
  981|  84.6k|    maxSfbNrg_e =
  982|  84.6k|        (maxSfbNrg_e + 1) >> 1; /* +1 to go safe (round to next higher int) */
  983|       |
  984|       |    /* Some safety margin is needed for 2 reasons:
  985|       |       - The signal energy is not equally spread over all subband samples in
  986|       |         a specific sfb of an envelope (Nrg could be too high by a factor of
  987|       |         envWidth * sfbWidth)
  988|       |       - Smoothing can smear high gains of the previous envelope into the
  989|       |       current
  990|       |    */
  991|  84.6k|    maxSfbNrg_e += (6 + MAX_SFB_NRG_HEADROOM);
  ------------------
  |  |  154|  84.6k|#define MAX_SFB_NRG_HEADROOM (1)
  ------------------
  992|       |
  993|  84.6k|    adj_e = maxSfbNrg_e;
  994|       |    // final_e should not exist for PVC fixfix framing
  995|   174k|  } else {
  996|   385k|    for (i = 0; i < hFrameData->frameInfo.nEnvelopes; i++) {
  ------------------
  |  Branch (996:17): [True: 210k, False: 174k]
  ------------------
  997|   210k|      INT maxSfbNrg_e =
  998|   210k|          -FRACT_BITS + NRG_EXP_OFFSET; /* start value for maximum search */
  ------------------
  |  |  112|   210k|#define FRACT_BITS 16  /* single precision */
  ------------------
                        -FRACT_BITS + NRG_EXP_OFFSET; /* start value for maximum search */
  ------------------
  |  |  153|   210k|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
  999|       |
 1000|       |      /* Fetch frequency resolution for current envelope: */
 1001|  2.16M|      for (j = noSubFrameBands[hFrameData->frameInfo.freqRes[i]]; j != 0; j--) {
  ------------------
  |  Branch (1001:67): [True: 1.95M, False: 210k]
  ------------------
 1002|  1.95M|        maxSfbNrg_e = fixMax(maxSfbNrg_e, (INT)((LONG)(*pIenv++) & MASK_E));
  ------------------
  |  |  307|  1.95M|#define fixMax(a, b) fMax(a, b)
  ------------------
 1003|  1.95M|      }
 1004|   210k|      maxSfbNrg_e -= NRG_EXP_OFFSET;
  ------------------
  |  |  153|   210k|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
 1005|       |
 1006|       |      /* Energy -> magnitude (sqrt halfens exponent) */
 1007|   210k|      maxSfbNrg_e =
 1008|   210k|          (maxSfbNrg_e + 1) >> 1; /* +1 to go safe (round to next higher int) */
 1009|       |
 1010|       |      /* Some safety margin is needed for 2 reasons:
 1011|       |         - The signal energy is not equally spread over all subband samples in
 1012|       |           a specific sfb of an envelope (Nrg could be too high by a factor of
 1013|       |           envWidth * sfbWidth)
 1014|       |         - Smoothing can smear high gains of the previous envelope into the
 1015|       |         current
 1016|       |      */
 1017|   210k|      maxSfbNrg_e += (6 + MAX_SFB_NRG_HEADROOM);
  ------------------
  |  |  154|   210k|#define MAX_SFB_NRG_HEADROOM (1)
  ------------------
 1018|       |
 1019|   210k|      if (borders[i] < hHeaderData->numberTimeSlots)
  ------------------
  |  Branch (1019:11): [True: 199k, False: 11.2k]
  ------------------
 1020|       |        /* This envelope affects timeslots that belong to the output frame */
 1021|   199k|        adj_e = fMax(maxSfbNrg_e, adj_e);
 1022|       |
 1023|   210k|      if (borders[i + 1] > hHeaderData->numberTimeSlots)
  ------------------
  |  Branch (1023:11): [True: 18.7k, False: 191k]
  ------------------
 1024|       |        /* This envelope affects timeslots after the output frame */
 1025|  18.7k|        final_e = fMax(maxSfbNrg_e, final_e);
 1026|   210k|    }
 1027|   174k|  }
 1028|       |  /*
 1029|       |    Calculate adjustment factors and apply them for every envelope.
 1030|       |  */
 1031|   259k|  pIenv = hFrameData->iEnvelope;
 1032|       |
 1033|   259k|  if (pvc_mode > 0) {
  ------------------
  |  Branch (1033:7): [True: 84.6k, False: 174k]
  ------------------
 1034|       |    /* iterate over SBR time slots starting with bordersPvc[i] */
 1035|  84.6k|    i = bordersPvc[0]; /* usually 0; can be >0 if switching from legacy SBR to
 1036|       |                          PVC */
 1037|  84.6k|    i_stop = PVC_NTIMESLOT;
  ------------------
  |  |  114|  84.6k|#define PVC_NTIMESLOT 16
  ------------------
 1038|  84.6k|    FDK_ASSERT(bordersPvc[hFrameData->frameInfo.nEnvelopes] == PVC_NTIMESLOT);
  ------------------
  |  |  221|  84.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1038:5): [True: 84.6k, False: 0]
  ------------------
 1039|   174k|  } else {
 1040|       |    /* iterate over SBR envelopes starting with 0 */
 1041|   174k|    i = 0;
 1042|   174k|    i_stop = hFrameData->frameInfo.nEnvelopes;
 1043|   174k|  }
 1044|  1.82M|  for (; i < i_stop; i++) {
  ------------------
  |  Branch (1044:10): [True: 1.56M, False: 259k]
  ------------------
 1045|  1.56M|    int k, noNoiseFlag;
 1046|  1.56M|    SCHAR noise_e, input_e = SCALE2EXP(sbrScaleFactor->hb_scale);
  ------------------
  |  |  414|  1.56M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1047|  1.56M|    C_ALLOC_SCRATCH_START(pNrgs, ENV_CALC_NRGS, 1);
  ------------------
  |  |  324|  1.56M|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1048|       |
 1049|       |    /*
 1050|       |      Helper variables.
 1051|       |    */
 1052|  1.56M|    int start_pos, stop_pos, freq_res;
 1053|  1.56M|    if (pvc_mode > 0) {
  ------------------
  |  Branch (1053:9): [True: 1.35M, False: 210k]
  ------------------
 1054|  1.35M|      start_pos =
 1055|  1.35M|          hHeaderData->timeStep *
 1056|  1.35M|          i; /* Start-position in time (subband sample) for current envelope. */
 1057|  1.35M|      stop_pos = hHeaderData->timeStep * (i + 1); /* Stop-position in time
 1058|       |                                                     (subband sample) for
 1059|       |                                                     current envelope. */
 1060|  1.35M|      freq_res =
 1061|  1.35M|          hFrameData->frameInfo
 1062|  1.35M|              .freqRes[0]; /* Frequency resolution for current envelope. */
 1063|  1.35M|      FDK_ASSERT(
  ------------------
  |  |  221|  1.35M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1063:7): [True: 1.35M, False: 0]
  ------------------
 1064|  1.35M|          freq_res ==
 1065|  1.35M|          hFrameData->frameInfo.freqRes[hFrameData->frameInfo.nEnvelopes - 1]);
 1066|  1.35M|    } else {
 1067|   210k|      start_pos = hHeaderData->timeStep *
 1068|   210k|                  borders[i]; /* Start-position in time (subband sample) for
 1069|       |                                 current envelope. */
 1070|   210k|      stop_pos = hHeaderData->timeStep *
 1071|   210k|                 borders[i + 1]; /* Stop-position in time (subband sample) for
 1072|       |                                    current envelope. */
 1073|   210k|      freq_res =
 1074|   210k|          hFrameData->frameInfo
 1075|   210k|              .freqRes[i]; /* Frequency resolution for current envelope. */
 1076|   210k|    }
 1077|       |
 1078|       |    /* Always fully initialize the temporary energy table. This prevents
 1079|       |       negative energies and extreme gain factors in cases where the number of
 1080|       |       limiter bands exceeds the number of subbands. The latter can be caused by
 1081|       |       undetected bit errors and is tested by some streams from the
 1082|       |       certification set. */
 1083|  1.56M|    FDKmemclear(pNrgs, sizeof(ENV_CALC_NRGS));
 1084|       |
 1085|  1.56M|    if (pvc_mode > 0) {
  ------------------
  |  Branch (1085:9): [True: 1.35M, False: 210k]
  ------------------
 1086|       |      /* get predicted energy values from PVC module */
 1087|  1.35M|      expandPredEsg(pPvcDynamicData, i, (int)MAX_FREQ_COEFFS, pNrgs->nrgRef,
  ------------------
  |  |  140|  1.35M|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  1.35M|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
 1088|  1.35M|                    pNrgs->nrgRef_e);
 1089|       |
 1090|  1.35M|      if (i == borders[0]) {
  ------------------
  |  Branch (1090:11): [True: 84.6k, False: 1.27M]
  ------------------
 1091|  84.6k|        mapSineFlags(pFreqBandTable[1], noSubFrameBands[1],
 1092|  84.6k|                     hFrameData->addHarmonics, h_sbr_cal_env->harmFlagsPrev,
 1093|  84.6k|                     h_sbr_cal_env->harmFlagsPrevActive,
 1094|  84.6k|                     hFrameData->sinusoidal_position, sineMapped);
 1095|  84.6k|      }
 1096|       |
 1097|  1.35M|      if (i >= hFrameData->frameInfo.bordersNoise[envNoise + 1]) {
  ------------------
  |  Branch (1097:11): [True: 143k, False: 1.21M]
  ------------------
 1098|   143k|        if (envNoise >= 0) {
  ------------------
  |  Branch (1098:13): [True: 73.6k, False: 70.0k]
  ------------------
 1099|  73.6k|          noiseLevels += noNoiseBands; /* The noise floor data is stored in a
 1100|       |                                          row [noiseFloor1 noiseFloor2...].*/
 1101|  73.6k|        } else {
 1102|       |          /* leave trailing noise envelope of past frame */
 1103|  70.0k|          noNoiseBands = hFreq->nNfb;
 1104|  70.0k|          noSubFrameBands = hFreq->nSfb;
 1105|  70.0k|          noiseLevels = hFrameData->sbrNoiseFloorLevel;
 1106|       |
 1107|  70.0k|          lowSubband = hFreq->lowSubband;
 1108|  70.0k|          highSubband = hFreq->highSubband;
 1109|       |
 1110|  70.0k|          noSubbands = highSubband - lowSubband;
 1111|  70.0k|          ov_highSubband = highSubband;
 1112|  70.0k|          if (highSubband < hFreq->ov_highSubband) {
  ------------------
  |  Branch (1112:15): [True: 7.13k, False: 62.9k]
  ------------------
 1113|  7.13k|            ov_highSubband = hFreq->ov_highSubband;
 1114|  7.13k|          }
 1115|       |
 1116|  70.0k|          pFreqBandTable[0] = hFreq->freqBandTableLo;
 1117|  70.0k|          pFreqBandTable[1] = hFreq->freqBandTableHi;
 1118|  70.0k|          pFreqBandTableNoise = hFreq->freqBandTableNoise;
 1119|  70.0k|        }
 1120|   143k|        envNoise++;
 1121|   143k|      }
 1122|  1.35M|    } else {
 1123|       |      /* If the start-pos of the current envelope equals the stop pos of the
 1124|       |         current noise envelope, increase the pointer (i.e. choose the next
 1125|       |         noise-floor).*/
 1126|   210k|      if (borders[i] == hFrameData->frameInfo.bordersNoise[envNoise + 1]) {
  ------------------
  |  Branch (1126:11): [True: 32.3k, False: 178k]
  ------------------
 1127|  32.3k|        noiseLevels += noNoiseBands; /* The noise floor data is stored in a row
 1128|       |                                        [noiseFloor1 noiseFloor2...].*/
 1129|  32.3k|        envNoise++;
 1130|  32.3k|      }
 1131|   210k|    }
 1132|  1.56M|    if (i == hFrameData->frameInfo.tranEnv ||
  ------------------
  |  Branch (1132:9): [True: 4.02k, False: 1.56M]
  ------------------
 1133|  1.56M|        i == h_sbr_cal_env->prevTranEnv) /* attack */
  ------------------
  |  Branch (1133:9): [True: 732, False: 1.56M]
  ------------------
 1134|  4.75k|    {
 1135|  4.75k|      noNoiseFlag = 1;
 1136|  4.75k|      if (!useLP) smooth_length = 0; /* No smoothing on attacks! */
  ------------------
  |  Branch (1136:11): [True: 958, False: 3.79k]
  ------------------
 1137|  1.56M|    } else {
 1138|  1.56M|      noNoiseFlag = 0;
 1139|  1.56M|      if (!useLP)
  ------------------
  |  Branch (1139:11): [True: 1.51M, False: 45.1k]
  ------------------
 1140|  1.51M|        smooth_length = (1 - hHeaderData->bs_data.smoothingLength)
 1141|  1.51M|                        << 2; /* can become either 0 or 4 */
 1142|  1.56M|    }
 1143|       |
 1144|       |    /*
 1145|       |      Energy estimation in transposed highband.
 1146|       |    */
 1147|  1.56M|    if (hHeaderData->bs_data.interpolFreq)
  ------------------
  |  Branch (1147:9): [True: 1.53M, False: 30.8k]
  ------------------
 1148|  1.53M|      calcNrgPerSubband(analysBufferReal, (useLP) ? NULL : analysBufferImag,
  ------------------
  |  Branch (1148:43): [True: 45.2k, False: 1.48M]
  ------------------
 1149|  1.53M|                        lowSubband, highSubband, start_pos, stop_pos, input_e,
 1150|  1.53M|                        pNrgs->nrgEst, pNrgs->nrgEst_e);
 1151|  30.8k|    else
 1152|  30.8k|      calcNrgPerSfb(analysBufferReal, (useLP) ? NULL : analysBufferImag,
  ------------------
  |  Branch (1152:39): [True: 3.71k, False: 27.0k]
  ------------------
 1153|  30.8k|                    noSubFrameBands[freq_res], pFreqBandTable[freq_res],
 1154|  30.8k|                    start_pos, stop_pos, input_e, pNrgs->nrgEst,
 1155|  30.8k|                    pNrgs->nrgEst_e);
 1156|       |
 1157|       |    /*
 1158|       |      Calculate subband gains
 1159|       |    */
 1160|  1.56M|    {
 1161|  1.56M|      UCHAR *table = pFreqBandTable[freq_res];
 1162|  1.56M|      UCHAR *pUiNoise =
 1163|  1.56M|          &pFreqBandTableNoise[1]; /*! Upper limit of the current noise floor
 1164|       |                                      band. */
 1165|       |
 1166|  1.56M|      FIXP_SGL *pNoiseLevels = noiseLevels;
 1167|       |
 1168|  1.56M|      FIXP_DBL tmpNoise =
 1169|  1.56M|          FX_SGL2FX_DBL((FIXP_SGL)((LONG)(*pNoiseLevels) & MASK_M));
  ------------------
  |  |  219|  1.56M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.56M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.56M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1170|  1.56M|      SCHAR tmpNoise_e =
 1171|  1.56M|          (UCHAR)((LONG)(*pNoiseLevels++) & MASK_E) - NOISE_EXP_OFFSET;
  ------------------
  |  |  142|  1.56M|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|  1.56M|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                        (UCHAR)((LONG)(*pNoiseLevels++) & MASK_E) - NOISE_EXP_OFFSET;
  ------------------
  |  |  156|  1.56M|  38 /*!< Will be added to the noise level exponent to prevent negative \
  ------------------
 1172|       |
 1173|  1.56M|      int cc = 0;
 1174|  1.56M|      c = 0;
 1175|  1.56M|      if (pvc_mode > 0) {
  ------------------
  |  Branch (1175:11): [True: 1.35M, False: 210k]
  ------------------
 1176|  6.60M|        for (j = 0; j < noSubFrameBands[freq_res]; j++) {
  ------------------
  |  Branch (1176:21): [True: 5.24M, False: 1.35M]
  ------------------
 1177|  5.24M|          UCHAR sinePresentFlag = 0;
 1178|  5.24M|          int li = table[j];
 1179|  5.24M|          int ui = table[j + 1];
 1180|       |
 1181|  36.3M|          for (k = li; k < ui; k++) {
  ------------------
  |  Branch (1181:24): [True: 31.1M, False: 5.24M]
  ------------------
 1182|  31.1M|            sinePresentFlag |= (i >= sineMapped[cc]);
 1183|  31.1M|            cc++;
 1184|  31.1M|          }
 1185|       |
 1186|  36.3M|          for (k = li; k < ui; k++) {
  ------------------
  |  Branch (1186:24): [True: 31.1M, False: 5.24M]
  ------------------
 1187|  31.1M|            FIXP_DBL refNrg = pNrgs->nrgRef[k - lowSubband];
 1188|  31.1M|            SCHAR refNrg_e = pNrgs->nrgRef_e[k - lowSubband];
 1189|       |
 1190|  31.1M|            if (k >= *pUiNoise) {
  ------------------
  |  Branch (1190:17): [True: 1.74M, False: 29.3M]
  ------------------
 1191|  1.74M|              tmpNoise =
 1192|  1.74M|                  FX_SGL2FX_DBL((FIXP_SGL)((LONG)(*pNoiseLevels) & MASK_M));
  ------------------
  |  |  219|  1.74M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.74M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.74M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1193|  1.74M|              tmpNoise_e =
 1194|  1.74M|                  (SCHAR)((LONG)(*pNoiseLevels++) & MASK_E) - NOISE_EXP_OFFSET;
  ------------------
  |  |  142|  1.74M|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|  1.74M|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                                (SCHAR)((LONG)(*pNoiseLevels++) & MASK_E) - NOISE_EXP_OFFSET;
  ------------------
  |  |  156|  1.74M|  38 /*!< Will be added to the noise level exponent to prevent negative \
  ------------------
 1195|       |
 1196|  1.74M|              pUiNoise++;
 1197|  1.74M|            }
 1198|       |
 1199|  31.1M|            FDK_ASSERT(k >= lowSubband);
  ------------------
  |  |  221|  31.1M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1199:13): [True: 31.1M, False: 0]
  ------------------
 1200|       |
 1201|  31.1M|            if (useLP) useAliasReduction[k - lowSubband] = !sinePresentFlag;
  ------------------
  |  Branch (1201:17): [True: 0, False: 31.1M]
  ------------------
 1202|       |
 1203|  31.1M|            pNrgs->nrgSine[c] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  31.1M|  (FIXP_DBL)(                                                                \
  |  |  193|  31.1M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 31.1M, Folded]
  |  |  ------------------
  |  |  194|  31.1M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  31.1M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  31.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 31.1M]
  |  |  ------------------
  |  |  195|  31.1M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  31.1M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  31.1M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  31.1M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  31.1M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  31.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  31.1M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1204|  31.1M|            pNrgs->nrgSine_e[c] = 0;
 1205|       |
 1206|  31.1M|            calcSubbandGain(refNrg, refNrg_e, pNrgs, c, tmpNoise, tmpNoise_e,
 1207|  31.1M|                            sinePresentFlag, i >= sineMapped[c], noNoiseFlag);
 1208|       |
 1209|  31.1M|            c++;
 1210|  31.1M|          }
 1211|  5.24M|        }
 1212|  1.35M|      } else {
 1213|  2.16M|        for (j = 0; j < noSubFrameBands[freq_res]; j++) {
  ------------------
  |  Branch (1213:21): [True: 1.95M, False: 210k]
  ------------------
 1214|  1.95M|          FIXP_DBL refNrg = FX_SGL2FX_DBL((FIXP_SGL)((LONG)(*pIenv) & MASK_M));
  ------------------
  |  |  219|  1.95M|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.95M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.95M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1215|  1.95M|          SCHAR refNrg_e = (SCHAR)((LONG)(*pIenv) & MASK_E) - NRG_EXP_OFFSET;
  ------------------
  |  |  142|  1.95M|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|  1.95M|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                        SCHAR refNrg_e = (SCHAR)((LONG)(*pIenv) & MASK_E) - NRG_EXP_OFFSET;
  ------------------
  |  |  153|  1.95M|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
 1216|       |
 1217|  1.95M|          UCHAR sinePresentFlag = 0;
 1218|  1.95M|          int li = table[j];
 1219|  1.95M|          int ui = table[j + 1];
 1220|       |
 1221|  7.33M|          for (k = li; k < ui; k++) {
  ------------------
  |  Branch (1221:24): [True: 5.38M, False: 1.95M]
  ------------------
 1222|  5.38M|            sinePresentFlag |= (i >= sineMapped[cc]);
 1223|  5.38M|            cc++;
 1224|  5.38M|          }
 1225|       |
 1226|  7.33M|          for (k = li; k < ui; k++) {
  ------------------
  |  Branch (1226:24): [True: 5.38M, False: 1.95M]
  ------------------
 1227|  5.38M|            if (k >= *pUiNoise) {
  ------------------
  |  Branch (1227:17): [True: 315k, False: 5.06M]
  ------------------
 1228|   315k|              tmpNoise =
 1229|   315k|                  FX_SGL2FX_DBL((FIXP_SGL)((LONG)(*pNoiseLevels) & MASK_M));
  ------------------
  |  |  219|   315k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   315k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   315k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1230|   315k|              tmpNoise_e =
 1231|   315k|                  (SCHAR)((LONG)(*pNoiseLevels++) & MASK_E) - NOISE_EXP_OFFSET;
  ------------------
  |  |  142|   315k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|   315k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                                (SCHAR)((LONG)(*pNoiseLevels++) & MASK_E) - NOISE_EXP_OFFSET;
  ------------------
  |  |  156|   315k|  38 /*!< Will be added to the noise level exponent to prevent negative \
  ------------------
 1232|       |
 1233|   315k|              pUiNoise++;
 1234|   315k|            }
 1235|       |
 1236|  5.38M|            FDK_ASSERT(k >= lowSubband);
  ------------------
  |  |  221|  5.38M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1236:13): [True: 5.38M, False: 0]
  ------------------
 1237|       |
 1238|  5.38M|            if (useLP) useAliasReduction[k - lowSubband] = !sinePresentFlag;
  ------------------
  |  Branch (1238:17): [True: 603k, False: 4.77M]
  ------------------
 1239|       |
 1240|  5.38M|            pNrgs->nrgSine[c] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  5.38M|  (FIXP_DBL)(                                                                \
  |  |  193|  5.38M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 5.38M, Folded]
  |  |  ------------------
  |  |  194|  5.38M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  5.38M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.38M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 5.38M]
  |  |  ------------------
  |  |  195|  5.38M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  5.38M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  5.38M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  5.38M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  5.38M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.38M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  5.38M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1241|  5.38M|            pNrgs->nrgSine_e[c] = 0;
 1242|       |
 1243|  5.38M|            calcSubbandGain(refNrg, refNrg_e, pNrgs, c, tmpNoise, tmpNoise_e,
 1244|  5.38M|                            sinePresentFlag, i >= sineMapped[c], noNoiseFlag);
 1245|       |
 1246|  5.38M|            pNrgs->nrgRef[c] = refNrg;
 1247|  5.38M|            pNrgs->nrgRef_e[c] = refNrg_e;
 1248|       |
 1249|  5.38M|            c++;
 1250|  5.38M|          }
 1251|  1.95M|          pIenv++;
 1252|  1.95M|        }
 1253|   210k|      }
 1254|  1.56M|    }
 1255|       |
 1256|       |    /*
 1257|       |      Noise limiting
 1258|       |    */
 1259|       |
 1260|  6.71M|    for (c = 0; c < hFreq->noLimiterBands; c++) {
  ------------------
  |  Branch (1260:17): [True: 5.15M, False: 1.56M]
  ------------------
 1261|  5.15M|      FIXP_DBL sumRef, boostGain, maxGain;
 1262|  5.15M|      FIXP_DBL accu = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  5.15M|  (FIXP_DBL)(                                                                \
  |  |  193|  5.15M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 5.15M, Folded]
  |  |  ------------------
  |  |  194|  5.15M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  5.15M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.15M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 5.15M]
  |  |  ------------------
  |  |  195|  5.15M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  5.15M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  5.15M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  5.15M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  5.15M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.15M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  5.15M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1263|  5.15M|      SCHAR sumRef_e, boostGain_e, maxGain_e, accu_e = 0;
 1264|  5.15M|      int maxGainLimGainSum_e = 0;
 1265|       |
 1266|  5.15M|      calcAvgGain(pNrgs, hFreq->limiterBandTable[c],
 1267|  5.15M|                  hFreq->limiterBandTable[c + 1], &sumRef, &sumRef_e, &maxGain,
 1268|  5.15M|                  &maxGain_e);
 1269|       |
 1270|       |      /* Multiply maxGain with limiterGain: */
 1271|  5.15M|      maxGain = fMult(
 1272|  5.15M|          maxGain,
 1273|  5.15M|          FDK_sbrDecoder_sbr_limGains_m[hHeaderData->bs_data.limiterGains]);
 1274|       |      /* maxGain_e +=
 1275|       |       * FDK_sbrDecoder_sbr_limGains_e[hHeaderData->bs_data.limiterGains]; */
 1276|       |      /* The addition of maxGain_e and FDK_sbrDecoder_sbr_limGains_e[3] might
 1277|       |         yield values greater than 127 which doesn't fit into an SCHAR! In these
 1278|       |         rare situations limit maxGain_e to 127.
 1279|       |      */
 1280|  5.15M|      maxGainLimGainSum_e =
 1281|  5.15M|          maxGain_e +
 1282|  5.15M|          FDK_sbrDecoder_sbr_limGains_e[hHeaderData->bs_data.limiterGains];
 1283|  5.15M|      maxGain_e =
 1284|  5.15M|          (maxGainLimGainSum_e > 127) ? (SCHAR)127 : (SCHAR)maxGainLimGainSum_e;
  ------------------
  |  Branch (1284:11): [True: 365, False: 5.15M]
  ------------------
 1285|       |
 1286|       |      /* Scale mantissa of MaxGain into range between 0.5 and 1: */
 1287|  5.15M|      if (maxGain == FL2FXCONST_DBL(0.0f))
  ------------------
  |  |  192|  5.15M|  (FIXP_DBL)(                                                                \
  |  |  193|  5.15M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 5.15M, Folded]
  |  |  ------------------
  |  |  194|  5.15M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  5.15M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.15M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 5.15M]
  |  |  ------------------
  |  |  195|  5.15M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  5.15M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  5.15M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  5.15M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  5.15M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.15M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  5.15M|          : ((((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 (1287:11): [True: 150, False: 5.15M]
  ------------------
 1288|    150|        maxGain_e = -FRACT_BITS;
  ------------------
  |  |  112|    150|#define FRACT_BITS 16  /* single precision */
  ------------------
 1289|  5.15M|      else {
 1290|  5.15M|        SCHAR charTemp = CountLeadingBits(maxGain);
  ------------------
  |  |  309|  5.15M|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
 1291|  5.15M|        maxGain_e -= charTemp;
 1292|  5.15M|        maxGain <<= (int)charTemp;
 1293|  5.15M|      }
 1294|       |
 1295|  5.15M|      if (maxGain_e >= maxGainLimit_e) { /* upper limit (e.g. 96 dB) */
  ------------------
  |  Branch (1295:11): [True: 1.17M, False: 3.98M]
  ------------------
 1296|  1.17M|        maxGain = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  1.17M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.17M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.17M, Folded]
  |  |  ------------------
  |  |  194|  1.17M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.17M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.17M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.17M]
  |  |  ------------------
  |  |  195|  1.17M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.17M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.17M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.17M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.17M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.17M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.17M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1297|  1.17M|        maxGain_e = maxGainLimit_e;
 1298|  1.17M|      }
 1299|       |
 1300|       |      /* Every subband gain is compared to the scaled "average gain"
 1301|       |         and limited if necessary: */
 1302|  41.6M|      for (k = hFreq->limiterBandTable[c]; k < hFreq->limiterBandTable[c + 1];
  ------------------
  |  Branch (1302:44): [True: 36.5M, False: 5.15M]
  ------------------
 1303|  36.5M|           k++) {
 1304|  36.5M|        if ((pNrgs->nrgGain_e[k] > maxGain_e) ||
  ------------------
  |  Branch (1304:13): [True: 12.5M, False: 23.9M]
  ------------------
 1305|  23.9M|            (pNrgs->nrgGain_e[k] == maxGain_e && pNrgs->nrgGain[k] > maxGain)) {
  ------------------
  |  Branch (1305:14): [True: 4.55M, False: 19.3M]
  |  Branch (1305:50): [True: 2.34M, False: 2.21M]
  ------------------
 1306|  14.9M|          FIXP_DBL noiseAmp;
 1307|  14.9M|          SCHAR noiseAmp_e;
 1308|       |
 1309|  14.9M|          FDK_divide_MantExp(maxGain, maxGain_e, pNrgs->nrgGain[k],
 1310|  14.9M|                             pNrgs->nrgGain_e[k], &noiseAmp, &noiseAmp_e);
 1311|  14.9M|          pNrgs->noiseLevel[k] = fMult(pNrgs->noiseLevel[k], noiseAmp);
 1312|  14.9M|          pNrgs->noiseLevel_e[k] += noiseAmp_e;
 1313|  14.9M|          pNrgs->nrgGain[k] = maxGain;
 1314|  14.9M|          pNrgs->nrgGain_e[k] = maxGain_e;
 1315|  14.9M|        }
 1316|  36.5M|      }
 1317|       |
 1318|       |      /* -- Boost gain
 1319|       |        Calculate and apply boost factor for each limiter band:
 1320|       |        1. Check how much energy would be present when using the limited gain
 1321|       |        2. Calculate boost factor by comparison with reference energy
 1322|       |        3. Apply boost factor to compensate for the energy loss due to limiting
 1323|       |      */
 1324|  41.6M|      for (k = hFreq->limiterBandTable[c]; k < hFreq->limiterBandTable[c + 1];
  ------------------
  |  Branch (1324:44): [True: 36.5M, False: 5.15M]
  ------------------
 1325|  36.5M|           k++) {
 1326|       |        /* 1.a  Add energy of adjusted signal (using preliminary gain) */
 1327|  36.5M|        FIXP_DBL tmp = fMult(pNrgs->nrgGain[k], pNrgs->nrgEst[k]);
 1328|  36.5M|        SCHAR tmp_e = pNrgs->nrgGain_e[k] + pNrgs->nrgEst_e[k];
 1329|  36.5M|        FDK_add_MantExp(tmp, tmp_e, accu, accu_e, &accu, &accu_e);
 1330|       |
 1331|       |        /* 1.b  Add sine energy (if present) */
 1332|  36.5M|        if (pNrgs->nrgSine[k] != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  36.5M|  (FIXP_DBL)(                                                                \
  |  |  193|  36.5M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 36.5M, Folded]
  |  |  ------------------
  |  |  194|  36.5M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  36.5M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  36.5M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 36.5M]
  |  |  ------------------
  |  |  195|  36.5M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  36.5M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  36.5M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  36.5M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  36.5M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  36.5M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  36.5M|          : ((((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 (1332:13): [True: 72.0k, False: 36.4M]
  ------------------
 1333|  72.0k|          FDK_add_MantExp(pNrgs->nrgSine[k], pNrgs->nrgSine_e[k], accu, accu_e,
 1334|  72.0k|                          &accu, &accu_e);
 1335|  36.4M|        } else {
 1336|       |          /* 1.c  Add noise energy (if present) */
 1337|  36.4M|          if (noNoiseFlag == 0) {
  ------------------
  |  Branch (1337:15): [True: 36.3M, False: 53.2k]
  ------------------
 1338|  36.3M|            FDK_add_MantExp(pNrgs->noiseLevel[k], pNrgs->noiseLevel_e[k], accu,
 1339|  36.3M|                            accu_e, &accu, &accu_e);
 1340|  36.3M|          }
 1341|  36.4M|        }
 1342|  36.5M|      }
 1343|       |
 1344|       |      /* 2.a  Calculate ratio of wanted energy and accumulated energy */
 1345|  5.15M|      if (accu == (FIXP_DBL)0) { /* If divisor is 0, limit quotient to +4 dB */
  ------------------
  |  Branch (1345:11): [True: 33.6k, False: 5.11M]
  ------------------
 1346|  33.6k|        boostGain = FL2FXCONST_DBL(0.6279716f);
  ------------------
  |  |  192|  33.6k|  (FIXP_DBL)(                                                                \
  |  |  193|  33.6k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 33.6k, Folded]
  |  |  ------------------
  |  |  194|  33.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  33.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  33.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 33.6k]
  |  |  ------------------
  |  |  195|  33.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  33.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  33.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  33.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  33.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  33.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  33.6k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1347|  33.6k|        boostGain_e = 2;
 1348|  5.11M|      } else {
 1349|  5.11M|        INT div_e;
 1350|  5.11M|        boostGain = fDivNorm(sumRef, accu, &div_e);
 1351|  5.11M|        boostGain_e = sumRef_e - accu_e + div_e;
 1352|  5.11M|      }
 1353|       |
 1354|       |      /* 2.b Result too high? --> Limit the boost factor to +4 dB */
 1355|  5.15M|      if ((boostGain_e > 3) ||
  ------------------
  |  Branch (1355:11): [True: 1.14M, False: 4.00M]
  ------------------
 1356|  4.00M|          (boostGain_e == 2 && boostGain > FL2FXCONST_DBL(0.6279716f)) ||
  ------------------
  |  |  192|  1.41M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.41M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.41M, Folded]
  |  |  ------------------
  |  |  194|  1.41M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.41M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.41M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.41M]
  |  |  ------------------
  |  |  195|  1.41M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.41M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.41M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.41M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.41M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.41M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.41M|          : ((((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 (1356:12): [True: 1.41M, False: 2.58M]
  |  Branch (1356:32): [True: 104k, False: 1.31M]
  ------------------
 1357|  3.90M|          (boostGain_e == 3 && boostGain > FL2FXCONST_DBL(0.3139858f))) {
  ------------------
  |  |  192|   193k|  (FIXP_DBL)(                                                                \
  |  |  193|   193k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 193k, Folded]
  |  |  ------------------
  |  |  194|   193k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   193k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   193k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 193k]
  |  |  ------------------
  |  |  195|   193k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   193k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   193k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   193k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   193k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   193k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   193k|          : ((((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 (1357:12): [True: 193k, False: 3.70M]
  |  Branch (1357:32): [True: 165k, False: 28.4k]
  ------------------
 1358|  1.41M|        boostGain = FL2FXCONST_DBL(0.6279716f);
  ------------------
  |  |  192|  1.41M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.41M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.41M, Folded]
  |  |  ------------------
  |  |  194|  1.41M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.41M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.41M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.41M]
  |  |  ------------------
  |  |  195|  1.41M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.41M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.41M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.41M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.41M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.41M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.41M|          : ((((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|  1.41M|        boostGain_e = 2;
 1360|  1.41M|      }
 1361|       |      /* 3.  Multiply all signal components with the boost factor */
 1362|  41.6M|      for (k = hFreq->limiterBandTable[c]; k < hFreq->limiterBandTable[c + 1];
  ------------------
  |  Branch (1362:44): [True: 36.5M, False: 5.15M]
  ------------------
 1363|  36.5M|           k++) {
 1364|  36.5M|        pNrgs->nrgGain[k] = fMultDiv2(pNrgs->nrgGain[k], boostGain);
 1365|  36.5M|        pNrgs->nrgGain_e[k] = pNrgs->nrgGain_e[k] + boostGain_e + 1;
 1366|       |
 1367|  36.5M|        pNrgs->nrgSine[k] = fMultDiv2(pNrgs->nrgSine[k], boostGain);
 1368|  36.5M|        pNrgs->nrgSine_e[k] = pNrgs->nrgSine_e[k] + boostGain_e + 1;
 1369|       |
 1370|  36.5M|        pNrgs->noiseLevel[k] = fMultDiv2(pNrgs->noiseLevel[k], boostGain);
 1371|  36.5M|        pNrgs->noiseLevel_e[k] = pNrgs->noiseLevel_e[k] + boostGain_e + 1;
 1372|  36.5M|      }
 1373|  5.15M|    }
 1374|       |    /* End of noise limiting */
 1375|       |
 1376|  1.56M|    if (useLP)
  ------------------
  |  Branch (1376:9): [True: 48.9k, False: 1.51M]
  ------------------
 1377|  48.9k|      aliasingReduction(degreeAlias + lowSubband, pNrgs, useAliasReduction,
 1378|  48.9k|                        noSubbands);
 1379|       |
 1380|       |    /* For the timeslots within the range for the output frame,
 1381|       |       use the same scale for the noise levels.
 1382|       |       Drawback: If the envelope exceeds the frame border, the noise levels
 1383|       |                 will have to be rescaled later to fit final_e of
 1384|       |                 the gain-values.
 1385|       |    */
 1386|  1.56M|    noise_e = (start_pos < no_cols) ? adj_e : final_e;
  ------------------
  |  Branch (1386:15): [True: 1.55M, False: 11.2k]
  ------------------
 1387|       |
 1388|  1.56M|    if (start_pos >= no_cols) {
  ------------------
  |  Branch (1388:9): [True: 11.2k, False: 1.55M]
  ------------------
 1389|  11.2k|      int diff = h_sbr_cal_env->filtBufferNoise_e - noise_e;
 1390|  11.2k|      if (diff > 0) {
  ------------------
  |  Branch (1390:11): [True: 3.90k, False: 7.38k]
  ------------------
 1391|  3.90k|        int s = getScalefactor(h_sbr_cal_env->filtBufferNoise, noSubbands);
 1392|  3.90k|        if (diff > s) {
  ------------------
  |  Branch (1392:13): [True: 198, False: 3.71k]
  ------------------
 1393|    198|          final_e += diff - s;
 1394|    198|          noise_e = final_e;
 1395|    198|        }
 1396|  3.90k|      }
 1397|  11.2k|    }
 1398|       |
 1399|       |    /*
 1400|       |      Convert energies to amplitude levels
 1401|       |    */
 1402|  38.0M|    for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1402:17): [True: 36.4M, False: 1.56M]
  ------------------
 1403|  36.4M|      FDK_sqrt_MantExp(&pNrgs->nrgSine[k], &pNrgs->nrgSine_e[k], &noise_e);
 1404|  36.4M|      FDK_sqrt_MantExp(&pNrgs->nrgGain[k], &pNrgs->nrgGain_e[k],
 1405|  36.4M|                       &pNrgs->nrgGain_e[k]);
 1406|  36.4M|      FDK_sqrt_MantExp(&pNrgs->noiseLevel[k], &pNrgs->noiseLevel_e[k],
 1407|  36.4M|                       &noise_e);
 1408|  36.4M|    }
 1409|       |
 1410|       |    /*
 1411|       |      Apply calculated gains and adaptive noise
 1412|       |    */
 1413|       |
 1414|       |    /* assembleHfSignals() */
 1415|  1.56M|    {
 1416|  1.56M|      int scale_change, sc_change;
 1417|  1.56M|      FIXP_SGL smooth_ratio;
 1418|  1.56M|      int filtBufferNoiseShift = 0;
 1419|       |
 1420|       |      /* Initialize smoothing buffers with the first valid values */
 1421|  1.56M|      if (h_sbr_cal_env->startUp) {
  ------------------
  |  Branch (1421:11): [True: 72.8k, False: 1.49M]
  ------------------
 1422|  72.8k|        if (!useLP) {
  ------------------
  |  Branch (1422:13): [True: 60.6k, False: 12.1k]
  ------------------
 1423|  60.6k|          h_sbr_cal_env->filtBufferNoise_e = noise_e;
 1424|       |
 1425|  60.6k|          FDKmemcpy(h_sbr_cal_env->filtBuffer_e, pNrgs->nrgGain_e,
 1426|  60.6k|                    noSubbands * sizeof(SCHAR));
 1427|  60.6k|          FDKmemcpy(h_sbr_cal_env->filtBufferNoise, pNrgs->noiseLevel,
 1428|  60.6k|                    noSubbands * sizeof(FIXP_DBL));
 1429|  60.6k|          FDKmemcpy(h_sbr_cal_env->filtBuffer, pNrgs->nrgGain,
 1430|  60.6k|                    noSubbands * sizeof(FIXP_DBL));
 1431|  60.6k|        }
 1432|  72.8k|        h_sbr_cal_env->startUp = 0;
 1433|  72.8k|      }
 1434|       |
 1435|  1.56M|      if (!useLP) {
  ------------------
  |  Branch (1435:11): [True: 1.51M, False: 48.9k]
  ------------------
 1436|  1.51M|        equalizeFiltBufferExp(h_sbr_cal_env->filtBuffer,   /* buffered */
 1437|  1.51M|                              h_sbr_cal_env->filtBuffer_e, /* buffered */
 1438|  1.51M|                              pNrgs->nrgGain,              /* current  */
 1439|  1.51M|                              pNrgs->nrgGain_e,            /* current  */
 1440|  1.51M|                              noSubbands);
 1441|       |
 1442|       |        /* Adapt exponent of buffered noise levels to the current exponent
 1443|       |           so they can easily be smoothed */
 1444|  1.51M|        if ((h_sbr_cal_env->filtBufferNoise_e - noise_e) >= 0) {
  ------------------
  |  Branch (1444:13): [True: 1.49M, False: 25.0k]
  ------------------
 1445|  1.49M|          int shift = fixMin(DFRACT_BITS - 1,
  ------------------
  |  |  306|  1.49M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1446|  1.49M|                             (int)(h_sbr_cal_env->filtBufferNoise_e - noise_e));
 1447|  36.6M|          for (k = 0; k < noSubbands; k++)
  ------------------
  |  Branch (1447:23): [True: 35.1M, False: 1.49M]
  ------------------
 1448|  35.1M|            h_sbr_cal_env->filtBufferNoise[k] <<= shift;
 1449|  1.49M|        } else {
 1450|  25.0k|          int shift =
 1451|  25.0k|              fixMin(DFRACT_BITS - 1,
  ------------------
  |  |  306|  25.0k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1452|  25.0k|                     -(int)(h_sbr_cal_env->filtBufferNoise_e - noise_e));
 1453|   719k|          for (k = 0; k < noSubbands; k++)
  ------------------
  |  Branch (1453:23): [True: 694k, False: 25.0k]
  ------------------
 1454|   694k|            h_sbr_cal_env->filtBufferNoise[k] >>= shift;
 1455|  25.0k|        }
 1456|       |
 1457|  1.51M|        h_sbr_cal_env->filtBufferNoise_e = noise_e;
 1458|  1.51M|      }
 1459|       |
 1460|       |      /* find best scaling! */
 1461|  1.56M|      scale_change = -(DFRACT_BITS - 1);
  ------------------
  |  |  113|  1.56M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1462|  38.0M|      for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1462:19): [True: 36.4M, False: 1.56M]
  ------------------
 1463|  36.4M|        scale_change = fixMax(scale_change, (int)pNrgs->nrgGain_e[k]);
  ------------------
  |  |  307|  36.4M|#define fixMax(a, b) fMax(a, b)
  ------------------
 1464|  36.4M|      }
 1465|  1.56M|      sc_change = (start_pos < no_cols) ? adj_e - input_e : final_e - input_e;
  ------------------
  |  Branch (1465:19): [True: 1.55M, False: 11.2k]
  ------------------
 1466|       |
 1467|  1.56M|      if ((scale_change - sc_change + 1) < 0)
  ------------------
  |  Branch (1467:11): [True: 334k, False: 1.23M]
  ------------------
 1468|   334k|        scale_change -= (scale_change - sc_change + 1);
 1469|       |
 1470|  1.56M|      scale_change = (scale_change - sc_change) + 1;
 1471|       |
 1472|  38.0M|      for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1472:19): [True: 36.4M, False: 1.56M]
  ------------------
 1473|  36.4M|        int sc = scale_change - pNrgs->nrgGain_e[k] + (sc_change - 1);
 1474|  36.4M|        pNrgs->nrgGain[k] >>= fixMin(sc, DFRACT_BITS - 1);
  ------------------
  |  |  306|  36.4M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1475|  36.4M|        pNrgs->nrgGain_e[k] += sc;
 1476|  36.4M|      }
 1477|       |
 1478|  1.56M|      if (!useLP) {
  ------------------
  |  Branch (1478:11): [True: 1.51M, False: 48.9k]
  ------------------
 1479|  37.3M|        for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1479:21): [True: 35.8M, False: 1.51M]
  ------------------
 1480|  35.8M|          int sc =
 1481|  35.8M|              scale_change - h_sbr_cal_env->filtBuffer_e[k] + (sc_change - 1);
 1482|  35.8M|          h_sbr_cal_env->filtBuffer[k] >>= fixMin(sc, DFRACT_BITS - 1);
  ------------------
  |  |  306|  35.8M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1483|  35.8M|        }
 1484|  1.51M|      }
 1485|       |
 1486|  10.3M|      for (j = start_pos; j < stop_pos; j++) {
  ------------------
  |  Branch (1486:27): [True: 8.79M, False: 1.56M]
  ------------------
 1487|       |        /* This timeslot is located within the first part of the processing
 1488|       |           buffer and will be fed into the QMF-synthesis for the current frame.
 1489|       |               adj_e - input_e
 1490|       |           This timeslot will not yet be fed into the QMF so we do not care
 1491|       |           about the adj_e.
 1492|       |               sc_change = final_e - input_e
 1493|       |        */
 1494|  8.79M|        if ((j == no_cols) && (start_pos < no_cols)) {
  ------------------
  |  Branch (1494:13): [True: 15.1k, False: 8.77M]
  |  Branch (1494:31): [True: 7.49k, False: 7.69k]
  ------------------
 1495|  7.49k|          int shift = (int)(noise_e - final_e);
 1496|  7.49k|          if (!useLP)
  ------------------
  |  Branch (1496:15): [True: 4.23k, False: 3.25k]
  ------------------
 1497|  4.23k|            filtBufferNoiseShift = shift; /* shifting of
 1498|       |                                             h_sbr_cal_env->filtBufferNoise[k]
 1499|       |                                             will be applied in function
 1500|       |                                             adjustTimeSlotHQ() */
 1501|  7.49k|          if (shift >= 0) {
  ------------------
  |  Branch (1501:15): [True: 5.43k, False: 2.05k]
  ------------------
 1502|  5.43k|            shift = fixMin(DFRACT_BITS - 1, shift);
  ------------------
  |  |  306|  5.43k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1503|   181k|            for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1503:25): [True: 175k, False: 5.43k]
  ------------------
 1504|   175k|              pNrgs->nrgSine[k] <<= shift;
 1505|   175k|              pNrgs->noiseLevel[k] <<= shift;
 1506|       |              /*
 1507|       |              if (!useLP)
 1508|       |                h_sbr_cal_env->filtBufferNoise[k]  <<= shift;
 1509|       |              */
 1510|   175k|            }
 1511|  5.43k|          } else {
 1512|  2.05k|            shift = fixMin(DFRACT_BITS - 1, -shift);
  ------------------
  |  |  306|  2.05k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1513|  83.2k|            for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1513:25): [True: 81.1k, False: 2.05k]
  ------------------
 1514|  81.1k|              pNrgs->nrgSine[k] >>= shift;
 1515|  81.1k|              pNrgs->noiseLevel[k] >>= shift;
 1516|       |              /*
 1517|       |              if (!useLP)
 1518|       |                h_sbr_cal_env->filtBufferNoise[k]  >>= shift;
 1519|       |              */
 1520|  81.1k|            }
 1521|  2.05k|          }
 1522|       |
 1523|       |          /* update noise scaling */
 1524|  7.49k|          noise_e = final_e;
 1525|  7.49k|          if (!useLP)
  ------------------
  |  Branch (1525:15): [True: 4.23k, False: 3.25k]
  ------------------
 1526|  4.23k|            h_sbr_cal_env->filtBufferNoise_e =
 1527|  4.23k|                noise_e; /* scaling value unused! */
 1528|       |
 1529|       |          /* update gain buffer*/
 1530|  7.49k|          sc_change -= (final_e - input_e);
 1531|       |
 1532|  7.49k|          if (sc_change < 0) {
  ------------------
  |  Branch (1532:15): [True: 2.05k, False: 5.43k]
  ------------------
 1533|  83.2k|            for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1533:25): [True: 81.1k, False: 2.05k]
  ------------------
 1534|  81.1k|              pNrgs->nrgGain[k] >>= -sc_change;
 1535|  81.1k|              pNrgs->nrgGain_e[k] += -sc_change;
 1536|  81.1k|            }
 1537|  2.05k|            if (!useLP) {
  ------------------
  |  Branch (1537:17): [True: 2.05k, False: 6]
  ------------------
 1538|  83.1k|              for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (1538:27): [True: 81.0k, False: 2.05k]
  ------------------
 1539|  81.0k|                h_sbr_cal_env->filtBuffer[k] >>= -sc_change;
 1540|  81.0k|              }
 1541|  2.05k|            }
 1542|  5.43k|          } else {
 1543|  5.43k|            scale_change += sc_change;
 1544|  5.43k|          }
 1545|       |
 1546|  7.49k|        } /* if */
 1547|       |
 1548|  8.79M|        if (!useLP) {
  ------------------
  |  Branch (1548:13): [True: 7.80M, False: 987k]
  ------------------
 1549|       |          /* Prevent the smoothing filter from running on constant levels */
 1550|  7.80M|          if (j - start_pos < smooth_length)
  ------------------
  |  Branch (1550:15): [True: 2.38M, False: 5.41M]
  ------------------
 1551|  2.38M|            smooth_ratio = FDK_sbrDecoder_sbr_smoothFilter[j - start_pos];
 1552|  5.41M|          else
 1553|  5.41M|            smooth_ratio = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  5.41M|  (FIXP_SGL)(                                                                \
  |  |  181|  5.41M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.41M, Folded]
  |  |  ------------------
  |  |  182|  5.41M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.41M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.41M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.41M]
  |  |  ------------------
  |  |  183|  5.41M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.41M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.41M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.41M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.41M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.41M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.41M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1554|       |
 1555|  7.80M|          if (iTES_enable) {
  ------------------
  |  Branch (1555:15): [True: 1.10M, False: 6.70M]
  ------------------
 1556|       |            /* adjustTimeSlotHQ() without adding of additional harmonics */
 1557|  1.10M|            adjustTimeSlotHQ_GainAndNoise(
 1558|  1.10M|                &analysBufferReal[j][lowSubband],
 1559|  1.10M|                &analysBufferImag[j][lowSubband], h_sbr_cal_env, pNrgs,
 1560|  1.10M|                lowSubband, noSubbands, fMin(scale_change, DFRACT_BITS - 1),
  ------------------
  |  |  113|  1.10M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1561|  1.10M|                smooth_ratio, noNoiseFlag, filtBufferNoiseShift);
 1562|  6.70M|          } else {
 1563|  6.70M|            adjustTimeSlotHQ(&analysBufferReal[j][lowSubband],
 1564|  6.70M|                             &analysBufferImag[j][lowSubband], h_sbr_cal_env,
 1565|  6.70M|                             pNrgs, lowSubband, noSubbands,
 1566|  6.70M|                             fMin(scale_change, DFRACT_BITS - 1), smooth_ratio,
  ------------------
  |  |  113|  6.70M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1567|  6.70M|                             noNoiseFlag, filtBufferNoiseShift);
 1568|  6.70M|          }
 1569|  7.80M|        } else {
 1570|   987k|          FDK_ASSERT(!iTES_enable); /* not supported */
  ------------------
  |  |  221|   987k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1570:11): [True: 987k, False: 0]
  ------------------
 1571|   987k|          if (flags & SBRDEC_ELD_GRID) {
  ------------------
  |  |  204|   987k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (1571:15): [True: 336k, False: 651k]
  ------------------
 1572|       |            /* FDKmemset(analysBufferReal[j], 0, 64 * sizeof(FIXP_DBL)); */
 1573|   336k|            adjustTimeSlot_EldGrid(
 1574|   336k|                &analysBufferReal[j][lowSubband], pNrgs,
 1575|   336k|                &h_sbr_cal_env->harmIndex, lowSubband, noSubbands,
 1576|   336k|                fMin(scale_change, DFRACT_BITS - 1), noNoiseFlag,
  ------------------
  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1577|   336k|                &h_sbr_cal_env->phaseIndex,
 1578|   336k|                fMax(EXP2SCALE(adj_e) - sbrScaleFactor->lb_scale,
  ------------------
  |  |  415|   336k|#define EXP2SCALE(e) (15 - (e))
  ------------------
 1579|   336k|                     -(DFRACT_BITS - 1)));
  ------------------
  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1580|   651k|          } else {
 1581|   651k|            adjustTimeSlotLC(&analysBufferReal[j][lowSubband], pNrgs,
 1582|   651k|                             &h_sbr_cal_env->harmIndex, lowSubband, noSubbands,
 1583|   651k|                             fMin(scale_change, DFRACT_BITS - 1), noNoiseFlag,
  ------------------
  |  |  113|   651k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1584|   651k|                             &h_sbr_cal_env->phaseIndex);
 1585|   651k|          }
 1586|   987k|        }
 1587|       |        /* In case the envelope spans accross the no_cols border both exponents
 1588|       |         * are needed. */
 1589|       |        /* nrgGain_e[0...(noSubbands-1)] are equalized by
 1590|       |         * equalizeFiltBufferExp() */
 1591|  8.79M|        pNrgs->exponent[(j < no_cols) ? 0 : 1] =
  ------------------
  |  Branch (1591:25): [True: 8.72M, False: 68.4k]
  ------------------
 1592|  8.79M|            (SCHAR)((15 - sbrScaleFactor->hb_scale) + pNrgs->nrgGain_e[0] + 1 -
 1593|  8.79M|                    scale_change);
 1594|  8.79M|      } /* for */
 1595|       |
 1596|  1.56M|      if (iTES_enable) {
  ------------------
  |  Branch (1596:11): [True: 32.4k, False: 1.53M]
  ------------------
 1597|  32.4k|        apply_inter_tes(
 1598|  32.4k|            analysBufferReal, /* pABufR, */
 1599|  32.4k|            analysBufferImag, /* pABufI, */
 1600|  32.4k|            sbrScaleFactor, pNrgs->exponent, hHeaderData->timeStep, start_pos,
 1601|  32.4k|            stop_pos, lowSubband, noSubbands,
 1602|  32.4k|            hFrameData
 1603|  32.4k|                ->interTempShapeMode[i] /* frameData->interTempShapeMode[env] */
 1604|  32.4k|        );
 1605|       |
 1606|       |        /* add additional harmonics */
 1607|  1.13M|        for (j = start_pos; j < stop_pos; j++) {
  ------------------
  |  Branch (1607:29): [True: 1.10M, False: 32.4k]
  ------------------
 1608|       |          /* match exponent of additional harmonics to scale change of QMF data
 1609|       |           * caused by apply_inter_tes() */
 1610|  1.10M|          scale_change = 0;
 1611|       |
 1612|  1.10M|          if ((start_pos <= no_cols) && (stop_pos > no_cols)) {
  ------------------
  |  Branch (1612:15): [True: 1.09M, False: 7.23k]
  |  Branch (1612:41): [True: 77.1k, False: 1.01M]
  ------------------
 1613|       |            /* Scaling of analysBuffers was potentially changed within this
 1614|       |               envelope. The pNrgs->nrgSine_e match the second part of the
 1615|       |               envelope. For (j<=no_cols) the exponent of the sine energies has
 1616|       |               to be adapted. */
 1617|  77.1k|            scale_change = pNrgs->exponent[1] - pNrgs->exponent[0];
 1618|  77.1k|          }
 1619|       |
 1620|  1.10M|          adjustTimeSlotHQ_AddHarmonics(
 1621|  1.10M|              &analysBufferReal[j][lowSubband],
 1622|  1.10M|              &analysBufferImag[j][lowSubband], h_sbr_cal_env, pNrgs,
 1623|  1.10M|              lowSubband, noSubbands,
 1624|  1.10M|              -iTES_scale_change + ((j < no_cols) ? scale_change : 0));
  ------------------
  |  Branch (1624:37): [True: 1.07M, False: 26.8k]
  ------------------
 1625|  1.10M|        }
 1626|  32.4k|      }
 1627|       |
 1628|  1.56M|      if (!useLP) {
  ------------------
  |  Branch (1628:11): [True: 1.51M, False: 48.9k]
  ------------------
 1629|       |        /* Update time-smoothing-buffers for gains and noise levels
 1630|       |           The gains and the noise values of the current envelope are copied
 1631|       |           into the buffer. This has to be done at the end of each envelope as
 1632|       |           the values are required for a smooth transition to the next envelope.
 1633|       |         */
 1634|  1.51M|        FDKmemcpy(h_sbr_cal_env->filtBuffer, pNrgs->nrgGain,
 1635|  1.51M|                  noSubbands * sizeof(FIXP_DBL));
 1636|  1.51M|        FDKmemcpy(h_sbr_cal_env->filtBuffer_e, pNrgs->nrgGain_e,
 1637|  1.51M|                  noSubbands * sizeof(SCHAR));
 1638|  1.51M|        FDKmemcpy(h_sbr_cal_env->filtBufferNoise, pNrgs->noiseLevel,
 1639|  1.51M|                  noSubbands * sizeof(FIXP_DBL));
 1640|  1.51M|      }
 1641|  1.56M|    }
 1642|      0|    C_ALLOC_SCRATCH_END(pNrgs, ENV_CALC_NRGS, 1);
 1643|  1.56M|  }
 1644|       |
 1645|       |  /* adapt adj_e to the scale change caused by apply_inter_tes() */
 1646|   259k|  adj_e += iTES_scale_change;
 1647|       |
 1648|       |  /* Rescale output samples */
 1649|   259k|  {
 1650|   259k|    FIXP_DBL maxVal;
 1651|   259k|    int ov_reserve, reserve;
 1652|       |
 1653|       |    /* Determine headroom in old adjusted samples */
 1654|   259k|    maxVal =
 1655|   259k|        maxSubbandSample(analysBufferReal, (useLP) ? NULL : analysBufferImag,
  ------------------
  |  Branch (1655:44): [True: 42.7k, False: 216k]
  ------------------
 1656|   259k|                         lowSubband, ov_highSubband, 0, first_start);
 1657|       |
 1658|   259k|    ov_reserve = fNorm(maxVal);
 1659|       |
 1660|       |    /* Determine headroom in new adjusted samples */
 1661|   259k|    maxVal =
 1662|   259k|        maxSubbandSample(analysBufferReal, (useLP) ? NULL : analysBufferImag,
  ------------------
  |  Branch (1662:44): [True: 42.7k, False: 216k]
  ------------------
 1663|   259k|                         lowSubband, highSubband, first_start, no_cols);
 1664|       |
 1665|   259k|    reserve = fNorm(maxVal);
 1666|       |
 1667|       |    /* Determine common output exponent */
 1668|   259k|    output_e = fMax(ov_adj_e - ov_reserve, adj_e - reserve);
 1669|       |
 1670|       |    /* Rescale old samples */
 1671|   259k|    rescaleSubbandSamples(analysBufferReal, (useLP) ? NULL : analysBufferImag,
  ------------------
  |  Branch (1671:45): [True: 42.7k, False: 216k]
  ------------------
 1672|   259k|                          lowSubband, ov_highSubband, 0, first_start,
 1673|   259k|                          ov_adj_e - output_e);
 1674|       |
 1675|       |    /* Rescale new samples */
 1676|   259k|    rescaleSubbandSamples(analysBufferReal, (useLP) ? NULL : analysBufferImag,
  ------------------
  |  Branch (1676:45): [True: 42.7k, False: 216k]
  ------------------
 1677|   259k|                          lowSubband, highSubband, first_start, no_cols,
 1678|   259k|                          adj_e - output_e);
 1679|   259k|  }
 1680|       |
 1681|       |  /* Update hb_scale */
 1682|   259k|  sbrScaleFactor->hb_scale = EXP2SCALE(output_e);
  ------------------
  |  |  415|   259k|#define EXP2SCALE(e) (15 - (e))
  ------------------
 1683|       |
 1684|       |  /* Save the current final exponent for the next frame: */
 1685|       |  /* adapt final_e to the scale change caused by apply_inter_tes() */
 1686|   259k|  sbrScaleFactor->ov_hb_scale = EXP2SCALE(final_e + iTES_scale_change);
  ------------------
  |  |  415|   259k|#define EXP2SCALE(e) (15 - (e))
  ------------------
 1687|       |
 1688|       |  /* We need to remember to the next frame that the transient
 1689|       |     will occur in the first envelope (if tranEnv == nEnvelopes). */
 1690|   259k|  if (hFrameData->frameInfo.tranEnv == hFrameData->frameInfo.nEnvelopes)
  ------------------
  |  Branch (1690:7): [True: 833, False: 258k]
  ------------------
 1691|    833|    h_sbr_cal_env->prevTranEnv = 0;
 1692|   258k|  else
 1693|   258k|    h_sbr_cal_env->prevTranEnv = -1;
 1694|       |
 1695|   259k|  if (pvc_mode > 0) {
  ------------------
  |  Branch (1695:7): [True: 84.6k, False: 174k]
  ------------------
 1696|       |    /* Not more than just the last noise envelope reaches into the next PVC
 1697|       |       frame! This should be true because bs_noise_position is <= 15 */
 1698|  84.6k|    FDK_ASSERT(hFrameData->frameInfo
  ------------------
  |  |  221|  84.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1698:5): [True: 84.6k, False: 0]
  ------------------
 1699|  84.6k|                   .bordersNoise[hFrameData->frameInfo.nNoiseEnvelopes - 1] <
 1700|  84.6k|               PVC_NTIMESLOT);
 1701|  84.6k|    if (hFrameData->frameInfo
  ------------------
  |  Branch (1701:9): [True: 73.7k, False: 10.9k]
  ------------------
 1702|  84.6k|            .bordersNoise[hFrameData->frameInfo.nNoiseEnvelopes] >
 1703|  84.6k|        PVC_NTIMESLOT) {
  ------------------
  |  |  114|  84.6k|#define PVC_NTIMESLOT 16
  ------------------
 1704|  73.7k|      FDK_ASSERT(noiseLevels ==
  ------------------
  |  |  221|  73.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1704:7): [True: 73.7k, False: 0]
  ------------------
 1705|  73.7k|                 (hFrameData->sbrNoiseFloorLevel +
 1706|  73.7k|                  (hFrameData->frameInfo.nNoiseEnvelopes - 1) * noNoiseBands));
 1707|  73.7k|      h_sbr_cal_env->prevNNfb = noNoiseBands;
 1708|       |
 1709|  73.7k|      h_sbr_cal_env->prevNSfb[0] = noSubFrameBands[0];
 1710|  73.7k|      h_sbr_cal_env->prevNSfb[1] = noSubFrameBands[1];
 1711|       |
 1712|  73.7k|      h_sbr_cal_env->prevLoSubband = lowSubband;
 1713|  73.7k|      h_sbr_cal_env->prevHiSubband = highSubband;
 1714|  73.7k|      h_sbr_cal_env->prev_ov_highSubband = ov_highSubband;
 1715|       |
 1716|  73.7k|      FDKmemcpy(h_sbr_cal_env->prevFreqBandTableLo, pFreqBandTable[0],
 1717|  73.7k|                noSubFrameBands[0] + 1);
 1718|  73.7k|      FDKmemcpy(h_sbr_cal_env->prevFreqBandTableHi, pFreqBandTable[1],
 1719|  73.7k|                noSubFrameBands[1] + 1);
 1720|  73.7k|      FDKmemcpy(h_sbr_cal_env->prevFreqBandTableNoise,
 1721|  73.7k|                hFreq->freqBandTableNoise, sizeof(hFreq->freqBandTableNoise));
 1722|       |
 1723|  73.7k|      FDKmemcpy(h_sbr_cal_env->prevSbrNoiseFloorLevel, noiseLevels,
 1724|  73.7k|                MAX_NOISE_COEFFS * sizeof(FIXP_SGL));
  ------------------
  |  |  128|  73.7k|#define MAX_NOISE_COEFFS 5
  ------------------
 1725|  73.7k|    }
 1726|  84.6k|  }
 1727|       |
 1728|   259k|  C_ALLOC_SCRATCH_END(useAliasReduction, UCHAR, 64)
 1729|   259k|}
_Z21createSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPEP15SBR_HEADER_DATAij:
 1745|   149k|    const UINT flags) {
 1746|   149k|  SBR_ERROR err = SBRDEC_OK;
 1747|   149k|  int i;
 1748|       |
 1749|       |  /* Clear previous missing harmonics flags */
 1750|   447k|  for (i = 0; i < ADD_HARMONICS_FLAGS_SIZE; i++) {
  ------------------
  |  |  159|   447k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  |  Branch (1750:15): [True: 298k, False: 149k]
  ------------------
 1751|   298k|    hs->harmFlagsPrev[i] = 0;
 1752|   298k|    hs->harmFlagsPrevActive[i] = 0;
 1753|   298k|  }
 1754|   149k|  hs->harmIndex = 0;
 1755|       |
 1756|   149k|  FDKmemclear(hs->prevSbrNoiseFloorLevel, sizeof(hs->prevSbrNoiseFloorLevel));
 1757|   149k|  hs->prevNNfb = 0;
 1758|   149k|  FDKmemclear(hs->prevFreqBandTableNoise, sizeof(hs->prevFreqBandTableNoise));
 1759|   149k|  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|   149k|  hs->prevTranEnv = -1;
 1766|       |
 1767|       |  /* initialization */
 1768|   149k|  resetSbrEnvelopeCalc(hs);
 1769|       |
 1770|   149k|  if (chan == 0) { /* do this only once */
  ------------------
  |  Branch (1770:7): [True: 96.0k, False: 53.1k]
  ------------------
 1771|  96.0k|    err = resetFreqBandTables(hHeaderData, flags);
 1772|  96.0k|  }
 1773|       |
 1774|   149k|  return err;
 1775|   149k|}
_Z21deleteSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPE:
 1785|   153k|int deleteSbrEnvelopeCalc(HANDLE_SBR_CALCULATE_ENVELOPE hs) { return 0; }
_Z20resetSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPE:
 1797|   397k|{
 1798|   397k|  hCalEnv->phaseIndex = 0;
 1799|       |
 1800|       |  /* Noise exponent needs to be reset because the output exponent for the next
 1801|       |   * frame depends on it */
 1802|   397k|  hCalEnv->filtBufferNoise_e = 0;
 1803|       |
 1804|   397k|  hCalEnv->startUp = 1;
 1805|   397k|}
_Z21rescaleSubbandSamplesPPiS0_iiiii:
 1872|   966k|{
 1873|   966k|  int width = highSubband - lowSubband;
 1874|       |
 1875|   966k|  if ((width > 0) && (shift != 0)) {
  ------------------
  |  Branch (1875:7): [True: 964k, False: 2.30k]
  |  Branch (1875:22): [True: 897k, False: 67.2k]
  ------------------
 1876|   897k|    if (im != NULL) {
  ------------------
  |  Branch (1876:9): [True: 658k, False: 238k]
  ------------------
 1877|  17.4M|      for (int l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1877:31): [True: 16.8M, False: 658k]
  ------------------
 1878|  16.8M|        scaleValues(&re[l][lowSubband], width, shift);
 1879|  16.8M|        scaleValues(&im[l][lowSubband], width, shift);
 1880|  16.8M|      }
 1881|   658k|    } else {
 1882|  4.24M|      for (int l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1882:31): [True: 4.00M, False: 238k]
  ------------------
 1883|  4.00M|        scaleValues(&re[l][lowSubband], width, shift);
 1884|  4.00M|      }
 1885|   238k|    }
 1886|   897k|  }
 1887|   966k|}
_Z16maxSubbandSamplePPiS0_iiii:
 1916|  1.19M|) {
 1917|  1.19M|  FIXP_DBL maxVal = FL2FX_DBL(0.0f);
  ------------------
  |  |  210|  1.19M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 1.19M]
  |  |  ------------------
  |  |  211|  1.19M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  1.19M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.19M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1918|  1.19M|  unsigned int width = highSubband - lowSubband;
 1919|       |
 1920|  1.19M|  FDK_ASSERT(width <= (64));
  ------------------
  |  |  221|  1.19M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1920:3): [True: 1.19M, False: 0]
  ------------------
 1921|       |
 1922|  1.19M|  if (width > 0) {
  ------------------
  |  Branch (1922:7): [True: 1.19M, False: 3.25k]
  ------------------
 1923|  1.19M|    if (im != NULL) {
  ------------------
  |  Branch (1923:9): [True: 921k, False: 271k]
  ------------------
 1924|  28.0M|      for (int l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1924:31): [True: 27.1M, False: 921k]
  ------------------
 1925|  27.1M|        int k = width;
 1926|  27.1M|        FIXP_DBL *reTmp = &re[l][lowSubband];
 1927|  27.1M|        FIXP_DBL *imTmp = &im[l][lowSubband];
 1928|   457M|        do {
 1929|   457M|          FIXP_DBL tmp1 = *(reTmp++);
 1930|   457M|          FIXP_DBL tmp2 = *(imTmp++);
 1931|   457M|          maxVal |=
 1932|   457M|              (FIXP_DBL)((LONG)(tmp1) ^ ((LONG)tmp1 >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|   457M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1933|   457M|          maxVal |=
 1934|   457M|              (FIXP_DBL)((LONG)(tmp2) ^ ((LONG)tmp2 >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|   457M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1935|   457M|        } while (--k != 0);
  ------------------
  |  Branch (1935:18): [True: 430M, False: 27.1M]
  ------------------
 1936|  27.1M|      }
 1937|   921k|    } else {
 1938|  4.70M|      for (int l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1938:31): [True: 4.43M, False: 271k]
  ------------------
 1939|  4.43M|        maxVal |= FDK_get_maxval_real(maxVal, &re[l][lowSubband], width);
 1940|  4.43M|      }
 1941|   271k|    }
 1942|  1.19M|  }
 1943|       |
 1944|  1.19M|  if (maxVal > (FIXP_DBL)0) {
  ------------------
  |  Branch (1944:7): [True: 691k, False: 504k]
  ------------------
 1945|       |    /* For negative input values, maxVal is too small by 1. Add 1 only when
 1946|       |     * necessary: if maxVal is a power of 2 */
 1947|   691k|    FIXP_DBL lowerPow2 =
 1948|   691k|        (FIXP_DBL)(1 << (DFRACT_BITS - 1 - CntLeadingZeros(maxVal)));
  ------------------
  |  |  113|   691k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                      (FIXP_DBL)(1 << (DFRACT_BITS - 1 - CntLeadingZeros(maxVal)));
  ------------------
  |  |  308|   691k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 1949|   691k|    if (maxVal == lowerPow2) maxVal += (FIXP_DBL)1;
  ------------------
  |  Branch (1949:9): [True: 4.89k, False: 686k]
  ------------------
 1950|   691k|  }
 1951|       |
 1952|  1.19M|  return (maxVal);
 1953|  1.19M|}
_Z17ResetLimiterBandsPhS_S_iPK11PATCH_PARAMiihPii:
 3069|   259k|    UCHAR sbrPatchingMode, int xOverQmf[MAX_NUM_PATCHES], int b41Sbr) {
 3070|   259k|  int i, k, isPatchBorder[2], loLimIndex, hiLimIndex, tempNoLim, nBands;
 3071|   259k|  UCHAR workLimiterBandTable[MAX_FREQ_COEFFS / 2 + MAX_NUM_PATCHES + 1];
 3072|   259k|  int patchBorders[MAX_NUM_PATCHES + 1];
 3073|   259k|  int kx, k2;
 3074|       |
 3075|   259k|  int lowSubband = freqBandTable[0];
 3076|   259k|  int highSubband = freqBandTable[noFreqBands];
 3077|       |
 3078|       |  /* 1 limiter band. */
 3079|   259k|  if (limiterBands == 0) {
  ------------------
  |  Branch (3079:7): [True: 4.01k, False: 255k]
  ------------------
 3080|  4.01k|    limiterBandTable[0] = 0;
 3081|  4.01k|    limiterBandTable[1] = highSubband - lowSubband;
 3082|  4.01k|    nBands = 1;
 3083|   255k|  } else {
 3084|   255k|    if (!sbrPatchingMode && xOverQmf != NULL) {
  ------------------
  |  Branch (3084:9): [True: 157k, False: 98.6k]
  |  Branch (3084:29): [True: 29.3k, False: 127k]
  ------------------
 3085|  29.3k|      noPatches = 0;
 3086|       |
 3087|  29.3k|      if (b41Sbr == 1) {
  ------------------
  |  Branch (3087:11): [True: 11.1k, False: 18.1k]
  ------------------
 3088|  67.0k|        for (i = 1; i < MAX_NUM_PATCHES_HBE; i++)
  ------------------
  |  |  116|  67.0k|#define MAX_NUM_PATCHES_HBE (6)
  ------------------
  |  Branch (3088:21): [True: 55.9k, False: 11.1k]
  ------------------
 3089|  55.9k|          if (xOverQmf[i] != 0) noPatches++;
  ------------------
  |  Branch (3089:15): [True: 24.9k, False: 30.9k]
  ------------------
 3090|  18.1k|      } else {
 3091|  72.7k|        for (i = 1; i < MAX_STRETCH_HBE; i++)
  ------------------
  |  |  118|  72.7k|#define MAX_STRETCH_HBE (4)
  ------------------
  |  Branch (3091:21): [True: 54.5k, False: 18.1k]
  ------------------
 3092|  54.5k|          if (xOverQmf[i] != 0) noPatches++;
  ------------------
  |  Branch (3092:15): [True: 34.2k, False: 20.3k]
  ------------------
 3093|  18.1k|      }
 3094|  88.6k|      for (i = 0; i < noPatches; i++) {
  ------------------
  |  Branch (3094:19): [True: 59.2k, False: 29.3k]
  ------------------
 3095|  59.2k|        patchBorders[i] = xOverQmf[i] - lowSubband;
 3096|  59.2k|      }
 3097|   226k|    } else {
 3098|   610k|      for (i = 0; i < noPatches; i++) {
  ------------------
  |  Branch (3098:19): [True: 384k, False: 226k]
  ------------------
 3099|   384k|        patchBorders[i] = patchParam[i].guardStartBand - lowSubband;
 3100|   384k|      }
 3101|   226k|    }
 3102|   255k|    patchBorders[i] = highSubband - lowSubband;
 3103|       |
 3104|       |    /* 1.2, 2, or 3 limiter bands/octave plus bandborders at patchborders. */
 3105|  1.93M|    for (k = 0; k <= noFreqBands; k++) {
  ------------------
  |  Branch (3105:17): [True: 1.67M, False: 255k]
  ------------------
 3106|  1.67M|      workLimiterBandTable[k] = freqBandTable[k] - lowSubband;
 3107|  1.67M|    }
 3108|   529k|    for (k = 1; k < noPatches; k++) {
  ------------------
  |  Branch (3108:17): [True: 273k, False: 255k]
  ------------------
 3109|   273k|      workLimiterBandTable[noFreqBands + k] = patchBorders[k];
 3110|   273k|    }
 3111|       |
 3112|   255k|    tempNoLim = nBands = noFreqBands + noPatches - 1;
 3113|   255k|    shellsort(workLimiterBandTable, tempNoLim + 1);
 3114|       |
 3115|   255k|    loLimIndex = 0;
 3116|   255k|    hiLimIndex = 1;
 3117|       |
 3118|  1.86M|    while (hiLimIndex <= tempNoLim) {
  ------------------
  |  Branch (3118:12): [True: 1.61M, False: 255k]
  ------------------
 3119|  1.61M|      FIXP_DBL div_m, oct_m, temp;
 3120|  1.61M|      INT div_e = 0, oct_e = 0, temp_e = 0;
 3121|       |
 3122|  1.61M|      k2 = workLimiterBandTable[hiLimIndex] + lowSubband;
 3123|  1.61M|      kx = workLimiterBandTable[loLimIndex] + lowSubband;
 3124|       |
 3125|  1.61M|      div_m = fDivNorm(k2, kx, &div_e);
 3126|       |
 3127|       |      /* calculate number of octaves */
 3128|  1.61M|      oct_m = fLog2(div_m, div_e, &oct_e);
 3129|       |
 3130|       |      /* multiply with limiterbands per octave    */
 3131|       |      /* values 1, 1.2, 2, 3 -> scale factor of 2 */
 3132|  1.61M|      temp = fMultNorm(
 3133|  1.61M|          oct_m, FDK_sbrDecoder_sbr_limiterBandsPerOctaveDiv4_DBL[limiterBands],
 3134|  1.61M|          &temp_e);
 3135|       |
 3136|       |      /* overall scale factor of temp ist addition of scalefactors from log2
 3137|       |         calculation, limiter bands scalefactor (2) and limiter bands
 3138|       |         multiplication */
 3139|  1.61M|      temp_e += oct_e + 2;
 3140|       |
 3141|       |      /*    div can be a maximum of 64 (k2 = 64 and kx = 1)
 3142|       |         -> oct can be a maximum of 6
 3143|       |         -> temp can be a maximum of 18 (as limiterBandsPerOctoave is a maximum
 3144|       |         factor of 3)
 3145|       |         -> we need a scale factor of 5 for comparisson
 3146|       |      */
 3147|  1.61M|      if (temp >> (5 - temp_e) < FL2FXCONST_DBL(0.49f) >> 5) {
  ------------------
  |  |  192|  1.61M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.61M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.61M, Folded]
  |  |  ------------------
  |  |  194|  1.61M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.61M]
  |  |  ------------------
  |  |  195|  1.61M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.61M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.61M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.61M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.61M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.61M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.61M|          : ((((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 (3147:11): [True: 924k, False: 686k]
  ------------------
 3148|   924k|        if (workLimiterBandTable[hiLimIndex] ==
  ------------------
  |  Branch (3148:13): [True: 49.2k, False: 874k]
  ------------------
 3149|   924k|            workLimiterBandTable[loLimIndex]) {
 3150|  49.2k|          workLimiterBandTable[hiLimIndex] = highSubband;
 3151|  49.2k|          nBands--;
 3152|  49.2k|          hiLimIndex++;
 3153|  49.2k|          continue;
 3154|  49.2k|        }
 3155|   874k|        isPatchBorder[0] = isPatchBorder[1] = 0;
 3156|  3.46M|        for (k = 0; k <= noPatches; k++) {
  ------------------
  |  Branch (3156:21): [True: 2.86M, False: 594k]
  ------------------
 3157|  2.86M|          if (workLimiterBandTable[hiLimIndex] == patchBorders[k]) {
  ------------------
  |  Branch (3157:15): [True: 280k, False: 2.58M]
  ------------------
 3158|   280k|            isPatchBorder[1] = 1;
 3159|   280k|            break;
 3160|   280k|          }
 3161|  2.86M|        }
 3162|   874k|        if (!isPatchBorder[1]) {
  ------------------
  |  Branch (3162:13): [True: 594k, False: 280k]
  ------------------
 3163|   594k|          workLimiterBandTable[hiLimIndex] = highSubband;
 3164|   594k|          nBands--;
 3165|   594k|          hiLimIndex++;
 3166|   594k|          continue;
 3167|   594k|        }
 3168|  1.10M|        for (k = 0; k <= noPatches; k++) {
  ------------------
  |  Branch (3168:21): [True: 948k, False: 155k]
  ------------------
 3169|   948k|          if (workLimiterBandTable[loLimIndex] == patchBorders[k]) {
  ------------------
  |  Branch (3169:15): [True: 124k, False: 823k]
  ------------------
 3170|   124k|            isPatchBorder[0] = 1;
 3171|   124k|            break;
 3172|   124k|          }
 3173|   948k|        }
 3174|   280k|        if (!isPatchBorder[0]) {
  ------------------
  |  Branch (3174:13): [True: 155k, False: 124k]
  ------------------
 3175|   155k|          workLimiterBandTable[loLimIndex] = highSubband;
 3176|   155k|          nBands--;
 3177|   155k|        }
 3178|   280k|      }
 3179|   967k|      loLimIndex = hiLimIndex;
 3180|   967k|      hiLimIndex++;
 3181|   967k|    }
 3182|   255k|    shellsort(workLimiterBandTable, tempNoLim + 1);
 3183|       |
 3184|       |    /* Test if algorithm exceeded maximum allowed limiterbands */
 3185|   255k|    if (nBands > MAX_NUM_LIMITERS || nBands <= 0) {
  ------------------
  |  |  130|   511k|#define MAX_NUM_LIMITERS 12
  ------------------
  |  Branch (3185:9): [True: 0, False: 255k]
  |  Branch (3185:38): [True: 2.65k, False: 253k]
  ------------------
 3186|  2.65k|      return SBRDEC_UNSUPPORTED_CONFIG;
 3187|  2.65k|    }
 3188|       |
 3189|       |    /* Restrict maximum value of limiter band table */
 3190|   253k|    if (workLimiterBandTable[tempNoLim] > highSubband) {
  ------------------
  |  Branch (3190:9): [True: 234, False: 253k]
  ------------------
 3191|    234|      return SBRDEC_UNSUPPORTED_CONFIG;
 3192|    234|    }
 3193|       |
 3194|       |    /* Copy limiterbands from working buffer into final destination */
 3195|  1.31M|    for (k = 0; k <= nBands; k++) {
  ------------------
  |  Branch (3195:17): [True: 1.06M, False: 253k]
  ------------------
 3196|  1.06M|      limiterBandTable[k] = workLimiterBandTable[k];
 3197|  1.06M|    }
 3198|   253k|  }
 3199|   257k|  *noLimiterBands = nBands;
 3200|       |
 3201|   257k|  return SBRDEC_OK;
 3202|   259k|}
env_calc.cpp:_ZL12mapSineFlagsPhiPjS0_S0_iPa:
  258|   259k|{
  259|   259k|  int i;
  260|   259k|  int bitcount = 31;
  261|   259k|  ULONG harmFlagsQmfBands[ADD_HARMONICS_FLAGS_SIZE] = {0};
  ------------------
  |  |  182|   259k|#define ULONG UINT
  ------------------
  262|   259k|  ULONG *curFlags = addHarmonics;
  ------------------
  |  |  182|   259k|#define ULONG UINT
  ------------------
  263|       |
  264|       |  /*
  265|       |    Format of addHarmonics (aligned to MSB):
  266|       |
  267|       |      Up to MAX_FREQ_COEFFS sfb bands can be flagged for a sign.
  268|       |      first word  = flags for lowest 32 sfb bands in use
  269|       |      second word = flags for higest 32 sfb bands (if present)
  270|       |
  271|       |    Format of harmFlagsPrev (aligned to LSB):
  272|       |
  273|       |      Index is absolute (not relative to lsb) so it is correct even if lsb
  274|       |    changes first word  = flags for lowest 32 qmf bands (0...31) second word =
  275|       |    flags for next higher 32 qmf bands (32...63)
  276|       |
  277|       |  */
  278|       |
  279|       |  /* Reset the output vector first */
  280|   259k|  FDKmemset(sineMapped, 32,
  281|   259k|            MAX_FREQ_COEFFS * sizeof(SCHAR)); /* 32 means 'no sine' */
  ------------------
  |  |  140|   259k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|   259k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  282|   259k|  FDKmemclear(harmFlagsPrevActive, ADD_HARMONICS_FLAGS_SIZE * sizeof(ULONG));
  ------------------
  |  |  159|   259k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  283|  2.85M|  for (i = 0; i < nSfb; i++) {
  ------------------
  |  Branch (283:15): [True: 2.59M, False: 259k]
  ------------------
  284|  2.59M|    ULONG maskSfb =
  ------------------
  |  |  182|  2.59M|#define ULONG UINT
  ------------------
  285|  2.59M|        1 << bitcount; /* mask to extract addHarmonics flag of current Sfb */
  286|       |
  287|  2.59M|    if (*curFlags & maskSfb) {          /* There is a sine in this band */
  ------------------
  |  Branch (287:9): [True: 43.8k, False: 2.55M]
  ------------------
  288|  43.8k|      const int lsb = freqBandTable[0]; /* start of sbr range */
  289|       |      /* qmf band to which sine should be added */
  290|  43.8k|      const int qmfBand = (freqBandTable[i] + freqBandTable[i + 1]) >> 1;
  291|  43.8k|      const int qmfBandDiv32 = qmfBand >> 5;
  292|  43.8k|      const int maskQmfBand =
  293|  43.8k|          1 << (qmfBand &
  294|  43.8k|                31); /* mask to extract harmonic flag from prevFlags */
  295|       |
  296|       |      /* mapping of sfb with sine to a certain qmf band -> for harmFlagsPrev */
  297|  43.8k|      harmFlagsQmfBands[qmfBandDiv32] |= maskQmfBand;
  298|       |
  299|       |      /*
  300|       |        If there was a sine in the last frame, let it continue from the first
  301|       |        envelope on else start at the transient position. Indexing of sineMapped
  302|       |        starts relative to lsb.
  303|       |      */
  304|  43.8k|      sineMapped[qmfBand - lsb] =
  305|  43.8k|          (harmFlagsPrev[qmfBandDiv32] & maskQmfBand) ? 0 : tranEnv;
  ------------------
  |  Branch (305:11): [True: 2.80k, False: 41.0k]
  ------------------
  306|  43.8k|      if (sineMapped[qmfBand - lsb] < PVC_NTIMESLOT) {
  ------------------
  |  |  114|  43.8k|#define PVC_NTIMESLOT 16
  ------------------
  |  Branch (306:11): [True: 39.3k, False: 4.43k]
  ------------------
  307|  39.3k|        harmFlagsPrevActive[qmfBandDiv32] |= maskQmfBand;
  308|  39.3k|      }
  309|  43.8k|    }
  310|       |
  311|  2.59M|    if (bitcount-- == 0) {
  ------------------
  |  Branch (311:9): [True: 6.35k, False: 2.58M]
  ------------------
  312|  6.35k|      bitcount = 31;
  313|  6.35k|      curFlags++;
  314|  6.35k|    }
  315|  2.59M|  }
  316|   259k|  FDKmemcpy(harmFlagsPrev, harmFlagsQmfBands,
  317|   259k|            sizeof(ULONG) * ADD_HARMONICS_FLAGS_SIZE);
  ------------------
  |  |  159|   259k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  318|   259k|}
env_calc.cpp:_ZL15apply_inter_tesPPiS0_PK16QMF_SCALE_FACTORPKaiiiiih:
  514|  32.4k|                            const UCHAR gamma_idx) {
  515|  32.4k|  int highSubband = lowSubband + nbSubband;
  516|  32.4k|  FIXP_DBL *subsample_power_high, *subsample_power_low;
  517|  32.4k|  SCHAR *subsample_power_high_sf, *subsample_power_low_sf;
  518|  32.4k|  FIXP_DBL total_power_high = (FIXP_DBL)0;
  519|  32.4k|  FIXP_DBL total_power_low = (FIXP_DBL)0;
  520|  32.4k|  FIXP_DBL *gain;
  521|  32.4k|  int gain_sf[(((1024) / (32) * (4) / 2) + (3 * (4)))];
  522|       |
  523|       |  /* gamma[gamma_idx] = {0.0f, 1.0f, 2.0f, 4.0f} */
  524|  32.4k|  int gamma_sf =
  525|  32.4k|      (int)gamma_idx - 1; /* perhaps +1 to save one bit? (0.99999f vs 1.f) */
  526|       |
  527|  32.4k|  int nbSubsample = stopPos - startPos;
  528|  32.4k|  int i, j;
  529|       |
  530|  32.4k|  C_ALLOC_SCRATCH_START(pTmp, ITES_TEMP, 1);
  ------------------
  |  |  324|  32.4k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  531|  32.4k|  subsample_power_high = pTmp->subsample_power_high;
  532|  32.4k|  subsample_power_low = pTmp->subsample_power_low;
  533|  32.4k|  subsample_power_high_sf = pTmp->subsample_power_high_sf;
  534|  32.4k|  subsample_power_low_sf = pTmp->subsample_power_low_sf;
  535|  32.4k|  gain = pTmp->gain;
  536|       |
  537|  32.4k|  if (gamma_idx > 0) {
  ------------------
  |  Branch (537:7): [True: 10.7k, False: 21.7k]
  ------------------
  538|  10.7k|    int preShift2 = 32 - fNormz((FIXP_DBL)nbSubsample);
  539|  10.7k|    int total_power_low_sf = 1 - DFRACT_BITS;
  ------------------
  |  |  113|  10.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  540|  10.7k|    int total_power_high_sf = 1 - DFRACT_BITS;
  ------------------
  |  |  113|  10.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  541|       |
  542|   449k|    for (i = 0; i < nbSubsample; ++i) {
  ------------------
  |  Branch (542:17): [True: 439k, False: 10.7k]
  ------------------
  543|   439k|      FIXP_DBL bufferReal[(((1024) / (32) * (4) / 2) + (3 * (4)))];
  544|   439k|      FIXP_DBL bufferImag[(((1024) / (32) * (4) / 2) + (3 * (4)))];
  545|   439k|      FIXP_DBL maxVal = (FIXP_DBL)0;
  546|       |
  547|   439k|      int ts = startPos + i;
  548|       |
  549|   439k|      int low_sf = (ts < 3 * RATE) ? sbrScaleFactor->ov_lb_scale
  ------------------
  |  Branch (549:20): [True: 79.1k, False: 359k]
  ------------------
  550|   439k|                                   : sbrScaleFactor->lb_scale;
  551|   439k|      low_sf = 15 - low_sf;
  552|       |
  553|  8.00M|      for (j = 0; j < lowSubband; ++j) {
  ------------------
  |  Branch (553:19): [True: 7.56M, False: 439k]
  ------------------
  554|  7.56M|        bufferImag[j] = qmfImag[startPos + i][j];
  555|  7.56M|        maxVal |= (FIXP_DBL)((LONG)(bufferImag[j]) ^
  556|  7.56M|                             ((LONG)bufferImag[j] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  7.56M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  557|  7.56M|        bufferReal[j] = qmfReal[startPos + i][j];
  558|  7.56M|        maxVal |= (FIXP_DBL)((LONG)(bufferReal[j]) ^
  559|  7.56M|                             ((LONG)bufferReal[j] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  7.56M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  560|  7.56M|      }
  561|       |
  562|   439k|      subsample_power_low[i] = (FIXP_DBL)0;
  563|   439k|      subsample_power_low_sf[i] = 0;
  564|       |
  565|   439k|      if (maxVal != FL2FXCONST_DBL(0.f)) {
  ------------------
  |  |  192|   439k|  (FIXP_DBL)(                                                                \
  |  |  193|   439k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 439k, Folded]
  |  |  ------------------
  |  |  194|   439k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 439k]
  |  |  ------------------
  |  |  195|   439k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   439k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   439k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   439k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   439k|          : ((((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 (565:11): [True: 301k, False: 137k]
  ------------------
  566|       |        /* multiply first, then shift for safe summation */
  567|   301k|        int preShift = 1 - CntLeadingZeros(maxVal);
  ------------------
  |  |  308|   301k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  568|   301k|        int postShift = 32 - fNormz((FIXP_DBL)lowSubband);
  569|       |
  570|       |        /* reduce preShift because otherwise we risk to square -1.f */
  571|   301k|        if (preShift != 0) preShift++;
  ------------------
  |  Branch (571:13): [True: 161k, False: 140k]
  ------------------
  572|       |
  573|   301k|        subsample_power_low_sf[i] += (low_sf + preShift) * 2 + postShift + 1;
  574|       |
  575|   301k|        scaleValues(bufferReal, lowSubband, -preShift);
  576|   301k|        scaleValues(bufferImag, lowSubband, -preShift);
  577|  5.56M|        for (j = 0; j < lowSubband; ++j) {
  ------------------
  |  Branch (577:21): [True: 5.26M, False: 301k]
  ------------------
  578|  5.26M|          FIXP_DBL addme;
  579|  5.26M|          addme = fPow2Div2(bufferReal[j]);
  580|  5.26M|          subsample_power_low[i] += addme >> postShift;
  581|  5.26M|          addme = fPow2Div2(bufferImag[j]);
  582|  5.26M|          subsample_power_low[i] += addme >> postShift;
  583|  5.26M|        }
  584|   301k|      }
  585|       |
  586|       |      /* now get high */
  587|       |
  588|   439k|      maxVal = (FIXP_DBL)0;
  589|       |
  590|   439k|      int high_sf = exp[(ts < 16 * RATE) ? 0 : 1];
  ------------------
  |  Branch (590:25): [True: 438k, False: 742]
  ------------------
  591|       |
  592|  10.0M|      for (j = lowSubband; j < highSubband; ++j) {
  ------------------
  |  Branch (592:28): [True: 9.64M, False: 439k]
  ------------------
  593|  9.64M|        bufferImag[j] = qmfImag[startPos + i][j];
  594|  9.64M|        maxVal |= (FIXP_DBL)((LONG)(bufferImag[j]) ^
  595|  9.64M|                             ((LONG)bufferImag[j] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  9.64M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  596|  9.64M|        bufferReal[j] = qmfReal[startPos + i][j];
  597|  9.64M|        maxVal |= (FIXP_DBL)((LONG)(bufferReal[j]) ^
  598|  9.64M|                             ((LONG)bufferReal[j] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  9.64M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  599|  9.64M|      }
  600|       |
  601|   439k|      subsample_power_high[i] = (FIXP_DBL)0;
  602|   439k|      subsample_power_high_sf[i] = 0;
  603|       |
  604|   439k|      if (maxVal != FL2FXCONST_DBL(0.f)) {
  ------------------
  |  |  192|   439k|  (FIXP_DBL)(                                                                \
  |  |  193|   439k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 439k, Folded]
  |  |  ------------------
  |  |  194|   439k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 439k]
  |  |  ------------------
  |  |  195|   439k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   439k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   439k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   439k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   439k|          : ((((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 (604:11): [True: 420k, False: 18.0k]
  ------------------
  605|   420k|        int preShift = 1 - CntLeadingZeros(maxVal);
  ------------------
  |  |  308|   420k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  606|       |        /* reduce preShift because otherwise we risk to square -1.f */
  607|   420k|        if (preShift != 0) preShift++;
  ------------------
  |  Branch (607:13): [True: 420k, False: 55]
  ------------------
  608|       |
  609|   420k|        int postShift = 32 - fNormz((FIXP_DBL)(highSubband - lowSubband));
  610|   420k|        subsample_power_high_sf[i] += (high_sf + preShift) * 2 + postShift + 1;
  611|       |
  612|   420k|        scaleValues(&bufferReal[lowSubband], highSubband - lowSubband,
  613|   420k|                    -preShift);
  614|   420k|        scaleValues(&bufferImag[lowSubband], highSubband - lowSubband,
  615|   420k|                    -preShift);
  616|  9.33M|        for (j = lowSubband; j < highSubband; j++) {
  ------------------
  |  Branch (616:30): [True: 8.91M, False: 420k]
  ------------------
  617|  8.91M|          subsample_power_high[i] += fPow2Div2(bufferReal[j]) >> postShift;
  618|  8.91M|          subsample_power_high[i] += fPow2Div2(bufferImag[j]) >> postShift;
  619|  8.91M|        }
  620|   420k|      }
  621|       |
  622|       |      /* sum all together */
  623|   439k|      FIXP_DBL new_summand = subsample_power_low[i];
  624|   439k|      int new_summand_sf = subsample_power_low_sf[i];
  625|       |
  626|       |      /* make sure the current sum, and the new summand have the same SF */
  627|   439k|      if (new_summand_sf > total_power_low_sf) {
  ------------------
  |  Branch (627:11): [True: 23.0k, False: 416k]
  ------------------
  628|  23.0k|        int diff = fMin(DFRACT_BITS - 1, new_summand_sf - total_power_low_sf);
  ------------------
  |  |  113|  23.0k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  629|  23.0k|        total_power_low >>= diff;
  630|  23.0k|        total_power_low_sf = new_summand_sf;
  631|   416k|      } else if (new_summand_sf < total_power_low_sf) {
  ------------------
  |  Branch (631:18): [True: 126k, False: 289k]
  ------------------
  632|   126k|        new_summand >>=
  633|   126k|            fMin(DFRACT_BITS - 1, total_power_low_sf - new_summand_sf);
  ------------------
  |  |  113|   126k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  634|   126k|      }
  635|       |
  636|   439k|      total_power_low += (new_summand >> preShift2);
  637|       |
  638|   439k|      new_summand = subsample_power_high[i];
  639|   439k|      new_summand_sf = subsample_power_high_sf[i];
  640|   439k|      if (new_summand_sf > total_power_high_sf) {
  ------------------
  |  Branch (640:11): [True: 20.6k, False: 418k]
  ------------------
  641|  20.6k|        total_power_high >>=
  642|  20.6k|            fMin(DFRACT_BITS - 1, new_summand_sf - total_power_high_sf);
  ------------------
  |  |  113|  20.6k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  643|  20.6k|        total_power_high_sf = new_summand_sf;
  644|   418k|      } else if (new_summand_sf < total_power_high_sf) {
  ------------------
  |  Branch (644:18): [True: 159k, False: 258k]
  ------------------
  645|   159k|        new_summand >>=
  646|   159k|            fMin(DFRACT_BITS - 1, total_power_high_sf - new_summand_sf);
  ------------------
  |  |  113|   159k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  647|   159k|      }
  648|       |
  649|   439k|      total_power_high += (new_summand >> preShift2);
  650|   439k|    }
  651|       |
  652|  10.7k|    total_power_low_sf += preShift2;
  653|  10.7k|    total_power_high_sf += preShift2;
  654|       |
  655|       |    /* gain[i] = e_LOW[i] */
  656|   449k|    for (i = 0; i < nbSubsample; ++i) {
  ------------------
  |  Branch (656:17): [True: 439k, False: 10.7k]
  ------------------
  657|   439k|      int sf2;
  658|   439k|      FIXP_DBL mult =
  659|   439k|          fMultNorm(subsample_power_low[i], (FIXP_DBL)nbSubsample, &sf2);
  660|   439k|      int mult_sf = subsample_power_low_sf[i] + DFRACT_BITS - 1 + sf2;
  ------------------
  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  661|       |
  662|   439k|      if (total_power_low != FIXP_DBL(0)) {
  ------------------
  |  Branch (662:11): [True: 344k, False: 94.4k]
  ------------------
  663|   344k|        gain[i] = fDivNorm(mult, total_power_low, &sf2);
  664|   344k|        gain_sf[i] = mult_sf - total_power_low_sf + sf2;
  665|   344k|        gain[i] = sqrtFixp_lookup(gain[i], &gain_sf[i]);
  666|   344k|        if (gain_sf[i] < 0) {
  ------------------
  |  Branch (666:13): [True: 96.0k, False: 248k]
  ------------------
  667|  96.0k|          gain[i] >>= fMin(DFRACT_BITS - 1, -gain_sf[i]);
  ------------------
  |  |  113|  96.0k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  668|  96.0k|          gain_sf[i] = 0;
  669|  96.0k|        }
  670|   344k|      } else {
  671|  94.4k|        if (mult == FIXP_DBL(0)) {
  ------------------
  |  Branch (671:13): [True: 93.8k, False: 614]
  ------------------
  672|  93.8k|          gain[i] = FIXP_DBL(0);
  673|  93.8k|          gain_sf[i] = 0;
  674|  93.8k|        } else {
  675|    614|          gain[i] = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|    614|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  676|    614|          gain_sf[i] = 0;
  677|    614|        }
  678|  94.4k|      }
  679|   439k|    }
  680|       |
  681|  10.7k|    FIXP_DBL total_power_high_after = (FIXP_DBL)0;
  682|  10.7k|    int total_power_high_after_sf = 1 - DFRACT_BITS;
  ------------------
  |  |  113|  10.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  683|       |
  684|       |    /* gain[i] = g_inter[i] */
  685|   449k|    for (i = 0; i < nbSubsample; ++i) {
  ------------------
  |  Branch (685:17): [True: 439k, False: 10.7k]
  ------------------
  686|       |      /* calculate: gain[i] = 1.0f + gamma * (gain[i] - 1.0f); */
  687|   439k|      FIXP_DBL one = (FIXP_DBL)MAXVAL_DBL >>
  ------------------
  |  |  156|   439k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  688|   439k|                     gain_sf[i]; /* to substract this from gain[i] */
  689|       |
  690|       |      /* gamma is actually always 1 according to the table, so skip the
  691|       |       * fMultDiv2 */
  692|   439k|      FIXP_DBL mult = (gain[i] - one) >> 1;
  693|   439k|      int mult_sf = gain_sf[i] + gamma_sf;
  694|       |
  695|   439k|      one = FL2FXCONST_DBL(0.5f) >> mult_sf;
  ------------------
  |  |  192|   439k|  (FIXP_DBL)(                                                                \
  |  |  193|   439k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 439k, Folded]
  |  |  ------------------
  |  |  194|   439k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 439k]
  |  |  ------------------
  |  |  195|   439k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   439k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   439k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   439k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   439k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|   439k|      gain[i] = one + mult;
  697|   439k|      gain_sf[i] += gamma_sf + 1; /* +1 because of fMultDiv2() */
  698|       |
  699|       |      /* set gain to at least 0.2f */
  700|       |      /* limit and calculate gain[i]^2 too */
  701|   439k|      FIXP_DBL gain_pow2;
  702|   439k|      int gain_pow2_sf;
  703|       |
  704|   439k|      if (fIsLessThan(gain[i], gain_sf[i], FL2FXCONST_DBL(0.2f), 0)) {
  ------------------
  |  |  192|   439k|  (FIXP_DBL)(                                                                \
  |  |  193|   439k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 439k, Folded]
  |  |  ------------------
  |  |  194|   439k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 439k]
  |  |  ------------------
  |  |  195|   439k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   439k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   439k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   439k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   439k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   439k|          : ((((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 (704:11): [True: 243k, False: 195k]
  ------------------
  705|   243k|        gain[i] = FL2FXCONST_DBL(0.8f);
  ------------------
  |  |  192|   243k|  (FIXP_DBL)(                                                                \
  |  |  193|   243k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 243k, Folded]
  |  |  ------------------
  |  |  194|   243k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   243k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   243k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 243k]
  |  |  ------------------
  |  |  195|   243k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   243k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   243k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   243k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   243k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   243k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   243k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  706|   243k|        gain_sf[i] = -2;
  707|   243k|        gain_pow2 = FL2FXCONST_DBL(0.64f);
  ------------------
  |  |  192|   243k|  (FIXP_DBL)(                                                                \
  |  |  193|   243k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 243k, Folded]
  |  |  ------------------
  |  |  194|   243k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   243k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   243k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 243k]
  |  |  ------------------
  |  |  195|   243k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   243k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   243k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   243k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   243k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   243k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   243k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  708|   243k|        gain_pow2_sf = -4;
  709|   243k|      } else {
  710|       |        /* this upscaling seems quite important */
  711|   195k|        int r = CountLeadingBits(gain[i]);
  ------------------
  |  |  309|   195k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  712|   195k|        gain[i] <<= r;
  713|   195k|        gain_sf[i] -= r;
  714|       |
  715|   195k|        gain_pow2 = fPow2(gain[i]);
  716|   195k|        gain_pow2_sf = gain_sf[i] << 1;
  717|   195k|      }
  718|       |
  719|   439k|      int room;
  720|   439k|      subsample_power_high[i] =
  721|   439k|          fMultNorm(subsample_power_high[i], gain_pow2, &room);
  722|   439k|      subsample_power_high_sf[i] =
  723|   439k|          subsample_power_high_sf[i] + gain_pow2_sf + room;
  724|       |
  725|   439k|      int new_summand_sf = subsample_power_high_sf[i]; /* + gain_pow2_sf; */
  726|   439k|      if (new_summand_sf > total_power_high_after_sf) {
  ------------------
  |  Branch (726:11): [True: 35.7k, False: 403k]
  ------------------
  727|  35.7k|        total_power_high_after >>=
  728|  35.7k|            fMin(DFRACT_BITS - 1, new_summand_sf - total_power_high_after_sf);
  ------------------
  |  |  113|  35.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  729|  35.7k|        total_power_high_after_sf = new_summand_sf;
  730|   403k|      } else if (new_summand_sf < total_power_high_after_sf) {
  ------------------
  |  Branch (730:18): [True: 274k, False: 128k]
  ------------------
  731|   274k|        subsample_power_high[i] >>=
  732|   274k|            fMin(DFRACT_BITS - 1, total_power_high_after_sf - new_summand_sf);
  ------------------
  |  |  113|   274k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  733|   274k|      }
  734|   439k|      total_power_high_after += subsample_power_high[i] >> preShift2;
  735|   439k|    }
  736|       |
  737|  10.7k|    total_power_high_after_sf += preShift2;
  738|       |
  739|  10.7k|    int sf2 = 0;
  740|  10.7k|    FIXP_DBL gain_adj_2 = FL2FX_DBL(0.5f);
  ------------------
  |  |  210|  10.7k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|  10.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  10.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [True: 10.7k, Folded]
  |  |  ------------------
  |  |  211|  10.7k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  741|  10.7k|    int gain_adj_2_sf = 1;
  742|       |
  743|  10.7k|    if ((total_power_high != (FIXP_DBL)0) &&
  ------------------
  |  Branch (743:9): [True: 10.2k, False: 411]
  ------------------
  744|  10.2k|        (total_power_high_after != (FIXP_DBL)0)) {
  ------------------
  |  Branch (744:9): [True: 10.2k, False: 6]
  ------------------
  745|  10.2k|      gain_adj_2 = fDivNorm(total_power_high, total_power_high_after, &sf2);
  746|  10.2k|      gain_adj_2_sf = total_power_high_sf - total_power_high_after_sf + sf2;
  747|  10.2k|    }
  748|       |
  749|  10.7k|    FIXP_DBL gain_adj = sqrtFixp_lookup(gain_adj_2, &gain_adj_2_sf);
  750|  10.7k|    int gain_adj_sf = gain_adj_2_sf;
  751|       |
  752|   449k|    for (i = 0; i < nbSubsample; ++i) {
  ------------------
  |  Branch (752:17): [True: 439k, False: 10.7k]
  ------------------
  753|   439k|      int gain_e = fMax(
  754|   439k|          fMin(gain_sf[i] + gain_adj_sf - INTER_TES_SF_CHANGE, DFRACT_BITS - 1),
  ------------------
  |  |  499|   439k|#define INTER_TES_SF_CHANGE 4
  ------------------
                        fMin(gain_sf[i] + gain_adj_sf - INTER_TES_SF_CHANGE, DFRACT_BITS - 1),
  ------------------
  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  755|   439k|          -(DFRACT_BITS - 1));
  ------------------
  |  |  113|   439k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  756|   439k|      FIXP_DBL gain_final = fMult(gain[i], gain_adj);
  757|   439k|      gain_final = scaleValueSaturate(gain_final, gain_e);
  758|       |
  759|  10.0M|      for (j = lowSubband; j < highSubband; j++) {
  ------------------
  |  Branch (759:28): [True: 9.64M, False: 439k]
  ------------------
  760|  9.64M|        qmfReal[startPos + i][j] = fMult(qmfReal[startPos + i][j], gain_final);
  761|  9.64M|        qmfImag[startPos + i][j] = fMult(qmfImag[startPos + i][j], gain_final);
  762|  9.64M|      }
  763|   439k|    }
  764|  21.7k|  } else { /* gamma_idx == 0 */
  765|       |    /* Inter-TES is not active. Still perform the scale change to have a
  766|       |     * consistent scaling for all envelopes of this frame. */
  767|   682k|    for (i = 0; i < nbSubsample; ++i) {
  ------------------
  |  Branch (767:17): [True: 661k, False: 21.7k]
  ------------------
  768|  19.0M|      for (j = lowSubband; j < highSubband; j++) {
  ------------------
  |  Branch (768:28): [True: 18.4M, False: 661k]
  ------------------
  769|  18.4M|        qmfReal[startPos + i][j] >>= INTER_TES_SF_CHANGE;
  ------------------
  |  |  499|  18.4M|#define INTER_TES_SF_CHANGE 4
  ------------------
  770|  18.4M|        qmfImag[startPos + i][j] >>= INTER_TES_SF_CHANGE;
  ------------------
  |  |  499|  18.4M|#define INTER_TES_SF_CHANGE 4
  ------------------
  771|  18.4M|      }
  772|   661k|    }
  773|  21.7k|  }
  774|  32.4k|  C_ALLOC_SCRATCH_END(pTmp, ITES_TEMP, 1);
  775|  32.4k|}
env_calc.cpp:_ZL21equalizeFiltBufferExpPiPaS_S0_i:
 1820|  1.51M|{
 1821|  1.51M|  int band;
 1822|  1.51M|  int diff;
 1823|       |
 1824|  37.3M|  for (band = 0; band < subbands; band++) {
  ------------------
  |  Branch (1824:18): [True: 35.8M, False: 1.51M]
  ------------------
 1825|  35.8M|    diff = (int)(nrgGain_e[band] - filtBuffer_e[band]);
 1826|  35.8M|    if (diff > 0) {
  ------------------
  |  Branch (1826:9): [True: 1.85M, False: 34.0M]
  ------------------
 1827|  1.85M|      filtBuffer[band] >>=
 1828|  1.85M|          fMin(diff, DFRACT_BITS - 1); /* Compensate for the scale change by
  ------------------
  |  |  113|  1.85M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1829|       |                                          shifting the mantissa. */
 1830|  1.85M|      filtBuffer_e[band] += diff; /* New gain is bigger, use its exponent */
 1831|  34.0M|    } else if (diff < 0) {
  ------------------
  |  Branch (1831:16): [True: 26.2M, False: 7.79M]
  ------------------
 1832|       |      /* The buffered gains seem to be larger, but maybe there
 1833|       |         are some unused bits left in the mantissa */
 1834|       |
 1835|  26.2M|      int reserve = CntLeadingZeros(fixp_abs(filtBuffer[band])) - 1;
  ------------------
  |  |  308|  26.2M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 1836|       |
 1837|  26.2M|      if ((-diff) <= reserve) {
  ------------------
  |  Branch (1837:11): [True: 22.0M, False: 4.20M]
  ------------------
 1838|       |        /* There is enough space in the buffered mantissa so
 1839|       |           that we can take the new exponent as common.
 1840|       |        */
 1841|  22.0M|        filtBuffer[band] <<= (-diff);
 1842|  22.0M|        filtBuffer_e[band] += diff; /* becomes equal to *ptrNewExp */
 1843|  22.0M|      } else {
 1844|  4.20M|        filtBuffer[band] <<=
 1845|  4.20M|            reserve; /* Shift the mantissa as far as possible: */
 1846|  4.20M|        filtBuffer_e[band] -= reserve; /* Compensate in the exponent: */
 1847|       |
 1848|       |        /* For the remaining difference, change the new gain value */
 1849|  4.20M|        diff = -(reserve + diff);
 1850|  4.20M|        nrgGain[band] >>= fMin(diff, DFRACT_BITS - 1);
  ------------------
  |  |  113|  4.20M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1851|  4.20M|        nrgGain_e[band] += diff;
 1852|  4.20M|      }
 1853|  26.2M|    }
 1854|  35.8M|  }
 1855|  1.51M|}
env_calc.cpp:_ZL19FDK_get_maxval_realiPii:
 1890|  4.43M|                                           INT width) {
 1891|  4.43M|  maxVal = (FIXP_DBL)0;
 1892|   116M|  while (width-- != 0) {
  ------------------
  |  Branch (1892:10): [True: 112M, False: 4.43M]
  ------------------
 1893|   112M|    FIXP_DBL tmp = *(reTmp++);
 1894|   112M|    maxVal |= (FIXP_DBL)((LONG)(tmp) ^ ((LONG)tmp >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|   112M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1895|   112M|  }
 1896|       |
 1897|  4.43M|  return maxVal;
 1898|  4.43M|}
env_calc.cpp:_ZL17calcNrgPerSubbandPPiS0_iiiiaS_Pa:
 1994|  1.53M|{
 1995|  1.53M|  FIXP_SGL invWidth;
 1996|  1.53M|  SCHAR preShift;
 1997|  1.53M|  SCHAR shift;
 1998|  1.53M|  FIXP_DBL sum;
 1999|  1.53M|  int k;
 2000|       |
 2001|       |  /* Divide by width of envelope later: */
 2002|  1.53M|  invWidth = FX_DBL2FX_SGL(GetInvInt(next_pos - start_pos));
  ------------------
  |  |  220|  1.53M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.53M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.53M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2003|       |  /* The common exponent needs to be doubled because all mantissas are squared:
 2004|       |   */
 2005|  1.53M|  frameExp = frameExp << 1;
 2006|       |
 2007|  37.6M|  for (k = lowSubband; k < highSubband; k++) {
  ------------------
  |  Branch (2007:24): [True: 36.0M, False: 1.53M]
  ------------------
 2008|  36.0M|    FIXP_DBL bufferReal[(((1024) / (32) * (4) / 2) + (3 * (4)))];
 2009|  36.0M|    FIXP_DBL bufferImag[(((1024) / (32) * (4) / 2) + (3 * (4)))];
 2010|  36.0M|    FIXP_DBL maxVal;
 2011|       |
 2012|  36.0M|    if (analysBufferImag != NULL) {
  ------------------
  |  Branch (2012:9): [True: 35.5M, False: 553k]
  ------------------
 2013|  35.5M|      int l;
 2014|  35.5M|      maxVal = FL2FX_DBL(0.0f);
  ------------------
  |  |  210|  35.5M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 35.5M]
  |  |  ------------------
  |  |  211|  35.5M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  35.5M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  35.5M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2015|   226M|      for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2015:27): [True: 191M, False: 35.5M]
  ------------------
 2016|   191M|        bufferImag[l] = analysBufferImag[l][k];
 2017|   191M|        maxVal |= (FIXP_DBL)((LONG)(bufferImag[l]) ^
 2018|   191M|                             ((LONG)bufferImag[l] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|   191M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 2019|   191M|        bufferReal[l] = analysBufferReal[l][k];
 2020|   191M|        maxVal |= (FIXP_DBL)((LONG)(bufferReal[l]) ^
 2021|   191M|                             ((LONG)bufferReal[l] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|   191M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 2022|   191M|      }
 2023|  35.5M|    } else {
 2024|   553k|      int l;
 2025|   553k|      maxVal = FL2FX_DBL(0.0f);
  ------------------
  |  |  210|   553k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 553k]
  |  |  ------------------
  |  |  211|   553k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   553k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   553k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2026|  15.5M|      for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2026:27): [True: 15.0M, False: 553k]
  ------------------
 2027|  15.0M|        bufferReal[l] = analysBufferReal[l][k];
 2028|  15.0M|        maxVal |= (FIXP_DBL)((LONG)(bufferReal[l]) ^
 2029|  15.0M|                             ((LONG)bufferReal[l] >> (DFRACT_BITS - 1)));
  ------------------
  |  |  113|  15.0M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 2030|  15.0M|      }
 2031|   553k|    }
 2032|       |
 2033|  36.0M|    if (maxVal != FL2FXCONST_DBL(0.f)) {
  ------------------
  |  |  192|  36.0M|  (FIXP_DBL)(                                                                \
  |  |  193|  36.0M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 36.0M, Folded]
  |  |  ------------------
  |  |  194|  36.0M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  36.0M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  36.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 36.0M]
  |  |  ------------------
  |  |  195|  36.0M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  36.0M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  36.0M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  36.0M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  36.0M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  36.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  36.0M|          : ((((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 (2033:9): [True: 24.3M, False: 11.7M]
  ------------------
 2034|       |      /* If the accu does not provide enough overflow bits, we cannot
 2035|       |         shift the samples up to the limit.
 2036|       |         Instead, keep up to 3 free bits in each sample, i.e. up to
 2037|       |         6 bits after calculation of square.
 2038|       |         Please note the comment on saturated arithmetic above!
 2039|       |      */
 2040|  24.3M|      FIXP_DBL accu;
 2041|  24.3M|      preShift = CntLeadingZeros(maxVal) - 1;
  ------------------
  |  |  308|  24.3M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 2042|  24.3M|      preShift -= SHIFT_BEFORE_SQUARE;
  ------------------
  |  | 1959|  24.3M|#define SHIFT_BEFORE_SQUARE (4) /* ((8 - 0) / 2) */
  ------------------
 2043|       |
 2044|       |      /* Limit preShift to a maximum value to prevent accumulator overflow in
 2045|       |         exceptional situations where the signal in the analysis-buffer is very
 2046|       |         small (small maxVal).
 2047|       |      */
 2048|  24.3M|      preShift = fMin(preShift, (SCHAR)25);
 2049|       |
 2050|  24.3M|      accu = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  24.3M|  (FIXP_DBL)(                                                                \
  |  |  193|  24.3M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 24.3M, Folded]
  |  |  ------------------
  |  |  194|  24.3M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  24.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 24.3M]
  |  |  ------------------
  |  |  195|  24.3M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  24.3M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  24.3M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  24.3M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  24.3M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.3M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  24.3M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2051|  24.3M|      if (preShift >= 0) {
  ------------------
  |  Branch (2051:11): [True: 23.6M, False: 684k]
  ------------------
 2052|  23.6M|        int l;
 2053|  23.6M|        if (analysBufferImag != NULL) {
  ------------------
  |  Branch (2053:13): [True: 23.5M, False: 87.3k]
  ------------------
 2054|   131M|          for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2054:31): [True: 108M, False: 23.5M]
  ------------------
 2055|   108M|            FIXP_DBL temp1 = bufferReal[l] << (int)preShift;
 2056|   108M|            FIXP_DBL temp2 = bufferImag[l] << (int)preShift;
 2057|   108M|            accu = fPow2AddDiv2(accu, temp1);
 2058|   108M|            accu = fPow2AddDiv2(accu, temp2);
 2059|   108M|          }
 2060|  23.5M|        } else {
 2061|  1.49M|          for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2061:31): [True: 1.41M, False: 87.3k]
  ------------------
 2062|  1.41M|            FIXP_DBL temp = bufferReal[l] << (int)preShift;
 2063|  1.41M|            accu = fPow2AddDiv2(accu, temp);
 2064|  1.41M|          }
 2065|  87.3k|        }
 2066|  23.6M|      } else { /* if negative shift value */
 2067|   684k|        int l;
 2068|   684k|        int negpreShift = -preShift;
 2069|   684k|        if (analysBufferImag != NULL) {
  ------------------
  |  Branch (2069:13): [True: 679k, False: 4.98k]
  ------------------
 2070|  5.95M|          for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2070:31): [True: 5.27M, False: 679k]
  ------------------
 2071|  5.27M|            FIXP_DBL temp1 = bufferReal[l] >> (int)negpreShift;
 2072|  5.27M|            FIXP_DBL temp2 = bufferImag[l] >> (int)negpreShift;
 2073|  5.27M|            accu = fPow2AddDiv2(accu, temp1);
 2074|  5.27M|            accu = fPow2AddDiv2(accu, temp2);
 2075|  5.27M|          }
 2076|   679k|        } else {
 2077|  95.1k|          for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2077:31): [True: 90.2k, False: 4.98k]
  ------------------
 2078|  90.2k|            FIXP_DBL temp = bufferReal[l] >> (int)negpreShift;
 2079|  90.2k|            accu = fPow2AddDiv2(accu, temp);
 2080|  90.2k|          }
 2081|  4.98k|        }
 2082|   684k|      }
 2083|  24.3M|      accu <<= 1;
 2084|       |
 2085|       |      /* Convert double precision to Mantissa/Exponent: */
 2086|  24.3M|      shift = fNorm(accu);
 2087|  24.3M|      sum = accu << (int)shift;
 2088|       |
 2089|       |      /* Divide by width of envelope and apply frame scale: */
 2090|  24.3M|      *nrgEst++ = fMult(sum, invWidth);
 2091|  24.3M|      shift += 2 * preShift;
 2092|  24.3M|      if (analysBufferImag != NULL)
  ------------------
  |  Branch (2092:11): [True: 24.2M, False: 92.3k]
  ------------------
 2093|  24.2M|        *nrgEst_e++ = frameExp - shift;
 2094|  92.3k|      else
 2095|  92.3k|        *nrgEst_e++ = frameExp - shift + 1; /* +1 due to missing imag. part */
 2096|  24.3M|    }                                       /* maxVal!=0 */
 2097|  11.7M|    else {
 2098|       |      /* Prevent a zero-mantissa-number from being misinterpreted
 2099|       |         due to its exponent. */
 2100|  11.7M|      *nrgEst++ = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  11.7M|  (FIXP_DBL)(                                                                \
  |  |  193|  11.7M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 11.7M, Folded]
  |  |  ------------------
  |  |  194|  11.7M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  11.7M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  11.7M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 11.7M]
  |  |  ------------------
  |  |  195|  11.7M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  11.7M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  11.7M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  11.7M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  11.7M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  11.7M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  11.7M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2101|  11.7M|      *nrgEst_e++ = 0;
 2102|  11.7M|    }
 2103|  36.0M|  }
 2104|  1.53M|}
env_calc.cpp:_ZL13calcNrgPerSfbPPiS0_iPhiiaS_Pa:
 2122|  30.8k|{
 2123|  30.8k|  FIXP_SGL invWidth;
 2124|  30.8k|  FIXP_DBL temp;
 2125|  30.8k|  SCHAR preShift;
 2126|  30.8k|  SCHAR shift, sum_e;
 2127|  30.8k|  FIXP_DBL sum;
 2128|       |
 2129|  30.8k|  int j, k, l, li, ui;
 2130|  30.8k|  FIXP_DBL sumAll, sumLine; /* Single precision would be sufficient,
 2131|       |                             but overflow bits are required for accumulation */
 2132|       |
 2133|       |  /* Divide by width of envelope later: */
 2134|  30.8k|  invWidth = FX_DBL2FX_SGL(GetInvInt(next_pos - start_pos));
  ------------------
  |  |  220|  30.8k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  30.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  30.8k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2135|       |  /* The common exponent needs to be doubled because all mantissas are squared:
 2136|       |   */
 2137|  30.8k|  input_e = input_e << 1;
 2138|       |
 2139|   249k|  for (j = 0; j < nSfb; j++) {
  ------------------
  |  Branch (2139:15): [True: 218k, False: 30.8k]
  ------------------
 2140|   218k|    li = freqBandTable[j];
 2141|   218k|    ui = freqBandTable[j + 1];
 2142|       |
 2143|   218k|    FIXP_DBL maxVal = maxSubbandSample(analysBufferReal, analysBufferImag, li,
 2144|   218k|                                       ui, start_pos, next_pos);
 2145|       |
 2146|   218k|    if (maxVal != FL2FXCONST_DBL(0.f)) {
  ------------------
  |  |  192|   218k|  (FIXP_DBL)(                                                                \
  |  |  193|   218k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 218k, Folded]
  |  |  ------------------
  |  |  194|   218k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   218k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   218k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 218k]
  |  |  ------------------
  |  |  195|   218k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   218k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   218k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   218k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   218k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   218k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   218k|          : ((((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 (2146:9): [True: 142k, False: 75.6k]
  ------------------
 2147|   142k|      preShift = CntLeadingZeros(maxVal) - 1;
  ------------------
  |  |  308|   142k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 2148|       |
 2149|       |      /* If the accu does not provide enough overflow bits, we cannot
 2150|       |         shift the samples up to the limit.
 2151|       |         Instead, keep up to 3 free bits in each sample, i.e. up to
 2152|       |         6 bits after calculation of square.
 2153|       |         Please note the comment on saturated arithmetic above!
 2154|       |      */
 2155|   142k|      preShift -= SHIFT_BEFORE_SQUARE;
  ------------------
  |  | 1959|   142k|#define SHIFT_BEFORE_SQUARE (4) /* ((8 - 0) / 2) */
  ------------------
 2156|       |
 2157|   142k|      sumAll = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   142k|  (FIXP_DBL)(                                                                \
  |  |  193|   142k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 142k, Folded]
  |  |  ------------------
  |  |  194|   142k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   142k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   142k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 142k]
  |  |  ------------------
  |  |  195|   142k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   142k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   142k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   142k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   142k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   142k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   142k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2158|       |
 2159|   380k|      for (k = li; k < ui; k++) {
  ------------------
  |  Branch (2159:20): [True: 238k, False: 142k]
  ------------------
 2160|   238k|        sumLine = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   238k|  (FIXP_DBL)(                                                                \
  |  |  193|   238k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 238k, Folded]
  |  |  ------------------
  |  |  194|   238k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   238k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   238k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 238k]
  |  |  ------------------
  |  |  195|   238k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   238k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   238k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   238k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   238k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   238k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   238k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2161|       |
 2162|   238k|        if (analysBufferImag != NULL) {
  ------------------
  |  Branch (2162:13): [True: 198k, False: 39.7k]
  ------------------
 2163|   198k|          if (preShift >= 0) {
  ------------------
  |  Branch (2163:15): [True: 191k, False: 7.26k]
  ------------------
 2164|  7.98M|            for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2164:33): [True: 7.79M, False: 191k]
  ------------------
 2165|  7.79M|              temp = analysBufferReal[l][k] << (int)preShift;
 2166|  7.79M|              sumLine += fPow2Div2(temp);
 2167|  7.79M|              temp = analysBufferImag[l][k] << (int)preShift;
 2168|  7.79M|              sumLine += fPow2Div2(temp);
 2169|  7.79M|            }
 2170|   191k|          } else {
 2171|   131k|            for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2171:33): [True: 124k, False: 7.26k]
  ------------------
 2172|   124k|              temp = analysBufferReal[l][k] >> -(int)preShift;
 2173|   124k|              sumLine += fPow2Div2(temp);
 2174|   124k|              temp = analysBufferImag[l][k] >> -(int)preShift;
 2175|   124k|              sumLine += fPow2Div2(temp);
 2176|   124k|            }
 2177|  7.26k|          }
 2178|   198k|        } else {
 2179|  39.7k|          if (preShift >= 0) {
  ------------------
  |  Branch (2179:15): [True: 36.1k, False: 3.63k]
  ------------------
 2180|   727k|            for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2180:33): [True: 690k, False: 36.1k]
  ------------------
 2181|   690k|              temp = analysBufferReal[l][k] << (int)preShift;
 2182|   690k|              sumLine += fPow2Div2(temp);
 2183|   690k|            }
 2184|  36.1k|          } else {
 2185|  64.7k|            for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (2185:33): [True: 61.1k, False: 3.63k]
  ------------------
 2186|  61.1k|              temp = analysBufferReal[l][k] >> -(int)preShift;
 2187|  61.1k|              sumLine += fPow2Div2(temp);
 2188|  61.1k|            }
 2189|  3.63k|          }
 2190|  39.7k|        }
 2191|       |
 2192|       |        /* The number of QMF-channels per SBR bands may be up to 15.
 2193|       |           Shift right to avoid overflows in sum over all channels. */
 2194|   238k|        sumLine = sumLine >> (4 - 1);
 2195|   238k|        sumAll += sumLine;
 2196|   238k|      }
 2197|       |
 2198|       |      /* Convert double precision to Mantissa/Exponent: */
 2199|   142k|      shift = fNorm(sumAll);
 2200|   142k|      sum = sumAll << (int)shift;
 2201|       |
 2202|       |      /* Divide by width of envelope: */
 2203|   142k|      sum = fMult(sum, invWidth);
 2204|       |
 2205|       |      /* Divide by width of Sfb: */
 2206|   142k|      sum = fMult(sum, FX_DBL2FX_SGL(GetInvInt(ui - li)));
  ------------------
  |  |  220|   142k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   142k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   142k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2207|       |
 2208|       |      /* Set all Subband energies in the Sfb to the average energy: */
 2209|   142k|      if (analysBufferImag != NULL)
  ------------------
  |  Branch (2209:11): [True: 128k, False: 13.9k]
  ------------------
 2210|   128k|        sum_e = input_e + 4 - shift; /* -4 to compensate right-shift */
 2211|  13.9k|      else
 2212|  13.9k|        sum_e = input_e + 4 + 1 -
 2213|  13.9k|                shift; /* -4 to compensate right-shift; +1 due to missing
 2214|       |                          imag. part */
 2215|       |
 2216|   142k|      sum_e -= 2 * preShift;
 2217|   142k|    } /* maxVal!=0 */
 2218|  75.6k|    else {
 2219|       |      /* Prevent a zero-mantissa-number from being misinterpreted
 2220|       |         due to its exponent. */
 2221|  75.6k|      sum = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  75.6k|  (FIXP_DBL)(                                                                \
  |  |  193|  75.6k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 75.6k, Folded]
  |  |  ------------------
  |  |  194|  75.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  75.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  75.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 75.6k]
  |  |  ------------------
  |  |  195|  75.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  75.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  75.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  75.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  75.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  75.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  75.6k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2222|  75.6k|      sum_e = 0;
 2223|  75.6k|    }
 2224|       |
 2225|   628k|    for (k = li; k < ui; k++) {
  ------------------
  |  Branch (2225:18): [True: 410k, False: 218k]
  ------------------
 2226|   410k|      *nrgEst++ = sum;
 2227|   410k|      *nrgEst_e++ = sum_e;
 2228|   410k|    }
 2229|   218k|  }
 2230|  30.8k|}
env_calc.cpp:_ZL15calcSubbandGainiaP13ENV_CALC_NRGSiiahhi:
 2246|  36.4M|{
 2247|  36.4M|  FIXP_DBL nrgEst = nrgs->nrgEst[i]; /*!< Energy in transposed signal */
 2248|  36.4M|  SCHAR nrgEst_e =
 2249|  36.4M|      nrgs->nrgEst_e[i]; /*!< Energy in transposed signal (exponent) */
 2250|  36.4M|  FIXP_DBL *ptrNrgGain = &nrgs->nrgGain[i]; /*!< Resulting energy gain */
 2251|  36.4M|  SCHAR *ptrNrgGain_e =
 2252|  36.4M|      &nrgs->nrgGain_e[i]; /*!< Resulting energy gain (exponent) */
 2253|  36.4M|  FIXP_DBL *ptrNoiseLevel =
 2254|  36.4M|      &nrgs->noiseLevel[i]; /*!< Resulting absolute noise energy */
 2255|  36.4M|  SCHAR *ptrNoiseLevel_e =
 2256|  36.4M|      &nrgs->noiseLevel_e[i]; /*!< Resulting absolute noise energy (exponent) */
 2257|  36.4M|  FIXP_DBL *ptrNrgSine = &nrgs->nrgSine[i]; /*!< Additional sine energy */
 2258|  36.4M|  SCHAR *ptrNrgSine_e =
 2259|  36.4M|      &nrgs->nrgSine_e[i]; /*!< Additional sine energy (exponent) */
 2260|       |
 2261|  36.4M|  FIXP_DBL a, b, c;
 2262|  36.4M|  SCHAR a_e, b_e, c_e;
 2263|       |
 2264|       |  /*
 2265|       |     This addition of 1 prevents divisions by zero in the reference code.
 2266|       |     For very small energies in nrgEst, it prevents the gains from becoming
 2267|       |     very high which could cause some trouble due to the smoothing.
 2268|       |  */
 2269|  36.4M|  b_e = (int)(nrgEst_e - 1);
 2270|  36.4M|  if (b_e >= 0) {
  ------------------
  |  Branch (2270:7): [True: 21.8M, False: 14.6M]
  ------------------
 2271|  21.8M|    nrgEst = (FL2FXCONST_DBL(0.5f) >> (INT)fixMin(b_e + 1, DFRACT_BITS - 1)) +
  ------------------
  |  |  192|  21.8M|  (FIXP_DBL)(                                                                \
  |  |  193|  21.8M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.8M, Folded]
  |  |  ------------------
  |  |  194|  21.8M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.8M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.8M]
  |  |  ------------------
  |  |  195|  21.8M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.8M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.8M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.8M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.8M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.8M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.8M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  nrgEst = (FL2FXCONST_DBL(0.5f) >> (INT)fixMin(b_e + 1, DFRACT_BITS - 1)) +
  ------------------
  |  |  306|  21.8M|#define fixMin(a, b) fMin(a, b)
  ------------------
 2272|  21.8M|             (nrgEst >> 1);
 2273|  21.8M|    nrgEst_e += 1; /* shift by 1 bit to avoid overflow */
 2274|       |
 2275|  21.8M|  } else {
 2276|  14.6M|    nrgEst = (nrgEst >> (INT)(fixMin(-b_e + 1, DFRACT_BITS - 1))) +
  ------------------
  |  |  306|  14.6M|#define fixMin(a, b) fMin(a, b)
  ------------------
 2277|  14.6M|             (FL2FXCONST_DBL(0.5f) >> 1);
  ------------------
  |  |  192|  14.6M|  (FIXP_DBL)(                                                                \
  |  |  193|  14.6M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 14.6M, Folded]
  |  |  ------------------
  |  |  194|  14.6M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  14.6M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 14.6M]
  |  |  ------------------
  |  |  195|  14.6M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  14.6M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  14.6M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  14.6M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  14.6M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  14.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  14.6M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2278|  14.6M|    nrgEst_e = 2; /* shift by 1 bit to avoid overflow */
 2279|  14.6M|  }
 2280|       |
 2281|       |  /*  A = NrgRef * TmpNoise */
 2282|  36.4M|  a = fMult(nrgRef, tmpNoise);
 2283|  36.4M|  a_e = nrgRef_e + tmpNoise_e;
 2284|       |
 2285|       |  /*  B = 1 + TmpNoise */
 2286|  36.4M|  b_e = (int)(tmpNoise_e - 1);
 2287|  36.4M|  if (b_e >= 0) {
  ------------------
  |  Branch (2287:7): [True: 8.99M, False: 27.4M]
  ------------------
 2288|  8.99M|    b = (FL2FXCONST_DBL(0.5f) >> (INT)fixMin(b_e + 1, DFRACT_BITS - 1)) +
  ------------------
  |  |  192|  8.99M|  (FIXP_DBL)(                                                                \
  |  |  193|  8.99M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 8.99M, Folded]
  |  |  ------------------
  |  |  194|  8.99M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  8.99M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.99M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 8.99M]
  |  |  ------------------
  |  |  195|  8.99M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  8.99M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  8.99M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  8.99M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  8.99M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.99M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  8.99M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  b = (FL2FXCONST_DBL(0.5f) >> (INT)fixMin(b_e + 1, DFRACT_BITS - 1)) +
  ------------------
  |  |  306|  8.99M|#define fixMin(a, b) fMin(a, b)
  ------------------
 2289|  8.99M|        (tmpNoise >> 1);
 2290|  8.99M|    b_e = tmpNoise_e + 1; /* shift by 1 bit to avoid overflow */
 2291|  27.4M|  } else {
 2292|  27.4M|    b = (tmpNoise >> (INT)(fixMin(-b_e + 1, DFRACT_BITS - 1))) +
  ------------------
  |  |  306|  27.4M|#define fixMin(a, b) fMin(a, b)
  ------------------
 2293|  27.4M|        (FL2FXCONST_DBL(0.5f) >> 1);
  ------------------
  |  |  192|  27.4M|  (FIXP_DBL)(                                                                \
  |  |  193|  27.4M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 27.4M, Folded]
  |  |  ------------------
  |  |  194|  27.4M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  27.4M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 27.4M]
  |  |  ------------------
  |  |  195|  27.4M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  27.4M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  27.4M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  27.4M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  27.4M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.4M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  27.4M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2294|  27.4M|    b_e = 2; /* shift by 1 bit to avoid overflow */
 2295|  27.4M|  }
 2296|       |
 2297|       |  /*  noiseLevel = A / B = (NrgRef * TmpNoise) / (1 + TmpNoise) */
 2298|  36.4M|  FDK_divide_MantExp(a, a_e, b, b_e, ptrNoiseLevel, ptrNoiseLevel_e);
 2299|       |
 2300|  36.4M|  if (sinePresentFlag) {
  ------------------
  |  Branch (2300:7): [True: 184k, False: 36.3M]
  ------------------
 2301|       |    /*  C = (1 + TmpNoise) * NrgEst */
 2302|   184k|    c = fMult(b, nrgEst);
 2303|   184k|    c_e = b_e + nrgEst_e;
 2304|       |
 2305|       |    /*  gain = A / C = (NrgRef * TmpNoise) / (1 + TmpNoise) * NrgEst */
 2306|   184k|    FDK_divide_MantExp(a, a_e, c, c_e, ptrNrgGain, ptrNrgGain_e);
 2307|       |
 2308|   184k|    if (sineMapped) {
  ------------------
  |  Branch (2308:9): [True: 72.1k, False: 112k]
  ------------------
 2309|       |      /*  sineLevel = nrgRef/ (1 + TmpNoise) */
 2310|  72.1k|      FDK_divide_MantExp(nrgRef, nrgRef_e, b, b_e, ptrNrgSine, ptrNrgSine_e);
 2311|  72.1k|    }
 2312|  36.3M|  } else {
 2313|  36.3M|    if (noNoiseFlag) {
  ------------------
  |  Branch (2313:9): [True: 52.1k, False: 36.2M]
  ------------------
 2314|       |      /*  B = NrgEst */
 2315|  52.1k|      b = nrgEst;
 2316|  52.1k|      b_e = nrgEst_e;
 2317|  36.2M|    } else {
 2318|       |      /*  B = NrgEst * (1 + TmpNoise) */
 2319|  36.2M|      b = fMult(b, nrgEst);
 2320|  36.2M|      b_e = b_e + nrgEst_e;
 2321|  36.2M|    }
 2322|       |
 2323|       |    /*  gain = nrgRef / B */
 2324|  36.3M|    INT result_exp = 0;
 2325|  36.3M|    *ptrNrgGain = fDivNorm(nrgRef, b, &result_exp);
 2326|  36.3M|    *ptrNrgGain_e = (SCHAR)result_exp + (nrgRef_e - b_e);
 2327|       |
 2328|       |    /* There could be a one bit diffs. This is important to compensate,
 2329|       |       because later in the code values are compared by exponent only. */
 2330|  36.3M|    int headroom = CountLeadingBits(*ptrNrgGain);
  ------------------
  |  |  309|  36.3M|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
 2331|  36.3M|    *ptrNrgGain <<= headroom;
 2332|  36.3M|    *ptrNrgGain_e -= headroom;
 2333|  36.3M|  }
 2334|  36.4M|}
env_calc.cpp:_ZL11calcAvgGainP13ENV_CALC_NRGSiiPiPaS1_S2_:
 2350|  5.15M|{
 2351|  5.15M|  FIXP_DBL *nrgRef =
 2352|  5.15M|      nrgs->nrgRef; /*!< Reference Energy according to envelope data */
 2353|  5.15M|  SCHAR *nrgRef_e =
 2354|  5.15M|      nrgs->nrgRef_e; /*!< Reference Energy according to envelope data
 2355|       |                         (exponent) */
 2356|  5.15M|  FIXP_DBL *nrgEst = nrgs->nrgEst; /*!< Energy in transposed signal */
 2357|  5.15M|  SCHAR *nrgEst_e =
 2358|  5.15M|      nrgs->nrgEst_e; /*!< Energy in transposed signal (exponent) */
 2359|       |
 2360|  5.15M|  FIXP_DBL sumRef = 1;
 2361|  5.15M|  FIXP_DBL sumEst = 1;
 2362|  5.15M|  SCHAR sumRef_e = -FRACT_BITS;
  ------------------
  |  |  112|  5.15M|#define FRACT_BITS 16  /* single precision */
  ------------------
 2363|  5.15M|  SCHAR sumEst_e = -FRACT_BITS;
  ------------------
  |  |  112|  5.15M|#define FRACT_BITS 16  /* single precision */
  ------------------
 2364|  5.15M|  int k;
 2365|       |
 2366|  41.6M|  for (k = lowSubband; k < highSubband; k++) {
  ------------------
  |  Branch (2366:24): [True: 36.5M, False: 5.15M]
  ------------------
 2367|       |    /* Add nrgRef[k] to sumRef: */
 2368|  36.5M|    FDK_add_MantExp(sumRef, sumRef_e, nrgRef[k], nrgRef_e[k], &sumRef,
 2369|  36.5M|                    &sumRef_e);
 2370|       |
 2371|       |    /* Add nrgEst[k] to sumEst: */
 2372|  36.5M|    FDK_add_MantExp(sumEst, sumEst_e, nrgEst[k], nrgEst_e[k], &sumEst,
 2373|  36.5M|                    &sumEst_e);
 2374|  36.5M|  }
 2375|       |
 2376|  5.15M|  FDK_divide_MantExp(sumRef, sumRef_e, sumEst, sumEst_e, ptrAvgGain,
 2377|  5.15M|                     ptrAvgGain_e);
 2378|       |
 2379|  5.15M|  *ptrSumRef = sumRef;
 2380|  5.15M|  *ptrSumRef_e = sumRef_e;
 2381|  5.15M|}
env_calc.cpp:_ZL22adjustTimeSlot_EldGridPiP13ENV_CALC_NRGSPhiiiiS_i:
 2394|   336k|{
 2395|   336k|  int k;
 2396|   336k|  FIXP_DBL signalReal, sbNoise;
 2397|   336k|  int tone_count = 0;
 2398|       |
 2399|   336k|  FIXP_DBL *pGain = nrgs->nrgGain; /*!< Gains of current envelope */
 2400|   336k|  FIXP_DBL *RESTRICT pNoiseLevel =
 2401|   336k|      nrgs->noiseLevel; /*!< Noise levels of current envelope */
 2402|   336k|  FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */
 2403|       |
 2404|   336k|  int phaseIndex = *ptrPhaseIndex;
 2405|   336k|  UCHAR harmIndex = *ptrHarmIndex;
 2406|       |
 2407|   336k|  static const INT harmonicPhase[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
 2408|       |
 2409|   336k|  static const FIXP_DBL harmonicPhaseX[4][2] = {
 2410|   336k|      {FL2FXCONST_DBL(2.0 * 1.245183154539139e-001),
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2411|   336k|       FL2FXCONST_DBL(2.0 * 1.245183154539139e-001)},
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2412|   336k|      {FL2FXCONST_DBL(2.0 * -1.123767859325028e-001),
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 336k]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2413|   336k|       FL2FXCONST_DBL(2.0 * 1.123767859325028e-001)},
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2414|   336k|      {FL2FXCONST_DBL(2.0 * -1.245183154539139e-001),
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 336k]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2415|   336k|       FL2FXCONST_DBL(2.0 * -1.245183154539139e-001)},
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 336k]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2416|   336k|      {FL2FXCONST_DBL(2.0 * 1.123767859325028e-001),
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2417|   336k|       FL2FXCONST_DBL(2.0 * -1.123767859325028e-001)}};
  ------------------
  |  |  192|   336k|  (FIXP_DBL)(                                                                \
  |  |  193|   336k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 336k]
  |  |  ------------------
  |  |  194|   336k|          ? ((((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|   336k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 336k]
  |  |  ------------------
  |  |  199|   336k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   336k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   336k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   336k|                 ? (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|   336k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   336k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   336k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2418|       |
 2419|   336k|  const FIXP_DBL *p_harmonicPhaseX = &harmonicPhaseX[harmIndex][0];
 2420|   336k|  const INT *p_harmonicPhase = &harmonicPhase[harmIndex][0];
 2421|       |
 2422|   336k|  const FIXP_DBL max_val = MAX_VAL_NRG_HEADROOM >> scale_change;
  ------------------
  |  |  155|   336k|#define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  156|   336k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |               #define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  154|   336k|#define MAX_SFB_NRG_HEADROOM (1)
  |  |  ------------------
  ------------------
 2423|   336k|  const FIXP_DBL min_val = -max_val;
 2424|       |
 2425|   336k|  *(ptrReal - 1) = fAddSaturate(
 2426|   336k|      *(ptrReal - 1),
 2427|   336k|      SATURATE_SHIFT(fMultDiv2(p_harmonicPhaseX[lowSubband & 1], pSineLevel[0]),
  ------------------
  |  |  260|   336k|  (((scale) < 0) ? SATURATE_LEFT_SHIFT((src), -(scale), (dBits)) \
  |  |  ------------------
  |  |  |  |  251|   269k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (251:4): [True: 1.51k, False: 268k]
  |  |  |  |  ------------------
  |  |  |  |  252|   269k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  |  |  253|   269k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (253:10): [True: 1.54k, False: 266k]
  |  |  |  |  ------------------
  |  |  |  |  254|   268k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  |  |  255|   268k|             : ((LONG)(src) << (scale)))
  |  |  ------------------
  |  |  |  Branch (260:4): [True: 269k, False: 66.4k]
  |  |  ------------------
  |  |  261|   336k|                 : SATURATE_RIGHT_SHIFT((src), (scale), (dBits)))
  |  |  ------------------
  |  |  |  |  242|  66.4k|  ((((LONG)(src) >> (scale)) > (LONG)(((1U) << ((dBits)-1)) - 1))          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (242:4): [True: 0, False: 66.4k]
  |  |  |  |  ------------------
  |  |  |  |  243|  66.4k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                                 \
  |  |  |  |  244|  66.4k|       : (((LONG)(src) >> (scale)) < ~((LONG)(((1U) << ((dBits)-1)) - 1))) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (244:10): [True: 0, False: 66.4k]
  |  |  |  |  ------------------
  |  |  |  |  245|  66.4k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                        \
  |  |  |  |  246|  66.4k|             : ((LONG)(src) >> (scale)))
  |  |  ------------------
  ------------------
 2428|   336k|                     scale_diff_low, DFRACT_BITS));
 2429|   336k|  FIXP_DBL pSineLevel_prev = (FIXP_DBL)0;
 2430|       |
 2431|   336k|  int idx_k = lowSubband & 1;
 2432|       |
 2433|  2.12M|  for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (2433:15): [True: 1.78M, False: 335k]
  ------------------
 2434|  1.78M|    FIXP_DBL sineLevel_curr = *pSineLevel++;
 2435|  1.78M|    phaseIndex = (phaseIndex + 1) & (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  1.78M|  512 /*!< Size of random number array for noise floor */
  ------------------
 2436|       |
 2437|  1.78M|    signalReal = fMax(fMin(fMultDiv2(*ptrReal, *pGain++), max_val), min_val)
 2438|  1.78M|                 << scale_change;
 2439|  1.78M|    sbNoise = *pNoiseLevel++;
 2440|  1.78M|    if (((INT)sineLevel_curr | noNoiseFlag) == 0) {
  ------------------
  |  Branch (2440:9): [True: 1.71M, False: 71.1k]
  ------------------
 2441|  1.71M|      signalReal +=
 2442|  1.71M|          fMult(FDK_sbrDecoder_sbr_randomPhase[phaseIndex][0], sbNoise);
 2443|  1.71M|    }
 2444|  1.78M|    signalReal += sineLevel_curr * p_harmonicPhase[0];
 2445|  1.78M|    signalReal =
 2446|  1.78M|        fMultAddDiv2(signalReal, pSineLevel_prev, p_harmonicPhaseX[idx_k]);
 2447|  1.78M|    pSineLevel_prev = sineLevel_curr;
 2448|  1.78M|    idx_k = !idx_k;
 2449|  1.78M|    if (k < noSubbands - 1) {
  ------------------
  |  Branch (2449:9): [True: 1.45M, False: 335k]
  ------------------
 2450|  1.45M|      signalReal =
 2451|  1.45M|          fMultAddDiv2(signalReal, pSineLevel[0], p_harmonicPhaseX[idx_k]);
 2452|  1.45M|    } else /* (k == noSubbands - 1)  */
 2453|   335k|    {
 2454|   335k|      if (k + lowSubband + 1 < 63) {
  ------------------
  |  Branch (2454:11): [True: 330k, False: 5.04k]
  ------------------
 2455|   330k|        *(ptrReal + 1) += fMultDiv2(pSineLevel_prev, p_harmonicPhaseX[idx_k]);
 2456|   330k|      }
 2457|   335k|    }
 2458|  1.78M|    *ptrReal++ = signalReal;
 2459|       |
 2460|  1.78M|    if (pSineLevel_prev != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  1.78M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.78M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.78M, Folded]
  |  |  ------------------
  |  |  194|  1.78M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.78M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.78M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.78M]
  |  |  ------------------
  |  |  195|  1.78M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.78M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.78M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.78M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.78M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.78M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.78M|          : ((((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 (2460:9): [True: 19.6k, False: 1.76M]
  ------------------
 2461|  19.6k|      if (++tone_count == 16) {
  ------------------
  |  Branch (2461:11): [True: 614, False: 19.0k]
  ------------------
 2462|    614|        k++;
 2463|    614|        break;
 2464|    614|      }
 2465|  19.6k|    }
 2466|  1.78M|  }
 2467|       |  /* Run again, if previous loop got breaked with tone_count = 16 */
 2468|   341k|  for (; k < noSubbands; k++) {
  ------------------
  |  Branch (2468:10): [True: 5.00k, False: 336k]
  ------------------
 2469|  5.00k|    FIXP_DBL sineLevel_curr = *pSineLevel++;
 2470|  5.00k|    phaseIndex = (phaseIndex + 1) & (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  5.00k|  512 /*!< Size of random number array for noise floor */
  ------------------
 2471|       |
 2472|  5.00k|    signalReal = fMax(fMin(fMultDiv2(*ptrReal, *pGain++), max_val), min_val)
 2473|  5.00k|                 << scale_change;
 2474|  5.00k|    sbNoise = *pNoiseLevel++;
 2475|  5.00k|    if (((INT)sineLevel_curr | noNoiseFlag) == 0) {
  ------------------
  |  Branch (2475:9): [True: 1.96k, False: 3.03k]
  ------------------
 2476|  1.96k|      signalReal +=
 2477|  1.96k|          fMult(FDK_sbrDecoder_sbr_randomPhase[phaseIndex][0], sbNoise);
 2478|  1.96k|    }
 2479|  5.00k|    signalReal += sineLevel_curr * p_harmonicPhase[0];
 2480|  5.00k|    *ptrReal++ = signalReal;
 2481|  5.00k|  }
 2482|       |
 2483|   336k|  *ptrHarmIndex = (harmIndex + 1) & 3;
 2484|   336k|  *ptrPhaseIndex = phaseIndex & (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|   336k|  512 /*!< Size of random number array for noise floor */
  ------------------
 2485|   336k|}
env_calc.cpp:_ZL16adjustTimeSlotLCPiP13ENV_CALC_NRGSPhiiiiS_:
 2500|   651k|{
 2501|   651k|  FIXP_DBL *pGain = nrgs->nrgGain; /*!< Gains of current envelope */
 2502|   651k|  FIXP_DBL *pNoiseLevel =
 2503|   651k|      nrgs->noiseLevel;                 /*!< Noise levels of current envelope */
 2504|   651k|  FIXP_DBL *pSineLevel = nrgs->nrgSine; /*!< Sine levels */
 2505|       |
 2506|   651k|  int k;
 2507|   651k|  int index = *ptrPhaseIndex;
 2508|   651k|  UCHAR harmIndex = *ptrHarmIndex;
 2509|   651k|  UCHAR freqInvFlag = (lowSubband & 1);
 2510|   651k|  FIXP_DBL signalReal, sineLevel, sineLevelNext, sineLevelPrev;
 2511|   651k|  int tone_count = 0;
 2512|   651k|  int sineSign = 1;
 2513|   651k|  const FIXP_DBL max_val = MAX_VAL_NRG_HEADROOM >> scale_change;
  ------------------
  |  |  155|   651k|#define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  156|   651k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |               #define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  154|   651k|#define MAX_SFB_NRG_HEADROOM (1)
  |  |  ------------------
  ------------------
 2514|   651k|  const FIXP_DBL min_val = -max_val;
 2515|       |
 2516|   651k|#define C1 ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.00815f))
 2517|   651k|#define C1_CLDFB ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.16773f))
 2518|       |
 2519|       |  /*
 2520|       |    First pass for k=0 pulled out of the loop:
 2521|       |  */
 2522|       |
 2523|   651k|  index = (index + 1) & (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|   651k|  512 /*!< Size of random number array for noise floor */
  ------------------
 2524|       |
 2525|       |  /*
 2526|       |    The next multiplication constitutes the actual envelope adjustment
 2527|       |    of the signal and should be carried out with full accuracy
 2528|       |    (supplying #FRACT_BITS valid bits).
 2529|       |  */
 2530|   651k|  signalReal = fMax(fMin(fMultDiv2(*ptrReal, *pGain++), max_val), min_val)
 2531|   651k|               << scale_change;
 2532|   651k|  sineLevel = *pSineLevel++;
 2533|   651k|  sineLevelNext = (noSubbands > 1) ? pSineLevel[0] : FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   651k|  (FIXP_DBL)(                                                                \
  |  |  193|   651k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 218, Folded]
  |  |  ------------------
  |  |  194|   651k|          ? ((((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 (194:14): [Folded, False: 218]
  |  |  ------------------
  |  |  195|    218|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    218|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    218|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    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 */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   651k|          : ((((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 (2533:19): [True: 650k, False: 218]
  ------------------
 2534|       |
 2535|   651k|  if (sineLevel != FL2FXCONST_DBL(0.0f))
  ------------------
  |  |  192|   651k|  (FIXP_DBL)(                                                                \
  |  |  193|   651k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 651k, Folded]
  |  |  ------------------
  |  |  194|   651k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   651k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   651k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 651k]
  |  |  ------------------
  |  |  195|   651k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   651k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   651k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   651k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   651k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   651k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   651k|          : ((((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 (2535:7): [True: 52.4k, False: 598k]
  ------------------
 2536|  52.4k|    tone_count++;
 2537|   598k|  else if (!noNoiseFlag)
  ------------------
  |  Branch (2537:12): [True: 597k, False: 880]
  ------------------
 2538|       |    /* Add noisefloor to the amplified signal */
 2539|   597k|    signalReal +=
 2540|   597k|        fMult(FDK_sbrDecoder_sbr_randomPhase[index][0], pNoiseLevel[0]);
 2541|       |
 2542|   651k|  {
 2543|   651k|    if (!(harmIndex & 0x1)) {
  ------------------
  |  Branch (2543:9): [True: 325k, False: 325k]
  ------------------
 2544|       |      /* harmIndex 0,2 */
 2545|   325k|      signalReal += (harmIndex & 0x2) ? -sineLevel : sineLevel;
  ------------------
  |  Branch (2545:21): [True: 162k, False: 162k]
  ------------------
 2546|   325k|      *ptrReal++ = signalReal;
 2547|   325k|    } else {
 2548|       |      /* harmIndex 1,3 in combination with freqInvFlag */
 2549|   325k|      int shift = (int)(scale_change + 1);
 2550|   325k|      shift = (shift >= 0) ? fixMin(DFRACT_BITS - 1, shift)
  ------------------
  |  |  306|   325k|#define fixMin(a, b) fMin(a, b)
  ------------------
  |  Branch (2550:15): [True: 325k, False: 0]
  ------------------
 2551|   325k|                           : fixMax(-(DFRACT_BITS - 1), shift);
  ------------------
  |  |  307|   325k|#define fixMax(a, b) fMax(a, b)
  ------------------
 2552|       |
 2553|   325k|      FIXP_DBL tmp1 = (shift >= 0) ? (fMultDiv2(C1, sineLevel) >> shift)
  ------------------
  |  | 2516|   325k|#define C1 ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.00815f))
  |  |  ------------------
  |  |  |  |  180|   325k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   325k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 325k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   325k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   325k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   325k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 325k]
  |  |  |  |  ------------------
  |  |  |  |  183|   325k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   325k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   325k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   325k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   325k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   325k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   325k|          : ((((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 (2553:23): [True: 325k, False: 0]
  ------------------
 2554|   325k|                                   : (fMultDiv2(C1, sineLevel) << (-shift));
  ------------------
  |  | 2516|      0|#define C1 ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.00815f))
  |  |  ------------------
  |  |  |  |  180|      0|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|      0|          ? ((((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|      0|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2555|   325k|      FIXP_DBL tmp2 = fMultDiv2(C1, sineLevelNext);
  ------------------
  |  | 2516|   325k|#define C1 ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.00815f))
  |  |  ------------------
  |  |  |  |  180|   325k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   325k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 325k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   325k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   325k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   325k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 325k]
  |  |  |  |  ------------------
  |  |  |  |  183|   325k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   325k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   325k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   325k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   325k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   325k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   325k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2556|       |
 2557|       |      /* save switch and compare operations and reduce to XOR statement */
 2558|   325k|      if (((harmIndex >> 1) & 0x1) ^ freqInvFlag) {
  ------------------
  |  Branch (2558:11): [True: 160k, False: 164k]
  ------------------
 2559|   160k|        *(ptrReal - 1) = fAddSaturate(*(ptrReal - 1), tmp1);
 2560|   160k|        signalReal -= tmp2;
 2561|   164k|      } else {
 2562|   164k|        *(ptrReal - 1) = fAddSaturate(*(ptrReal - 1), -tmp1);
 2563|   164k|        signalReal += tmp2;
 2564|   164k|      }
 2565|   325k|      *ptrReal++ = signalReal;
 2566|   325k|      freqInvFlag = !freqInvFlag;
 2567|   325k|    }
 2568|   651k|  }
 2569|       |
 2570|   651k|  pNoiseLevel++;
 2571|       |
 2572|   651k|  if (noSubbands > 2) {
  ------------------
  |  Branch (2572:7): [True: 647k, False: 3.28k]
  ------------------
 2573|   647k|    if (!(harmIndex & 0x1)) {
  ------------------
  |  Branch (2573:9): [True: 323k, False: 323k]
  ------------------
 2574|       |      /* harmIndex 0,2 */
 2575|   323k|      if (!harmIndex) {
  ------------------
  |  Branch (2575:11): [True: 162k, False: 161k]
  ------------------
 2576|   162k|        sineSign = 0;
 2577|   162k|      }
 2578|       |
 2579|  6.80M|      for (k = noSubbands - 2; k != 0; k--) {
  ------------------
  |  Branch (2579:32): [True: 6.47M, False: 323k]
  ------------------
 2580|  6.47M|        FIXP_DBL sinelevel = *pSineLevel++;
 2581|  6.47M|        index++;
 2582|  6.47M|        if (((signalReal = (sineSign ? -sinelevel : sinelevel)) ==
  ------------------
  |  Branch (2582:13): [True: 5.92M, False: 550k]
  |  Branch (2582:29): [True: 3.21M, False: 3.25M]
  ------------------
 2583|  6.47M|             FL2FXCONST_DBL(0.0f)) &&
  ------------------
  |  |  192|  6.47M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.47M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.47M, Folded]
  |  |  ------------------
  |  |  194|  6.47M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.47M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.47M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.47M]
  |  |  ------------------
  |  |  195|  6.47M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.47M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.47M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.47M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.47M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.47M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.47M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2584|  5.92M|            !noNoiseFlag) {
  ------------------
  |  Branch (2584:13): [True: 5.90M, False: 18.8k]
  ------------------
 2585|       |          /* Add noisefloor to the amplified signal */
 2586|  5.90M|          index &= (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  5.90M|  512 /*!< Size of random number array for noise floor */
  ------------------
 2587|  5.90M|          signalReal +=
 2588|  5.90M|              fMult(FDK_sbrDecoder_sbr_randomPhase[index][0], pNoiseLevel[0]);
 2589|  5.90M|        }
 2590|       |
 2591|       |        /* The next multiplication constitutes the actual envelope adjustment of
 2592|       |         * the signal. */
 2593|  6.47M|        signalReal +=
 2594|  6.47M|            fMax(fMin(fMultDiv2(*ptrReal, *pGain++), max_val), min_val)
 2595|  6.47M|            << scale_change;
 2596|       |
 2597|  6.47M|        pNoiseLevel++;
 2598|  6.47M|        *ptrReal++ = signalReal;
 2599|  6.47M|      } /* for ... */
 2600|   323k|    } else {
 2601|       |      /* harmIndex 1,3 in combination with freqInvFlag */
 2602|   323k|      if (harmIndex == 1) freqInvFlag = !freqInvFlag;
  ------------------
  |  Branch (2602:11): [True: 162k, False: 161k]
  ------------------
 2603|       |
 2604|  6.80M|      for (k = noSubbands - 2; k != 0; k--) {
  ------------------
  |  Branch (2604:32): [True: 6.47M, False: 323k]
  ------------------
 2605|  6.47M|        index++;
 2606|       |        /* The next multiplication constitutes the actual envelope adjustment of
 2607|       |         * the signal. */
 2608|  6.47M|        signalReal = fMax(fMin(fMultDiv2(*ptrReal, *pGain++), max_val), min_val)
 2609|  6.47M|                     << scale_change;
 2610|       |
 2611|  6.47M|        if (*pSineLevel++ != FL2FXCONST_DBL(0.0f))
  ------------------
  |  |  192|  6.47M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.47M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.47M, Folded]
  |  |  ------------------
  |  |  194|  6.47M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.47M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.47M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.47M]
  |  |  ------------------
  |  |  195|  6.47M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.47M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.47M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.47M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.47M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.47M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.47M|          : ((((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 (2611:13): [True: 550k, False: 5.92M]
  ------------------
 2612|   550k|          tone_count++;
 2613|  5.92M|        else if (!noNoiseFlag) {
  ------------------
  |  Branch (2613:18): [True: 5.90M, False: 18.8k]
  ------------------
 2614|       |          /* Add noisefloor to the amplified signal */
 2615|  5.90M|          index &= (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  5.90M|  512 /*!< Size of random number array for noise floor */
  ------------------
 2616|  5.90M|          signalReal +=
 2617|  5.90M|              fMult(FDK_sbrDecoder_sbr_randomPhase[index][0], pNoiseLevel[0]);
 2618|  5.90M|        }
 2619|       |
 2620|  6.47M|        pNoiseLevel++;
 2621|       |
 2622|  6.47M|        if (tone_count <= 16) {
  ------------------
  |  Branch (2622:13): [True: 6.21M, False: 262k]
  ------------------
 2623|  6.21M|          FIXP_DBL addSine = fMultDiv2((pSineLevel[-2] - pSineLevel[0]), C1);
  ------------------
  |  | 2516|  6.21M|#define C1 ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.00815f))
  |  |  ------------------
  |  |  |  |  180|  6.21M|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  6.21M|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 6.21M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|  6.21M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  6.21M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  6.21M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 6.21M]
  |  |  |  |  ------------------
  |  |  |  |  183|  6.21M|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  6.21M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|  6.21M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|  6.21M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  6.21M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  6.21M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  6.21M|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2624|  6.21M|          signalReal += (freqInvFlag) ? (-addSine) : (addSine);
  ------------------
  |  Branch (2624:25): [True: 3.10M, False: 3.10M]
  ------------------
 2625|  6.21M|        }
 2626|       |
 2627|  6.47M|        *ptrReal++ = signalReal;
 2628|  6.47M|        freqInvFlag = !freqInvFlag;
 2629|  6.47M|      } /* for ... */
 2630|   323k|    }
 2631|   647k|  }
 2632|       |
 2633|   651k|  if (noSubbands > -1) {
  ------------------
  |  Branch (2633:7): [True: 651k, False: 0]
  ------------------
 2634|   651k|    index++;
 2635|       |    /* The next multiplication constitutes the actual envelope adjustment of the
 2636|       |     * signal. */
 2637|   651k|    signalReal = fMax(fMin(fMultDiv2(*ptrReal, *pGain), max_val), min_val)
 2638|   651k|                 << scale_change;
 2639|   651k|    sineLevelPrev = fMultDiv2(pSineLevel[-1], FL2FX_SGL(0.0163f));
  ------------------
  |  |  207|   651k|  ((val) > 0.0f ? (SHORT)((val) * (float)(FRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  146|   651k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   651k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (207:4): [True: 651k, Folded]
  |  |  ------------------
  |  |  208|   651k|                : (SHORT)((val) * (float)(FRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2640|   651k|    sineLevel = pSineLevel[0];
 2641|       |
 2642|   651k|    if (pSineLevel[0] != FL2FXCONST_DBL(0.0f))
  ------------------
  |  |  192|   651k|  (FIXP_DBL)(                                                                \
  |  |  193|   651k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 651k, Folded]
  |  |  ------------------
  |  |  194|   651k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   651k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   651k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 651k]
  |  |  ------------------
  |  |  195|   651k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   651k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   651k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   651k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   651k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   651k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   651k|          : ((((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 (2642:9): [True: 2.73k, False: 648k]
  ------------------
 2643|  2.73k|      tone_count++;
 2644|   648k|    else if (!noNoiseFlag) {
  ------------------
  |  Branch (2644:14): [True: 646k, False: 2.34k]
  ------------------
 2645|       |      /* Add noisefloor to the amplified signal */
 2646|   646k|      index &= (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|   646k|  512 /*!< Size of random number array for noise floor */
  ------------------
 2647|   646k|      signalReal = signalReal + fMult(FDK_sbrDecoder_sbr_randomPhase[index][0],
 2648|   646k|                                      pNoiseLevel[0]);
 2649|   646k|    }
 2650|       |
 2651|   651k|    if (!(harmIndex & 0x1)) {
  ------------------
  |  Branch (2651:9): [True: 325k, False: 325k]
  ------------------
 2652|       |      /* harmIndex 0,2 */
 2653|   325k|      *ptrReal = signalReal + ((sineSign) ? -sineLevel : sineLevel);
  ------------------
  |  Branch (2653:32): [True: 163k, False: 162k]
  ------------------
 2654|   325k|    } else {
 2655|       |      /* harmIndex 1,3 in combination with freqInvFlag */
 2656|   325k|      if (tone_count <= 16) {
  ------------------
  |  Branch (2656:11): [True: 299k, False: 26.4k]
  ------------------
 2657|   299k|        if (freqInvFlag) {
  ------------------
  |  Branch (2657:13): [True: 150k, False: 149k]
  ------------------
 2658|   150k|          *ptrReal++ = signalReal - sineLevelPrev;
 2659|   150k|          if (noSubbands + lowSubband < 63)
  ------------------
  |  Branch (2659:15): [True: 148k, False: 1.02k]
  ------------------
 2660|   148k|            *ptrReal = *ptrReal + fMultDiv2(C1, sineLevel);
  ------------------
  |  | 2516|   148k|#define C1 ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.00815f))
  |  |  ------------------
  |  |  |  |  180|   148k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   148k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 148k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   148k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   148k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   148k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |  183|   148k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   148k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   148k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   148k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   148k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   148k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   148k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2661|   150k|        } else {
 2662|   149k|          *ptrReal++ = signalReal + sineLevelPrev;
 2663|   149k|          if (noSubbands + lowSubband < 63)
  ------------------
  |  Branch (2663:15): [True: 148k, False: 1.01k]
  ------------------
 2664|   148k|            *ptrReal = *ptrReal - fMultDiv2(C1, sineLevel);
  ------------------
  |  | 2516|   148k|#define C1 ((FIXP_SGL)FL2FXCONST_SGL(2.f * 0.00815f))
  |  |  ------------------
  |  |  |  |  180|   148k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|   148k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [True: 148k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  182|   148k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   148k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   148k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |  183|   148k|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|   148k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|   148k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|   148k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|   148k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|   148k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|   148k|          : ((((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 */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2665|   149k|        }
 2666|   299k|      } else
 2667|  26.4k|        *ptrReal = signalReal;
 2668|   325k|    }
 2669|   651k|  }
 2670|   651k|  *ptrHarmIndex = (harmIndex + 1) & 3;
 2671|   651k|  *ptrPhaseIndex = index & (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|   651k|  512 /*!< Size of random number array for noise floor */
  ------------------
 2672|   651k|}
env_calc.cpp:_ZL29adjustTimeSlotHQ_GainAndNoisePiS_P22SBR_CALCULATE_ENVELOPEP13ENV_CALC_NRGSiiisii:
 2686|  1.10M|{
 2687|  1.10M|  FIXP_DBL *RESTRICT gain = nrgs->nrgGain; /*!< Gains of current envelope */
 2688|  1.10M|  FIXP_DBL *RESTRICT noiseLevel =
 2689|  1.10M|      nrgs->noiseLevel; /*!< Noise levels of current envelope */
 2690|  1.10M|  FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */
 2691|       |
 2692|  1.10M|  FIXP_DBL *RESTRICT filtBuffer =
 2693|  1.10M|      h_sbr_cal_env->filtBuffer; /*!< Gains of last envelope */
 2694|  1.10M|  FIXP_DBL *RESTRICT filtBufferNoise =
 2695|  1.10M|      h_sbr_cal_env->filtBufferNoise; /*!< Noise levels of last envelope */
 2696|  1.10M|  int *RESTRICT ptrPhaseIndex =
 2697|  1.10M|      &h_sbr_cal_env->phaseIndex; /*!< Start index to random number array */
 2698|       |
 2699|  1.10M|  int k;
 2700|  1.10M|  FIXP_DBL signalReal, signalImag;
 2701|  1.10M|  FIXP_DBL noiseReal, noiseImag;
 2702|  1.10M|  FIXP_DBL smoothedGain, smoothedNoise;
 2703|  1.10M|  FIXP_SGL direct_ratio =
 2704|  1.10M|      /*FL2FXCONST_SGL(1.0f) */ (FIXP_SGL)MAXVAL_SGL - smooth_ratio;
  ------------------
  |  |  152|  1.10M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
 2705|  1.10M|  int index = *ptrPhaseIndex;
 2706|  1.10M|  int shift;
 2707|  1.10M|  FIXP_DBL max_val_noise = 0, min_val_noise = 0;
 2708|  1.10M|  const FIXP_DBL max_val = MAX_VAL_NRG_HEADROOM >> scale_change;
  ------------------
  |  |  155|  1.10M|#define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  156|  1.10M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |               #define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  154|  1.10M|#define MAX_SFB_NRG_HEADROOM (1)
  |  |  ------------------
  ------------------
 2709|  1.10M|  const FIXP_DBL min_val = -max_val;
 2710|       |
 2711|  1.10M|  *ptrPhaseIndex = (index + noSubbands) & (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  1.10M|  512 /*!< Size of random number array for noise floor */
  ------------------
 2712|       |
 2713|  1.10M|  filtBufferNoiseShift +=
 2714|  1.10M|      1; /* due to later use of fMultDiv2 instead of fMult */
 2715|  1.10M|  if (filtBufferNoiseShift < 0) {
  ------------------
  |  Branch (2715:7): [True: 594, False: 1.09M]
  ------------------
 2716|    594|    shift = fixMin(DFRACT_BITS - 1, -filtBufferNoiseShift);
  ------------------
  |  |  306|    594|#define fixMin(a, b) fMin(a, b)
  ------------------
 2717|  1.09M|  } else {
 2718|  1.09M|    shift = fixMin(DFRACT_BITS - 1, filtBufferNoiseShift);
  ------------------
  |  |  306|  1.09M|#define fixMin(a, b) fMin(a, b)
  ------------------
 2719|  1.09M|    max_val_noise = MAX_VAL_NRG_HEADROOM >> shift;
  ------------------
  |  |  155|  1.09M|#define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  156|  1.09M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |               #define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  154|  1.09M|#define MAX_SFB_NRG_HEADROOM (1)
  |  |  ------------------
  ------------------
 2720|  1.09M|    min_val_noise = -max_val_noise;
 2721|  1.09M|  }
 2722|       |
 2723|  1.10M|  if (smooth_ratio > FL2FXCONST_SGL(0.0f)) {
  ------------------
  |  |  180|  1.10M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.10M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.10M, Folded]
  |  |  ------------------
  |  |  182|  1.10M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.10M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.10M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.10M]
  |  |  ------------------
  |  |  183|  1.10M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.10M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.10M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.10M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.10M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.10M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.10M|          : ((((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 (2723:7): [True: 14.8k, False: 1.08M]
  ------------------
 2724|   347k|    for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (2724:17): [True: 332k, False: 14.8k]
  ------------------
 2725|       |      /*
 2726|       |        Smoothing: The old envelope has been bufferd and a certain ratio
 2727|       |        of the old gains and noise levels is used.
 2728|       |      */
 2729|   332k|      smoothedGain =
 2730|   332k|          fMult(smooth_ratio, filtBuffer[k]) + fMult(direct_ratio, gain[k]);
 2731|       |
 2732|   332k|      if (filtBufferNoiseShift < 0) {
  ------------------
  |  Branch (2732:11): [True: 328, False: 332k]
  ------------------
 2733|    328|        smoothedNoise = (fMultDiv2(smooth_ratio, filtBufferNoise[k]) >> shift) +
 2734|    328|                        fMult(direct_ratio, noiseLevel[k]);
 2735|   332k|      } else {
 2736|   332k|        smoothedNoise = fMultDiv2(smooth_ratio, filtBufferNoise[k]);
 2737|   332k|        smoothedNoise =
 2738|   332k|            (fMax(fMin(smoothedNoise, max_val_noise), min_val_noise) << shift) +
 2739|   332k|            fMult(direct_ratio, noiseLevel[k]);
 2740|   332k|      }
 2741|       |
 2742|   332k|      smoothedNoise = fMax(fMin(smoothedNoise, (FIXP_DBL)(MAXVAL_DBL / 2)),
  ------------------
  |  |  156|   332k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 2743|   332k|                           (FIXP_DBL)(MINVAL_DBL / 2));
  ------------------
  |  |  158|   332k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 2744|       |
 2745|       |      /*
 2746|       |        The next 2 multiplications constitute the actual envelope adjustment
 2747|       |        of the signal and should be carried out with full accuracy
 2748|       |        (supplying #DFRACT_BITS valid bits).
 2749|       |      */
 2750|   332k|      signalReal =
 2751|   332k|          fMax(fMin(fMultDiv2(*ptrReal, smoothedGain), max_val), min_val)
 2752|   332k|          << scale_change;
 2753|   332k|      signalImag =
 2754|   332k|          fMax(fMin(fMultDiv2(*ptrImag, smoothedGain), max_val), min_val)
 2755|   332k|          << scale_change;
 2756|       |
 2757|   332k|      index++;
 2758|       |
 2759|   332k|      if ((pSineLevel[k] != FL2FXCONST_DBL(0.0f)) || noNoiseFlag) {
  ------------------
  |  |  192|   332k|  (FIXP_DBL)(                                                                \
  |  |  193|   332k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 332k, Folded]
  |  |  ------------------
  |  |  194|   332k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   332k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   332k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 332k]
  |  |  ------------------
  |  |  195|   332k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   332k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   332k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   332k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   332k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   332k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   332k|          : ((((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 (2759:11): [True: 956, False: 331k]
  |  Branch (2759:54): [True: 0, False: 331k]
  ------------------
 2760|       |        /* Just the amplified signal is saved */
 2761|    956|        *ptrReal++ = signalReal;
 2762|    956|        *ptrImag++ = signalImag;
 2763|   331k|      } else {
 2764|       |        /* Add noisefloor to the amplified signal */
 2765|   331k|        index &= (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|   331k|  512 /*!< Size of random number array for noise floor */
  ------------------
 2766|   331k|        noiseReal =
 2767|   331k|            fMult(FDK_sbrDecoder_sbr_randomPhase[index][0], smoothedNoise);
 2768|   331k|        noiseImag =
 2769|   331k|            fMult(FDK_sbrDecoder_sbr_randomPhase[index][1], smoothedNoise);
 2770|   331k|        *ptrReal++ = (signalReal + noiseReal);
 2771|   331k|        *ptrImag++ = (signalImag + noiseImag);
 2772|   331k|      }
 2773|   332k|    }
 2774|  1.08M|  } else {
 2775|  28.8M|    for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (2775:17): [True: 27.7M, False: 1.08M]
  ------------------
 2776|  27.7M|      smoothedGain = gain[k];
 2777|  27.7M|      signalReal =
 2778|  27.7M|          fMax(fMin(fMultDiv2(*ptrReal, smoothedGain), max_val), min_val)
 2779|  27.7M|          << scale_change;
 2780|  27.7M|      signalImag =
 2781|  27.7M|          fMax(fMin(fMultDiv2(*ptrImag, smoothedGain), max_val), min_val)
 2782|  27.7M|          << scale_change;
 2783|       |
 2784|  27.7M|      index++;
 2785|       |
 2786|  27.7M|      if ((pSineLevel[k] == FL2FXCONST_DBL(0.0f)) && (noNoiseFlag == 0)) {
  ------------------
  |  |  192|  27.7M|  (FIXP_DBL)(                                                                \
  |  |  193|  27.7M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 27.7M, Folded]
  |  |  ------------------
  |  |  194|  27.7M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  27.7M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.7M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 27.7M]
  |  |  ------------------
  |  |  195|  27.7M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  27.7M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  27.7M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  27.7M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  27.7M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.7M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  27.7M|          : ((((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 (2786:11): [True: 27.7M, False: 12.2k]
  |  Branch (2786:54): [True: 27.2M, False: 440k]
  ------------------
 2787|       |        /* Add noisefloor to the amplified signal */
 2788|  27.2M|        smoothedNoise = noiseLevel[k];
 2789|  27.2M|        index &= (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  27.2M|  512 /*!< Size of random number array for noise floor */
  ------------------
 2790|  27.2M|        noiseReal =
 2791|  27.2M|            fMult(FDK_sbrDecoder_sbr_randomPhase[index][0], smoothedNoise);
 2792|  27.2M|        noiseImag =
 2793|  27.2M|            fMult(FDK_sbrDecoder_sbr_randomPhase[index][1], smoothedNoise);
 2794|       |
 2795|  27.2M|        signalReal += noiseReal;
 2796|  27.2M|        signalImag += noiseImag;
 2797|  27.2M|      }
 2798|  27.7M|      *ptrReal++ = signalReal;
 2799|  27.7M|      *ptrImag++ = signalImag;
 2800|  27.7M|    }
 2801|  1.08M|  }
 2802|  1.10M|}
env_calc.cpp:_ZL29adjustTimeSlotHQ_AddHarmonicsPiS_P22SBR_CALCULATE_ENVELOPEP13ENV_CALC_NRGSiii:
 2814|  1.10M|) {
 2815|  1.10M|  FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */
 2816|  1.10M|  UCHAR *RESTRICT ptrHarmIndex =
 2817|  1.10M|      &h_sbr_cal_env->harmIndex; /*!< Harmonic index */
 2818|       |
 2819|  1.10M|  int k;
 2820|  1.10M|  FIXP_DBL signalReal, signalImag;
 2821|  1.10M|  UCHAR harmIndex = *ptrHarmIndex;
 2822|  1.10M|  int freqInvFlag = (lowSubband & 1);
 2823|  1.10M|  FIXP_DBL sineLevel;
 2824|       |
 2825|  1.10M|  *ptrHarmIndex = (harmIndex + 1) & 3;
 2826|       |
 2827|  29.1M|  for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (2827:15): [True: 28.0M, False: 1.10M]
  ------------------
 2828|  28.0M|    sineLevel = pSineLevel[k];
 2829|  28.0M|    freqInvFlag ^= 1;
 2830|  28.0M|    if (sineLevel != FL2FXCONST_DBL(0.f)) {
  ------------------
  |  |  192|  28.0M|  (FIXP_DBL)(                                                                \
  |  |  193|  28.0M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 28.0M, Folded]
  |  |  ------------------
  |  |  194|  28.0M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  28.0M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 28.0M]
  |  |  ------------------
  |  |  195|  28.0M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  28.0M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  28.0M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  28.0M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  28.0M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  28.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  28.0M|          : ((((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 (2830:9): [True: 13.2k, False: 28.0M]
  ------------------
 2831|  13.2k|      signalReal = ptrReal[k];
 2832|  13.2k|      signalImag = ptrImag[k];
 2833|  13.2k|      sineLevel = scaleValue(sineLevel, scale_change);
 2834|  13.2k|      if (harmIndex & 2) {
  ------------------
  |  Branch (2834:11): [True: 6.58k, False: 6.64k]
  ------------------
 2835|       |        /* case 2,3 */
 2836|  6.58k|        sineLevel = -sineLevel;
 2837|  6.58k|      }
 2838|  13.2k|      if (!(harmIndex & 1)) {
  ------------------
  |  Branch (2838:11): [True: 6.61k, False: 6.61k]
  ------------------
 2839|       |        /* case 0,2: */
 2840|  6.61k|        ptrReal[k] = signalReal + sineLevel;
 2841|  6.61k|      } else {
 2842|       |        /* case 1,3 */
 2843|  6.61k|        if (!freqInvFlag) sineLevel = -sineLevel;
  ------------------
  |  Branch (2843:13): [True: 4.49k, False: 2.11k]
  ------------------
 2844|  6.61k|        ptrImag[k] = signalImag + sineLevel;
 2845|  6.61k|      }
 2846|  13.2k|    }
 2847|  28.0M|  }
 2848|  1.10M|}
env_calc.cpp:_ZL16adjustTimeSlotHQPiS_P22SBR_CALCULATE_ENVELOPEP13ENV_CALC_NRGSiiisii:
 2862|  6.70M|{
 2863|  6.70M|  FIXP_DBL *RESTRICT gain = nrgs->nrgGain; /*!< Gains of current envelope */
 2864|  6.70M|  FIXP_DBL *RESTRICT noiseLevel =
 2865|  6.70M|      nrgs->noiseLevel; /*!< Noise levels of current envelope */
 2866|  6.70M|  FIXP_DBL *RESTRICT pSineLevel = nrgs->nrgSine; /*!< Sine levels */
 2867|       |
 2868|  6.70M|  FIXP_DBL *RESTRICT filtBuffer =
 2869|  6.70M|      h_sbr_cal_env->filtBuffer; /*!< Gains of last envelope */
 2870|  6.70M|  FIXP_DBL *RESTRICT filtBufferNoise =
 2871|  6.70M|      h_sbr_cal_env->filtBufferNoise; /*!< Noise levels of last envelope */
 2872|  6.70M|  UCHAR *RESTRICT ptrHarmIndex =
 2873|  6.70M|      &h_sbr_cal_env->harmIndex; /*!< Harmonic index */
 2874|  6.70M|  int *RESTRICT ptrPhaseIndex =
 2875|  6.70M|      &h_sbr_cal_env->phaseIndex; /*!< Start index to random number array */
 2876|       |
 2877|  6.70M|  int k;
 2878|  6.70M|  FIXP_DBL signalReal, signalImag;
 2879|  6.70M|  FIXP_DBL noiseReal, noiseImag;
 2880|  6.70M|  FIXP_DBL smoothedGain, smoothedNoise;
 2881|  6.70M|  FIXP_SGL direct_ratio =
 2882|  6.70M|      /*FL2FXCONST_SGL(1.0f) */ (FIXP_SGL)MAXVAL_SGL - smooth_ratio;
  ------------------
  |  |  152|  6.70M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
 2883|  6.70M|  int index = *ptrPhaseIndex;
 2884|  6.70M|  UCHAR harmIndex = *ptrHarmIndex;
 2885|  6.70M|  int freqInvFlag = (lowSubband & 1);
 2886|  6.70M|  FIXP_DBL sineLevel;
 2887|  6.70M|  int shift;
 2888|  6.70M|  FIXP_DBL max_val_noise = 0, min_val_noise = 0;
 2889|  6.70M|  const FIXP_DBL max_val = MAX_VAL_NRG_HEADROOM >> scale_change;
  ------------------
  |  |  155|  6.70M|#define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  156|  6.70M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |               #define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  154|  6.70M|#define MAX_SFB_NRG_HEADROOM (1)
  |  |  ------------------
  ------------------
 2890|  6.70M|  const FIXP_DBL min_val = -max_val;
 2891|       |
 2892|  6.70M|  *ptrPhaseIndex = (index + noSubbands) & (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  6.70M|  512 /*!< Size of random number array for noise floor */
  ------------------
 2893|  6.70M|  *ptrHarmIndex = (harmIndex + 1) & 3;
 2894|       |
 2895|       |  /*
 2896|       |    Possible optimization:
 2897|       |    smooth_ratio and harmIndex stay constant during the loop.
 2898|       |    It might be faster to include a separate loop in each path.
 2899|       |
 2900|       |    the check for smooth_ratio is now outside the loop and the workload
 2901|       |    of the whole function decreased by about 20 %
 2902|       |  */
 2903|       |
 2904|  6.70M|  filtBufferNoiseShift +=
 2905|  6.70M|      1; /* due to later use of fMultDiv2 instead of fMult */
 2906|  6.70M|  if (filtBufferNoiseShift < 0) {
  ------------------
  |  Branch (2906:7): [True: 624, False: 6.70M]
  ------------------
 2907|    624|    shift = fixMin(DFRACT_BITS - 1, -filtBufferNoiseShift);
  ------------------
  |  |  306|    624|#define fixMin(a, b) fMin(a, b)
  ------------------
 2908|  6.70M|  } else {
 2909|  6.70M|    shift = fixMin(DFRACT_BITS - 1, filtBufferNoiseShift);
  ------------------
  |  |  306|  6.70M|#define fixMin(a, b) fMin(a, b)
  ------------------
 2910|  6.70M|    max_val_noise = MAX_VAL_NRG_HEADROOM >> shift;
  ------------------
  |  |  155|  6.70M|#define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  156|  6.70M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |               #define MAX_VAL_NRG_HEADROOM ((((FIXP_DBL)MAXVAL_DBL) >> MAX_SFB_NRG_HEADROOM))
  |  |  ------------------
  |  |  |  |  154|  6.70M|#define MAX_SFB_NRG_HEADROOM (1)
  |  |  ------------------
  ------------------
 2911|  6.70M|    min_val_noise = -max_val_noise;
 2912|  6.70M|  }
 2913|       |
 2914|  6.70M|  if (smooth_ratio > FL2FXCONST_SGL(0.0f)) {
  ------------------
  |  |  180|  6.70M|  (FIXP_SGL)(                                                                \
  |  |  181|  6.70M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 6.70M, Folded]
  |  |  ------------------
  |  |  182|  6.70M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  6.70M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.70M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 6.70M]
  |  |  ------------------
  |  |  183|  6.70M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  6.70M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  6.70M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  6.70M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  6.70M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.70M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  6.70M|          : ((((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 (2914:7): [True: 2.36M, False: 4.33M]
  ------------------
 2915|  50.0M|    for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (2915:17): [True: 47.6M, False: 2.36M]
  ------------------
 2916|       |      /*
 2917|       |        Smoothing: The old envelope has been bufferd and a certain ratio
 2918|       |        of the old gains and noise levels is used.
 2919|       |      */
 2920|       |
 2921|  47.6M|      smoothedGain =
 2922|  47.6M|          fMult(smooth_ratio, filtBuffer[k]) + fMult(direct_ratio, gain[k]);
 2923|       |
 2924|  47.6M|      if (filtBufferNoiseShift < 0) {
  ------------------
  |  Branch (2924:11): [True: 34, False: 47.6M]
  ------------------
 2925|     34|        smoothedNoise = (fMultDiv2(smooth_ratio, filtBufferNoise[k]) >> shift) +
 2926|     34|                        fMult(direct_ratio, noiseLevel[k]);
 2927|  47.6M|      } else {
 2928|  47.6M|        smoothedNoise = fMultDiv2(smooth_ratio, filtBufferNoise[k]);
 2929|  47.6M|        smoothedNoise =
 2930|  47.6M|            (fMax(fMin(smoothedNoise, max_val_noise), min_val_noise) << shift) +
 2931|  47.6M|            fMult(direct_ratio, noiseLevel[k]);
 2932|  47.6M|      }
 2933|       |
 2934|  47.6M|      smoothedNoise = fMax(fMin(smoothedNoise, (FIXP_DBL)(MAXVAL_DBL / 2)),
  ------------------
  |  |  156|  47.6M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 2935|  47.6M|                           (FIXP_DBL)(MINVAL_DBL / 2));
  ------------------
  |  |  158|  47.6M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 2936|       |
 2937|       |      /*
 2938|       |        The next 2 multiplications constitute the actual envelope adjustment
 2939|       |        of the signal and should be carried out with full accuracy
 2940|       |        (supplying #DFRACT_BITS valid bits).
 2941|       |      */
 2942|  47.6M|      signalReal =
 2943|  47.6M|          fMax(fMin(fMultDiv2(*ptrReal, smoothedGain), max_val), min_val)
 2944|  47.6M|          << scale_change;
 2945|  47.6M|      signalImag =
 2946|  47.6M|          fMax(fMin(fMultDiv2(*ptrImag, smoothedGain), max_val), min_val)
 2947|  47.6M|          << scale_change;
 2948|       |
 2949|  47.6M|      index++;
 2950|       |
 2951|  47.6M|      if (pSineLevel[k] != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  47.6M|  (FIXP_DBL)(                                                                \
  |  |  193|  47.6M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 47.6M, Folded]
  |  |  ------------------
  |  |  194|  47.6M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  47.6M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  47.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 47.6M]
  |  |  ------------------
  |  |  195|  47.6M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  47.6M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  47.6M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  47.6M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  47.6M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  47.6M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  47.6M|          : ((((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 (2951:11): [True: 58.9k, False: 47.6M]
  ------------------
 2952|  58.9k|        sineLevel = pSineLevel[k];
 2953|       |
 2954|  58.9k|        switch (harmIndex) {
  ------------------
  |  Branch (2954:17): [True: 58.9k, False: 0]
  ------------------
 2955|  14.7k|          case 0:
  ------------------
  |  Branch (2955:11): [True: 14.7k, False: 44.2k]
  ------------------
 2956|  14.7k|            *ptrReal++ = (signalReal + sineLevel);
 2957|  14.7k|            *ptrImag++ = (signalImag);
 2958|  14.7k|            break;
 2959|  14.7k|          case 2:
  ------------------
  |  Branch (2959:11): [True: 14.7k, False: 44.1k]
  ------------------
 2960|  14.7k|            *ptrReal++ = (signalReal - sineLevel);
 2961|  14.7k|            *ptrImag++ = (signalImag);
 2962|  14.7k|            break;
 2963|  14.7k|          case 1:
  ------------------
  |  Branch (2963:11): [True: 14.7k, False: 44.2k]
  ------------------
 2964|  14.7k|            *ptrReal++ = (signalReal);
 2965|  14.7k|            if (freqInvFlag)
  ------------------
  |  Branch (2965:17): [True: 13.8k, False: 881]
  ------------------
 2966|  13.8k|              *ptrImag++ = (signalImag - sineLevel);
 2967|    881|            else
 2968|    881|              *ptrImag++ = (signalImag + sineLevel);
 2969|  14.7k|            break;
 2970|  14.7k|          case 3:
  ------------------
  |  Branch (2970:11): [True: 14.7k, False: 44.1k]
  ------------------
 2971|  14.7k|            *ptrReal++ = signalReal;
 2972|  14.7k|            if (freqInvFlag)
  ------------------
  |  Branch (2972:17): [True: 13.8k, False: 880]
  ------------------
 2973|  13.8k|              *ptrImag++ = (signalImag + sineLevel);
 2974|    880|            else
 2975|    880|              *ptrImag++ = (signalImag - sineLevel);
 2976|  14.7k|            break;
 2977|  58.9k|        }
 2978|  47.6M|      } else {
 2979|  47.6M|        if (noNoiseFlag) {
  ------------------
  |  Branch (2979:13): [True: 0, False: 47.6M]
  ------------------
 2980|       |          /* Just the amplified signal is saved */
 2981|      0|          *ptrReal++ = (signalReal);
 2982|      0|          *ptrImag++ = (signalImag);
 2983|  47.6M|        } else {
 2984|       |          /* Add noisefloor to the amplified signal */
 2985|  47.6M|          index &= (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|  47.6M|  512 /*!< Size of random number array for noise floor */
  ------------------
 2986|  47.6M|          noiseReal =
 2987|  47.6M|              fMult(FDK_sbrDecoder_sbr_randomPhase[index][0], smoothedNoise);
 2988|  47.6M|          noiseImag =
 2989|  47.6M|              fMult(FDK_sbrDecoder_sbr_randomPhase[index][1], smoothedNoise);
 2990|  47.6M|          *ptrReal++ = (signalReal + noiseReal);
 2991|  47.6M|          *ptrImag++ = (signalImag + noiseImag);
 2992|  47.6M|        }
 2993|  47.6M|      }
 2994|  47.6M|      freqInvFlag ^= 1;
 2995|  47.6M|    }
 2996|       |
 2997|  4.33M|  } else {
 2998|   131M|    for (k = 0; k < noSubbands; k++) {
  ------------------
  |  Branch (2998:17): [True: 127M, False: 4.33M]
  ------------------
 2999|   127M|      smoothedGain = gain[k];
 3000|   127M|      signalReal =
 3001|   127M|          fMax(fMin(fMultDiv2(*ptrReal, smoothedGain), max_val), min_val)
 3002|   127M|          << scale_change;
 3003|   127M|      signalImag =
 3004|   127M|          fMax(fMin(fMultDiv2(*ptrImag, smoothedGain), max_val), min_val)
 3005|   127M|          << scale_change;
 3006|       |
 3007|   127M|      index++;
 3008|       |
 3009|   127M|      if ((sineLevel = pSineLevel[k]) != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   127M|  (FIXP_DBL)(                                                                \
  |  |  193|   127M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 127M, Folded]
  |  |  ------------------
  |  |  194|   127M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   127M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   127M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 127M]
  |  |  ------------------
  |  |  195|   127M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   127M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   127M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   127M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   127M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   127M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   127M|          : ((((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 (3009:11): [True: 72.1k, False: 127M]
  ------------------
 3010|  72.1k|        switch (harmIndex) {
  ------------------
  |  Branch (3010:17): [True: 72.1k, False: 0]
  ------------------
 3011|  18.1k|          case 0:
  ------------------
  |  Branch (3011:11): [True: 18.1k, False: 53.9k]
  ------------------
 3012|  18.1k|            signalReal += sineLevel;
 3013|  18.1k|            break;
 3014|  18.1k|          case 1:
  ------------------
  |  Branch (3014:11): [True: 18.1k, False: 53.9k]
  ------------------
 3015|  18.1k|            if (freqInvFlag)
  ------------------
  |  Branch (3015:17): [True: 10.2k, False: 7.88k]
  ------------------
 3016|  10.2k|              signalImag -= sineLevel;
 3017|  7.88k|            else
 3018|  7.88k|              signalImag += sineLevel;
 3019|  18.1k|            break;
 3020|  17.9k|          case 2:
  ------------------
  |  Branch (3020:11): [True: 17.9k, False: 54.2k]
  ------------------
 3021|  17.9k|            signalReal -= sineLevel;
 3022|  17.9k|            break;
 3023|  17.9k|          case 3:
  ------------------
  |  Branch (3023:11): [True: 17.9k, False: 54.2k]
  ------------------
 3024|  17.9k|            if (freqInvFlag)
  ------------------
  |  Branch (3024:17): [True: 10.0k, False: 7.83k]
  ------------------
 3025|  10.0k|              signalImag += sineLevel;
 3026|  7.83k|            else
 3027|  7.83k|              signalImag -= sineLevel;
 3028|  17.9k|            break;
 3029|  72.1k|        }
 3030|   127M|      } else {
 3031|   127M|        if (noNoiseFlag == 0) {
  ------------------
  |  Branch (3031:13): [True: 126M, False: 407k]
  ------------------
 3032|       |          /* Add noisefloor to the amplified signal */
 3033|   126M|          smoothedNoise = noiseLevel[k];
 3034|   126M|          index &= (SBR_NF_NO_RANDOM_VAL - 1);
  ------------------
  |  |  116|   126M|  512 /*!< Size of random number array for noise floor */
  ------------------
 3035|   126M|          noiseReal =
 3036|   126M|              fMult(FDK_sbrDecoder_sbr_randomPhase[index][0], smoothedNoise);
 3037|   126M|          noiseImag =
 3038|   126M|              fMult(FDK_sbrDecoder_sbr_randomPhase[index][1], smoothedNoise);
 3039|       |
 3040|   126M|          signalReal += noiseReal;
 3041|   126M|          signalImag += noiseImag;
 3042|   126M|        }
 3043|   127M|      }
 3044|   127M|      *ptrReal++ = signalReal;
 3045|   127M|      *ptrImag++ = signalImag;
 3046|       |
 3047|   127M|      freqInvFlag ^= 1;
 3048|   127M|    }
 3049|  4.33M|  }
 3050|  6.70M|}

_Z13decodeSbrDataP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATAS2_S4_:
  240|   187k|{
  241|   187k|  FIXP_SGL tempSfbNrgPrev[MAX_FREQ_COEFFS];
  242|   187k|  int errLeft;
  243|       |
  244|       |  /* Save previous energy values to be able to reuse them later for concealment.
  245|       |   */
  246|   187k|  FDKmemcpy(tempSfbNrgPrev, h_prev_data_left->sfb_nrg_prev,
  247|   187k|            MAX_FREQ_COEFFS * sizeof(FIXP_SGL));
  ------------------
  |  |  140|   187k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|   187k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  248|       |
  249|   187k|  if (hHeaderData->frameErrorFlag || hHeaderData->bs_info.pvc_mode == 0) {
  ------------------
  |  Branch (249:7): [True: 18.3k, False: 168k]
  |  Branch (249:38): [True: 84.2k, False: 84.6k]
  ------------------
  250|   102k|    decodeEnvelope(hHeaderData, h_data_left, h_prev_data_left,
  251|   102k|                   h_prev_data_right);
  252|   102k|  } else {
  253|  84.6k|    FDK_ASSERT(h_data_right == NULL);
  ------------------
  |  |  221|  84.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (253:5): [True: 84.6k, False: 0]
  ------------------
  254|  84.6k|  }
  255|   187k|  decodeNoiseFloorlevels(hHeaderData, h_data_left, h_prev_data_left);
  256|       |
  257|   187k|  if (h_data_right != NULL) {
  ------------------
  |  Branch (257:7): [True: 72.1k, False: 115k]
  ------------------
  258|  72.1k|    errLeft = hHeaderData->frameErrorFlag;
  259|  72.1k|    decodeEnvelope(hHeaderData, h_data_right, h_prev_data_right,
  260|  72.1k|                   h_prev_data_left);
  261|  72.1k|    decodeNoiseFloorlevels(hHeaderData, h_data_right, h_prev_data_right);
  262|       |
  263|  72.1k|    if (!errLeft && hHeaderData->frameErrorFlag) {
  ------------------
  |  Branch (263:9): [True: 40.6k, False: 31.4k]
  |  Branch (263:21): [True: 6.03k, False: 34.6k]
  ------------------
  264|       |      /* If an error occurs in the right channel where the left channel seemed
  265|       |         ok, we apply concealment also on the left channel. This ensures that
  266|       |         the coupling modes of both channels match and that we have the same
  267|       |         number of envelopes in coupling mode. However, as the left channel has
  268|       |         already been processed before, the resulting energy levels are not the
  269|       |         same as if the left channel had been concealed during the first call of
  270|       |         decodeEnvelope().
  271|       |      */
  272|       |      /* Restore previous energy values for concealment, because the values have
  273|       |         been overwritten by the first call of decodeEnvelope(). */
  274|  6.03k|      FDKmemcpy(h_prev_data_left->sfb_nrg_prev, tempSfbNrgPrev,
  275|  6.03k|                MAX_FREQ_COEFFS * sizeof(FIXP_SGL));
  ------------------
  |  |  140|  6.03k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  6.03k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  276|       |      /* Do concealment */
  277|  6.03k|      decodeEnvelope(hHeaderData, h_data_left, h_prev_data_left,
  278|  6.03k|                     h_prev_data_right);
  279|  6.03k|    }
  280|       |
  281|  72.1k|    if (h_data_left->coupling) {
  ------------------
  |  Branch (281:9): [True: 22.4k, False: 49.6k]
  ------------------
  282|  22.4k|      sbr_envelope_unmapping(hHeaderData, h_data_left, h_data_right);
  283|  22.4k|    }
  284|  72.1k|  }
  285|       |
  286|       |  /* Display the data for debugging: */
  287|   187k|}
env_dec.cpp:_ZL22sbr_envelope_unmappingP15SBR_HEADER_DATAP14SBR_FRAME_DATAS2_:
  296|  22.4k|{
  297|  22.4k|  int i;
  298|  22.4k|  FIXP_SGL tempL_m, tempR_m, tempRplus1_m, newL_m, newR_m;
  299|  22.4k|  SCHAR tempL_e, tempR_e, tempRplus1_e, newL_e, newR_e;
  300|       |
  301|       |  /* 1. Unmap (already dequantized) coupled envelope energies */
  302|       |
  303|   293k|  for (i = 0; i < h_data_left->nScaleFactors; i++) {
  ------------------
  |  Branch (303:15): [True: 271k, False: 22.4k]
  ------------------
  304|   271k|    tempR_m = (FIXP_SGL)((LONG)h_data_right->iEnvelope[i] & MASK_M);
  ------------------
  |  |  138|   271k|  (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  112|   271k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |                 (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  |  |  139|   271k|   << EXP_BITS) /*!< Mask for extracting the mantissa of a pseudo float \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  305|   271k|    tempR_e = (SCHAR)((LONG)h_data_right->iEnvelope[i] & MASK_E);
  ------------------
  |  |  142|   271k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  306|       |
  307|   271k|    tempR_e -= (18 + NRG_EXP_OFFSET); /* -18 = ld(UNMAPPING_SCALE /
  ------------------
  |  |  153|   271k|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
  308|       |                                         h_data_right->nChannels) */
  309|   271k|    tempL_m = (FIXP_SGL)((LONG)h_data_left->iEnvelope[i] & MASK_M);
  ------------------
  |  |  138|   271k|  (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  112|   271k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |                 (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  |  |  139|   271k|   << EXP_BITS) /*!< Mask for extracting the mantissa of a pseudo float \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  310|   271k|    tempL_e = (SCHAR)((LONG)h_data_left->iEnvelope[i] & MASK_E);
  ------------------
  |  |  142|   271k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  311|       |
  312|   271k|    tempL_e -= NRG_EXP_OFFSET;
  ------------------
  |  |  153|   271k|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
  313|       |
  314|       |    /* Calculate tempRight+1 */
  315|   271k|    FDK_add_MantExp(tempR_m, tempR_e, FL2FXCONST_SGL(0.5f), 1, /* 1.0 */
  ------------------
  |  |  180|   271k|  (FIXP_SGL)(                                                                \
  |  |  181|   271k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 271k, Folded]
  |  |  ------------------
  |  |  182|   271k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   271k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   271k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 271k]
  |  |  ------------------
  |  |  183|   271k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   271k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   271k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   271k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   271k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   271k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   271k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  316|   271k|                    &tempRplus1_m, &tempRplus1_e);
  317|       |
  318|   271k|    FDK_divide_MantExp(tempL_m, tempL_e + 1, /*  2 * tempLeft */
  319|   271k|                       tempRplus1_m, tempRplus1_e, &newR_m, &newR_e);
  320|       |
  321|   271k|    if (newR_m >= ((FIXP_SGL)MAXVAL_SGL - ROUNDING)) {
  ------------------
  |  |  152|   271k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
                  if (newR_m >= ((FIXP_SGL)MAXVAL_SGL - ROUNDING)) {
  ------------------
  |  |  149|   271k|  ((FIXP_SGL)(                                                             \
  |  |  150|   271k|      1 << (EXP_BITS - 1))) /*!< 0.5-offset for rounding the mantissa of a \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  |  Branch (321:9): [True: 771, False: 270k]
  ------------------
  322|    771|      newR_m >>= 1;
  323|    771|      newR_e += 1;
  324|    771|    }
  325|       |
  326|   271k|    newL_m = FX_DBL2FX_SGL(fMult(tempR_m, newR_m));
  ------------------
  |  |  220|   271k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   271k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   271k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  327|   271k|    newL_e = tempR_e + newR_e;
  328|       |
  329|   271k|    h_data_right->iEnvelope[i] =
  330|   271k|        ((FIXP_SGL)((SHORT)(FIXP_SGL)(newR_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  149|   271k|  ((FIXP_SGL)(                                                             \
  |  |  150|   271k|      1 << (EXP_BITS - 1))) /*!< 0.5-offset for rounding the mantissa of a \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                      ((FIXP_SGL)((SHORT)(FIXP_SGL)(newR_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  138|   271k|  (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  112|   271k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |                 (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  |  |  139|   271k|   << EXP_BITS) /*!< Mask for extracting the mantissa of a pseudo float \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  331|   271k|        (FIXP_SGL)((SHORT)(FIXP_SGL)(newR_e + NRG_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  153|   271k|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
                      (FIXP_SGL)((SHORT)(FIXP_SGL)(newR_e + NRG_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  142|   271k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  332|   271k|    h_data_left->iEnvelope[i] =
  333|   271k|        ((FIXP_SGL)((SHORT)(FIXP_SGL)(newL_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  149|   271k|  ((FIXP_SGL)(                                                             \
  |  |  150|   271k|      1 << (EXP_BITS - 1))) /*!< 0.5-offset for rounding the mantissa of a \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                      ((FIXP_SGL)((SHORT)(FIXP_SGL)(newL_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  138|   271k|  (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  112|   271k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |                 (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  |  |  139|   271k|   << EXP_BITS) /*!< Mask for extracting the mantissa of a pseudo float \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  334|   271k|        (FIXP_SGL)((SHORT)(FIXP_SGL)(newL_e + NRG_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  153|   271k|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
                      (FIXP_SGL)((SHORT)(FIXP_SGL)(newL_e + NRG_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  142|   271k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|   271k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  335|   271k|  }
  336|       |
  337|       |  /* 2. Dequantize and unmap coupled noise floor levels */
  338|       |
  339|  98.8k|  for (i = 0; i < hHeaderData->freqBandData.nNfb *
  ------------------
  |  Branch (339:15): [True: 76.3k, False: 22.4k]
  ------------------
  340|  98.8k|                      h_data_left->frameInfo.nNoiseEnvelopes;
  341|  76.3k|       i++) {
  342|  76.3k|    tempL_e = (SCHAR)(6 - (LONG)h_data_left->sbrNoiseFloorLevel[i]);
  343|  76.3k|    tempR_e = (SCHAR)((LONG)h_data_right->sbrNoiseFloorLevel[i] -
  344|  76.3k|                      12) /*SBR_ENERGY_PAN_OFFSET*/;
  345|       |
  346|       |    /* Calculate tempR+1 */
  347|  76.3k|    FDK_add_MantExp(FL2FXCONST_SGL(0.5f), 1 + tempR_e, /* tempR */
  ------------------
  |  |  180|  76.3k|  (FIXP_SGL)(                                                                \
  |  |  181|  76.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 76.3k, Folded]
  |  |  ------------------
  |  |  182|  76.3k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  76.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 76.3k]
  |  |  ------------------
  |  |  183|  76.3k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  76.3k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  76.3k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  76.3k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  76.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  76.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  348|  76.3k|                    FL2FXCONST_SGL(0.5f), 1,           /*  1.0  */
  ------------------
  |  |  180|  76.3k|  (FIXP_SGL)(                                                                \
  |  |  181|  76.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 76.3k, Folded]
  |  |  ------------------
  |  |  182|  76.3k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  76.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 76.3k]
  |  |  ------------------
  |  |  183|  76.3k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  76.3k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  76.3k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  76.3k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  76.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  76.3k|          : ((((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|  76.3k|                    &tempRplus1_m, &tempRplus1_e);
  350|       |
  351|       |    /* Calculate 2*tempLeft/(tempR+1) */
  352|  76.3k|    FDK_divide_MantExp(FL2FXCONST_SGL(0.5f), tempL_e + 2, /*  2 * tempLeft */
  ------------------
  |  |  180|  76.3k|  (FIXP_SGL)(                                                                \
  |  |  181|  76.3k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 76.3k, Folded]
  |  |  ------------------
  |  |  182|  76.3k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  76.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 76.3k]
  |  |  ------------------
  |  |  183|  76.3k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  76.3k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  76.3k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  76.3k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  76.3k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  76.3k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|  76.3k|                       tempRplus1_m, tempRplus1_e, &newR_m, &newR_e);
  354|       |
  355|       |    /* if (newR_m >= ((FIXP_SGL)MAXVAL_SGL - ROUNDING)) {
  356|       |      newR_m >>= 1;
  357|       |      newR_e += 1;
  358|       |    } */
  359|       |
  360|       |    /* L = tempR * R */
  361|  76.3k|    newL_m = newR_m;
  362|  76.3k|    newL_e = newR_e + tempR_e;
  363|  76.3k|    h_data_right->sbrNoiseFloorLevel[i] =
  364|  76.3k|        ((FIXP_SGL)((SHORT)(FIXP_SGL)(newR_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  149|  76.3k|  ((FIXP_SGL)(                                                             \
  |  |  150|  76.3k|      1 << (EXP_BITS - 1))) /*!< 0.5-offset for rounding the mantissa of a \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                      ((FIXP_SGL)((SHORT)(FIXP_SGL)(newR_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  138|  76.3k|  (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |                 (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  |  |  139|  76.3k|   << EXP_BITS) /*!< Mask for extracting the mantissa of a pseudo float \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  365|  76.3k|        (FIXP_SGL)((SHORT)(FIXP_SGL)(newR_e + NOISE_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  156|  76.3k|  38 /*!< Will be added to the noise level exponent to prevent negative \
  ------------------
                      (FIXP_SGL)((SHORT)(FIXP_SGL)(newR_e + NOISE_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  142|  76.3k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  366|  76.3k|    h_data_left->sbrNoiseFloorLevel[i] =
  367|  76.3k|        ((FIXP_SGL)((SHORT)(FIXP_SGL)(newL_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  149|  76.3k|  ((FIXP_SGL)(                                                             \
  |  |  150|  76.3k|      1 << (EXP_BITS - 1))) /*!< 0.5-offset for rounding the mantissa of a \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                      ((FIXP_SGL)((SHORT)(FIXP_SGL)(newL_m + ROUNDING) & MASK_M)) +
  ------------------
  |  |  138|  76.3k|  (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  112|  76.3k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |                 (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  |  |  139|  76.3k|   << EXP_BITS) /*!< Mask for extracting the mantissa of a pseudo float \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  368|  76.3k|        (FIXP_SGL)((SHORT)(FIXP_SGL)(newL_e + NOISE_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  156|  76.3k|  38 /*!< Will be added to the noise level exponent to prevent negative \
  ------------------
                      (FIXP_SGL)((SHORT)(FIXP_SGL)(newL_e + NOISE_EXP_OFFSET) & MASK_E);
  ------------------
  |  |  142|  76.3k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|  76.3k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  369|  76.3k|  }
  370|  22.4k|}
env_dec.cpp:_ZL14decodeEnvelopeP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATAS4_:
  456|   203k|) {
  457|   203k|  int i;
  458|   203k|  int fFrameError = hHeaderData->frameErrorFlag;
  459|   203k|  FIXP_SGL tempSfbNrgPrev[MAX_FREQ_COEFFS];
  460|       |
  461|   203k|  if (!fFrameError) {
  ------------------
  |  Branch (461:7): [True: 124k, False: 78.4k]
  ------------------
  462|       |    /*
  463|       |      To avoid distortions after bad frames, set the error flag if delta coding
  464|       |      in time occurs. However, SBR can take a little longer to come up again.
  465|       |    */
  466|   124k|    if (h_prev_data->frameErrorFlag) {
  ------------------
  |  Branch (466:9): [True: 57.4k, False: 67.4k]
  ------------------
  467|  57.4k|      if (h_sbr_data->domain_vec[0] != 0) {
  ------------------
  |  Branch (467:11): [True: 6.91k, False: 50.5k]
  ------------------
  468|  6.91k|        fFrameError = 1;
  469|  6.91k|      }
  470|  67.4k|    } else {
  471|       |      /* Check that the previous stop position and the current start position
  472|       |         match. (Could be done in checkFrameInfo(), but the previous frame data
  473|       |         is not available there) */
  474|  67.4k|      if (h_sbr_data->frameInfo.borders[0] !=
  ------------------
  |  Branch (474:11): [True: 9.20k, False: 58.2k]
  ------------------
  475|  67.4k|          h_prev_data->stopPos - hHeaderData->numberTimeSlots) {
  476|       |        /* Both the previous as well as the current frame are flagged to be ok,
  477|       |         * but they do not match! */
  478|  9.20k|        if (h_sbr_data->domain_vec[0] == 1) {
  ------------------
  |  Branch (478:13): [True: 239, False: 8.96k]
  ------------------
  479|       |          /* Prefer concealment over delta-time coding between the mismatching
  480|       |           * frames */
  481|    239|          fFrameError = 1;
  482|  8.96k|        } else {
  483|       |          /* Close the gap in time by triggering timeCompensateFirstEnvelope()
  484|       |           */
  485|  8.96k|          fFrameError = 1;
  486|  8.96k|        }
  487|  9.20k|      }
  488|  67.4k|    }
  489|   124k|  }
  490|       |
  491|   203k|  if (fFrameError) /* Error is detected */
  ------------------
  |  Branch (491:7): [True: 94.5k, False: 108k]
  ------------------
  492|  94.5k|  {
  493|  94.5k|    leanSbrConcealment(hHeaderData, h_sbr_data, h_prev_data);
  494|       |
  495|       |    /* decode the envelope data to linear PCM */
  496|  94.5k|    deltaToLinearPcmEnvelopeDecoding(hHeaderData, h_sbr_data, h_prev_data);
  497|  94.5k|  } else /*Do a temporary dummy decoding and check that the envelope values are
  498|       |            within limits */
  499|   108k|  {
  500|   108k|    if (h_prev_data->frameErrorFlag) {
  ------------------
  |  Branch (500:9): [True: 50.5k, False: 58.2k]
  ------------------
  501|  50.5k|      timeCompensateFirstEnvelope(hHeaderData, h_sbr_data, h_prev_data);
  502|  50.5k|      if (h_sbr_data->coupling != h_prev_data->coupling) {
  ------------------
  |  Branch (502:11): [True: 5.88k, False: 44.6k]
  ------------------
  503|       |        /*
  504|       |          Coupling mode has changed during concealment.
  505|       |           The stored energy levels need to be converted.
  506|       |         */
  507|  94.2k|        for (i = 0; i < hHeaderData->freqBandData.nSfb[1]; i++) {
  ------------------
  |  Branch (507:21): [True: 88.3k, False: 5.88k]
  ------------------
  508|       |          /* Former Level-Channel will be used for both channels */
  509|  88.3k|          if (h_prev_data->coupling == COUPLING_BAL) {
  ------------------
  |  Branch (509:15): [True: 6.85k, False: 81.4k]
  ------------------
  510|  6.85k|            h_prev_data->sfb_nrg_prev[i] =
  511|  6.85k|                (otherChannel != NULL) ? otherChannel->sfb_nrg_prev[i]
  ------------------
  |  Branch (511:17): [True: 6.85k, False: 0]
  ------------------
  512|  6.85k|                                       : (FIXP_SGL)SBR_ENERGY_PAN_OFFSET;
  ------------------
  |  |  141|  6.85k|#define SBR_ENERGY_PAN_OFFSET (12 << ENV_EXP_FRACT)
  |  |  ------------------
  |  |  |  |  119|      0|#define ENV_EXP_FRACT 0
  |  |  ------------------
  ------------------
  513|  6.85k|          }
  514|       |          /* Former L/R will be combined as the new Level-Channel */
  515|  81.4k|          else if (h_sbr_data->coupling == COUPLING_LEVEL &&
  ------------------
  |  Branch (515:20): [True: 11.0k, False: 70.4k]
  ------------------
  516|  11.0k|                   otherChannel != NULL) {
  ------------------
  |  Branch (516:20): [True: 11.0k, False: 0]
  ------------------
  517|  11.0k|            h_prev_data->sfb_nrg_prev[i] = (h_prev_data->sfb_nrg_prev[i] +
  518|  11.0k|                                            otherChannel->sfb_nrg_prev[i]) >>
  519|  11.0k|                                           1;
  520|  70.4k|          } else if (h_sbr_data->coupling == COUPLING_BAL) {
  ------------------
  |  Branch (520:22): [True: 4.76k, False: 65.6k]
  ------------------
  521|  4.76k|            h_prev_data->sfb_nrg_prev[i] = (FIXP_SGL)SBR_ENERGY_PAN_OFFSET;
  ------------------
  |  |  141|  4.76k|#define SBR_ENERGY_PAN_OFFSET (12 << ENV_EXP_FRACT)
  |  |  ------------------
  |  |  |  |  119|  4.76k|#define ENV_EXP_FRACT 0
  |  |  ------------------
  ------------------
  522|  4.76k|          }
  523|  88.3k|        }
  524|  5.88k|      }
  525|  50.5k|    }
  526|   108k|    FDKmemcpy(tempSfbNrgPrev, h_prev_data->sfb_nrg_prev,
  527|   108k|              MAX_FREQ_COEFFS * sizeof(FIXP_SGL));
  ------------------
  |  |  140|   108k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|   108k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  528|       |
  529|   108k|    deltaToLinearPcmEnvelopeDecoding(hHeaderData, h_sbr_data, h_prev_data);
  530|       |
  531|   108k|    fFrameError = checkEnvelopeData(hHeaderData, h_sbr_data, h_prev_data);
  532|       |
  533|   108k|    if (fFrameError) {
  ------------------
  |  Branch (533:9): [True: 22.5k, False: 86.2k]
  ------------------
  534|  22.5k|      hHeaderData->frameErrorFlag = 1;
  535|  22.5k|      FDKmemcpy(h_prev_data->sfb_nrg_prev, tempSfbNrgPrev,
  536|  22.5k|                MAX_FREQ_COEFFS * sizeof(FIXP_SGL));
  ------------------
  |  |  140|  22.5k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  22.5k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  537|  22.5k|      decodeEnvelope(hHeaderData, h_sbr_data, h_prev_data, otherChannel);
  538|  22.5k|      return;
  539|  22.5k|    }
  540|   108k|  }
  541|       |
  542|   180k|  requantizeEnvelopeData(h_sbr_data, h_sbr_data->ampResolutionCurrentFrame);
  543|       |
  544|   180k|  hHeaderData->frameErrorFlag = fFrameError;
  545|   180k|}
env_dec.cpp:_ZL18leanSbrConcealmentP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATA:
  384|  94.5k|) {
  385|  94.5k|  FIXP_SGL target; /* targeted level for sfb_nrg_prev during fade-down */
  386|  94.5k|  FIXP_SGL step;   /* speed of fade */
  387|  94.5k|  int i;
  388|       |
  389|  94.5k|  int currentStartPos =
  390|  94.5k|      fMax(0, h_prev_data->stopPos - hHeaderData->numberTimeSlots);
  391|  94.5k|  int currentStopPos = hHeaderData->numberTimeSlots;
  392|       |
  393|       |  /* Use some settings of the previous frame */
  394|  94.5k|  h_sbr_data->ampResolutionCurrentFrame = h_prev_data->ampRes;
  395|  94.5k|  h_sbr_data->coupling = h_prev_data->coupling;
  396|   567k|  for (i = 0; i < MAX_INVF_BANDS; i++)
  ------------------
  |  |  159|   567k|#define MAX_INVF_BANDS MAX_NOISE_COEFFS
  |  |  ------------------
  |  |  |  |  128|   567k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (396:15): [True: 472k, False: 94.5k]
  ------------------
  397|   472k|    h_sbr_data->sbr_invf_mode[i] = h_prev_data->sbr_invf_mode[i];
  398|       |
  399|       |  /* Generate concealing control data */
  400|       |
  401|  94.5k|  h_sbr_data->frameInfo.nEnvelopes = 1;
  402|  94.5k|  h_sbr_data->frameInfo.borders[0] = currentStartPos;
  403|  94.5k|  h_sbr_data->frameInfo.borders[1] = currentStopPos;
  404|  94.5k|  h_sbr_data->frameInfo.freqRes[0] = 1;
  405|  94.5k|  h_sbr_data->frameInfo.tranEnv = -1; /* no transient */
  406|  94.5k|  h_sbr_data->frameInfo.nNoiseEnvelopes = 1;
  407|  94.5k|  h_sbr_data->frameInfo.bordersNoise[0] = currentStartPos;
  408|  94.5k|  h_sbr_data->frameInfo.bordersNoise[1] = currentStopPos;
  409|       |
  410|  94.5k|  h_sbr_data->nScaleFactors = hHeaderData->freqBandData.nSfb[1];
  411|       |
  412|       |  /* Generate fake envelope data */
  413|       |
  414|  94.5k|  h_sbr_data->domain_vec[0] = 1;
  415|       |
  416|  94.5k|  if (h_sbr_data->coupling == COUPLING_BAL) {
  ------------------
  |  Branch (416:7): [True: 12.6k, False: 81.8k]
  ------------------
  417|  12.6k|    target = (FIXP_SGL)SBR_ENERGY_PAN_OFFSET;
  ------------------
  |  |  141|  12.6k|#define SBR_ENERGY_PAN_OFFSET (12 << ENV_EXP_FRACT)
  |  |  ------------------
  |  |  |  |  119|  12.6k|#define ENV_EXP_FRACT 0
  |  |  ------------------
  ------------------
  418|  12.6k|    step = (FIXP_SGL)DECAY_COUPLING;
  ------------------
  |  |  151|  12.6k|  1 /*!< If the energy data is not shifted, use 1 instead of 0.5 */
  ------------------
  419|  81.8k|  } else {
  420|  81.8k|    target = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  81.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  81.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 81.8k, Folded]
  |  |  ------------------
  |  |  182|  81.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  81.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  81.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 81.8k]
  |  |  ------------------
  |  |  183|  81.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  81.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  81.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  81.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  81.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  81.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  81.8k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  421|  81.8k|    step = (FIXP_SGL)DECAY;
  ------------------
  |  |  144|  81.8k|#define DECAY (1 << ENV_EXP_FRACT)
  |  |  ------------------
  |  |  |  |  119|  81.8k|#define ENV_EXP_FRACT 0
  |  |  ------------------
  ------------------
  422|  81.8k|  }
  423|  94.5k|  if (hHeaderData->bs_info.ampResolution == 0) {
  ------------------
  |  Branch (423:7): [True: 46.1k, False: 48.4k]
  ------------------
  424|  46.1k|    target <<= 1;
  425|  46.1k|    step <<= 1;
  426|  46.1k|  }
  427|       |
  428|  1.06M|  for (i = 0; i < h_sbr_data->nScaleFactors; i++) {
  ------------------
  |  Branch (428:15): [True: 968k, False: 94.5k]
  ------------------
  429|   968k|    if (h_prev_data->sfb_nrg_prev[i] > target)
  ------------------
  |  Branch (429:9): [True: 506k, False: 461k]
  ------------------
  430|   506k|      h_sbr_data->iEnvelope[i] = -step;
  431|   461k|    else
  432|   461k|      h_sbr_data->iEnvelope[i] = step;
  433|   968k|  }
  434|       |
  435|       |  /* Noisefloor levels are always cleared ... */
  436|       |
  437|  94.5k|  h_sbr_data->domain_vec_noise[0] = 1;
  438|  94.5k|  FDKmemclear(h_sbr_data->sbrNoiseFloorLevel,
  439|  94.5k|              sizeof(h_sbr_data->sbrNoiseFloorLevel));
  440|       |
  441|       |  /* ... and so are the sines */
  442|  94.5k|  FDKmemclear(h_sbr_data->addHarmonics,
  443|  94.5k|              sizeof(ULONG) * ADD_HARMONICS_FLAGS_SIZE);
  ------------------
  |  |  159|  94.5k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  444|  94.5k|}
env_dec.cpp:_ZL32deltaToLinearPcmEnvelopeDecodingP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATA:
  771|   203k|{
  772|   203k|  int i, domain, no_of_bands, band, freqRes;
  773|       |
  774|   203k|  FIXP_SGL *sfb_nrg_prev = h_prev_data->sfb_nrg_prev;
  775|   203k|  FIXP_SGL *ptr_nrg = h_sbr_data->iEnvelope;
  776|       |
  777|   203k|  int offset =
  778|   203k|      2 * hHeaderData->freqBandData.nSfb[0] - hHeaderData->freqBandData.nSfb[1];
  779|       |
  780|   471k|  for (i = 0; i < h_sbr_data->frameInfo.nEnvelopes; i++) {
  ------------------
  |  Branch (780:15): [True: 268k, False: 203k]
  ------------------
  781|   268k|    domain = h_sbr_data->domain_vec[i];
  782|   268k|    freqRes = h_sbr_data->frameInfo.freqRes[i];
  783|       |
  784|   268k|    FDK_ASSERT(freqRes >= 0 && freqRes <= 1);
  ------------------
  |  |  221|   268k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (784:5): [True: 268k, False: 0]
  |  Branch (784:5): [True: 268k, False: 0]
  |  Branch (784:5): [True: 268k, False: 0]
  ------------------
  785|       |
  786|   268k|    no_of_bands = hHeaderData->freqBandData.nSfb[freqRes];
  787|       |
  788|   268k|    FDK_ASSERT(no_of_bands < (64));
  ------------------
  |  |  221|   268k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (788:5): [True: 268k, False: 0]
  ------------------
  789|       |
  790|   268k|    if (domain == 0) {
  ------------------
  |  Branch (790:9): [True: 138k, False: 129k]
  ------------------
  791|   138k|      mapLowResEnergyVal(*ptr_nrg, sfb_nrg_prev, offset, 0, freqRes);
  792|   138k|      ptr_nrg++;
  793|  1.02M|      for (band = 1; band < no_of_bands; band++) {
  ------------------
  |  Branch (793:22): [True: 884k, False: 138k]
  ------------------
  794|   884k|        *ptr_nrg = *ptr_nrg + *(ptr_nrg - 1);
  795|   884k|        mapLowResEnergyVal(*ptr_nrg, sfb_nrg_prev, offset, band, freqRes);
  796|   884k|        ptr_nrg++;
  797|   884k|      }
  798|   138k|    } else {
  799|  1.44M|      for (band = 0; band < no_of_bands; band++) {
  ------------------
  |  Branch (799:22): [True: 1.31M, False: 129k]
  ------------------
  800|  1.31M|        *ptr_nrg =
  801|  1.31M|            *ptr_nrg + sfb_nrg_prev[indexLow2High(offset, band, freqRes)];
  802|  1.31M|        mapLowResEnergyVal(*ptr_nrg, sfb_nrg_prev, offset, band, freqRes);
  803|  1.31M|        ptr_nrg++;
  804|  1.31M|      }
  805|   129k|    }
  806|   268k|  }
  807|   203k|}
env_dec.cpp:_ZL18mapLowResEnergyValsPsiii:
  193|  2.34M|{
  194|  2.34M|  if (res == 0) {
  ------------------
  |  Branch (194:7): [True: 620k, False: 1.72M]
  ------------------
  195|   620k|    if (offset >= 0) {
  ------------------
  |  Branch (195:9): [True: 620k, False: 0]
  ------------------
  196|   620k|      if (index < offset)
  ------------------
  |  Branch (196:11): [True: 36.9k, False: 583k]
  ------------------
  197|  36.9k|        prevData[index] = currVal;
  198|   583k|      else {
  199|   583k|        prevData[2 * index - offset] = currVal;
  200|   583k|        prevData[2 * index + 1 - offset] = currVal;
  201|   583k|      }
  202|   620k|    } else {
  203|      0|      offset = -offset;
  204|      0|      if (index < offset) {
  ------------------
  |  Branch (204:11): [True: 0, False: 0]
  ------------------
  205|      0|        prevData[3 * index] = currVal;
  206|      0|        prevData[3 * index + 1] = currVal;
  207|      0|        prevData[3 * index + 2] = currVal;
  208|      0|      } else {
  209|      0|        prevData[2 * index + offset] = currVal;
  210|      0|        prevData[2 * index + 1 + offset] = currVal;
  211|      0|      }
  212|      0|    }
  213|   620k|  } else
  214|  1.72M|    prevData[index] = currVal;
  215|  2.34M|}
env_dec.cpp:_ZL13indexLow2Highiii:
  160|  1.31M|{
  161|  1.31M|  if (res == 0) {
  ------------------
  |  Branch (161:7): [True: 59.0k, False: 1.26M]
  ------------------
  162|  59.0k|    if (offset >= 0) {
  ------------------
  |  Branch (162:9): [True: 59.0k, False: 0]
  ------------------
  163|  59.0k|      if (index < offset)
  ------------------
  |  Branch (163:11): [True: 7.65k, False: 51.3k]
  ------------------
  164|  7.65k|        return (index);
  165|  51.3k|      else
  166|  51.3k|        return (2 * index - offset);
  167|  59.0k|    } else {
  168|      0|      offset = -offset;
  169|      0|      if (index < offset)
  ------------------
  |  Branch (169:11): [True: 0, False: 0]
  ------------------
  170|      0|        return (2 * index + index);
  171|      0|      else
  172|      0|        return (2 * index + offset);
  173|      0|    }
  174|  59.0k|  } else
  175|  1.26M|    return (index);
  176|  1.31M|}
env_dec.cpp:_ZL27timeCompensateFirstEnvelopeP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATA:
  630|  50.5k|{
  631|  50.5k|  int i, nScalefactors;
  632|  50.5k|  FRAME_INFO *pFrameInfo = &h_sbr_data->frameInfo;
  633|  50.5k|  UCHAR *nSfb = hHeaderData->freqBandData.nSfb;
  634|  50.5k|  int estimatedStartPos =
  635|  50.5k|      fMax(0, h_prev_data->stopPos - hHeaderData->numberTimeSlots);
  636|  50.5k|  int refLen, newLen, shift;
  637|  50.5k|  FIXP_SGL deltaExp;
  638|       |
  639|       |  /* Original length of first envelope according to bitstream */
  640|  50.5k|  refLen = pFrameInfo->borders[1] - pFrameInfo->borders[0];
  641|       |  /* Corrected length of first envelope (concealing can make the first envelope
  642|       |   * longer) */
  643|  50.5k|  newLen = pFrameInfo->borders[1] - estimatedStartPos;
  644|       |
  645|  50.5k|  if (newLen <= 0) {
  ------------------
  |  Branch (645:7): [True: 9, False: 50.5k]
  ------------------
  646|       |    /* An envelope length of <= 0 would not work, so we don't use it.
  647|       |       May occur if the previous frame was flagged bad due to a mismatch
  648|       |       of the old and new frame infos. */
  649|      9|    newLen = refLen;
  650|      9|    estimatedStartPos = pFrameInfo->borders[0];
  651|      9|  }
  652|       |
  653|  50.5k|  deltaExp = FDK_getNumOctavesDiv8(newLen, refLen);
  654|       |
  655|       |  /* Shift by -3 to rescale ld-table, ampRes-1 to enable coarser steps */
  656|  50.5k|  shift = (FRACT_BITS - 1 - ENV_EXP_FRACT - 1 +
  ------------------
  |  |  112|  50.5k|#define FRACT_BITS 16  /* single precision */
  ------------------
                shift = (FRACT_BITS - 1 - ENV_EXP_FRACT - 1 +
  ------------------
  |  |  119|  50.5k|#define ENV_EXP_FRACT 0
  ------------------
  657|  50.5k|           h_sbr_data->ampResolutionCurrentFrame - 3);
  658|  50.5k|  deltaExp = deltaExp >> shift;
  659|  50.5k|  pFrameInfo->borders[0] = estimatedStartPos;
  660|  50.5k|  pFrameInfo->bordersNoise[0] = estimatedStartPos;
  661|       |
  662|  50.5k|  if (h_sbr_data->coupling != COUPLING_BAL) {
  ------------------
  |  Branch (662:7): [True: 42.8k, False: 7.74k]
  ------------------
  663|  42.8k|    nScalefactors = (pFrameInfo->freqRes[0]) ? nSfb[1] : nSfb[0];
  ------------------
  |  Branch (663:21): [True: 8.28k, False: 34.5k]
  ------------------
  664|       |
  665|   366k|    for (i = 0; i < nScalefactors; i++)
  ------------------
  |  Branch (665:17): [True: 323k, False: 42.8k]
  ------------------
  666|   323k|      h_sbr_data->iEnvelope[i] = h_sbr_data->iEnvelope[i] + deltaExp;
  667|  42.8k|  }
  668|  50.5k|}
env_dec.cpp:_ZL17checkEnvelopeDataP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATA:
  555|   108k|) {
  556|   108k|  FIXP_SGL *iEnvelope = h_sbr_data->iEnvelope;
  557|   108k|  FIXP_SGL *sfb_nrg_prev = h_prev_data->sfb_nrg_prev;
  558|   108k|  int i = 0, errorFlag = 0;
  559|   108k|  FIXP_SGL sbr_max_energy = (h_sbr_data->ampResolutionCurrentFrame == 1)
  ------------------
  |  Branch (559:29): [True: 21.4k, False: 87.4k]
  ------------------
  560|   108k|                                ? SBR_MAX_ENERGY
  ------------------
  |  |  142|  21.4k|#define SBR_MAX_ENERGY (35 << ENV_EXP_FRACT)
  |  |  ------------------
  |  |  |  |  119|  21.4k|#define ENV_EXP_FRACT 0
  |  |  ------------------
  ------------------
  561|   108k|                                : (SBR_MAX_ENERGY << 1);
  ------------------
  |  |  142|  87.4k|#define SBR_MAX_ENERGY (35 << ENV_EXP_FRACT)
  |  |  ------------------
  |  |  |  |  119|  87.4k|#define ENV_EXP_FRACT 0
  |  |  ------------------
  ------------------
  562|       |
  563|       |  /*
  564|       |    Range check for current energies
  565|       |  */
  566|  1.48M|  for (i = 0; i < h_sbr_data->nScaleFactors; i++) {
  ------------------
  |  Branch (566:15): [True: 1.37M, False: 108k]
  ------------------
  567|  1.37M|    if (iEnvelope[i] > sbr_max_energy) {
  ------------------
  |  Branch (567:9): [True: 76.7k, False: 1.29M]
  ------------------
  568|  76.7k|      errorFlag = 1;
  569|  76.7k|    }
  570|  1.37M|    if (iEnvelope[i] < FL2FXCONST_SGL(0.0f)) {
  ------------------
  |  |  180|  1.37M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.37M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.37M, Folded]
  |  |  ------------------
  |  |  182|  1.37M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.37M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.37M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.37M]
  |  |  ------------------
  |  |  183|  1.37M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.37M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.37M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.37M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.37M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.37M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.37M|          : ((((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 (570:9): [True: 73.0k, False: 1.30M]
  ------------------
  571|  73.0k|      errorFlag = 1;
  572|       |      /* iEnvelope[i] = FL2FXCONST_SGL(0.0f); */
  573|  73.0k|    }
  574|  1.37M|  }
  575|       |
  576|       |  /*
  577|       |    Range check for previous energies
  578|       |  */
  579|  1.39M|  for (i = 0; i < hHeaderData->freqBandData.nSfb[1]; i++) {
  ------------------
  |  Branch (579:15): [True: 1.28M, False: 108k]
  ------------------
  580|  1.28M|    sfb_nrg_prev[i] = fixMax(sfb_nrg_prev[i], FL2FXCONST_SGL(0.0f));
  ------------------
  |  |  307|  5.13M|#define fixMax(a, b) fMax(a, b)
  |  |  ------------------
  |  |  |  Branch (307:30): [Folded, False: 1.28M]
  |  |  |  Branch (307:30): [Folded, False: 0]
  |  |  |  Branch (307:30): [True: 1.28M, Folded]
  |  |  ------------------
  ------------------
  581|  1.28M|    sfb_nrg_prev[i] = fixMin(sfb_nrg_prev[i], sbr_max_energy);
  ------------------
  |  |  306|  1.28M|#define fixMin(a, b) fMin(a, b)
  ------------------
  582|  1.28M|  }
  583|       |
  584|   108k|  return (errorFlag);
  585|   108k|}
env_dec.cpp:_ZL22requantizeEnvelopeDataP14SBR_FRAME_DATAi:
  691|   180k|                                   int ampResolution) {
  692|   180k|  int i;
  693|   180k|  FIXP_SGL mantissa;
  694|   180k|  int ampShift = 1 - ampResolution;
  695|   180k|  int exponent;
  696|       |
  697|       |  /* In case that ENV_EXP_FRACT is changed to something else but 0 or 8,
  698|       |     the initialization of this array has to be adapted!
  699|       |  */
  700|       |#if ENV_EXP_FRACT
  701|       |  static const FIXP_SGL pow2[ENV_EXP_FRACT] = {
  702|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 1))), /* 0.7071 */
  703|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 2))), /* 0.5946 */
  704|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 3))),
  705|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 4))),
  706|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 5))),
  707|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 6))),
  708|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 7))),
  709|       |      FL2FXCONST_SGL(0.5f * pow(2.0f, pow(0.5f, 8))) /* 0.5013 */
  710|       |  };
  711|       |
  712|       |  int bit, mask;
  713|       |#endif
  714|       |
  715|  2.17M|  for (i = 0; i < h_sbr_data->nScaleFactors; i++) {
  ------------------
  |  Branch (715:15): [True: 1.99M, False: 180k]
  ------------------
  716|  1.99M|    exponent = (LONG)h_sbr_data->iEnvelope[i];
  717|       |
  718|       |#if ENV_EXP_FRACT
  719|       |
  720|       |    exponent = exponent >> ampShift;
  721|       |    mantissa = 0.5f;
  722|       |
  723|       |    /* Amplify mantissa according to the fractional part of the
  724|       |       exponent (result will be between 0.500000 and 0.999999)
  725|       |    */
  726|       |    mask = 1; /* begin with lowest bit of exponent */
  727|       |
  728|       |    for (bit = ENV_EXP_FRACT - 1; bit >= 0; bit--) {
  729|       |      if (exponent & mask) {
  730|       |        /* The current bit of the exponent is set,
  731|       |           multiply mantissa with the corresponding factor: */
  732|       |        mantissa = (FIXP_SGL)((mantissa * pow2[bit]) << 1);
  733|       |      }
  734|       |      /* Advance to next bit */
  735|       |      mask = mask << 1;
  736|       |    }
  737|       |
  738|       |    /* Make integer part of exponent right aligned */
  739|       |    exponent = exponent >> ENV_EXP_FRACT;
  740|       |
  741|       |#else
  742|       |    /* In case of the high amplitude resolution, 1 bit of the exponent gets lost
  743|       |       by the shift. This will be compensated by a mantissa of 0.5*sqrt(2)
  744|       |       instead of 0.5 if that bit is 1. */
  745|  1.99M|    mantissa = (exponent & ampShift) ? FL2FXCONST_SGL(0.707106781186548f)
  ------------------
  |  |  180|   616k|  (FIXP_SGL)(                                                                \
  |  |  181|   616k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.99M, Folded]
  |  |  ------------------
  |  |  182|  1.99M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.99M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.99M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.99M]
  |  |  ------------------
  |  |  183|  1.99M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.99M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.99M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.99M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.99M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.99M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  18.4E|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|  18.4E|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  18.4E|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 18.4E]
  |  |  ------------------
  |  |  187|  18.4E|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|  18.4E|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|  18.4E|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|  18.4E|                 ? (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|  18.4E|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|  18.4E|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  18.4E|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (745:16): [True: 616k, False: 1.37M]
  ------------------
  746|  1.99M|                                     : FL2FXCONST_SGL(0.5f);
  ------------------
  |  |  180|  3.37M|  (FIXP_SGL)(                                                                \
  |  |  181|  3.37M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.99M, Folded]
  |  |  ------------------
  |  |  182|  3.37M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.99M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.99M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.99M]
  |  |  ------------------
  |  |  183|  1.99M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.99M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.99M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.99M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.99M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.99M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  18.4E|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|  18.4E|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  18.4E|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 18.4E]
  |  |  ------------------
  |  |  187|  18.4E|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|  18.4E|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|  18.4E|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|  18.4E|                 ? (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|  18.4E|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|  18.4E|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  18.4E|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  747|  1.99M|    exponent = exponent >> ampShift;
  748|  1.99M|#endif
  749|       |
  750|       |    /*
  751|       |      Mantissa was set to 0.5 (instead of 1.0, therefore increase exponent by
  752|       |      1). Multiply by L=nChannels=64 by increasing exponent by another 6.
  753|       |      => Increase exponent by 7
  754|       |    */
  755|  1.99M|    exponent += 7 + NRG_EXP_OFFSET;
  ------------------
  |  |  153|  1.99M|  16 /*!< Will be added to the reference energy's exponent to prevent negative \
  ------------------
  756|       |
  757|       |    /* Combine mantissa and exponent and write back the result */
  758|  1.99M|    h_sbr_data->iEnvelope[i] =
  759|  1.99M|        ((FIXP_SGL)((SHORT)(FIXP_SGL)mantissa & MASK_M)) +
  ------------------
  |  |  138|  1.99M|  (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  112|  1.99M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |                 (((1 << (FRACT_BITS - EXP_BITS)) - 1)                                 \
  |  |  ------------------
  |  |  |  |  126|  1.99M|#define EXP_BITS 6
  |  |  ------------------
  |  |  139|  1.99M|   << EXP_BITS) /*!< Mask for extracting the mantissa of a pseudo float \
  |  |  ------------------
  |  |  |  |  126|  1.99M|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  760|  1.99M|        (FIXP_SGL)((SHORT)(FIXP_SGL)exponent & MASK_E);
  ------------------
  |  |  142|  1.99M|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|  1.99M|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  761|  1.99M|  }
  762|   180k|}
env_dec.cpp:_ZL22decodeNoiseFloorlevelsP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATA:
  816|   259k|{
  817|   259k|  int i;
  818|   259k|  int nNfb = hHeaderData->freqBandData.nNfb;
  819|   259k|  int nNoiseFloorEnvelopes = h_sbr_data->frameInfo.nNoiseEnvelopes;
  820|       |
  821|       |  /* Decode first noise envelope */
  822|       |
  823|   259k|  if (h_sbr_data->domain_vec_noise[0] == 0) {
  ------------------
  |  Branch (823:7): [True: 164k, False: 94.5k]
  ------------------
  824|   164k|    FIXP_SGL noiseLevel = h_sbr_data->sbrNoiseFloorLevel[0];
  825|   417k|    for (i = 1; i < nNfb; i++) {
  ------------------
  |  Branch (825:17): [True: 252k, False: 164k]
  ------------------
  826|   252k|      noiseLevel += h_sbr_data->sbrNoiseFloorLevel[i];
  827|   252k|      h_sbr_data->sbrNoiseFloorLevel[i] = noiseLevel;
  828|   252k|    }
  829|   164k|  } else {
  830|   288k|    for (i = 0; i < nNfb; i++) {
  ------------------
  |  Branch (830:17): [True: 193k, False: 94.5k]
  ------------------
  831|   193k|      h_sbr_data->sbrNoiseFloorLevel[i] += h_prev_data->prevNoiseLevel[i];
  832|   193k|    }
  833|  94.5k|  }
  834|       |
  835|       |  /* If present, decode the second noise envelope
  836|       |     Note:  nNoiseFloorEnvelopes can only be 1 or 2 */
  837|       |
  838|   259k|  if (nNoiseFloorEnvelopes > 1) {
  ------------------
  |  Branch (838:7): [True: 106k, False: 152k]
  ------------------
  839|   106k|    if (h_sbr_data->domain_vec_noise[1] == 0) {
  ------------------
  |  Branch (839:9): [True: 35.8k, False: 71.0k]
  ------------------
  840|  35.8k|      FIXP_SGL noiseLevel = h_sbr_data->sbrNoiseFloorLevel[nNfb];
  841|   118k|      for (i = nNfb + 1; i < 2 * nNfb; i++) {
  ------------------
  |  Branch (841:26): [True: 82.9k, False: 35.8k]
  ------------------
  842|  82.9k|        noiseLevel += h_sbr_data->sbrNoiseFloorLevel[i];
  843|  82.9k|        h_sbr_data->sbrNoiseFloorLevel[i] = noiseLevel;
  844|  82.9k|      }
  845|  71.0k|    } else {
  846|   213k|      for (i = 0; i < nNfb; i++) {
  ------------------
  |  Branch (846:19): [True: 142k, False: 71.0k]
  ------------------
  847|   142k|        h_sbr_data->sbrNoiseFloorLevel[i + nNfb] +=
  848|   142k|            h_sbr_data->sbrNoiseFloorLevel[i];
  849|   142k|      }
  850|  71.0k|    }
  851|   106k|  }
  852|       |
  853|   259k|  limitNoiseLevels(hHeaderData, h_sbr_data);
  854|       |
  855|       |  /* Update prevNoiseLevel with the last noise envelope */
  856|   870k|  for (i = 0; i < nNfb; i++)
  ------------------
  |  Branch (856:15): [True: 610k, False: 259k]
  ------------------
  857|   610k|    h_prev_data->prevNoiseLevel[i] =
  858|   610k|        h_sbr_data->sbrNoiseFloorLevel[i + nNfb * (nNoiseFloorEnvelopes - 1)];
  859|       |
  860|       |  /* Requantize the noise floor levels in COUPLING_OFF-mode */
  861|   259k|  if (!h_sbr_data->coupling) {
  ------------------
  |  Branch (861:7): [True: 214k, False: 44.9k]
  ------------------
  862|   214k|    int nf_e;
  863|       |
  864|   933k|    for (i = 0; i < nNoiseFloorEnvelopes * nNfb; i++) {
  ------------------
  |  Branch (864:17): [True: 718k, False: 214k]
  ------------------
  865|   718k|      nf_e = 6 - (LONG)h_sbr_data->sbrNoiseFloorLevel[i] + 1 + NOISE_EXP_OFFSET;
  ------------------
  |  |  156|   718k|  38 /*!< Will be added to the noise level exponent to prevent negative \
  ------------------
  866|       |      /* +1 to compensate for a mantissa of 0.5 instead of 1.0 */
  867|       |
  868|   718k|      h_sbr_data->sbrNoiseFloorLevel[i] =
  869|   718k|          (FIXP_SGL)(((LONG)FL2FXCONST_SGL(0.5f)) + /* mantissa */
  ------------------
  |  |  180|   718k|  (FIXP_SGL)(                                                                \
  |  |  181|   718k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 718k, Folded]
  |  |  ------------------
  |  |  182|   718k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   718k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   718k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 718k]
  |  |  ------------------
  |  |  183|   718k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   718k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   718k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   718k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   718k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   718k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   718k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  870|   718k|                     (nf_e & MASK_E));              /* exponent */
  ------------------
  |  |  142|   718k|  ((1 << EXP_BITS) - 1) /*!< Mask for extracting the exponent of a pseudo \
  |  |  ------------------
  |  |  |  |  126|   718k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  871|   718k|    }
  872|   214k|  }
  873|   259k|}
env_dec.cpp:_ZL16limitNoiseLevelsP15SBR_HEADER_DATAP14SBR_FRAME_DATA:
  597|   259k|{
  598|   259k|  int i;
  599|   259k|  int nNfb = hHeaderData->freqBandData.nNfb;
  600|       |
  601|       |/*
  602|       |  Set range limits. The exact values depend on the coupling mode.
  603|       |  However this limitation is primarily intended to avoid unlimited
  604|       |  accumulation of the delta-coded noise levels.
  605|       |*/
  606|   259k|#define lowerLimit \
  607|   259k|  ((FIXP_SGL)0) /* lowerLimit actually refers to the _highest_ noise energy */
  608|   259k|#define upperLimit \
  609|   259k|  ((FIXP_SGL)35) /* upperLimit actually refers to the _lowest_ noise energy */
  610|       |
  611|       |  /*
  612|       |    Range check for current noise levels
  613|       |  */
  614|  1.13M|  for (i = 0; i < h_sbr_data->frameInfo.nNoiseEnvelopes * nNfb; i++) {
  ------------------
  |  Branch (614:15): [True: 872k, False: 259k]
  ------------------
  615|   872k|    h_sbr_data->sbrNoiseFloorLevel[i] =
  616|   872k|        fixMin(h_sbr_data->sbrNoiseFloorLevel[i], upperLimit);
  ------------------
  |  |  306|   872k|#define fixMin(a, b) fMin(a, b)
  ------------------
  617|   872k|    h_sbr_data->sbrNoiseFloorLevel[i] =
  618|   872k|        fixMax(h_sbr_data->sbrNoiseFloorLevel[i], lowerLimit);
  ------------------
  |  |  307|   872k|#define fixMax(a, b) fMax(a, b)
  ------------------
  619|   872k|  }
  620|   259k|}

_Z25sbrdec_mapToStdSampleRatejj:
  219|   254k|{
  220|   254k|  UINT fsMapped = fs, tableSize = 0;
  221|   254k|  const SR_MAPPING *mappingTable;
  222|   254k|  int i;
  223|       |
  224|   254k|  if (!isUsac) {
  ------------------
  |  Branch (224:7): [True: 137k, False: 116k]
  ------------------
  225|   137k|    mappingTable = stdSampleRatesMapping;
  226|   137k|    tableSize = sizeof(stdSampleRatesMapping) / sizeof(SR_MAPPING);
  227|   137k|  } else {
  228|   116k|    mappingTable = stdSampleRatesMappingUsac;
  229|   116k|    tableSize = sizeof(stdSampleRatesMappingUsac) / sizeof(SR_MAPPING);
  230|   116k|  }
  231|       |
  232|  1.81M|  for (i = tableSize - 1; i >= 0; i--) {
  ------------------
  |  Branch (232:27): [True: 1.81M, False: 0]
  ------------------
  233|  1.81M|    if (fs >= mappingTable[i].fsRangeLo) {
  ------------------
  |  Branch (233:9): [True: 254k, False: 1.55M]
  ------------------
  234|   254k|      fsMapped = mappingTable[i].fsMapped;
  235|   254k|      break;
  236|   254k|    }
  237|  1.81M|  }
  238|       |
  239|   254k|  return (fsMapped);
  240|   254k|}
_Z14initHeaderDataP15SBR_HEADER_DATAiiiiji:
  246|   230k|               const int setDefaultHdr) {
  247|   230k|  HANDLE_FREQ_BAND_DATA hFreq = &hHeaderData->freqBandData;
  248|   230k|  SBR_ERROR sbrError = SBRDEC_OK;
  249|   230k|  int numAnalysisBands;
  250|   230k|  int sampleRateProc;
  251|       |
  252|   230k|  if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  206|   230k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  207|   230k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (252:7): [True: 137k, False: 92.2k]
  ------------------
  253|   137k|    sampleRateProc =
  254|   137k|        sbrdec_mapToStdSampleRate(sampleRateOut * downscaleFactor, 0);
  255|   137k|  } else {
  256|  92.2k|    sampleRateProc = sampleRateOut * downscaleFactor;
  257|  92.2k|  }
  258|       |
  259|   230k|  if (sampleRateIn == sampleRateOut) {
  ------------------
  |  Branch (259:7): [True: 91.1k, False: 139k]
  ------------------
  260|  91.1k|    hHeaderData->sbrProcSmplRate = sampleRateProc << 1;
  261|  91.1k|    numAnalysisBands = 32;
  262|   139k|  } else {
  263|   139k|    hHeaderData->sbrProcSmplRate = sampleRateProc;
  264|   139k|    if ((sampleRateOut >> 1) == sampleRateIn) {
  ------------------
  |  Branch (264:9): [True: 86.0k, False: 53.0k]
  ------------------
  265|       |      /* 1:2 */
  266|  86.0k|      numAnalysisBands = 32;
  267|  86.0k|    } else if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (267:16): [True: 25.9k, False: 27.1k]
  ------------------
  268|       |      /* 1:4 */
  269|  25.9k|      numAnalysisBands = 16;
  270|  27.1k|    } else if ((sampleRateOut * 3) >> 3 == (sampleRateIn * 8) >> 3) {
  ------------------
  |  Branch (270:16): [True: 27.0k, False: 86]
  ------------------
  271|       |      /* 3:8, 3/4 core frame length */
  272|  27.0k|      numAnalysisBands = 24;
  273|  27.0k|    } else {
  274|     86|      sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  275|     86|      goto bail;
  276|     86|    }
  277|   139k|  }
  278|   230k|  numAnalysisBands /= downscaleFactor;
  279|       |
  280|   230k|  if (setDefaultHdr) {
  ------------------
  |  Branch (280:7): [True: 229k, False: 911]
  ------------------
  281|       |    /* Fill in default values first */
  282|   229k|    hHeaderData->syncState = SBR_NOT_INITIALIZED;
  283|   229k|    hHeaderData->status = 0;
  284|   229k|    hHeaderData->frameErrorFlag = 0;
  285|       |
  286|   229k|    hHeaderData->bs_info.ampResolution = 1;
  287|   229k|    hHeaderData->bs_info.xover_band = 0;
  288|   229k|    hHeaderData->bs_info.sbr_preprocessing = 0;
  289|   229k|    hHeaderData->bs_info.pvc_mode = 0;
  290|       |
  291|   229k|    hHeaderData->bs_data.startFreq = 5;
  292|   229k|    hHeaderData->bs_data.stopFreq = 0;
  293|   229k|    hHeaderData->bs_data.freqScale =
  294|   229k|        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|   229k|    hHeaderData->bs_data.alterScale = 1;
  300|   229k|    hHeaderData->bs_data.noise_bands = 2;
  301|   229k|    hHeaderData->bs_data.limiterBands = 2;
  302|   229k|    hHeaderData->bs_data.limiterGains = 2;
  303|   229k|    hHeaderData->bs_data.interpolFreq = 1;
  304|   229k|    hHeaderData->bs_data.smoothingLength = 1;
  305|       |
  306|       |    /* Patch some entries */
  307|   229k|    if (sampleRateOut * downscaleFactor >= 96000) {
  ------------------
  |  Branch (307:9): [True: 25.7k, False: 203k]
  ------------------
  308|  25.7k|      hHeaderData->bs_data.startFreq =
  309|  25.7k|          4; /*   having read these frequency values from bit stream before. */
  310|  25.7k|      hHeaderData->bs_data.stopFreq = 3;
  311|   203k|    } else if (sampleRateOut * downscaleFactor >
  ------------------
  |  Branch (311:16): [True: 70.5k, False: 132k]
  ------------------
  312|   203k|               24000) { /* Trigger an error if SBR is going to be processed
  313|       |                           without     */
  314|  70.5k|      hHeaderData->bs_data.startFreq =
  315|  70.5k|          7; /*   having read these frequency values from bit stream before. */
  316|  70.5k|      hHeaderData->bs_data.stopFreq = 3;
  317|  70.5k|    }
  318|   229k|  }
  319|       |
  320|   230k|  if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (320:7): [True: 25.9k, False: 204k]
  ------------------
  321|  25.9k|    hHeaderData->timeStep = 4;
  322|   204k|  } else {
  323|   204k|    hHeaderData->timeStep = (flags & SBRDEC_ELD_GRID) ? 1 : 2;
  ------------------
  |  |  204|   204k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (323:29): [True: 127k, False: 77.1k]
  ------------------
  324|   204k|  }
  325|       |
  326|       |  /* Setup pointers to frequency band tables */
  327|   230k|  hFreq->freqBandTable[0] = hFreq->freqBandTableLo;
  328|   230k|  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|   230k|  hHeaderData->numberTimeSlots =
  333|   230k|      (samplesPerFrame / numAnalysisBands) >> (hHeaderData->timeStep - 1);
  334|   230k|  if (hHeaderData->numberTimeSlots > (16)) {
  ------------------
  |  Branch (334:7): [True: 0, False: 230k]
  ------------------
  335|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  336|      0|  }
  337|       |
  338|   230k|  hHeaderData->numberOfAnalysisBands = numAnalysisBands;
  339|   230k|  if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (339:7): [True: 25.9k, False: 204k]
  ------------------
  340|  25.9k|    hHeaderData->numberTimeSlots <<= 1;
  341|  25.9k|  }
  342|       |
  343|   230k|bail:
  344|   230k|  return sbrError;
  345|   230k|}
_Z20initSbrPrevFrameDataP19SBR_PREV_FRAME_DATAi:
  354|   147k|{
  355|   147k|  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|  8.43M|  for (i = 0; i < MAX_FREQ_COEFFS; i++)
  ------------------
  |  |  140|  8.43M|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  8.43M|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  |  Branch (359:15): [True: 8.28M, False: 147k]
  ------------------
  360|  8.28M|    h_prev_data->sfb_nrg_prev[i] = (FIXP_DBL)0;
  361|   887k|  for (i = 0; i < MAX_NOISE_COEFFS; i++)
  ------------------
  |  |  128|   887k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (361:15): [True: 739k, False: 147k]
  ------------------
  362|   739k|    h_prev_data->prevNoiseLevel[i] = (FIXP_DBL)0;
  363|   887k|  for (i = 0; i < MAX_INVF_BANDS; i++) h_prev_data->sbr_invf_mode[i] = INVF_OFF;
  ------------------
  |  |  159|   887k|#define MAX_INVF_BANDS MAX_NOISE_COEFFS
  |  |  ------------------
  |  |  |  |  128|   887k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (363:15): [True: 739k, False: 147k]
  ------------------
  364|       |
  365|   147k|  h_prev_data->stopPos = timeSlots;
  366|   147k|  h_prev_data->coupling = COUPLING_OFF;
  367|   147k|  h_prev_data->ampRes = 0;
  368|       |
  369|   147k|  FDKmemclear(&h_prev_data->prevFrameInfo, sizeof(h_prev_data->prevFrameInfo));
  370|   147k|}
_Z16sbrGetHeaderDataP15SBR_HEADER_DATAP13FDK_BITSTREAMjih:
  380|   573k|                 const UCHAR configMode) {
  381|   573k|  SBR_HEADER_DATA_BS *pBsData;
  382|   573k|  SBR_HEADER_DATA_BS lastHeader;
  383|   573k|  SBR_HEADER_DATA_BS_INFO lastInfo;
  384|   573k|  int headerExtra1 = 0, headerExtra2 = 0;
  385|       |
  386|       |  /* Read and discard new header in config change detection mode */
  387|   573k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   573k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (387:7): [True: 312k, False: 260k]
  ------------------
  388|   312k|    if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|   312k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|   312k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (388:9): [True: 203k, False: 108k]
  ------------------
  389|       |      /* ampResolution */
  390|   203k|      FDKreadBits(hBs, 1);
  391|   203k|    }
  392|       |    /* startFreq, stopFreq */
  393|   312k|    FDKpushFor(hBs, 8);
  394|   312k|    if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|   312k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|   312k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (394:9): [True: 203k, False: 108k]
  ------------------
  395|       |      /* xover_band */
  396|   203k|      FDKreadBits(hBs, 3);
  397|       |      /* reserved bits */
  398|   203k|      FDKreadBits(hBs, 2);
  399|   203k|    }
  400|   312k|    headerExtra1 = FDKreadBit(hBs);
  401|   312k|    headerExtra2 = FDKreadBit(hBs);
  402|   312k|    FDKpushFor(hBs, 5 * headerExtra1 + 6 * headerExtra2);
  403|       |
  404|   312k|    return HEADER_OK;
  405|   312k|  }
  406|       |
  407|       |  /* Copy SBR bit stream header to temporary header */
  408|   260k|  lastHeader = hHeaderData->bs_data;
  409|   260k|  lastInfo = hHeaderData->bs_info;
  410|       |
  411|       |  /* Read new header from bitstream */
  412|   260k|  if ((flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) && !fIsSbrData) {
  ------------------
  |  |  207|   260k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if ((flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) && !fIsSbrData) {
  ------------------
  |  |  206|   260k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (412:7): [True: 120k, False: 140k]
  |  Branch (412:64): [True: 60.7k, False: 59.6k]
  ------------------
  413|  60.7k|    pBsData = &hHeaderData->bs_dflt;
  414|   199k|  } else {
  415|   199k|    pBsData = &hHeaderData->bs_data;
  416|   199k|  }
  417|       |
  418|   260k|  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|   260k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|   260k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (418:7): [True: 140k, False: 120k]
  ------------------
  419|   140k|    hHeaderData->bs_info.ampResolution = FDKreadBits(hBs, 1);
  420|   140k|  }
  421|       |
  422|   260k|  pBsData->startFreq = FDKreadBits(hBs, 4);
  423|   260k|  pBsData->stopFreq = FDKreadBits(hBs, 4);
  424|       |
  425|   260k|  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|   260k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|   260k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (425:7): [True: 140k, False: 120k]
  ------------------
  426|   140k|    hHeaderData->bs_info.xover_band = FDKreadBits(hBs, 3);
  427|   140k|    FDKreadBits(hBs, 2);
  428|   140k|  }
  429|       |
  430|   260k|  headerExtra1 = FDKreadBits(hBs, 1);
  431|   260k|  headerExtra2 = FDKreadBits(hBs, 1);
  432|       |
  433|       |  /* Handle extra header information */
  434|   260k|  if (headerExtra1) {
  ------------------
  |  Branch (434:7): [True: 92.4k, False: 168k]
  ------------------
  435|  92.4k|    pBsData->freqScale = FDKreadBits(hBs, 2);
  436|  92.4k|    pBsData->alterScale = FDKreadBits(hBs, 1);
  437|  92.4k|    pBsData->noise_bands = FDKreadBits(hBs, 2);
  438|   168k|  } else {
  439|   168k|    pBsData->freqScale = 2;
  440|   168k|    pBsData->alterScale = 1;
  441|   168k|    pBsData->noise_bands = 2;
  442|   168k|  }
  443|       |
  444|   260k|  if (headerExtra2) {
  ------------------
  |  Branch (444:7): [True: 93.2k, False: 167k]
  ------------------
  445|  93.2k|    pBsData->limiterBands = FDKreadBits(hBs, 2);
  446|  93.2k|    pBsData->limiterGains = FDKreadBits(hBs, 2);
  447|  93.2k|    pBsData->interpolFreq = FDKreadBits(hBs, 1);
  448|  93.2k|    pBsData->smoothingLength = FDKreadBits(hBs, 1);
  449|   167k|  } else {
  450|   167k|    pBsData->limiterBands = 2;
  451|   167k|    pBsData->limiterGains = 2;
  452|   167k|    pBsData->interpolFreq = 1;
  453|   167k|    pBsData->smoothingLength = 1;
  454|   167k|  }
  455|       |
  456|       |  /* Look for new settings. IEC 14496-3, 4.6.18.3.1 */
  457|   260k|  if (hHeaderData->syncState < SBR_HEADER ||
  ------------------
  |  Branch (457:7): [True: 147k, False: 113k]
  ------------------
  458|   113k|      lastHeader.startFreq != pBsData->startFreq ||
  ------------------
  |  Branch (458:7): [True: 39.3k, False: 74.1k]
  ------------------
  459|  74.1k|      lastHeader.stopFreq != pBsData->stopFreq ||
  ------------------
  |  Branch (459:7): [True: 11.0k, False: 63.0k]
  ------------------
  460|  63.0k|      lastHeader.freqScale != pBsData->freqScale ||
  ------------------
  |  Branch (460:7): [True: 1.94k, False: 61.1k]
  ------------------
  461|  61.1k|      lastHeader.alterScale != pBsData->alterScale ||
  ------------------
  |  Branch (461:7): [True: 397, False: 60.7k]
  ------------------
  462|  60.7k|      lastHeader.noise_bands != pBsData->noise_bands ||
  ------------------
  |  Branch (462:7): [True: 1.20k, False: 59.5k]
  ------------------
  463|   202k|      lastInfo.xover_band != hHeaderData->bs_info.xover_band) {
  ------------------
  |  Branch (463:7): [True: 1.75k, False: 57.7k]
  ------------------
  464|   202k|    return HEADER_RESET; /* New settings */
  465|   202k|  }
  466|       |
  467|  57.7k|  return HEADER_OK;
  468|   260k|}
_Z24sbrGetSyntheticCodedDataP15SBR_HEADER_DATAP14SBR_FRAME_DATAP13FDK_BITSTREAMj:
  477|   292k|                             HANDLE_FDK_BITSTREAM hBs, const UINT flags) {
  478|   292k|  int i, bitsRead = 0;
  479|       |
  480|   292k|  int add_harmonic_flag = FDKreadBits(hBs, 1);
  481|   292k|  bitsRead++;
  482|       |
  483|   292k|  if (add_harmonic_flag) {
  ------------------
  |  Branch (483:7): [True: 36.5k, False: 255k]
  ------------------
  484|  36.5k|    int nSfb = hHeaderData->freqBandData.nSfb[1];
  485|   109k|    for (i = 0; i < ADD_HARMONICS_FLAGS_SIZE; i++) {
  ------------------
  |  |  159|   109k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  |  Branch (485:17): [True: 73.1k, False: 36.5k]
  ------------------
  486|       |      /* read maximum 32 bits and align them to the MSB */
  487|  73.1k|      int readBits = fMin(32, nSfb);
  488|  73.1k|      nSfb -= readBits;
  489|  73.1k|      if (readBits > 0) {
  ------------------
  |  Branch (489:11): [True: 37.6k, False: 35.5k]
  ------------------
  490|  37.6k|        hFrameData->addHarmonics[i] = FDKreadBits(hBs, readBits)
  491|  37.6k|                                      << (32 - readBits);
  492|  37.6k|      } else {
  493|  35.5k|        hFrameData->addHarmonics[i] = 0;
  494|  35.5k|      }
  495|       |
  496|  73.1k|      bitsRead += readBits;
  497|  73.1k|    }
  498|       |    /* bs_pvc_mode = 0 for Rsvd50 */
  499|  36.5k|    if (flags & SBRDEC_SYNTAX_USAC) {
  ------------------
  |  |  206|  36.5k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (499:9): [True: 11.4k, False: 25.0k]
  ------------------
  500|  11.4k|      if (hHeaderData->bs_info.pvc_mode) {
  ------------------
  |  Branch (500:11): [True: 2.77k, False: 8.71k]
  ------------------
  501|  2.77k|        int bs_sinusoidal_position = 31;
  502|  2.77k|        if (FDKreadBit(hBs) /* bs_sinusoidal_position_flag */) {
  ------------------
  |  Branch (502:13): [True: 586, False: 2.18k]
  ------------------
  503|    586|          bs_sinusoidal_position = FDKreadBits(hBs, 5);
  504|    586|        }
  505|  2.77k|        hFrameData->sinusoidal_position = bs_sinusoidal_position;
  506|  2.77k|      }
  507|  11.4k|    }
  508|   255k|  } else {
  509|   767k|    for (i = 0; i < ADD_HARMONICS_FLAGS_SIZE; i++)
  ------------------
  |  |  159|   767k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  |  Branch (509:17): [True: 511k, False: 255k]
  ------------------
  510|   511k|      hFrameData->addHarmonics[i] = 0;
  511|   255k|  }
  512|       |
  513|   292k|  return (bitsRead);
  514|   292k|}
_Z20sbrGetChannelElementP15SBR_HEADER_DATAP14SBR_FRAME_DATAS2_P19SBR_PREV_FRAME_DATAhP13FDK_BITSTREAMP6PS_DECji:
  623|   225k|                         const int overlap) {
  624|   225k|  int i, bs_coupling = COUPLING_OFF;
  625|   225k|  const int nCh = (hFrameDataRight == NULL) ? 1 : 2;
  ------------------
  |  Branch (625:19): [True: 140k, False: 85.8k]
  ------------------
  626|       |
  627|   225k|  if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  206|   225k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  207|   225k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (627:7): [True: 65.5k, False: 160k]
  ------------------
  628|       |    /* Reserved bits */
  629|  65.5k|    if (FDKreadBits(hBs, 1)) { /* bs_data_extra */
  ------------------
  |  Branch (629:9): [True: 18.8k, False: 46.7k]
  ------------------
  630|  18.8k|      FDKreadBits(hBs, 4);
  631|  18.8k|      if ((flags & SBRDEC_SYNTAX_SCAL) || (nCh == 2)) {
  ------------------
  |  |  205|  18.8k|#define SBRDEC_SYNTAX_SCAL 2
  ------------------
  |  Branch (631:11): [True: 11.1k, False: 7.69k]
  |  Branch (631:43): [True: 5.05k, False: 2.64k]
  ------------------
  632|  16.2k|        FDKreadBits(hBs, 4);
  633|  16.2k|      }
  634|  18.8k|    }
  635|  65.5k|  }
  636|       |
  637|   225k|  if (nCh == 2) {
  ------------------
  |  Branch (637:7): [True: 85.8k, False: 140k]
  ------------------
  638|       |    /* Read coupling flag */
  639|  85.8k|    bs_coupling = FDKreadBits(hBs, 1);
  640|  85.8k|    if (bs_coupling) {
  ------------------
  |  Branch (640:9): [True: 24.4k, False: 61.3k]
  ------------------
  641|  24.4k|      hFrameDataLeft->coupling = COUPLING_LEVEL;
  642|  24.4k|      hFrameDataRight->coupling = COUPLING_BAL;
  643|  61.3k|    } else {
  644|  61.3k|      hFrameDataLeft->coupling = COUPLING_OFF;
  645|  61.3k|      hFrameDataRight->coupling = COUPLING_OFF;
  646|  61.3k|    }
  647|   140k|  } else {
  648|   140k|    if (flags & SBRDEC_SYNTAX_SCAL) {
  ------------------
  |  |  205|   140k|#define SBRDEC_SYNTAX_SCAL 2
  ------------------
  |  Branch (648:9): [True: 15.0k, False: 125k]
  ------------------
  649|  15.0k|      FDKreadBits(hBs, 1); /* bs_coupling */
  650|  15.0k|    }
  651|   140k|    hFrameDataLeft->coupling = COUPLING_OFF;
  652|   140k|  }
  653|       |
  654|   225k|  if (flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  206|   225k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  207|   225k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (654:7): [True: 160k, False: 65.5k]
  ------------------
  655|   160k|    if (flags & SBRDEC_USAC_HARMONICSBR) {
  ------------------
  |  |  218|   160k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (655:9): [True: 41.7k, False: 118k]
  ------------------
  656|  41.7k|      hFrameDataLeft->sbrPatchingMode = FDKreadBit(hBs);
  657|  41.7k|      if (hFrameDataLeft->sbrPatchingMode == 0) {
  ------------------
  |  Branch (657:11): [True: 24.5k, False: 17.1k]
  ------------------
  658|  24.5k|        hFrameDataLeft->sbrOversamplingFlag = FDKreadBit(hBs);
  659|  24.5k|        if (FDKreadBit(hBs)) { /* sbrPitchInBinsFlag */
  ------------------
  |  Branch (659:13): [True: 3.42k, False: 21.1k]
  ------------------
  660|  3.42k|          hFrameDataLeft->sbrPitchInBins = FDKreadBits(hBs, 7);
  661|  21.1k|        } else {
  662|  21.1k|          hFrameDataLeft->sbrPitchInBins = 0;
  663|  21.1k|        }
  664|  24.5k|      } else {
  665|  17.1k|        hFrameDataLeft->sbrOversamplingFlag = 0;
  666|  17.1k|        hFrameDataLeft->sbrPitchInBins = 0;
  667|  17.1k|      }
  668|       |
  669|  41.7k|      if (nCh == 2) {
  ------------------
  |  Branch (669:11): [True: 29.3k, False: 12.3k]
  ------------------
  670|  29.3k|        if (bs_coupling) {
  ------------------
  |  Branch (670:13): [True: 13.3k, False: 15.9k]
  ------------------
  671|  13.3k|          hFrameDataRight->sbrPatchingMode = hFrameDataLeft->sbrPatchingMode;
  672|  13.3k|          hFrameDataRight->sbrOversamplingFlag =
  673|  13.3k|              hFrameDataLeft->sbrOversamplingFlag;
  674|  13.3k|          hFrameDataRight->sbrPitchInBins = hFrameDataLeft->sbrPitchInBins;
  675|  15.9k|        } else {
  676|  15.9k|          hFrameDataRight->sbrPatchingMode = FDKreadBit(hBs);
  677|  15.9k|          if (hFrameDataRight->sbrPatchingMode == 0) {
  ------------------
  |  Branch (677:15): [True: 9.81k, False: 6.15k]
  ------------------
  678|  9.81k|            hFrameDataRight->sbrOversamplingFlag = FDKreadBit(hBs);
  679|  9.81k|            if (FDKreadBit(hBs)) { /* sbrPitchInBinsFlag */
  ------------------
  |  Branch (679:17): [True: 2.95k, False: 6.86k]
  ------------------
  680|  2.95k|              hFrameDataRight->sbrPitchInBins = FDKreadBits(hBs, 7);
  681|  6.86k|            } else {
  682|  6.86k|              hFrameDataRight->sbrPitchInBins = 0;
  683|  6.86k|            }
  684|  9.81k|          } else {
  685|  6.15k|            hFrameDataRight->sbrOversamplingFlag = 0;
  686|  6.15k|            hFrameDataRight->sbrPitchInBins = 0;
  687|  6.15k|          }
  688|  15.9k|        }
  689|  29.3k|      }
  690|   118k|    } else {
  691|   118k|      if (nCh == 2) {
  ------------------
  |  Branch (691:11): [True: 24.4k, False: 94.2k]
  ------------------
  692|  24.4k|        hFrameDataRight->sbrPatchingMode = 1;
  693|  24.4k|        hFrameDataRight->sbrOversamplingFlag = 0;
  694|  24.4k|        hFrameDataRight->sbrPitchInBins = 0;
  695|  24.4k|      }
  696|       |
  697|   118k|      hFrameDataLeft->sbrPatchingMode = 1;
  698|   118k|      hFrameDataLeft->sbrOversamplingFlag = 0;
  699|   118k|      hFrameDataLeft->sbrPitchInBins = 0;
  700|   118k|    }
  701|   160k|  } else {
  702|  65.5k|    if (nCh == 2) {
  ------------------
  |  Branch (702:9): [True: 32.0k, False: 33.5k]
  ------------------
  703|  32.0k|      hFrameDataRight->sbrPatchingMode = 1;
  704|  32.0k|      hFrameDataRight->sbrOversamplingFlag = 0;
  705|  32.0k|      hFrameDataRight->sbrPitchInBins = 0;
  706|  32.0k|    }
  707|       |
  708|  65.5k|    hFrameDataLeft->sbrPatchingMode = 1;
  709|  65.5k|    hFrameDataLeft->sbrOversamplingFlag = 0;
  710|  65.5k|    hFrameDataLeft->sbrPitchInBins = 0;
  711|  65.5k|  }
  712|       |
  713|       |  /*
  714|       |    sbr_grid(): Grid control
  715|       |  */
  716|   225k|  if (hHeaderData->bs_info.pvc_mode) {
  ------------------
  |  Branch (716:7): [True: 88.8k, False: 137k]
  ------------------
  717|  88.8k|    FDK_ASSERT(nCh == 1); /* PVC not possible for CPE */
  ------------------
  |  |  221|  88.8k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (717:5): [True: 88.8k, False: 0]
  ------------------
  718|  88.8k|    if (!extractPvcFrameInfo(hBs, hHeaderData, hFrameDataLeft,
  ------------------
  |  Branch (718:9): [True: 733, False: 88.1k]
  ------------------
  719|  88.8k|                             hFrameDataLeftPrev, pvc_mode_last, flags))
  720|    733|      return 0;
  721|       |
  722|  88.1k|    if (!checkFrameInfo(&hFrameDataLeft->frameInfo,
  ------------------
  |  Branch (722:9): [True: 378, False: 87.7k]
  ------------------
  723|  88.1k|                        hHeaderData->numberTimeSlots, overlap,
  724|  88.1k|                        hHeaderData->timeStep))
  725|    378|      return 0;
  726|   137k|  } else {
  727|   137k|    if (!extractFrameInfo(hBs, hHeaderData, hFrameDataLeft, 1, flags)) return 0;
  ------------------
  |  Branch (727:9): [True: 6.01k, False: 131k]
  ------------------
  728|       |
  729|   131k|    if (!checkFrameInfo(&hFrameDataLeft->frameInfo,
  ------------------
  |  Branch (729:9): [True: 2.98k, False: 128k]
  ------------------
  730|   131k|                        hHeaderData->numberTimeSlots, overlap,
  731|   131k|                        hHeaderData->timeStep))
  732|  2.98k|      return 0;
  733|   131k|  }
  734|   215k|  if (nCh == 2) {
  ------------------
  |  Branch (734:7): [True: 80.4k, False: 135k]
  ------------------
  735|  80.4k|    if (hFrameDataLeft->coupling) {
  ------------------
  |  Branch (735:9): [True: 23.2k, False: 57.1k]
  ------------------
  736|  23.2k|      FDKmemcpy(&hFrameDataRight->frameInfo, &hFrameDataLeft->frameInfo,
  737|  23.2k|                sizeof(FRAME_INFO));
  738|  23.2k|      hFrameDataRight->ampResolutionCurrentFrame =
  739|  23.2k|          hFrameDataLeft->ampResolutionCurrentFrame;
  740|  57.1k|    } else {
  741|  57.1k|      if (!extractFrameInfo(hBs, hHeaderData, hFrameDataRight, 2, flags))
  ------------------
  |  Branch (741:11): [True: 778, False: 56.3k]
  ------------------
  742|    778|        return 0;
  743|       |
  744|  56.3k|      if (!checkFrameInfo(&hFrameDataRight->frameInfo,
  ------------------
  |  Branch (744:11): [True: 844, False: 55.5k]
  ------------------
  745|  56.3k|                          hHeaderData->numberTimeSlots, overlap,
  746|  56.3k|                          hHeaderData->timeStep))
  747|    844|        return 0;
  748|  56.3k|    }
  749|  80.4k|  }
  750|       |
  751|       |  /*
  752|       |    sbr_dtdf(): Fetch domain vectors (time or frequency direction for
  753|       |    delta-coding)
  754|       |  */
  755|   214k|  sbrGetDirectionControlData(hFrameDataLeft, hBs, flags,
  756|   214k|                             hHeaderData->bs_info.pvc_mode);
  757|   214k|  if (nCh == 2) {
  ------------------
  |  Branch (757:7): [True: 78.7k, False: 135k]
  ------------------
  758|  78.7k|    sbrGetDirectionControlData(hFrameDataRight, hBs, flags, 0);
  759|  78.7k|  }
  760|       |
  761|       |  /* sbr_invf() */
  762|   705k|  for (i = 0; i < hHeaderData->freqBandData.nInvfBands; i++) {
  ------------------
  |  Branch (762:15): [True: 490k, False: 214k]
  ------------------
  763|   490k|    hFrameDataLeft->sbr_invf_mode[i] = (INVF_MODE)FDKreadBits(hBs, 2);
  764|   490k|  }
  765|   214k|  if (nCh == 2) {
  ------------------
  |  Branch (765:7): [True: 78.7k, False: 135k]
  ------------------
  766|  78.7k|    if (hFrameDataLeft->coupling) {
  ------------------
  |  Branch (766:9): [True: 23.2k, False: 55.5k]
  ------------------
  767|  76.2k|      for (i = 0; i < hHeaderData->freqBandData.nInvfBands; i++) {
  ------------------
  |  Branch (767:19): [True: 53.0k, False: 23.2k]
  ------------------
  768|  53.0k|        hFrameDataRight->sbr_invf_mode[i] = hFrameDataLeft->sbr_invf_mode[i];
  769|  53.0k|      }
  770|  55.5k|    } else {
  771|   203k|      for (i = 0; i < hHeaderData->freqBandData.nInvfBands; i++) {
  ------------------
  |  Branch (771:19): [True: 147k, False: 55.5k]
  ------------------
  772|   147k|        hFrameDataRight->sbr_invf_mode[i] = (INVF_MODE)FDKreadBits(hBs, 2);
  773|   147k|      }
  774|  55.5k|    }
  775|  78.7k|  }
  776|       |
  777|   214k|  if (nCh == 1) {
  ------------------
  |  Branch (777:7): [True: 135k, False: 78.7k]
  ------------------
  778|   135k|    if (hHeaderData->bs_info.pvc_mode) {
  ------------------
  |  Branch (778:9): [True: 87.7k, False: 47.6k]
  ------------------
  779|  87.7k|      if (!sbrGetPvcEnvelope(hHeaderData, hFrameDataLeft, hBs, flags,
  ------------------
  |  Branch (779:11): [True: 503, False: 87.2k]
  ------------------
  780|  87.7k|                             hHeaderData->bs_info.pvc_mode))
  781|    503|        return 0;
  782|  87.7k|    } else if (!sbrGetEnvelope(hHeaderData, hFrameDataLeft, hBs, flags))
  ------------------
  |  Branch (782:16): [True: 0, False: 47.6k]
  ------------------
  783|      0|      return 0;
  784|       |
  785|   134k|    sbrGetNoiseFloorData(hHeaderData, hFrameDataLeft, hBs);
  786|   134k|  } else if (hFrameDataLeft->coupling) {
  ------------------
  |  Branch (786:14): [True: 23.2k, False: 55.5k]
  ------------------
  787|  23.2k|    if (!sbrGetEnvelope(hHeaderData, hFrameDataLeft, hBs, flags)) {
  ------------------
  |  Branch (787:9): [True: 0, False: 23.2k]
  ------------------
  788|      0|      return 0;
  789|      0|    }
  790|       |
  791|  23.2k|    sbrGetNoiseFloorData(hHeaderData, hFrameDataLeft, hBs);
  792|       |
  793|  23.2k|    if (!sbrGetEnvelope(hHeaderData, hFrameDataRight, hBs, flags)) {
  ------------------
  |  Branch (793:9): [True: 0, False: 23.2k]
  ------------------
  794|      0|      return 0;
  795|      0|    }
  796|  23.2k|    sbrGetNoiseFloorData(hHeaderData, hFrameDataRight, hBs);
  797|  55.5k|  } else { /* nCh == 2 && no coupling */
  798|       |
  799|  55.5k|    if (!sbrGetEnvelope(hHeaderData, hFrameDataLeft, hBs, flags)) return 0;
  ------------------
  |  Branch (799:9): [True: 0, False: 55.5k]
  ------------------
  800|       |
  801|  55.5k|    if (!sbrGetEnvelope(hHeaderData, hFrameDataRight, hBs, flags)) return 0;
  ------------------
  |  Branch (801:9): [True: 0, False: 55.5k]
  ------------------
  802|       |
  803|  55.5k|    sbrGetNoiseFloorData(hHeaderData, hFrameDataLeft, hBs);
  804|       |
  805|  55.5k|    sbrGetNoiseFloorData(hHeaderData, hFrameDataRight, hBs);
  806|  55.5k|  }
  807|       |
  808|   213k|  sbrGetSyntheticCodedData(hHeaderData, hFrameDataLeft, hBs, flags);
  809|   213k|  if (nCh == 2) {
  ------------------
  |  Branch (809:7): [True: 78.7k, False: 134k]
  ------------------
  810|  78.7k|    sbrGetSyntheticCodedData(hHeaderData, hFrameDataRight, hBs, flags);
  811|  78.7k|  }
  812|       |
  813|   213k|  if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  206|   213k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  207|   213k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (813:7): [True: 57.3k, False: 156k]
  ------------------
  814|  57.3k|    if (!extractExtendedData(hHeaderData, hBs, hParametricStereoDec)) {
  ------------------
  |  Branch (814:9): [True: 4.44k, False: 52.8k]
  ------------------
  815|  4.44k|      return 0;
  816|  4.44k|    }
  817|  57.3k|  }
  818|       |
  819|   209k|  return 1;
  820|   213k|}
env_extr.cpp:_ZL19extractExtendedDataP15SBR_HEADER_DATAP13FDK_BITSTREAMP6PS_DEC:
  530|  57.3k|) {
  531|  57.3k|  INT nBitsLeft;
  532|  57.3k|  int extended_data;
  533|  57.3k|  int i, frameOk = 1;
  534|       |
  535|  57.3k|  extended_data = FDKreadBits(hBs, 1);
  536|       |
  537|  57.3k|  if (extended_data) {
  ------------------
  |  Branch (537:7): [True: 21.1k, False: 36.1k]
  ------------------
  538|  21.1k|    int cnt;
  539|  21.1k|    int bPsRead = 0;
  540|       |
  541|  21.1k|    cnt = FDKreadBits(hBs, 4);
  542|  21.1k|    if (cnt == (1 << 4) - 1) cnt += FDKreadBits(hBs, 8);
  ------------------
  |  Branch (542:9): [True: 3.54k, False: 17.6k]
  ------------------
  543|       |
  544|  21.1k|    nBitsLeft = 8 * cnt;
  545|       |
  546|       |    /* sanity check for cnt */
  547|  21.1k|    if (nBitsLeft > (INT)FDKgetValidBits(hBs)) {
  ------------------
  |  Branch (547:9): [True: 2.31k, False: 18.8k]
  ------------------
  548|       |      /* limit nBitsLeft */
  549|  2.31k|      nBitsLeft = (INT)FDKgetValidBits(hBs);
  550|       |      /* set frame error */
  551|  2.31k|      frameOk = 0;
  552|  2.31k|    }
  553|       |
  554|  46.2k|    while (nBitsLeft > 7) {
  ------------------
  |  Branch (554:12): [True: 25.0k, False: 21.1k]
  ------------------
  555|  25.0k|      int extension_id = FDKreadBits(hBs, 2);
  556|  25.0k|      nBitsLeft -= 2;
  557|       |
  558|  25.0k|      switch (extension_id) {
  559|  12.0k|        case EXTENSION_ID_PS_CODING:
  ------------------
  |  |  165|  12.0k|#define EXTENSION_ID_PS_CODING 2
  ------------------
  |  Branch (559:9): [True: 12.0k, False: 13.0k]
  ------------------
  560|       |
  561|       |          /* Read PS data from bitstream */
  562|       |
  563|  12.0k|          if (hParametricStereoDec != NULL) {
  ------------------
  |  Branch (563:15): [True: 9.17k, False: 2.86k]
  ------------------
  564|  9.17k|            if (bPsRead &&
  ------------------
  |  Branch (564:17): [True: 2.40k, False: 6.77k]
  ------------------
  565|  2.40k|                !hParametricStereoDec->bsData[hParametricStereoDec->bsReadSlot]
  ------------------
  |  Branch (565:17): [True: 250, False: 2.15k]
  ------------------
  566|  2.40k|                     .mpeg.bPsHeaderValid) {
  567|    250|              cnt = nBitsLeft >> 3; /* number of remaining bytes */
  568|  1.71k|              for (i = 0; i < cnt; i++) FDKreadBits(hBs, 8);
  ------------------
  |  Branch (568:27): [True: 1.46k, False: 250]
  ------------------
  569|    250|              nBitsLeft -= cnt * 8;
  570|  8.92k|            } else {
  571|  8.92k|              nBitsLeft -=
  572|  8.92k|                  (INT)ReadPsData(hParametricStereoDec, hBs, nBitsLeft);
  573|  8.92k|              bPsRead = 1;
  574|  8.92k|            }
  575|  9.17k|          }
  576|       |
  577|       |          /* parametric stereo detected, could set channelMode accordingly here
  578|       |           */
  579|       |          /*                                                                     */
  580|       |          /* "The usage of this parametric stereo extension to HE-AAC is */
  581|       |          /* signalled implicitly in the bitstream. Hence, if an sbr_extension()
  582|       |           */
  583|       |          /* with bs_extension_id==EXTENSION_ID_PS is found in the SBR part of
  584|       |           */
  585|       |          /* the bitstream, a decoder supporting the combination of SBR and PS
  586|       |           */
  587|       |          /* shall operate the PS tool to generate a stereo output signal." */
  588|       |          /* source: ISO/IEC 14496-3:2001/FDAM 2:2004(E) */
  589|       |
  590|  12.0k|          break;
  591|       |
  592|  13.0k|        default:
  ------------------
  |  Branch (592:9): [True: 13.0k, False: 12.0k]
  ------------------
  593|  13.0k|          cnt = nBitsLeft >> 3; /* number of remaining bytes */
  594|   188k|          for (i = 0; i < cnt; i++) FDKreadBits(hBs, 8);
  ------------------
  |  Branch (594:23): [True: 175k, False: 13.0k]
  ------------------
  595|  13.0k|          nBitsLeft -= cnt * 8;
  596|  13.0k|          break;
  597|  25.0k|      }
  598|  25.0k|    }
  599|       |
  600|  21.1k|    if (nBitsLeft < 0) {
  ------------------
  |  Branch (600:9): [True: 3.00k, False: 18.1k]
  ------------------
  601|  3.00k|      frameOk = 0;
  602|  3.00k|      goto bail;
  603|  18.1k|    } else {
  604|       |      /* Read fill bits for byte alignment */
  605|  18.1k|      FDKreadBits(hBs, nBitsLeft);
  606|  18.1k|    }
  607|  21.1k|  }
  608|       |
  609|  57.3k|bail:
  610|  57.3k|  return (frameOk);
  611|  57.3k|}
env_extr.cpp:_ZL26sbrGetDirectionControlDataP14SBR_FRAME_DATAP13FDK_BITSTREAMji:
  830|   293k|{
  831|   293k|  int i;
  832|   293k|  int indepFlag = 0;
  833|       |
  834|   293k|  if (flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  206|   293k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  207|   293k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (834:7): [True: 208k, False: 84.3k]
  ------------------
  835|   208k|    indepFlag = flags & SBRDEC_USAC_INDEP;
  ------------------
  |  |  209|   208k|  16 /* Flag indicating that USAC global independency flag is active. */
  ------------------
  836|   208k|  }
  837|       |
  838|   293k|  if (bs_pvc_mode == 0) {
  ------------------
  |  Branch (838:7): [True: 205k, False: 87.7k]
  ------------------
  839|   205k|    i = 0;
  840|   205k|    if (indepFlag) {
  ------------------
  |  Branch (840:9): [True: 96.2k, False: 109k]
  ------------------
  841|  96.2k|      h_frame_data->domain_vec[i++] = 0;
  842|  96.2k|    }
  843|   484k|    for (; i < h_frame_data->frameInfo.nEnvelopes; i++) {
  ------------------
  |  Branch (843:12): [True: 279k, False: 205k]
  ------------------
  844|   279k|      h_frame_data->domain_vec[i] = FDKreadBits(hBs, 1);
  845|   279k|    }
  846|   205k|  }
  847|       |
  848|   293k|  i = 0;
  849|   293k|  if (indepFlag) {
  ------------------
  |  Branch (849:7): [True: 168k, False: 124k]
  ------------------
  850|   168k|    h_frame_data->domain_vec_noise[i++] = 0;
  851|   168k|  }
  852|   582k|  for (; i < h_frame_data->frameInfo.nNoiseEnvelopes; i++) {
  ------------------
  |  Branch (852:10): [True: 289k, False: 293k]
  ------------------
  853|   289k|    h_frame_data->domain_vec_noise[i] = FDKreadBits(hBs, 1);
  854|   289k|  }
  855|   293k|}
env_extr.cpp:_ZL20sbrGetNoiseFloorDataP15SBR_HEADER_DATAP14SBR_FRAME_DATAP13FDK_BITSTREAM:
  864|   292k|{
  865|   292k|  int i, j;
  866|   292k|  int delta;
  867|   292k|  COUPLING_MODE coupling;
  868|   292k|  int noNoiseBands = hHeaderData->freqBandData.nNfb;
  869|       |
  870|   292k|  Huffman hcb_noiseF;
  871|   292k|  Huffman hcb_noise;
  872|   292k|  int envDataTableCompFactor;
  873|       |
  874|   292k|  coupling = h_frame_data->coupling;
  875|       |
  876|       |  /*
  877|       |    Select huffman codebook depending on coupling mode
  878|       |  */
  879|   292k|  if (coupling == COUPLING_BAL) {
  ------------------
  |  Branch (879:7): [True: 23.2k, False: 269k]
  ------------------
  880|  23.2k|    hcb_noise = (Huffman)&FDK_sbrDecoder_sbr_huffBook_NoiseBalance11T;
  881|  23.2k|    hcb_noiseF =
  882|  23.2k|        (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvBalance11F; /* "sbr_huffBook_NoiseBalance11F"
  883|       |                                                              */
  884|  23.2k|    envDataTableCompFactor = 1;
  885|   269k|  } else {
  886|   269k|    hcb_noise = (Huffman)&FDK_sbrDecoder_sbr_huffBook_NoiseLevel11T;
  887|   269k|    hcb_noiseF =
  888|   269k|        (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvLevel11F; /* "sbr_huffBook_NoiseLevel11F"
  889|       |                                                            */
  890|   269k|    envDataTableCompFactor = 0;
  891|   269k|  }
  892|       |
  893|       |  /*
  894|       |    Read raw noise-envelope data
  895|       |  */
  896|   749k|  for (i = 0; i < h_frame_data->frameInfo.nNoiseEnvelopes; i++) {
  ------------------
  |  Branch (896:15): [True: 457k, False: 292k]
  ------------------
  897|   457k|    if (h_frame_data->domain_vec_noise[i] == 0) {
  ------------------
  |  Branch (897:9): [True: 331k, False: 125k]
  ------------------
  898|   331k|      if (coupling == COUPLING_BAL) {
  ------------------
  |  Branch (898:11): [True: 30.4k, False: 300k]
  ------------------
  899|  30.4k|        h_frame_data->sbrNoiseFloorLevel[i * noNoiseBands] =
  900|  30.4k|            (FIXP_SGL)(((int)FDKreadBits(hBs, 5)) << envDataTableCompFactor);
  901|   300k|      } else {
  902|   300k|        h_frame_data->sbrNoiseFloorLevel[i * noNoiseBands] =
  903|   300k|            (FIXP_SGL)(int)FDKreadBits(hBs, 5);
  904|   300k|      }
  905|       |
  906|   817k|      for (j = 1; j < noNoiseBands; j++) {
  ------------------
  |  Branch (906:19): [True: 485k, False: 331k]
  ------------------
  907|   485k|        delta = DecodeHuffmanCW(hcb_noiseF, hBs);
  908|   485k|        h_frame_data->sbrNoiseFloorLevel[i * noNoiseBands + j] =
  909|   485k|            (FIXP_SGL)(delta << envDataTableCompFactor);
  910|   485k|      }
  911|   331k|    } else {
  912|   382k|      for (j = 0; j < noNoiseBands; j++) {
  ------------------
  |  Branch (912:19): [True: 256k, False: 125k]
  ------------------
  913|   256k|        delta = DecodeHuffmanCW(hcb_noise, hBs);
  914|   256k|        h_frame_data->sbrNoiseFloorLevel[i * noNoiseBands + j] =
  915|   256k|            (FIXP_SGL)(delta << envDataTableCompFactor);
  916|   256k|      }
  917|   125k|    }
  918|   457k|  }
  919|   292k|}
env_extr.cpp:_ZL17sbrGetPvcEnvelopeP15SBR_HEADER_DATAP14SBR_FRAME_DATAP13FDK_BITSTREAMjj:
  931|  87.7k|    const UINT flags, const UINT pvcMode) {
  932|  87.7k|  int divMode, nsMode;
  933|  87.7k|  int indepFlag = flags & SBRDEC_USAC_INDEP;
  ------------------
  |  |  209|  87.7k|  16 /* Flag indicating that USAC global independency flag is active. */
  ------------------
  934|  87.7k|  UCHAR *pvcID = h_frame_data->pvcID;
  935|       |
  936|  87.7k|  divMode = FDKreadBits(hBs, PVC_DIVMODE_BITS);
  ------------------
  |  |  108|  87.7k|#define PVC_DIVMODE_BITS 3
  ------------------
  937|  87.7k|  nsMode = FDKreadBit(hBs);
  938|  87.7k|  FDK_ASSERT((pvcMode == 1) || (pvcMode == 2));
  ------------------
  |  |  221|  87.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (938:3): [True: 12.6k, False: 75.0k]
  |  Branch (938:3): [True: 75.0k, False: 0]
  |  Branch (938:3): [True: 87.7k, False: 0]
  ------------------
  939|  87.7k|  h_frame_data->ns = mapNsMode2ns[pvcMode - 1][nsMode];
  940|       |
  941|  87.7k|  if (divMode <= 3) {
  ------------------
  |  Branch (941:7): [True: 14.7k, False: 73.0k]
  ------------------
  942|  14.7k|    int i, k = 1, sum_length = 0, reuse_pcvID;
  943|       |
  944|       |    /* special treatment for first time slot k=0 */
  945|  14.7k|    indepFlag ? (reuse_pcvID = 0) : (reuse_pcvID = FDKreadBit(hBs));
  ------------------
  |  Branch (945:5): [True: 3.30k, False: 11.4k]
  ------------------
  946|  14.7k|    if (reuse_pcvID) {
  ------------------
  |  Branch (946:9): [True: 3.66k, False: 11.0k]
  ------------------
  947|  3.66k|      pvcID[0] = hHeaderData->pvcIDprev;
  948|  11.0k|    } else {
  949|  11.0k|      pvcID[0] = FDKreadBits(hBs, PVC_PVCID_BITS);
  ------------------
  |  |  110|  11.0k|#define PVC_PVCID_BITS 7
  ------------------
  950|  11.0k|    }
  951|       |
  952|       |    /* other time slots k>0 */
  953|  26.0k|    for (i = 0; i < divMode; i++) {
  ------------------
  |  Branch (953:17): [True: 11.8k, False: 14.2k]
  ------------------
  954|  11.8k|      int length, numBits = 4;
  955|       |
  956|  11.8k|      if (sum_length >= 13) {
  ------------------
  |  Branch (956:11): [True: 419, False: 11.4k]
  ------------------
  957|    419|        numBits = 1;
  958|  11.4k|      } else if (sum_length >= 11) {
  ------------------
  |  Branch (958:18): [True: 183, False: 11.2k]
  ------------------
  959|    183|        numBits = 2;
  960|  11.2k|      } else if (sum_length >= 7) {
  ------------------
  |  Branch (960:18): [True: 1.14k, False: 10.0k]
  ------------------
  961|  1.14k|        numBits = 3;
  962|  1.14k|      }
  963|       |
  964|  11.8k|      length = FDKreadBits(hBs, numBits);
  965|  11.8k|      sum_length += length + 1;
  966|  11.8k|      if (sum_length >= PVC_NTIMESLOT) {
  ------------------
  |  |  114|  11.8k|#define PVC_NTIMESLOT 16
  ------------------
  |  Branch (966:11): [True: 503, False: 11.3k]
  ------------------
  967|    503|        return 0; /* parse error */
  968|    503|      }
  969|  46.4k|      for (; length--; k++) {
  ------------------
  |  Branch (969:14): [True: 35.1k, False: 11.3k]
  ------------------
  970|  35.1k|        pvcID[k] = pvcID[k - 1];
  971|  35.1k|      }
  972|  11.3k|      pvcID[k++] = FDKreadBits(hBs, PVC_PVCID_BITS);
  ------------------
  |  |  110|  11.3k|#define PVC_PVCID_BITS 7
  ------------------
  973|  11.3k|    }
  974|   185k|    for (; k < 16; k++) {
  ------------------
  |  Branch (974:12): [True: 170k, False: 14.2k]
  ------------------
  975|   170k|      pvcID[k] = pvcID[k - 1];
  976|   170k|    }
  977|  73.0k|  } else { /* divMode >= 4 */
  978|  73.0k|    int num_grid_info, fixed_length, grid_info, j, k = 0;
  979|       |
  980|  73.0k|    divMode -= 4;
  981|  73.0k|    num_grid_info = 2 << divMode;
  982|  73.0k|    fixed_length = 8 >> divMode;
  983|  73.0k|    FDK_ASSERT(num_grid_info * fixed_length == PVC_NTIMESLOT);
  ------------------
  |  |  221|  73.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (983:5): [True: 73.0k, False: 0]
  ------------------
  984|       |
  985|       |    /* special treatment for first time slot k=0 */
  986|  73.0k|    indepFlag ? (grid_info = 1) : (grid_info = FDKreadBit(hBs));
  ------------------
  |  Branch (986:5): [True: 69.2k, False: 3.75k]
  ------------------
  987|  73.0k|    if (grid_info) {
  ------------------
  |  Branch (987:9): [True: 70.2k, False: 2.75k]
  ------------------
  988|  70.2k|      pvcID[k++] = FDKreadBits(hBs, PVC_PVCID_BITS);
  ------------------
  |  |  110|  70.2k|#define PVC_PVCID_BITS 7
  ------------------
  989|  70.2k|    } else {
  990|  2.75k|      pvcID[k++] = hHeaderData->pvcIDprev;
  991|  2.75k|    }
  992|  73.0k|    j = fixed_length - 1;
  993|   562k|    for (; j--; k++) {
  ------------------
  |  Branch (993:12): [True: 489k, False: 73.0k]
  ------------------
  994|   489k|      pvcID[k] = pvcID[k - 1];
  995|   489k|    }
  996|  73.0k|    num_grid_info--;
  997|       |
  998|       |    /* other time slots k>0 */
  999|   182k|    for (; num_grid_info--;) {
  ------------------
  |  Branch (999:12): [True: 109k, False: 73.0k]
  ------------------
 1000|   109k|      j = fixed_length;
 1001|   109k|      grid_info = FDKreadBit(hBs);
 1002|   109k|      if (grid_info) {
  ------------------
  |  Branch (1002:11): [True: 13.8k, False: 95.4k]
  ------------------
 1003|  13.8k|        pvcID[k++] = FDKreadBits(hBs, PVC_PVCID_BITS);
  ------------------
  |  |  110|  13.8k|#define PVC_PVCID_BITS 7
  ------------------
 1004|  13.8k|        j--;
 1005|  13.8k|      }
 1006|   701k|      for (; j--; k++) {
  ------------------
  |  Branch (1006:14): [True: 591k, False: 109k]
  ------------------
 1007|   591k|        pvcID[k] = pvcID[k - 1];
 1008|   591k|      }
 1009|   109k|    }
 1010|  73.0k|  }
 1011|       |
 1012|  87.2k|  hHeaderData->pvcIDprev = pvcID[PVC_NTIMESLOT - 1];
  ------------------
  |  |  114|  87.2k|#define PVC_NTIMESLOT 16
  ------------------
 1013|       |
 1014|       |  /* usage of PVC excludes inter-TES tool */
 1015|  87.2k|  h_frame_data->iTESactive = (UCHAR)0;
 1016|       |
 1017|  87.2k|  return 1;
 1018|  87.7k|}
env_extr.cpp:_ZL14sbrGetEnvelopeP15SBR_HEADER_DATAP14SBR_FRAME_DATAP13FDK_BITSTREAMj:
 1026|   205k|    const UINT flags) {
 1027|   205k|  int i, j;
 1028|   205k|  UCHAR no_band[MAX_ENVELOPES];
 1029|   205k|  int delta = 0;
 1030|   205k|  int offset = 0;
 1031|   205k|  COUPLING_MODE coupling = h_frame_data->coupling;
 1032|   205k|  int ampRes = hHeaderData->bs_info.ampResolution;
 1033|   205k|  int nEnvelopes = h_frame_data->frameInfo.nEnvelopes;
 1034|   205k|  int envDataTableCompFactor;
 1035|   205k|  int start_bits, start_bits_balance;
 1036|   205k|  Huffman hcb_t, hcb_f;
 1037|       |
 1038|   205k|  h_frame_data->nScaleFactors = 0;
 1039|       |
 1040|   205k|  if ((h_frame_data->frameInfo.frameClass == 0) && (nEnvelopes == 1)) {
  ------------------
  |  Branch (1040:7): [True: 121k, False: 84.0k]
  |  Branch (1040:52): [True: 71.5k, False: 49.6k]
  ------------------
 1041|  71.5k|    if (flags & SBRDEC_ELD_GRID)
  ------------------
  |  |  204|  71.5k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (1041:9): [True: 27.2k, False: 44.3k]
  ------------------
 1042|  27.2k|      ampRes = h_frame_data->ampResolutionCurrentFrame;
 1043|  44.3k|    else
 1044|  44.3k|      ampRes = 0;
 1045|  71.5k|  }
 1046|   205k|  h_frame_data->ampResolutionCurrentFrame = ampRes;
 1047|       |
 1048|       |  /*
 1049|       |    Set number of bits for first value depending on amplitude resolution
 1050|       |  */
 1051|   205k|  if (ampRes == 1) {
  ------------------
  |  Branch (1051:7): [True: 50.4k, False: 154k]
  ------------------
 1052|  50.4k|    start_bits = 6;
 1053|  50.4k|    start_bits_balance = 5;
 1054|   154k|  } else {
 1055|   154k|    start_bits = 7;
 1056|   154k|    start_bits_balance = 6;
 1057|   154k|  }
 1058|       |
 1059|       |  /*
 1060|       |    Calculate number of values for each envelope and alltogether
 1061|       |  */
 1062|   580k|  for (i = 0; i < nEnvelopes; i++) {
  ------------------
  |  Branch (1062:15): [True: 375k, False: 205k]
  ------------------
 1063|   375k|    no_band[i] =
 1064|   375k|        hHeaderData->freqBandData.nSfb[h_frame_data->frameInfo.freqRes[i]];
 1065|   375k|    h_frame_data->nScaleFactors += no_band[i];
 1066|   375k|  }
 1067|   205k|  if (h_frame_data->nScaleFactors > MAX_NUM_ENVELOPE_VALUES) return 0;
  ------------------
  |  |  145|   205k|#define MAX_NUM_ENVELOPE_VALUES (MAX_ENVELOPES * MAX_FREQ_COEFFS)
  |  |  ------------------
  |  |  |  |  136|   205k|#define MAX_ENVELOPES MAX_ENVELOPES_USAC
  |  |  |  |  ------------------
  |  |  |  |  |  |  135|   205k|#define MAX_ENVELOPES_USAC 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_NUM_ENVELOPE_VALUES (MAX_ENVELOPES * MAX_FREQ_COEFFS)
  |  |  ------------------
  |  |  |  |  140|   205k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  |  |  ------------------
  |  |  |  |  |  |  139|   205k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:7): [True: 0, False: 205k]
  ------------------
 1068|       |
 1069|       |  /*
 1070|       |    Select Huffman codebook depending on coupling mode and amplitude resolution
 1071|       |  */
 1072|   205k|  if (coupling == COUPLING_BAL) {
  ------------------
  |  Branch (1072:7): [True: 23.2k, False: 182k]
  ------------------
 1073|  23.2k|    envDataTableCompFactor = 1;
 1074|  23.2k|    if (ampRes == 0) {
  ------------------
  |  Branch (1074:9): [True: 20.1k, False: 3.14k]
  ------------------
 1075|  20.1k|      hcb_t = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvBalance10T;
 1076|  20.1k|      hcb_f = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvBalance10F;
 1077|  20.1k|    } else {
 1078|  3.14k|      hcb_t = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvBalance11T;
 1079|  3.14k|      hcb_f = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvBalance11F;
 1080|  3.14k|    }
 1081|   182k|  } else {
 1082|   182k|    envDataTableCompFactor = 0;
 1083|   182k|    if (ampRes == 0) {
  ------------------
  |  Branch (1083:9): [True: 134k, False: 47.3k]
  ------------------
 1084|   134k|      hcb_t = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvLevel10T;
 1085|   134k|      hcb_f = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvLevel10F;
 1086|   134k|    } else {
 1087|  47.3k|      hcb_t = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvLevel11T;
 1088|  47.3k|      hcb_f = (Huffman)&FDK_sbrDecoder_sbr_huffBook_EnvLevel11F;
 1089|  47.3k|    }
 1090|   182k|  }
 1091|       |
 1092|   205k|  h_frame_data->iTESactive = (UCHAR)0; /* disable inter-TES by default */
 1093|       |  /*
 1094|       |    Now read raw envelope data
 1095|       |  */
 1096|   580k|  for (j = 0, offset = 0; j < nEnvelopes; j++) {
  ------------------
  |  Branch (1096:27): [True: 375k, False: 205k]
  ------------------
 1097|   375k|    if (h_frame_data->domain_vec[j] == 0) {
  ------------------
  |  Branch (1097:9): [True: 268k, False: 107k]
  ------------------
 1098|   268k|      if (coupling == COUPLING_BAL) {
  ------------------
  |  Branch (1098:11): [True: 40.9k, False: 227k]
  ------------------
 1099|  40.9k|        h_frame_data->iEnvelope[offset] =
 1100|  40.9k|            (FIXP_SGL)(((int)FDKreadBits(hBs, start_bits_balance))
 1101|  40.9k|                       << envDataTableCompFactor);
 1102|   227k|      } else {
 1103|   227k|        h_frame_data->iEnvelope[offset] =
 1104|   227k|            (FIXP_SGL)(int)FDKreadBits(hBs, start_bits);
 1105|   227k|      }
 1106|   268k|    }
 1107|       |
 1108|  2.96M|    for (i = (1 - h_frame_data->domain_vec[j]); i < no_band[j]; i++) {
  ------------------
  |  Branch (1108:49): [True: 2.59M, False: 375k]
  ------------------
 1109|  2.59M|      if (h_frame_data->domain_vec[j] == 0) {
  ------------------
  |  Branch (1109:11): [True: 1.71M, False: 876k]
  ------------------
 1110|  1.71M|        delta = DecodeHuffmanCW(hcb_f, hBs);
 1111|  1.71M|      } else {
 1112|   876k|        delta = DecodeHuffmanCW(hcb_t, hBs);
 1113|   876k|      }
 1114|       |
 1115|  2.59M|      h_frame_data->iEnvelope[offset + i] =
 1116|  2.59M|          (FIXP_SGL)(delta << envDataTableCompFactor);
 1117|  2.59M|    }
 1118|   375k|    if ((flags & SBRDEC_SYNTAX_USAC) && (flags & SBRDEC_USAC_ITES)) {
  ------------------
  |  |  206|   375k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                  if ((flags & SBRDEC_SYNTAX_USAC) && (flags & SBRDEC_USAC_ITES)) {
  ------------------
  |  |  222|   203k|  1024 /* Flag indicating that USAC inter TES tool is active. */
  ------------------
  |  Branch (1118:9): [True: 203k, False: 171k]
  |  Branch (1118:41): [True: 110k, False: 93.7k]
  ------------------
 1119|   110k|      int bs_temp_shape = FDKreadBit(hBs);
 1120|   110k|      FDK_ASSERT(j < 8);
  ------------------
  |  |  221|   110k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1120:7): [True: 110k, False: 0]
  ------------------
 1121|   110k|      h_frame_data->iTESactive |= (UCHAR)(bs_temp_shape << j);
 1122|   110k|      if (bs_temp_shape) {
  ------------------
  |  Branch (1122:11): [True: 27.9k, False: 82.2k]
  ------------------
 1123|  27.9k|        h_frame_data->interTempShapeMode[j] =
 1124|  27.9k|            FDKread2Bits(hBs); /* bs_inter_temp_shape_mode */
 1125|  82.2k|      } else {
 1126|  82.2k|        h_frame_data->interTempShapeMode[j] = 0;
 1127|  82.2k|      }
 1128|   110k|    }
 1129|   375k|    offset += no_band[j];
 1130|   375k|  }
 1131|       |
 1132|       |#if ENV_EXP_FRACT
 1133|       |  /* Convert from int to scaled fract (ENV_EXP_FRACT bits for the fractional
 1134|       |   * part) */
 1135|       |  for (i = 0; i < h_frame_data->nScaleFactors; i++) {
 1136|       |    h_frame_data->iEnvelope[i] <<= ENV_EXP_FRACT;
 1137|       |  }
 1138|       |#endif
 1139|       |
 1140|   205k|  return 1;
 1141|   205k|}
env_extr.cpp:_ZL19extractPvcFrameInfoP13FDK_BITSTREAMP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATAhj:
 1264|  88.8k|    const UINT flags) {
 1265|  88.8k|  FRAME_INFO *pFrameInfo = &h_frame_data->frameInfo;
 1266|  88.8k|  FRAME_INFO *pPrevFrameInfo = &h_prev_frame_data->prevFrameInfo;
 1267|  88.8k|  int bs_var_len_hf, bs_noise_position;
 1268|  88.8k|  bs_noise_position = FDKreadBits(hBs, 4); /* SBR_PVC_NOISEPOSITION_BITS 4 */
 1269|  88.8k|  bs_var_len_hf = FDKreadBit(hBs);
 1270|  88.8k|  pFrameInfo->noisePosition = bs_noise_position;
 1271|  88.8k|  pFrameInfo->tranEnv = -1;
 1272|       |
 1273|       |  /* Init for bs_noise_position == 0 in case a parse error is found below. */
 1274|  88.8k|  pFrameInfo->nEnvelopes = 1;
 1275|  88.8k|  pFrameInfo->nNoiseEnvelopes = 1;
 1276|  88.8k|  pFrameInfo->freqRes[0] = 0;
 1277|       |
 1278|  88.8k|  if (bs_var_len_hf) { /* 1 or 3 Bits */
  ------------------
  |  Branch (1278:7): [True: 75.3k, False: 13.4k]
  ------------------
 1279|  75.3k|    pFrameInfo->varLength = FDKreadBits(hBs, 2) + 1;
 1280|  75.3k|    if (pFrameInfo->varLength > 3) {
  ------------------
  |  Branch (1280:9): [True: 733, False: 74.6k]
  ------------------
 1281|    733|      pFrameInfo->varLength =
 1282|    733|          0;    /* assume bs_var_len_hf == 0 in case of error */
 1283|    733|      return 0; /* reserved value -> parse error */
 1284|    733|    }
 1285|  75.3k|  } else {
 1286|  13.4k|    pFrameInfo->varLength = 0;
 1287|  13.4k|  }
 1288|       |
 1289|  88.1k|  if (bs_noise_position) {
  ------------------
  |  Branch (1289:7): [True: 75.3k, False: 12.7k]
  ------------------
 1290|  75.3k|    pFrameInfo->nEnvelopes = 2;
 1291|  75.3k|    pFrameInfo->nNoiseEnvelopes = 2;
 1292|  75.3k|    FDKmemclear(pFrameInfo->freqRes, sizeof(pFrameInfo->freqRes));
 1293|  75.3k|  }
 1294|       |
 1295|       |  /* frame border calculation */
 1296|  88.1k|  if (hHeaderData->bs_info.pvc_mode > 0) {
  ------------------
  |  Branch (1296:7): [True: 88.1k, False: 0]
  ------------------
 1297|       |    /* See "7.5.1.4 HF adjustment of SBR envelope scalefactors" for reference.
 1298|       |     */
 1299|       |
 1300|  88.1k|    FDK_ASSERT((pFrameInfo->nEnvelopes == 1) || (pFrameInfo->nEnvelopes == 2));
  ------------------
  |  |  221|  88.1k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1300:5): [True: 12.7k, False: 75.3k]
  |  Branch (1300:5): [True: 75.3k, False: 0]
  |  Branch (1300:5): [True: 88.1k, False: 0]
  ------------------
 1301|       |
 1302|       |    /* left timeborder-offset: use the timeborder of prev SBR frame */
 1303|  88.1k|    if (pPrevFrameInfo->nEnvelopes > 0) {
  ------------------
  |  Branch (1303:9): [True: 85.4k, False: 2.69k]
  ------------------
 1304|  85.4k|      pFrameInfo->borders[0] =
 1305|  85.4k|          pPrevFrameInfo->borders[pPrevFrameInfo->nEnvelopes] - PVC_NTIMESLOT;
  ------------------
  |  |  114|  85.4k|#define PVC_NTIMESLOT 16
  ------------------
 1306|  85.4k|      FDK_ASSERT(pFrameInfo->borders[0] <= 3);
  ------------------
  |  |  221|  85.4k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1306:7): [True: 85.4k, False: 0]
  ------------------
 1307|  85.4k|    } else {
 1308|  2.69k|      pFrameInfo->borders[0] = 0;
 1309|  2.69k|    }
 1310|       |
 1311|       |    /* right timeborder-offset: */
 1312|  88.1k|    pFrameInfo->borders[pFrameInfo->nEnvelopes] = 16 + pFrameInfo->varLength;
 1313|       |
 1314|  88.1k|    if (pFrameInfo->nEnvelopes == 2) {
  ------------------
  |  Branch (1314:9): [True: 75.3k, False: 12.7k]
  ------------------
 1315|  75.3k|      pFrameInfo->borders[1] = pFrameInfo->noisePosition;
 1316|  75.3k|    }
 1317|       |
 1318|       |    /* Calculation of PVC time borders t_EPVC */
 1319|  88.1k|    if (pvc_mode_last == 0) {
  ------------------
  |  Branch (1319:9): [True: 5.87k, False: 82.2k]
  ------------------
 1320|       |      /* there was a legacy SBR frame before this frame => use bs_var_len' for
 1321|       |       * first PVC timeslot */
 1322|  5.87k|      pFrameInfo->pvcBorders[0] = pFrameInfo->borders[0];
 1323|  82.2k|    } else {
 1324|  82.2k|      pFrameInfo->pvcBorders[0] = 0;
 1325|  82.2k|    }
 1326|  88.1k|    if (pFrameInfo->nEnvelopes == 2) {
  ------------------
  |  Branch (1326:9): [True: 75.3k, False: 12.7k]
  ------------------
 1327|  75.3k|      pFrameInfo->pvcBorders[1] = pFrameInfo->borders[1];
 1328|  75.3k|    }
 1329|  88.1k|    pFrameInfo->pvcBorders[pFrameInfo->nEnvelopes] = 16;
 1330|       |
 1331|       |    /* calculation of SBR noise-floor time-border vector: */
 1332|   339k|    for (INT i = 0; i <= pFrameInfo->nNoiseEnvelopes; i++) {
  ------------------
  |  Branch (1332:21): [True: 251k, False: 88.1k]
  ------------------
 1333|   251k|      pFrameInfo->bordersNoise[i] = pFrameInfo->borders[i];
 1334|   251k|    }
 1335|       |
 1336|  88.1k|    pFrameInfo->tranEnv = -1; /* tranEnv not used */
 1337|  88.1k|  }
 1338|  88.1k|  return 1;
 1339|  88.1k|}
env_extr.cpp:_ZL16extractFrameInfoP13FDK_BITSTREAMP15SBR_HEADER_DATAP14SBR_FRAME_DATAjj:
 1350|   194k|    const UINT nrOfChannels, const UINT flags) {
 1351|   194k|  FRAME_INFO *pFrameInfo = &h_frame_data->frameInfo;
 1352|   194k|  int numberTimeSlots = hHeaderData->numberTimeSlots;
 1353|   194k|  int pointer_bits = 0, nEnv = 0, b = 0, border, i, n = 0, k, p, aL, aR, nL, nR,
 1354|   194k|      temp = 0, staticFreqRes;
 1355|   194k|  UCHAR frameClass;
 1356|       |
 1357|   194k|  if (flags & SBRDEC_ELD_GRID) {
  ------------------
  |  |  204|   194k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (1357:7): [True: 46.6k, False: 147k]
  ------------------
 1358|       |    /* CODEC_AACLD (LD+SBR) only uses the normal 0 Grid for non-transient Frames
 1359|       |     * and the LowDelayGrid for transient Frames */
 1360|  46.6k|    frameClass = FDKreadBits(hBs, 1); /* frameClass = [1 bit] */
 1361|  46.6k|    if (frameClass == 1) {
  ------------------
  |  Branch (1361:9): [True: 10.3k, False: 36.3k]
  ------------------
 1362|       |      /* if frameClass == 1, extract LowDelaySbrGrid, otherwise extract normal
 1363|       |       * SBR-Grid for FIXIFX */
 1364|       |      /* extract the AACLD-Sbr-Grid */
 1365|  10.3k|      pFrameInfo->frameClass = frameClass;
 1366|  10.3k|      int err = 1;
 1367|  10.3k|      err = extractLowDelayGrid(hBs, hHeaderData, h_frame_data, numberTimeSlots,
 1368|  10.3k|                                flags);
 1369|  10.3k|      return err;
 1370|  10.3k|    }
 1371|   147k|  } else {
 1372|   147k|    frameClass = FDKreadBits(hBs, 2); /* frameClass = C [2 bits] */
 1373|   147k|  }
 1374|       |
 1375|   183k|  switch (frameClass) {
  ------------------
  |  Branch (1375:11): [True: 172k, False: 11.7k]
  ------------------
 1376|   103k|    case 0:
  ------------------
  |  Branch (1376:5): [True: 103k, False: 80.6k]
  ------------------
 1377|   103k|      temp = FDKreadBits(hBs, 2); /* E [2 bits ] */
 1378|   103k|      nEnv = (int)(1 << temp);    /* E -> e */
 1379|       |
 1380|   103k|      if ((flags & SBRDEC_ELD_GRID) && (nEnv == 1))
  ------------------
  |  |  204|   103k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (1380:11): [True: 36.3k, False: 66.9k]
  |  Branch (1380:40): [True: 26.8k, False: 9.49k]
  ------------------
 1381|  26.8k|        h_frame_data->ampResolutionCurrentFrame =
 1382|  26.8k|            FDKreadBits(hBs, 1); /* new ELD Syntax 07-11-09 */
 1383|       |
 1384|   103k|      staticFreqRes = FDKreadBits(hBs, 1);
 1385|       |
 1386|   103k|      if (flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  206|   103k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                    if (flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  207|   103k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (1386:11): [True: 56.5k, False: 46.7k]
  ------------------
 1387|  56.5k|        if (nEnv > MAX_ENVELOPES_USAC) return 0;
  ------------------
  |  |  135|  56.5k|#define MAX_ENVELOPES_USAC 8
  ------------------
  |  Branch (1387:13): [True: 0, False: 56.5k]
  ------------------
 1388|  56.5k|      } else
 1389|       |
 1390|  46.7k|        b = nEnv + 1;
 1391|   103k|      switch (nEnv) {
  ------------------
  |  Branch (1391:15): [True: 103k, False: 0]
  ------------------
 1392|  66.1k|        case 1:
  ------------------
  |  Branch (1392:9): [True: 66.1k, False: 37.1k]
  ------------------
 1393|  66.1k|          switch (numberTimeSlots) {
 1394|  24.3k|            case 15:
  ------------------
  |  Branch (1394:13): [True: 24.3k, False: 41.7k]
  ------------------
 1395|  24.3k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info1_15,
 1396|  24.3k|                        sizeof(FRAME_INFO));
 1397|  24.3k|              break;
 1398|  41.7k|            case 16:
  ------------------
  |  Branch (1398:13): [True: 41.7k, False: 24.3k]
  ------------------
 1399|  41.7k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info1_16,
 1400|  41.7k|                        sizeof(FRAME_INFO));
 1401|  41.7k|              break;
 1402|      0|            default:
  ------------------
  |  Branch (1402:13): [True: 0, False: 66.1k]
  ------------------
 1403|      0|              FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1403:15): [Folded, False: 0]
  ------------------
 1404|  66.1k|          }
 1405|  66.1k|          break;
 1406|  66.1k|        case 2:
  ------------------
  |  Branch (1406:9): [True: 25.5k, False: 77.7k]
  ------------------
 1407|  25.5k|          switch (numberTimeSlots) {
 1408|  5.30k|            case 15:
  ------------------
  |  Branch (1408:13): [True: 5.30k, False: 20.2k]
  ------------------
 1409|  5.30k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info2_15,
 1410|  5.30k|                        sizeof(FRAME_INFO));
 1411|  5.30k|              break;
 1412|  20.2k|            case 16:
  ------------------
  |  Branch (1412:13): [True: 20.2k, False: 5.30k]
  ------------------
 1413|  20.2k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info2_16,
 1414|  20.2k|                        sizeof(FRAME_INFO));
 1415|  20.2k|              break;
 1416|      0|            default:
  ------------------
  |  Branch (1416:13): [True: 0, False: 25.5k]
  ------------------
 1417|      0|              FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1417:15): [Folded, False: 0]
  ------------------
 1418|  25.5k|          }
 1419|  25.5k|          break;
 1420|  25.5k|        case 4:
  ------------------
  |  Branch (1420:9): [True: 5.80k, False: 97.4k]
  ------------------
 1421|  5.80k|          switch (numberTimeSlots) {
 1422|  2.87k|            case 15:
  ------------------
  |  Branch (1422:13): [True: 2.87k, False: 2.92k]
  ------------------
 1423|  2.87k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info4_15,
 1424|  2.87k|                        sizeof(FRAME_INFO));
 1425|  2.87k|              break;
 1426|  2.92k|            case 16:
  ------------------
  |  Branch (1426:13): [True: 2.92k, False: 2.87k]
  ------------------
 1427|  2.92k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info4_16,
 1428|  2.92k|                        sizeof(FRAME_INFO));
 1429|  2.92k|              break;
 1430|      0|            default:
  ------------------
  |  Branch (1430:13): [True: 0, False: 5.80k]
  ------------------
 1431|      0|              FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1431:15): [Folded, False: 0]
  ------------------
 1432|  5.80k|          }
 1433|  5.80k|          break;
 1434|  5.80k|        case 8:
  ------------------
  |  Branch (1434:9): [True: 5.80k, False: 97.4k]
  ------------------
 1435|  5.80k|#if (MAX_ENVELOPES >= 8)
 1436|  5.80k|          switch (numberTimeSlots) {
 1437|  1.59k|            case 15:
  ------------------
  |  Branch (1437:13): [True: 1.59k, False: 4.20k]
  ------------------
 1438|  1.59k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info8_15,
 1439|  1.59k|                        sizeof(FRAME_INFO));
 1440|  1.59k|              break;
 1441|  4.20k|            case 16:
  ------------------
  |  Branch (1441:13): [True: 4.20k, False: 1.59k]
  ------------------
 1442|  4.20k|              FDKmemcpy(pFrameInfo, &FDK_sbrDecoder_sbr_frame_info8_16,
 1443|  4.20k|                        sizeof(FRAME_INFO));
 1444|  4.20k|              break;
 1445|      0|            default:
  ------------------
  |  Branch (1445:13): [True: 0, False: 5.80k]
  ------------------
 1446|      0|              FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1446:15): [Folded, False: 0]
  ------------------
 1447|  5.80k|          }
 1448|  5.80k|          break;
 1449|       |#else
 1450|       |          return 0;
 1451|       |#endif
 1452|   103k|      }
 1453|       |      /* Apply correct freqRes (High is default) */
 1454|   103k|      if (!staticFreqRes) {
  ------------------
  |  Branch (1454:11): [True: 66.8k, False: 36.4k]
  ------------------
 1455|   160k|        for (i = 0; i < nEnv; i++) pFrameInfo->freqRes[i] = 0;
  ------------------
  |  Branch (1455:21): [True: 93.5k, False: 66.8k]
  ------------------
 1456|  66.8k|      }
 1457|       |
 1458|   103k|      break;
 1459|  34.7k|    case 1:
  ------------------
  |  Branch (1459:5): [True: 34.7k, False: 149k]
  ------------------
 1460|  68.8k|    case 2:
  ------------------
  |  Branch (1460:5): [True: 34.1k, False: 149k]
  ------------------
 1461|  68.8k|      temp = FDKreadBits(hBs, 2); /* A [2 bits] */
 1462|       |
 1463|  68.8k|      n = FDKreadBits(hBs, 2); /* n = N [2 bits] */
 1464|       |
 1465|  68.8k|      nEnv = n + 1; /* # envelopes */
 1466|  68.8k|      b = nEnv + 1; /* # borders   */
 1467|       |
 1468|  68.8k|      break;
 1469|   183k|  }
 1470|       |
 1471|   183k|  switch (frameClass) {
  ------------------
  |  Branch (1471:11): [True: 80.6k, False: 103k]
  ------------------
 1472|  34.7k|    case 1:
  ------------------
  |  Branch (1472:5): [True: 34.7k, False: 149k]
  ------------------
 1473|       |      /* Decode borders: */
 1474|  34.7k|      pFrameInfo->borders[0] = 0;      /* first border          */
 1475|  34.7k|      border = temp + numberTimeSlots; /* A -> aR               */
 1476|  34.7k|      i = b - 1;                       /* frame info index for last border */
 1477|  34.7k|      pFrameInfo->borders[i] = border; /* last border                      */
 1478|       |
 1479|  61.2k|      for (k = 0; k < n; k++) {
  ------------------
  |  Branch (1479:19): [True: 26.5k, False: 34.7k]
  ------------------
 1480|  26.5k|        temp = FDKreadBits(hBs, 2); /* R [2 bits] */
 1481|  26.5k|        border -= (2 * temp + 2);   /* R -> r                */
 1482|  26.5k|        pFrameInfo->borders[--i] = border;
 1483|  26.5k|      }
 1484|       |
 1485|       |      /* Decode pointer: */
 1486|  34.7k|      pointer_bits = DFRACT_BITS - 1 - CountLeadingBits((FIXP_DBL)(n + 1));
  ------------------
  |  |  113|  34.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                    pointer_bits = DFRACT_BITS - 1 - CountLeadingBits((FIXP_DBL)(n + 1));
  ------------------
  |  |  309|  34.7k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
 1487|  34.7k|      p = FDKreadBits(hBs, pointer_bits); /* p = P [pointer_bits bits] */
 1488|       |
 1489|  34.7k|      if (p > n + 1) return 0;
  ------------------
  |  Branch (1489:11): [True: 1.32k, False: 33.3k]
  ------------------
 1490|       |
 1491|  33.3k|      pFrameInfo->tranEnv = p ? n + 2 - p : -1;
  ------------------
  |  Branch (1491:29): [True: 7.06k, False: 26.3k]
  ------------------
 1492|       |
 1493|       |      /* Decode freq res: */
 1494|  90.6k|      for (k = n; k >= 0; k--) {
  ------------------
  |  Branch (1494:19): [True: 57.2k, False: 33.3k]
  ------------------
 1495|  57.2k|        pFrameInfo->freqRes[k] = FDKreadBits(hBs, 1); /* f = F [1 bits] */
 1496|  57.2k|      }
 1497|       |
 1498|       |      /* Calculate noise floor middle border: */
 1499|  33.3k|      if (p == 0 || p == 1)
  ------------------
  |  Branch (1499:11): [True: 26.3k, False: 7.06k]
  |  Branch (1499:21): [True: 5.87k, False: 1.19k]
  ------------------
 1500|  32.1k|        pFrameInfo->bordersNoise[1] = pFrameInfo->borders[n];
 1501|  1.19k|      else
 1502|  1.19k|        pFrameInfo->bordersNoise[1] = pFrameInfo->borders[pFrameInfo->tranEnv];
 1503|       |
 1504|  33.3k|      break;
 1505|       |
 1506|  34.1k|    case 2:
  ------------------
  |  Branch (1506:5): [True: 34.1k, False: 149k]
  ------------------
 1507|       |      /* Decode borders: */
 1508|  34.1k|      border = temp;                   /* A -> aL */
 1509|  34.1k|      pFrameInfo->borders[0] = border; /* first border */
 1510|       |
 1511|  51.9k|      for (k = 1; k <= n; k++) {
  ------------------
  |  Branch (1511:19): [True: 17.7k, False: 34.1k]
  ------------------
 1512|  17.7k|        temp = FDKreadBits(hBs, 2); /* R [2 bits] */
 1513|  17.7k|        border += (2 * temp + 2);   /* R -> r                */
 1514|  17.7k|        pFrameInfo->borders[k] = border;
 1515|  17.7k|      }
 1516|  34.1k|      pFrameInfo->borders[k] = numberTimeSlots; /* last border */
 1517|       |
 1518|       |      /* Decode pointer: */
 1519|  34.1k|      pointer_bits = DFRACT_BITS - 1 - CountLeadingBits((FIXP_DBL)(n + 1));
  ------------------
  |  |  113|  34.1k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                    pointer_bits = DFRACT_BITS - 1 - CountLeadingBits((FIXP_DBL)(n + 1));
  ------------------
  |  |  309|  34.1k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
 1520|  34.1k|      p = FDKreadBits(hBs, pointer_bits); /* p = P [pointer_bits bits] */
 1521|  34.1k|      if (p > n + 1) return 0;
  ------------------
  |  Branch (1521:11): [True: 799, False: 33.3k]
  ------------------
 1522|       |
 1523|  33.3k|      if (p == 0 || p == 1)
  ------------------
  |  Branch (1523:11): [True: 26.1k, False: 7.17k]
  |  Branch (1523:21): [True: 2.25k, False: 4.92k]
  ------------------
 1524|  28.4k|        pFrameInfo->tranEnv = -1;
 1525|  4.92k|      else
 1526|  4.92k|        pFrameInfo->tranEnv = p - 1;
 1527|       |
 1528|       |      /* Decode freq res: */
 1529|  82.5k|      for (k = 0; k <= n; k++) {
  ------------------
  |  Branch (1529:19): [True: 49.1k, False: 33.3k]
  ------------------
 1530|  49.1k|        pFrameInfo->freqRes[k] = FDKreadBits(hBs, 1); /* f = F [1 bits] */
 1531|  49.1k|      }
 1532|       |
 1533|       |      /* Calculate noise floor middle border: */
 1534|  33.3k|      switch (p) {
 1535|  26.1k|        case 0:
  ------------------
  |  Branch (1535:9): [True: 26.1k, False: 7.17k]
  ------------------
 1536|  26.1k|          pFrameInfo->bordersNoise[1] = pFrameInfo->borders[1];
 1537|  26.1k|          break;
 1538|  2.25k|        case 1:
  ------------------
  |  Branch (1538:9): [True: 2.25k, False: 31.0k]
  ------------------
 1539|  2.25k|          pFrameInfo->bordersNoise[1] = pFrameInfo->borders[n];
 1540|  2.25k|          break;
 1541|  4.92k|        default:
  ------------------
  |  Branch (1541:9): [True: 4.92k, False: 28.4k]
  ------------------
 1542|  4.92k|          pFrameInfo->bordersNoise[1] =
 1543|  4.92k|              pFrameInfo->borders[pFrameInfo->tranEnv];
 1544|  4.92k|          break;
 1545|  33.3k|      }
 1546|       |
 1547|  33.3k|      break;
 1548|       |
 1549|  33.3k|    case 3:
  ------------------
  |  Branch (1549:5): [True: 11.7k, False: 172k]
  ------------------
 1550|       |      /* v_ctrlSignal = [frameClass,aL,aR,nL,nR,v_rL,v_rR,p,v_fLR]; */
 1551|       |
 1552|  11.7k|      aL = FDKreadBits(hBs, 2); /* AL [2 bits], AL -> aL */
 1553|       |
 1554|  11.7k|      aR = FDKreadBits(hBs, 2) + numberTimeSlots; /* AR [2 bits], AR -> aR */
 1555|       |
 1556|  11.7k|      nL = FDKreadBits(hBs, 2); /* nL = NL [2 bits] */
 1557|       |
 1558|  11.7k|      nR = FDKreadBits(hBs, 2); /* nR = NR [2 bits] */
 1559|       |
 1560|       |      /*-------------------------------------------------------------------------
 1561|       |        Calculate help variables
 1562|       |        --------------------------------------------------------------------------*/
 1563|       |
 1564|       |      /* general: */
 1565|  11.7k|      nEnv = nL + nR + 1; /* # envelopes */
 1566|  11.7k|      if (nEnv > MAX_ENVELOPES) return 0;
  ------------------
  |  |  136|  11.7k|#define MAX_ENVELOPES MAX_ENVELOPES_USAC
  |  |  ------------------
  |  |  |  |  135|  11.7k|#define MAX_ENVELOPES_USAC 8
  |  |  ------------------
  ------------------
  |  Branch (1566:11): [True: 0, False: 11.7k]
  ------------------
 1567|  11.7k|      b = nEnv + 1; /* # borders   */
 1568|       |
 1569|       |      /*-------------------------------------------------------------------------
 1570|       |        Decode envelopes
 1571|       |        --------------------------------------------------------------------------*/
 1572|       |
 1573|       |      /* L-borders:   */
 1574|  11.7k|      border = aL; /* first border */
 1575|  11.7k|      pFrameInfo->borders[0] = border;
 1576|       |
 1577|  25.8k|      for (k = 1; k <= nL; k++) {
  ------------------
  |  Branch (1577:19): [True: 14.0k, False: 11.7k]
  ------------------
 1578|  14.0k|        temp = FDKreadBits(hBs, 2); /* R [2 bits] */
 1579|  14.0k|        border += (2 * temp + 2);   /* R -> r                */
 1580|  14.0k|        pFrameInfo->borders[k] = border;
 1581|  14.0k|      }
 1582|       |
 1583|       |      /* R-borders:  */
 1584|  11.7k|      border = aR; /* last border */
 1585|  11.7k|      i = nEnv;
 1586|       |
 1587|  11.7k|      pFrameInfo->borders[i] = border;
 1588|       |
 1589|  28.2k|      for (k = 0; k < nR; k++) {
  ------------------
  |  Branch (1589:19): [True: 16.4k, False: 11.7k]
  ------------------
 1590|  16.4k|        temp = FDKreadBits(hBs, 2); /* R [2 bits] */
 1591|  16.4k|        border -= (2 * temp + 2);   /* R -> r                */
 1592|  16.4k|        pFrameInfo->borders[--i] = border;
 1593|  16.4k|      }
 1594|       |
 1595|       |      /* decode pointer: */
 1596|  11.7k|      pointer_bits =
 1597|  11.7k|          DFRACT_BITS - 1 - CountLeadingBits((FIXP_DBL)(nL + nR + 1));
  ------------------
  |  |  113|  11.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                        DFRACT_BITS - 1 - CountLeadingBits((FIXP_DBL)(nL + nR + 1));
  ------------------
  |  |  309|  11.7k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
 1598|  11.7k|      p = FDKreadBits(hBs, pointer_bits); /* p = P [pointer_bits bits] */
 1599|       |
 1600|  11.7k|      if (p > nL + nR + 1) return 0;
  ------------------
  |  Branch (1600:11): [True: 1.28k, False: 10.5k]
  ------------------
 1601|       |
 1602|  10.5k|      pFrameInfo->tranEnv = p ? b - p : -1;
  ------------------
  |  Branch (1602:29): [True: 4.87k, False: 5.63k]
  ------------------
 1603|       |
 1604|       |      /* decode freq res: */
 1605|  47.3k|      for (k = 0; k < nEnv; k++) {
  ------------------
  |  Branch (1605:19): [True: 36.8k, False: 10.5k]
  ------------------
 1606|  36.8k|        pFrameInfo->freqRes[k] = FDKreadBits(hBs, 1); /* f = F [1 bits] */
 1607|  36.8k|      }
 1608|       |
 1609|       |      /*-------------------------------------------------------------------------
 1610|       |        Decode noise floors
 1611|       |        --------------------------------------------------------------------------*/
 1612|  10.5k|      pFrameInfo->bordersNoise[0] = aL;
 1613|       |
 1614|  10.5k|      if (nEnv == 1) {
  ------------------
  |  Branch (1614:11): [True: 1.33k, False: 9.16k]
  ------------------
 1615|       |        /* 1 noise floor envelope: */
 1616|  1.33k|        pFrameInfo->bordersNoise[1] = aR;
 1617|  9.16k|      } else {
 1618|       |        /* 2 noise floor envelopes */
 1619|  9.16k|        if (p == 0 || p == 1)
  ------------------
  |  Branch (1619:13): [True: 5.22k, False: 3.94k]
  |  Branch (1619:23): [True: 1.69k, False: 2.24k]
  ------------------
 1620|  6.92k|          pFrameInfo->bordersNoise[1] = pFrameInfo->borders[nEnv - 1];
 1621|  2.24k|        else
 1622|  2.24k|          pFrameInfo->bordersNoise[1] =
 1623|  2.24k|              pFrameInfo->borders[pFrameInfo->tranEnv];
 1624|  9.16k|        pFrameInfo->bordersNoise[2] = aR;
 1625|  9.16k|      }
 1626|  10.5k|      break;
 1627|   183k|  }
 1628|       |
 1629|       |  /*
 1630|       |    Store number of envelopes, noise floor envelopes and frame class
 1631|       |  */
 1632|   180k|  pFrameInfo->nEnvelopes = nEnv;
 1633|       |
 1634|   180k|  if (nEnv == 1)
  ------------------
  |  Branch (1634:7): [True: 109k, False: 70.9k]
  ------------------
 1635|   109k|    pFrameInfo->nNoiseEnvelopes = 1;
 1636|  70.9k|  else
 1637|  70.9k|    pFrameInfo->nNoiseEnvelopes = 2;
 1638|       |
 1639|   180k|  pFrameInfo->frameClass = frameClass;
 1640|       |
 1641|   180k|  if (pFrameInfo->frameClass == 2 || pFrameInfo->frameClass == 1) {
  ------------------
  |  Branch (1641:7): [True: 33.3k, False: 147k]
  |  Branch (1641:38): [True: 33.3k, False: 113k]
  ------------------
 1642|       |    /* calculate noise floor first and last borders: */
 1643|  66.7k|    pFrameInfo->bordersNoise[0] = pFrameInfo->borders[0];
 1644|  66.7k|    pFrameInfo->bordersNoise[pFrameInfo->nNoiseEnvelopes] =
 1645|  66.7k|        pFrameInfo->borders[nEnv];
 1646|  66.7k|  }
 1647|       |
 1648|   180k|  return 1;
 1649|   183k|}
env_extr.cpp:_ZL19extractLowDelayGridP13FDK_BITSTREAMP15SBR_HEADER_DATAP14SBR_FRAME_DATAij:
 1207|  10.3k|    int timeSlots, const UINT flags) {
 1208|  10.3k|  FRAME_INFO *pFrameInfo = &h_frame_data->frameInfo;
 1209|  10.3k|  INT numberTimeSlots = hHeaderData->numberTimeSlots;
 1210|  10.3k|  INT temp = 0, k;
 1211|       |
 1212|       |  /* FIXFIXonly framing case */
 1213|  10.3k|  h_frame_data->frameInfo.frameClass = 0;
 1214|       |
 1215|       |  /* get the transient position from the bitstream */
 1216|  10.3k|  switch (timeSlots) {
 1217|      0|    case 8:
  ------------------
  |  Branch (1217:5): [True: 0, False: 10.3k]
  ------------------
 1218|       |      /* 3bit transient position (temp={0;..;7}) */
 1219|      0|      temp = FDKreadBits(hBitBuf, 3);
 1220|      0|      break;
 1221|       |
 1222|  2.93k|    case 16:
  ------------------
  |  Branch (1222:5): [True: 2.93k, False: 7.39k]
  ------------------
 1223|  10.3k|    case 15:
  ------------------
  |  Branch (1223:5): [True: 7.39k, False: 2.93k]
  ------------------
 1224|       |      /* 4bit transient position (temp={0;..;15}) */
 1225|  10.3k|      temp = FDKreadBits(hBitBuf, 4);
 1226|  10.3k|      break;
 1227|       |
 1228|      0|    default:
  ------------------
  |  Branch (1228:5): [True: 0, False: 10.3k]
  ------------------
 1229|      0|      return 0;
 1230|  10.3k|  }
 1231|       |
 1232|       |  /* For "case 15" only*/
 1233|  10.3k|  if (temp >= timeSlots) {
  ------------------
  |  Branch (1233:7): [True: 3.37k, False: 6.95k]
  ------------------
 1234|  3.37k|    return 0;
 1235|  3.37k|  }
 1236|       |
 1237|       |  /* calculate borders according to the transient position */
 1238|  6.95k|  if (!generateFixFixOnly(pFrameInfo, temp, numberTimeSlots, flags)) {
  ------------------
  |  Branch (1238:7): [True: 0, False: 6.95k]
  ------------------
 1239|      0|    return 0;
 1240|      0|  }
 1241|       |
 1242|       |  /* decode freq res: */
 1243|  23.9k|  for (k = 0; k < pFrameInfo->nEnvelopes; k++) {
  ------------------
  |  Branch (1243:15): [True: 17.0k, False: 6.95k]
  ------------------
 1244|  17.0k|    pFrameInfo->freqRes[k] =
 1245|  17.0k|        (UCHAR)FDKreadBits(hBitBuf, 1); /* f = F [1 bits] */
 1246|  17.0k|  }
 1247|       |
 1248|  6.95k|  return 1;
 1249|  6.95k|}
env_extr.cpp:_ZL18generateFixFixOnlyP10FRAME_INFOiij:
 1151|  6.95k|                              int numberTimeSlots, const UINT flags) {
 1152|  6.95k|  int nEnv, i, tranIdx;
 1153|  6.95k|  const int *pTable;
 1154|       |
 1155|  6.95k|  if (tranPosInternal >= numberTimeSlots) {
  ------------------
  |  Branch (1155:7): [True: 0, False: 6.95k]
  ------------------
 1156|      0|    return 0;
 1157|      0|  }
 1158|       |
 1159|  6.95k|  switch (numberTimeSlots) {
 1160|      0|    case 8:
  ------------------
  |  Branch (1160:5): [True: 0, False: 6.95k]
  ------------------
 1161|      0|      pTable = FDK_sbrDecoder_envelopeTable_8[tranPosInternal];
 1162|      0|      break;
 1163|  4.02k|    case 15:
  ------------------
  |  Branch (1163:5): [True: 4.02k, False: 2.93k]
  ------------------
 1164|  4.02k|      pTable = FDK_sbrDecoder_envelopeTable_15[tranPosInternal];
 1165|  4.02k|      break;
 1166|  2.93k|    case 16:
  ------------------
  |  Branch (1166:5): [True: 2.93k, False: 4.02k]
  ------------------
 1167|  2.93k|      pTable = FDK_sbrDecoder_envelopeTable_16[tranPosInternal];
 1168|  2.93k|      break;
 1169|      0|    default:
  ------------------
  |  Branch (1169:5): [True: 0, False: 6.95k]
  ------------------
 1170|      0|      return 0;
 1171|  6.95k|  }
 1172|       |
 1173|       |  /* look number of envelopes in table */
 1174|  6.95k|  nEnv = pTable[0];
 1175|       |  /* look up envelope distribution in table */
 1176|  17.0k|  for (i = 1; i < nEnv; i++) hSbrFrameInfo->borders[i] = pTable[i + 2];
  ------------------
  |  Branch (1176:15): [True: 10.0k, False: 6.95k]
  ------------------
 1177|       |  /* open and close frame border */
 1178|  6.95k|  hSbrFrameInfo->borders[0] = 0;
 1179|  6.95k|  hSbrFrameInfo->borders[nEnv] = numberTimeSlots;
 1180|  6.95k|  hSbrFrameInfo->nEnvelopes = nEnv;
 1181|       |
 1182|       |  /* transient idx */
 1183|  6.95k|  tranIdx = hSbrFrameInfo->tranEnv = pTable[1];
 1184|       |
 1185|       |  /* add noise floors */
 1186|  6.95k|  hSbrFrameInfo->bordersNoise[0] = 0;
 1187|  6.95k|  hSbrFrameInfo->bordersNoise[1] =
 1188|  6.95k|      hSbrFrameInfo->borders[tranIdx ? tranIdx : 1];
  ------------------
  |  Branch (1188:30): [True: 6.08k, False: 867]
  ------------------
 1189|  6.95k|  hSbrFrameInfo->bordersNoise[2] = numberTimeSlots;
 1190|       |  /* nEnv is always > 1, so nNoiseEnvelopes is always 2 (IEC 14496-3 4.6.19.3.2)
 1191|       |   */
 1192|  6.95k|  hSbrFrameInfo->nNoiseEnvelopes = 2;
 1193|       |
 1194|  6.95k|  return 1;
 1195|  6.95k|}
env_extr.cpp:_ZL14checkFrameInfoP10FRAME_INFOiii:
 1660|   275k|{
 1661|   275k|  int maxPos, i, j;
 1662|   275k|  int startPos;
 1663|   275k|  int stopPos;
 1664|   275k|  int tranEnv;
 1665|   275k|  int startPosNoise;
 1666|   275k|  int stopPosNoise;
 1667|   275k|  int nEnvelopes = pFrameInfo->nEnvelopes;
 1668|   275k|  int nNoiseEnvelopes = pFrameInfo->nNoiseEnvelopes;
 1669|       |
 1670|   275k|  if (nEnvelopes < 1 || nEnvelopes > MAX_ENVELOPES) return 0;
  ------------------
  |  |  136|   275k|#define MAX_ENVELOPES MAX_ENVELOPES_USAC
  |  |  ------------------
  |  |  |  |  135|   275k|#define MAX_ENVELOPES_USAC 8
  |  |  ------------------
  ------------------
  |  Branch (1670:7): [True: 0, False: 275k]
  |  Branch (1670:25): [True: 0, False: 275k]
  ------------------
 1671|       |
 1672|   275k|  if (nNoiseEnvelopes > MAX_NOISE_ENVELOPES) return 0;
  ------------------
  |  |  127|   275k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (1672:7): [True: 0, False: 275k]
  ------------------
 1673|       |
 1674|   275k|  startPos = pFrameInfo->borders[0];
 1675|   275k|  stopPos = pFrameInfo->borders[nEnvelopes];
 1676|   275k|  tranEnv = pFrameInfo->tranEnv;
 1677|   275k|  startPosNoise = pFrameInfo->bordersNoise[0];
 1678|   275k|  stopPosNoise = pFrameInfo->bordersNoise[nNoiseEnvelopes];
 1679|       |
 1680|   275k|  if (overlap < 0 || overlap > (3 * (4))) {
  ------------------
  |  Branch (1680:7): [True: 0, False: 275k]
  |  Branch (1680:22): [True: 0, False: 275k]
  ------------------
 1681|      0|    return 0;
 1682|      0|  }
 1683|   275k|  if (timeStep < 1 || timeStep > (4)) {
  ------------------
  |  Branch (1683:7): [True: 0, False: 275k]
  |  Branch (1683:23): [True: 0, False: 275k]
  ------------------
 1684|      0|    return 0;
 1685|      0|  }
 1686|   275k|  maxPos = numberOfTimeSlots + (overlap / timeStep);
 1687|       |
 1688|       |  /* Check that the start and stop positions of the frame are reasonable values.
 1689|       |   */
 1690|   275k|  if ((startPos < 0) || (startPos >= stopPos)) return 0;
  ------------------
  |  Branch (1690:7): [True: 0, False: 275k]
  |  Branch (1690:25): [True: 0, False: 275k]
  ------------------
 1691|   275k|  if (startPos > maxPos - numberOfTimeSlots) /* First env. must start in or
  ------------------
  |  Branch (1691:7): [True: 0, False: 275k]
  ------------------
 1692|       |                                                directly after the overlap
 1693|       |                                                buffer */
 1694|      0|    return 0;
 1695|   275k|  if (stopPos < numberOfTimeSlots) /* One complete frame must be ready for
  ------------------
  |  Branch (1695:7): [True: 0, False: 275k]
  ------------------
 1696|       |                                      output after processing */
 1697|      0|    return 0;
 1698|   275k|  if (stopPos > maxPos) return 0;
  ------------------
  |  Branch (1698:7): [True: 0, False: 275k]
  ------------------
 1699|       |
 1700|       |  /* Check that the  start border for every envelope is strictly later in time
 1701|       |   */
 1702|   774k|  for (i = 0; i < nEnvelopes; i++) {
  ------------------
  |  Branch (1702:15): [True: 502k, False: 271k]
  ------------------
 1703|   502k|    if (pFrameInfo->borders[i] >= pFrameInfo->borders[i + 1]) return 0;
  ------------------
  |  Branch (1703:9): [True: 4.20k, False: 498k]
  ------------------
 1704|   502k|  }
 1705|       |
 1706|       |  /* Check that the envelope to be shortened is actually among the envelopes */
 1707|   271k|  if (tranEnv > nEnvelopes) return 0;
  ------------------
  |  Branch (1707:7): [True: 0, False: 271k]
  ------------------
 1708|       |
 1709|       |  /* Check the noise borders */
 1710|   271k|  if (nEnvelopes == 1 && nNoiseEnvelopes > 1) return 0;
  ------------------
  |  Branch (1710:7): [True: 122k, False: 149k]
  |  Branch (1710:26): [True: 0, False: 122k]
  ------------------
 1711|       |
 1712|   271k|  if (startPos != startPosNoise || stopPos != stopPosNoise) return 0;
  ------------------
  |  Branch (1712:7): [True: 0, False: 271k]
  |  Branch (1712:36): [True: 0, False: 271k]
  ------------------
 1713|       |
 1714|       |  /* Check that the  start border for every noise-envelope is strictly later in
 1715|       |   * time*/
 1716|   691k|  for (i = 0; i < nNoiseEnvelopes; i++) {
  ------------------
  |  Branch (1716:15): [True: 420k, False: 271k]
  ------------------
 1717|   420k|    if (pFrameInfo->bordersNoise[i] >= pFrameInfo->bordersNoise[i + 1])
  ------------------
  |  Branch (1717:9): [True: 0, False: 420k]
  ------------------
 1718|      0|      return 0;
 1719|   420k|  }
 1720|       |
 1721|       |  /* Check that every noise border is the same as an envelope border*/
 1722|   691k|  for (i = 0; i < nNoiseEnvelopes; i++) {
  ------------------
  |  Branch (1722:15): [True: 420k, False: 271k]
  ------------------
 1723|   420k|    startPosNoise = pFrameInfo->bordersNoise[i];
 1724|       |
 1725|   609k|    for (j = 0; j < nEnvelopes; j++) {
  ------------------
  |  Branch (1725:17): [True: 609k, False: 0]
  ------------------
 1726|   609k|      if (pFrameInfo->borders[j] == startPosNoise) break;
  ------------------
  |  Branch (1726:11): [True: 420k, False: 189k]
  ------------------
 1727|   609k|    }
 1728|   420k|    if (j == nEnvelopes) return 0;
  ------------------
  |  Branch (1728:9): [True: 0, False: 420k]
  ------------------
 1729|   420k|  }
 1730|       |
 1731|   271k|  return 1;
 1732|   271k|}

_Z19QmfTransposerCreatePP13hbeTransposeriii:
  925|  18.2k|                    int bDisableCrossProducts, int bSbr41) {
  926|  18.2k|  HANDLE_HBE_TRANSPOSER hQmfTran = NULL;
  927|       |
  928|  18.2k|  int i;
  929|       |
  930|  18.2k|  if (hQmfTransposer != NULL) {
  ------------------
  |  Branch (930:7): [True: 18.2k, False: 0]
  ------------------
  931|       |    /* Memory allocation */
  932|       |    /*--------------------------------------------------------------------------------------------*/
  933|  18.2k|    hQmfTran =
  934|  18.2k|        (HANDLE_HBE_TRANSPOSER)FDKcalloc(1, sizeof(struct hbeTransposer));
  935|  18.2k|    if (hQmfTran == NULL) {
  ------------------
  |  Branch (935:9): [True: 0, False: 18.2k]
  ------------------
  936|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  937|      0|    }
  938|       |
  939|  72.8k|    for (i = 0; i < MAX_STRETCH_HBE - 1; i++) {
  ------------------
  |  |  118|  72.8k|#define MAX_STRETCH_HBE (4)
  ------------------
  |  Branch (939:17): [True: 54.6k, False: 18.2k]
  ------------------
  940|  54.6k|      hQmfTran->bXProducts[i] = (bDisableCrossProducts ? 0 : xProducts[i]);
  ------------------
  |  Branch (940:34): [True: 0, False: 54.6k]
  ------------------
  941|  54.6k|    }
  942|       |
  943|  18.2k|    hQmfTran->timeDomainWinLen = frameSize;
  944|  18.2k|    if (frameSize == 768) {
  ------------------
  |  Branch (944:9): [True: 4.27k, False: 13.9k]
  ------------------
  945|  4.27k|      hQmfTran->noCols =
  946|  4.27k|          (8 * frameSize / 3) / QMF_SYNTH_CHANNELS; /* 32 for 24:64 */
  ------------------
  |  |  109|  4.27k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  947|  13.9k|    } else {
  948|  13.9k|      hQmfTran->noCols =
  949|  13.9k|          (bSbr41 + 1) * 2 * frameSize /
  950|  13.9k|          QMF_SYNTH_CHANNELS; /* 32 for 32:64 and 64 for 16:64 -> identical to
  ------------------
  |  |  109|  13.9k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  951|       |                                 sbrdec->no_cols */
  952|  13.9k|    }
  953|       |
  954|  18.2k|    hQmfTran->noChannels = frameSize / hQmfTran->noCols;
  955|       |
  956|  18.2k|    hQmfTran->qmfInBufSize = QMF_WIN_LEN;
  ------------------
  |  |  118|  18.2k|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
  957|  18.2k|    hQmfTran->qmfOutBufSize = 2 * (hQmfTran->noCols / 2 + QMF_WIN_LEN - 1);
  ------------------
  |  |  118|  18.2k|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
  958|       |
  959|  18.2k|    hQmfTran->inBuf_F =
  960|  18.2k|        (LONG*)FDKcalloc(QMF_SYNTH_CHANNELS + 20 + 1, sizeof(LONG));
  ------------------
  |  |  109|  18.2k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  961|       |    /* buffered time signal needs to be delayed by synthesis_size; max
  962|       |     * synthesis_size = 20; */
  963|  18.2k|    if (hQmfTran->inBuf_F == NULL) {
  ------------------
  |  Branch (963:9): [True: 0, False: 18.2k]
  ------------------
  964|      0|      QmfTransposerClose(hQmfTran);
  965|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  966|      0|    }
  967|       |
  968|  18.2k|    hQmfTran->qmfInBufReal_F =
  969|  18.2k|        (FIXP_DBL**)FDKcalloc(hQmfTran->qmfInBufSize, sizeof(FIXP_DBL*));
  970|  18.2k|    hQmfTran->qmfInBufImag_F =
  971|  18.2k|        (FIXP_DBL**)FDKcalloc(hQmfTran->qmfInBufSize, sizeof(FIXP_DBL*));
  972|       |
  973|  18.2k|    if (hQmfTran->qmfInBufReal_F == NULL) {
  ------------------
  |  Branch (973:9): [True: 0, False: 18.2k]
  ------------------
  974|      0|      QmfTransposerClose(hQmfTran);
  975|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  976|      0|    }
  977|  18.2k|    if (hQmfTran->qmfInBufImag_F == NULL) {
  ------------------
  |  Branch (977:9): [True: 0, False: 18.2k]
  ------------------
  978|      0|      QmfTransposerClose(hQmfTran);
  979|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  980|      0|    }
  981|       |
  982|   254k|    for (i = 0; i < hQmfTran->qmfInBufSize; i++) {
  ------------------
  |  Branch (982:17): [True: 236k, False: 18.2k]
  ------------------
  983|   236k|      hQmfTran->qmfInBufReal_F[i] = (FIXP_DBL*)FDKaalloc(
  984|   236k|          QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  109|   236k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
                        QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|   236k|#define ALIGNMENT_DEFAULT 8
  ------------------
  985|   236k|      hQmfTran->qmfInBufImag_F[i] = (FIXP_DBL*)FDKaalloc(
  986|   236k|          QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  109|   236k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
                        QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|   236k|#define ALIGNMENT_DEFAULT 8
  ------------------
  987|   236k|      if (hQmfTran->qmfInBufReal_F[i] == NULL) {
  ------------------
  |  Branch (987:11): [True: 0, False: 236k]
  ------------------
  988|      0|        QmfTransposerClose(hQmfTran);
  989|      0|        return SBRDEC_MEM_ALLOC_FAILED;
  990|      0|      }
  991|   236k|      if (hQmfTran->qmfInBufImag_F[i] == NULL) {
  ------------------
  |  Branch (991:11): [True: 0, False: 236k]
  ------------------
  992|      0|        QmfTransposerClose(hQmfTran);
  993|      0|        return SBRDEC_MEM_ALLOC_FAILED;
  994|      0|      }
  995|   236k|    }
  996|       |
  997|  18.2k|    hQmfTran->qmfHBEBufReal_F =
  998|  18.2k|        (FIXP_DBL**)FDKcalloc(HBE_MAX_OUT_SLOTS, sizeof(FIXP_DBL*));
  ------------------
  |  |  115|  18.2k|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  999|  18.2k|    hQmfTran->qmfHBEBufImag_F =
 1000|  18.2k|        (FIXP_DBL**)FDKcalloc(HBE_MAX_OUT_SLOTS, sizeof(FIXP_DBL*));
  ------------------
  |  |  115|  18.2k|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
 1001|       |
 1002|  18.2k|    if (hQmfTran->qmfHBEBufReal_F == NULL) {
  ------------------
  |  Branch (1002:9): [True: 0, False: 18.2k]
  ------------------
 1003|      0|      QmfTransposerClose(hQmfTran);
 1004|      0|      return SBRDEC_MEM_ALLOC_FAILED;
 1005|      0|    }
 1006|  18.2k|    if (hQmfTran->qmfHBEBufImag_F == NULL) {
  ------------------
  |  Branch (1006:9): [True: 0, False: 18.2k]
  ------------------
 1007|      0|      QmfTransposerClose(hQmfTran);
 1008|      0|      return SBRDEC_MEM_ALLOC_FAILED;
 1009|      0|    }
 1010|       |
 1011|   218k|    for (i = 0; i < HBE_MAX_OUT_SLOTS; i++) {
  ------------------
  |  |  115|   218k|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (1011:17): [True: 200k, False: 18.2k]
  ------------------
 1012|   200k|      hQmfTran->qmfHBEBufReal_F[i] =
 1013|   200k|          (FIXP_DBL*)FDKcalloc(QMF_SYNTH_CHANNELS, sizeof(FIXP_DBL));
  ------------------
  |  |  109|   200k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1014|   200k|      hQmfTran->qmfHBEBufImag_F[i] =
 1015|   200k|          (FIXP_DBL*)FDKcalloc(QMF_SYNTH_CHANNELS, sizeof(FIXP_DBL));
  ------------------
  |  |  109|   200k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1016|   200k|      if (hQmfTran->qmfHBEBufReal_F[i] == NULL) {
  ------------------
  |  Branch (1016:11): [True: 0, False: 200k]
  ------------------
 1017|      0|        QmfTransposerClose(hQmfTran);
 1018|      0|        return SBRDEC_MEM_ALLOC_FAILED;
 1019|      0|      }
 1020|   200k|      if (hQmfTran->qmfHBEBufImag_F[i] == NULL) {
  ------------------
  |  Branch (1020:11): [True: 0, False: 200k]
  ------------------
 1021|      0|        QmfTransposerClose(hQmfTran);
 1022|      0|        return SBRDEC_MEM_ALLOC_FAILED;
 1023|      0|      }
 1024|   200k|    }
 1025|       |
 1026|  18.2k|    hQmfTran->qmfBufferCodecTempSlot_F =
 1027|  18.2k|        (FIXP_DBL*)FDKcalloc(QMF_SYNTH_CHANNELS / 2, sizeof(FIXP_DBL));
  ------------------
  |  |  109|  18.2k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1028|  18.2k|    if (hQmfTran->qmfBufferCodecTempSlot_F == NULL) {
  ------------------
  |  Branch (1028:9): [True: 0, False: 18.2k]
  ------------------
 1029|      0|      QmfTransposerClose(hQmfTran);
 1030|      0|      return SBRDEC_MEM_ALLOC_FAILED;
 1031|      0|    }
 1032|       |
 1033|  18.2k|    hQmfTran->bSbr41 = bSbr41;
 1034|       |
 1035|  18.2k|    hQmfTran->highband_exp[0] = 0;
 1036|  18.2k|    hQmfTran->highband_exp[1] = 0;
 1037|  18.2k|    hQmfTran->target_exp[0] = 0;
 1038|  18.2k|    hQmfTran->target_exp[1] = 0;
 1039|       |
 1040|  18.2k|    *hQmfTransposer = hQmfTran;
 1041|  18.2k|  }
 1042|       |
 1043|  18.2k|  return SBRDEC_OK;
 1044|  18.2k|}
_Z19QmfTransposerReInitP13hbeTransposerPPhS1_:
 1051|  30.6k|{
 1052|  30.6k|  int L, sfb, patch, stopPatch, qmfErr;
 1053|       |
 1054|  30.6k|  if (hQmfTransposer != NULL) {
  ------------------
  |  Branch (1054:7): [True: 30.6k, False: 0]
  ------------------
 1055|  30.6k|    const FIXP_QTW* tmp_t_cos;
 1056|  30.6k|    const FIXP_QTW* tmp_t_sin;
 1057|       |
 1058|  30.6k|    hQmfTransposer->startBand = FreqBandTable[0][0];
 1059|  30.6k|    FDK_ASSERT((!hQmfTransposer->bSbr41 && hQmfTransposer->startBand <= 32) ||
  ------------------
  |  |  221|  30.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1059:5): [True: 24.3k, False: 6.34k]
  |  Branch (1059:5): [True: 24.3k, False: 0]
  |  Branch (1059:5): [True: 6.34k, False: 0]
  |  Branch (1059:5): [True: 6.34k, False: 0]
  |  Branch (1059:5): [True: 30.6k, False: 0]
  ------------------
 1060|  30.6k|               (hQmfTransposer->bSbr41 &&
 1061|  30.6k|                hQmfTransposer->startBand <=
 1062|  30.6k|                    16)); /* is checked by resetFreqBandTables() */
 1063|  30.6k|    hQmfTransposer->stopBand = FreqBandTable[0][NSfb[0]];
 1064|       |
 1065|  30.6k|    hQmfTransposer->synthSize =
 1066|  30.6k|        4 * ((hQmfTransposer->startBand + 4) / 8 + 1); /* 8, 12, 16, 20 */
 1067|  30.6k|    hQmfTransposer->kstart = startSubband2kL[hQmfTransposer->startBand];
 1068|       |
 1069|       |    /* don't know where to take this information from */
 1070|       |    /* hQmfTransposer->bSbr41 = bSbr41;               */
 1071|       |
 1072|  30.6k|    if (hQmfTransposer->bSbr41) {
  ------------------
  |  Branch (1072:9): [True: 6.34k, False: 24.3k]
  ------------------
 1073|  6.34k|      if (hQmfTransposer->kstart + hQmfTransposer->synthSize > 16)
  ------------------
  |  Branch (1073:11): [True: 3.18k, False: 3.16k]
  ------------------
 1074|  3.18k|        hQmfTransposer->kstart = 16 - hQmfTransposer->synthSize;
 1075|  24.3k|    } else if (hQmfTransposer->timeDomainWinLen == 768) {
  ------------------
  |  Branch (1075:16): [True: 23.7k, False: 555]
  ------------------
 1076|  23.7k|      if (hQmfTransposer->kstart + hQmfTransposer->synthSize > 24)
  ------------------
  |  Branch (1076:11): [True: 12.4k, False: 11.3k]
  ------------------
 1077|  12.4k|        hQmfTransposer->kstart = 24 - hQmfTransposer->synthSize;
 1078|  23.7k|    }
 1079|       |
 1080|  30.6k|    hQmfTransposer->synthesisQmfPreModCos_F =
 1081|  30.6k|        &preModCos[hQmfTransposer->kstart];
 1082|  30.6k|    hQmfTransposer->synthesisQmfPreModSin_F =
 1083|  30.6k|        &preModSin[hQmfTransposer->kstart];
 1084|       |
 1085|  30.6k|    L = 2 * hQmfTransposer->synthSize; /* 8, 16, 24, 32, 40 */
 1086|       |                                       /* Change analysis post twiddles */
 1087|       |
 1088|  30.6k|    switch (L) {
 1089|      0|      case 8:
  ------------------
  |  Branch (1089:7): [True: 0, False: 30.6k]
  ------------------
 1090|      0|        tmp_t_cos = post_twiddle_cos_8;
 1091|      0|        tmp_t_sin = post_twiddle_sin_8;
 1092|      0|        break;
 1093|  2.88k|      case 16:
  ------------------
  |  Branch (1093:7): [True: 2.88k, False: 27.8k]
  ------------------
 1094|  2.88k|        tmp_t_cos = post_twiddle_cos_16;
 1095|  2.88k|        tmp_t_sin = post_twiddle_sin_16;
 1096|  2.88k|        break;
 1097|  14.9k|      case 24:
  ------------------
  |  Branch (1097:7): [True: 14.9k, False: 15.7k]
  ------------------
 1098|  14.9k|        tmp_t_cos = post_twiddle_cos_24;
 1099|  14.9k|        tmp_t_sin = post_twiddle_sin_24;
 1100|  14.9k|        break;
 1101|  11.5k|      case 32:
  ------------------
  |  Branch (1101:7): [True: 11.5k, False: 19.1k]
  ------------------
 1102|  11.5k|        tmp_t_cos = post_twiddle_cos_32;
 1103|  11.5k|        tmp_t_sin = post_twiddle_sin_32;
 1104|  11.5k|        break;
 1105|  1.31k|      case 40:
  ------------------
  |  Branch (1105:7): [True: 1.31k, False: 29.3k]
  ------------------
 1106|  1.31k|        tmp_t_cos = post_twiddle_cos_40;
 1107|  1.31k|        tmp_t_sin = post_twiddle_sin_40;
 1108|  1.31k|        break;
 1109|      0|      default:
  ------------------
  |  Branch (1109:7): [True: 0, False: 30.6k]
  ------------------
 1110|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
 1111|  30.6k|    }
 1112|       |
 1113|  30.6k|    qmfErr = qmfInitSynthesisFilterBank(
 1114|  30.6k|        &hQmfTransposer->HBESynthesisQMF, hQmfTransposer->synQmfStates,
 1115|  30.6k|        hQmfTransposer->noCols, 0, hQmfTransposer->synthSize,
 1116|  30.6k|        hQmfTransposer->synthSize, 1);
 1117|  30.6k|    if (qmfErr != 0) {
  ------------------
  |  Branch (1117:9): [True: 0, False: 30.6k]
  ------------------
 1118|      0|      return SBRDEC_UNSUPPORTED_CONFIG;
 1119|      0|    }
 1120|       |
 1121|  30.6k|    qmfErr = qmfInitAnalysisFilterBank(
 1122|  30.6k|        &hQmfTransposer->HBEAnalysiscQMF, hQmfTransposer->anaQmfStates,
 1123|  30.6k|        hQmfTransposer->noCols / 2, 0, 2 * hQmfTransposer->synthSize,
 1124|  30.6k|        2 * hQmfTransposer->synthSize, 0);
 1125|       |
 1126|  30.6k|    if (qmfErr != 0) {
  ------------------
  |  Branch (1126:9): [True: 0, False: 30.6k]
  ------------------
 1127|      0|      return SBRDEC_UNSUPPORTED_CONFIG;
 1128|      0|    }
 1129|       |
 1130|  30.6k|    hQmfTransposer->HBEAnalysiscQMF.t_cos = tmp_t_cos;
 1131|  30.6k|    hQmfTransposer->HBEAnalysiscQMF.t_sin = tmp_t_sin;
 1132|       |
 1133|  30.6k|    FDKmemset(hQmfTransposer->xOverQmf, 0,
 1134|  30.6k|              MAX_NUM_PATCHES * sizeof(int)); /* global */
  ------------------
  |  |  161|  30.6k|#define MAX_NUM_PATCHES 6
  ------------------
 1135|  30.6k|    sfb = 0;
 1136|  30.6k|    if (hQmfTransposer->bSbr41) {
  ------------------
  |  Branch (1136:9): [True: 6.34k, False: 24.3k]
  ------------------
 1137|  6.34k|      stopPatch = MAX_NUM_PATCHES;
  ------------------
  |  |  161|  6.34k|#define MAX_NUM_PATCHES 6
  ------------------
 1138|  6.34k|      hQmfTransposer->maxStretch = MAX_STRETCH_HBE;
  ------------------
  |  |  118|  6.34k|#define MAX_STRETCH_HBE (4)
  ------------------
 1139|  24.3k|    } else {
 1140|  24.3k|      stopPatch = MAX_STRETCH_HBE;
  ------------------
  |  |  118|  24.3k|#define MAX_STRETCH_HBE (4)
  ------------------
 1141|  24.3k|    }
 1142|       |
 1143|   105k|    for (patch = 1; patch <= stopPatch; patch++) {
  ------------------
  |  Branch (1143:21): [True: 105k, False: 51]
  ------------------
 1144|   375k|      while (sfb <= NSfb[0] &&
  ------------------
  |  Branch (1144:14): [True: 344k, False: 30.6k]
  ------------------
 1145|   344k|             FreqBandTable[0][sfb] <= patch * hQmfTransposer->startBand)
  ------------------
  |  Branch (1145:14): [True: 269k, False: 74.7k]
  ------------------
 1146|   269k|        sfb++;
 1147|   105k|      if (sfb <= NSfb[0]) {
  ------------------
  |  Branch (1147:11): [True: 74.7k, False: 30.6k]
  ------------------
 1148|       |        /* If the distance is larger than three QMF bands - try aligning to high
 1149|       |         * resolution frequency bands instead. */
 1150|  74.7k|        if ((patch * hQmfTransposer->startBand - FreqBandTable[0][sfb - 1]) <=
  ------------------
  |  Branch (1150:13): [True: 69.7k, False: 4.91k]
  ------------------
 1151|  74.7k|            3) {
 1152|  69.7k|          hQmfTransposer->xOverQmf[patch - 1] = FreqBandTable[0][sfb - 1];
 1153|  69.7k|        } else {
 1154|  4.91k|          int sfb_tmp = 0;
 1155|  75.6k|          while (sfb_tmp <= NSfb[1] &&
  ------------------
  |  Branch (1155:18): [True: 75.6k, False: 0]
  ------------------
 1156|  75.6k|                 FreqBandTable[1][sfb_tmp] <= patch * hQmfTransposer->startBand)
  ------------------
  |  Branch (1156:18): [True: 70.7k, False: 4.91k]
  ------------------
 1157|  70.7k|            sfb_tmp++;
 1158|  4.91k|          hQmfTransposer->xOverQmf[patch - 1] = FreqBandTable[1][sfb_tmp - 1];
 1159|  4.91k|        }
 1160|  74.7k|      } else {
 1161|  30.6k|        hQmfTransposer->xOverQmf[patch - 1] = hQmfTransposer->stopBand;
 1162|  30.6k|        hQmfTransposer->maxStretch = fMin(patch, MAX_STRETCH_HBE);
  ------------------
  |  |  118|  30.6k|#define MAX_STRETCH_HBE (4)
  ------------------
 1163|  30.6k|        break;
 1164|  30.6k|      }
 1165|   105k|    }
 1166|       |
 1167|  30.6k|    hQmfTransposer->highband_exp[0] = 0;
 1168|  30.6k|    hQmfTransposer->highband_exp[1] = 0;
 1169|  30.6k|    hQmfTransposer->target_exp[0] = 0;
 1170|  30.6k|    hQmfTransposer->target_exp[1] = 0;
 1171|  30.6k|  }
 1172|       |
 1173|  30.6k|  return SBRDEC_OK;
 1174|  30.6k|}
_Z18QmfTransposerCloseP13hbeTransposer:
 1176|  18.2k|void QmfTransposerClose(HANDLE_HBE_TRANSPOSER hQmfTransposer) {
 1177|  18.2k|  int i;
 1178|       |
 1179|  18.2k|  if (hQmfTransposer != NULL) {
  ------------------
  |  Branch (1179:7): [True: 18.2k, False: 0]
  ------------------
 1180|  18.2k|    if (hQmfTransposer->inBuf_F) FDKfree(hQmfTransposer->inBuf_F);
  ------------------
  |  Branch (1180:9): [True: 18.2k, False: 0]
  ------------------
 1181|       |
 1182|  18.2k|    if (hQmfTransposer->qmfInBufReal_F) {
  ------------------
  |  Branch (1182:9): [True: 18.2k, False: 0]
  ------------------
 1183|   254k|      for (i = 0; i < hQmfTransposer->qmfInBufSize; i++) {
  ------------------
  |  Branch (1183:19): [True: 236k, False: 18.2k]
  ------------------
 1184|   236k|        FDKafree(hQmfTransposer->qmfInBufReal_F[i]);
 1185|   236k|      }
 1186|  18.2k|      FDKfree(hQmfTransposer->qmfInBufReal_F);
 1187|  18.2k|    }
 1188|       |
 1189|  18.2k|    if (hQmfTransposer->qmfInBufImag_F) {
  ------------------
  |  Branch (1189:9): [True: 18.2k, False: 0]
  ------------------
 1190|   254k|      for (i = 0; i < hQmfTransposer->qmfInBufSize; i++) {
  ------------------
  |  Branch (1190:19): [True: 236k, False: 18.2k]
  ------------------
 1191|   236k|        FDKafree(hQmfTransposer->qmfInBufImag_F[i]);
 1192|   236k|      }
 1193|  18.2k|      FDKfree(hQmfTransposer->qmfInBufImag_F);
 1194|  18.2k|    }
 1195|       |
 1196|  18.2k|    if (hQmfTransposer->qmfHBEBufReal_F) {
  ------------------
  |  Branch (1196:9): [True: 18.2k, False: 0]
  ------------------
 1197|   218k|      for (i = 0; i < HBE_MAX_OUT_SLOTS; i++) {
  ------------------
  |  |  115|   218k|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (1197:19): [True: 200k, False: 18.2k]
  ------------------
 1198|   200k|        FDKfree(hQmfTransposer->qmfHBEBufReal_F[i]);
 1199|   200k|      }
 1200|  18.2k|      FDKfree(hQmfTransposer->qmfHBEBufReal_F);
 1201|  18.2k|    }
 1202|       |
 1203|  18.2k|    if (hQmfTransposer->qmfHBEBufImag_F) {
  ------------------
  |  Branch (1203:9): [True: 18.2k, False: 0]
  ------------------
 1204|   218k|      for (i = 0; i < HBE_MAX_OUT_SLOTS; i++) {
  ------------------
  |  |  115|   218k|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (1204:19): [True: 200k, False: 18.2k]
  ------------------
 1205|   200k|        FDKfree(hQmfTransposer->qmfHBEBufImag_F[i]);
 1206|   200k|      }
 1207|  18.2k|      FDKfree(hQmfTransposer->qmfHBEBufImag_F);
 1208|  18.2k|    }
 1209|       |
 1210|  18.2k|    FDKfree(hQmfTransposer->qmfBufferCodecTempSlot_F);
 1211|       |
 1212|  18.2k|    FDKfree(hQmfTransposer);
 1213|  18.2k|  }
 1214|  18.2k|}
_Z18QmfTransposerApplyP13hbeTransposerPPiS2_iS2_S2_PA64_iS4_iiiS1_iii23KEEP_STATES_SYNCED_MODE:
 1358|   109k|                        KEEP_STATES_SYNCED_MODE keepStatesSyncedMode) {
 1359|   109k|  int i, j, stretch, band, sourceband, r, s;
 1360|   109k|  int qmfVocoderColsIn = hQmfTransposer->noCols / 2;
 1361|   109k|  int bSbr41 = hQmfTransposer->bSbr41;
 1362|       |
 1363|   109k|  const int winLength[3] = {10, 8, 6};
 1364|   109k|  const int slotOffset = 6; /* hQmfTransposer->winLen-6; */
 1365|       |
 1366|   109k|  int qmfOffset = 2 * hQmfTransposer->kstart;
 1367|   109k|  int scale_border = (nColsIn == 64) ? 32 : nColsIn;
  ------------------
  |  Branch (1367:22): [True: 32.8k, False: 76.3k]
  ------------------
 1368|       |
 1369|   109k|  INT slot_stretch4[9] = {0, 0, 0, 0, 2, 4, 6, 8, 10};
 1370|   109k|  INT slot_stretch2[11] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
 1371|   109k|  INT slot_stretch3[10] = {0, 0, 0, 1, 3, 4, 6, 7, 9, 10};
 1372|   109k|  INT filt_stretch3[10] = {0, 0, 0, 1, 0, 1, 0, 1, 0, 1};
 1373|   109k|  INT filt_dummy[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 1374|   109k|  INT* pSlotStretch;
 1375|   109k|  INT* pFilt;
 1376|       |
 1377|   109k|  int offset = 0; /* where to take  QmfTransposer data */
 1378|       |
 1379|   109k|  int signPreMod =
 1380|   109k|      (hQmfTransposer->synthesisQmfPreModCos_F[0] < FL2FXCONST_DBL(0.f)) ? 1
  ------------------
  |  |  192|   109k|  (FIXP_DBL)(                                                                \
  |  |  193|   109k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 109k, Folded]
  |  |  ------------------
  |  |  194|   109k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   109k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   109k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 109k]
  |  |  ------------------
  |  |  195|   109k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   109k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   109k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   109k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   109k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   109k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   109k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1380:7): [True: 63.4k, False: 45.7k]
  ------------------
 1381|   109k|                                                                         : -1;
 1382|       |
 1383|   109k|  int scale_factor_hbe =
 1384|   109k|      getHBEScaleFactorFrame(bSbr41, hQmfTransposer->maxStretch, pitchInBins);
 1385|       |
 1386|   109k|  if (keepStatesSyncedMode != KEEP_STATES_SYNCED_OFF) {
  ------------------
  |  Branch (1386:7): [True: 72.2k, False: 36.8k]
  ------------------
 1387|  72.2k|    offset = hQmfTransposer->noCols - ov_len - LPC_ORDER;
  ------------------
  |  |  157|  72.2k|#define LPC_ORDER 2
  ------------------
 1388|  72.2k|  }
 1389|       |
 1390|   109k|  hQmfTransposer->highband_exp[0] = hQmfTransposer->highband_exp[1];
 1391|   109k|  hQmfTransposer->target_exp[0] = hQmfTransposer->target_exp[1];
 1392|       |
 1393|   109k|  hQmfTransposer->highband_exp[1] = scale_factor_hbe;
 1394|   109k|  hQmfTransposer->target_exp[1] =
 1395|   109k|      fixMax(hQmfTransposer->highband_exp[1], hQmfTransposer->highband_exp[0]);
  ------------------
  |  |  307|   109k|#define fixMax(a, b) fMax(a, b)
  ------------------
 1396|       |
 1397|   109k|  scale_factor_hbe = hQmfTransposer->target_exp[1];
 1398|       |
 1399|   109k|  int shift_ov = hQmfTransposer->target_exp[0] - hQmfTransposer->target_exp[1];
 1400|       |
 1401|   109k|  if (shift_ov != 0) {
  ------------------
  |  Branch (1401:7): [True: 37.2k, False: 71.9k]
  ------------------
 1402|   446k|    for (i = 0; i < HBE_MAX_OUT_SLOTS; i++) {
  ------------------
  |  |  115|   446k|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (1402:17): [True: 409k, False: 37.2k]
  ------------------
 1403|   409k|      scaleValuesSaturate(&hQmfTransposer->qmfHBEBufReal_F[i][0],
 1404|   409k|                          QMF_SYNTH_CHANNELS, shift_ov);
  ------------------
  |  |  109|   409k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1405|   409k|      scaleValuesSaturate(&hQmfTransposer->qmfHBEBufImag_F[i][0],
 1406|   409k|                          QMF_SYNTH_CHANNELS, shift_ov);
  ------------------
  |  |  109|   409k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1407|   409k|    }
 1408|       |
 1409|  37.2k|    if (keepStatesSyncedMode == KEEP_STATES_SYNCED_OFF) {
  ------------------
  |  Branch (1409:9): [True: 4.81k, False: 32.4k]
  ------------------
 1410|  4.81k|      int nBands =
 1411|  4.81k|          fMax(0, hQmfTransposer->stopBand - hQmfTransposer->startBand);
 1412|       |
 1413|  23.9k|      for (i = timeStep * firstSlotOffsset; i < ov_len; i++) {
  ------------------
  |  Branch (1413:45): [True: 19.1k, False: 4.81k]
  ------------------
 1414|  19.1k|        scaleValuesSaturate(&ppQmfBufferOutReal_F[i][hQmfTransposer->startBand],
 1415|  19.1k|                            nBands, shift_ov);
 1416|  19.1k|        scaleValuesSaturate(&ppQmfBufferOutImag_F[i][hQmfTransposer->startBand],
 1417|  19.1k|                            nBands, shift_ov);
 1418|  19.1k|      }
 1419|       |
 1420|       |      /* shift lpc filterstates */
 1421|  27.0k|      for (i = 0; i < timeStep * firstSlotOffsset + LPC_ORDER; i++) {
  ------------------
  |  |  157|  27.0k|#define LPC_ORDER 2
  ------------------
  |  Branch (1421:19): [True: 22.2k, False: 4.81k]
  ------------------
 1422|  22.2k|        scaleValuesSaturate(&lpcFilterStatesReal[i][0], (64), shift_ov);
 1423|  22.2k|        scaleValuesSaturate(&lpcFilterStatesImag[i][0], (64), shift_ov);
 1424|  22.2k|      }
 1425|  4.81k|    }
 1426|  37.2k|  }
 1427|       |
 1428|   109k|  FIXP_DBL twid_m_new[3][2]; /* [stretch][cos/sin] */
 1429|   109k|  INT stepsize = 1 + !bSbr41, sine_offset = 24, mod = 96;
 1430|   109k|  INT mult[3] = {1, 2, 3};
 1431|       |
 1432|   436k|  for (s = 0; s <= MAX_STRETCH_HBE - 2; s++) {
  ------------------
  |  |  118|   436k|#define MAX_STRETCH_HBE (4)
  ------------------
  |  Branch (1432:15): [True: 327k, False: 109k]
  ------------------
 1433|   327k|    twid_m_new[s][0] = twiddle[(mult[s] * (stepsize * pitchInBins)) % mod];
 1434|   327k|    twid_m_new[s][1] =
 1435|   327k|        twiddle[((mult[s] * (stepsize * pitchInBins)) + sine_offset) % mod];
 1436|   327k|  }
 1437|       |
 1438|       |  /* Time-stretch */
 1439|  2.38M|  for (j = 0; j < qmfVocoderColsIn; j++) {
  ------------------
  |  Branch (1439:15): [True: 2.27M, False: 109k]
  ------------------
 1440|  2.27M|    int sign = -1, k, z, addrshift, codecTemp_e;
 1441|       |    /* update inbuf */
 1442|  30.9M|    for (i = 0; i < hQmfTransposer->synthSize; i++) {
  ------------------
  |  Branch (1442:17): [True: 28.6M, False: 2.27M]
  ------------------
 1443|  28.6M|      hQmfTransposer->inBuf_F[i] =
 1444|  28.6M|          hQmfTransposer->inBuf_F[i + 2 * hQmfTransposer->synthSize];
 1445|  28.6M|    }
 1446|       |
 1447|       |    /* run synthesis for two sbr slots as transposer uses
 1448|       |    half slots double bands representation */
 1449|  6.81M|    for (z = 0; z < 2; z++) {
  ------------------
  |  Branch (1449:17): [True: 4.54M, False: 2.27M]
  ------------------
 1450|  4.54M|      int scale_factor = ((nColsIn == 64) && ((2 * j + z) < scale_border))
  ------------------
  |  Branch (1450:27): [True: 2.10M, False: 2.44M]
  |  Branch (1450:46): [True: 1.05M, False: 1.05M]
  ------------------
 1451|  4.54M|                             ? scale_lb
 1452|  4.54M|                             : scale_hbe;
 1453|  4.54M|      codecTemp_e = scale_factor - 1; /* -2 for Div2 and cos/sin scale of 1 */
 1454|       |
 1455|  61.8M|      for (k = 0; k < hQmfTransposer->synthSize; k++) {
  ------------------
  |  Branch (1455:19): [True: 57.2M, False: 4.54M]
  ------------------
 1456|  57.2M|        int ki = hQmfTransposer->kstart + k;
 1457|  57.2M|        hQmfTransposer->qmfBufferCodecTempSlot_F[k] =
 1458|  57.2M|            fMultDiv2(signPreMod * hQmfTransposer->synthesisQmfPreModCos_F[k],
 1459|  57.2M|                      qmfBufferCodecReal[2 * j + z][ki]);
 1460|  57.2M|        hQmfTransposer->qmfBufferCodecTempSlot_F[k] +=
 1461|  57.2M|            fMultDiv2(signPreMod * hQmfTransposer->synthesisQmfPreModSin_F[k],
 1462|  57.2M|                      qmfBufferCodecImag[2 * j + z][ki]);
 1463|  57.2M|      }
 1464|       |
 1465|  4.54M|      C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL, (HBE_MAX_QMF_BANDS << 1));
  ------------------
  |  |  319|  4.54M|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  4.54M|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  4.54M|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  4.54M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  4.54M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  4.54M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  4.54M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  4.54M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  4.54M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  4.54M|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
 1466|       |
 1467|  4.54M|      qmfSynthesisFilteringSlot(
 1468|  4.54M|          &hQmfTransposer->HBESynthesisQMF,
 1469|  4.54M|          hQmfTransposer->qmfBufferCodecTempSlot_F, NULL, 0,
 1470|  4.54M|          -7 - hQmfTransposer->HBESynthesisQMF.filterScale - codecTemp_e + 1,
 1471|  4.54M|          hQmfTransposer->inBuf_F + hQmfTransposer->synthSize * (z + 1), 1,
 1472|  4.54M|          pWorkBuffer);
 1473|       |
 1474|  4.54M|      C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, (HBE_MAX_QMF_BANDS << 1));
  ------------------
  |  |  327|  4.54M|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
 1475|  4.54M|    }
 1476|       |
 1477|  2.27M|    C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL, (HBE_MAX_QMF_BANDS << 1));
  ------------------
  |  |  319|  2.27M|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  2.27M|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  2.27M|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  2.27M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  2.27M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  2.27M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  2.27M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  2.27M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  2.27M|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  2.27M|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
 1478|       |
 1479|  2.27M|    qmfAnalysisFilteringSlot(&hQmfTransposer->HBEAnalysiscQMF,
 1480|  2.27M|                             hQmfTransposer->qmfInBufReal_F[QMF_WIN_LEN - 1],
  ------------------
  |  |  118|  2.27M|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
 1481|  2.27M|                             hQmfTransposer->qmfInBufImag_F[QMF_WIN_LEN - 1],
  ------------------
  |  |  118|  2.27M|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
 1482|  2.27M|                             hQmfTransposer->inBuf_F + 1, 1, pWorkBuffer);
 1483|       |
 1484|  2.27M|    C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, (HBE_MAX_QMF_BANDS << 1));
  ------------------
  |  |  327|  2.27M|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
 1485|       |
 1486|  2.27M|    if ((keepStatesSyncedMode == KEEP_STATES_SYNCED_NORMAL) &&
  ------------------
  |  Branch (1486:9): [True: 627k, False: 1.64M]
  ------------------
 1487|   627k|        j <= qmfVocoderColsIn - ((LPC_ORDER + ov_len + QMF_WIN_LEN - 1) >> 1)) {
  ------------------
  |  |  157|   627k|#define LPC_ORDER 2
  ------------------
                      j <= qmfVocoderColsIn - ((LPC_ORDER + ov_len + QMF_WIN_LEN - 1) >> 1)) {
  ------------------
  |  |  118|   627k|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
  |  Branch (1487:9): [True: 320k, False: 306k]
  ------------------
 1488|       |      /* update in buffer */
 1489|  4.16M|      for (i = 0; i < QMF_WIN_LEN - 1; i++) {
  ------------------
  |  |  118|  4.16M|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
  |  Branch (1489:19): [True: 3.84M, False: 320k]
  ------------------
 1490|  3.84M|        FDKmemcpy(
 1491|  3.84M|            hQmfTransposer->qmfInBufReal_F[i],
 1492|  3.84M|            hQmfTransposer->qmfInBufReal_F[i + 1],
 1493|  3.84M|            sizeof(FIXP_DBL) * hQmfTransposer->HBEAnalysiscQMF.no_channels);
 1494|  3.84M|        FDKmemcpy(
 1495|  3.84M|            hQmfTransposer->qmfInBufImag_F[i],
 1496|  3.84M|            hQmfTransposer->qmfInBufImag_F[i + 1],
 1497|  3.84M|            sizeof(FIXP_DBL) * hQmfTransposer->HBEAnalysiscQMF.no_channels);
 1498|  3.84M|      }
 1499|   320k|      continue;
 1500|   320k|    }
 1501|       |
 1502|  6.48M|    for (stretch = 2; stretch <= hQmfTransposer->maxStretch; stretch++) {
  ------------------
  |  Branch (1502:23): [True: 4.53M, False: 1.95M]
  ------------------
 1503|  4.53M|      int start = slotOffset - winLength[stretch - 2] / 2;
 1504|  4.53M|      int stop = slotOffset + winLength[stretch - 2] / 2;
 1505|       |
 1506|  4.53M|      FIXP_DBL factor = FL2FXCONST_DBL(1.f / 3.f);
  ------------------
  |  |  192|  4.53M|  (FIXP_DBL)(                                                                \
  |  |  193|  4.53M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 4.53M, Folded]
  |  |  ------------------
  |  |  194|  4.53M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  4.53M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.53M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 4.53M]
  |  |  ------------------
  |  |  195|  4.53M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  4.53M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  4.53M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  4.53M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  4.53M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.53M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  4.53M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1507|       |
 1508|  4.53M|      for (band = hQmfTransposer->xOverQmf[stretch - 2];
 1509|  65.0M|           band < hQmfTransposer->xOverQmf[stretch - 1]; band++) {
  ------------------
  |  Branch (1509:12): [True: 60.4M, False: 4.53M]
  ------------------
 1510|  60.4M|        FIXP_DBL gammaCenterReal_m[2] = {(FIXP_DBL)0, (FIXP_DBL)0},
 1511|  60.4M|                 gammaCenterImag_m[2] = {(FIXP_DBL)0, (FIXP_DBL)0};
 1512|  60.4M|        INT gammaCenter_e[2] = {0, 0};
 1513|       |
 1514|  60.4M|        FIXP_DBL gammaVecReal_m[2] = {(FIXP_DBL)0, (FIXP_DBL)0},
 1515|  60.4M|                 gammaVecImag_m[2] = {(FIXP_DBL)0, (FIXP_DBL)0};
 1516|  60.4M|        INT gammaVec_e[2] = {0, 0};
 1517|       |
 1518|  60.4M|        FIXP_DBL wingain = (FIXP_DBL)0;
 1519|       |
 1520|  60.4M|        gammaCenter_e[0] =
 1521|  60.4M|            SCALE2EXP(-hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
  ------------------
  |  |  414|  60.4M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1522|  60.4M|        gammaCenter_e[1] =
 1523|  60.4M|            SCALE2EXP(-hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
  ------------------
  |  |  414|  60.4M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1524|       |
 1525|       |        /* interpolation filters for 3rd order */
 1526|  60.4M|        sourceband = 2 * band / stretch - qmfOffset;
 1527|  60.4M|        FDK_ASSERT(sourceband >= 0);
  ------------------
  |  |  221|  60.4M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1527:9): [True: 60.4M, False: 0]
  ------------------
 1528|       |
 1529|       |        /* maximum gammaCenter_e == 20 */
 1530|  60.4M|        calculateCenterFIXP(
 1531|  60.4M|            hQmfTransposer->qmfInBufReal_F[slotOffset][sourceband],
 1532|  60.4M|            hQmfTransposer->qmfInBufImag_F[slotOffset][sourceband],
 1533|  60.4M|            &gammaCenterReal_m[0], &gammaCenterImag_m[0], &gammaCenter_e[0],
 1534|  60.4M|            stretch, stretch - 2);
 1535|       |
 1536|  60.4M|        if (stretch == 4) {
  ------------------
  |  Branch (1536:13): [True: 14.7M, False: 45.6M]
  ------------------
 1537|  14.7M|          r = band - 2 * (band / 2);
 1538|  14.7M|          sourceband += (r == 0) ? -1 : 1;
  ------------------
  |  Branch (1538:25): [True: 7.12M, False: 7.67M]
  ------------------
 1539|  14.7M|          pSlotStretch = slot_stretch4;
 1540|  14.7M|          factor = FL2FXCONST_DBL(2.f / 3.f);
  ------------------
  |  |  192|  14.7M|  (FIXP_DBL)(                                                                \
  |  |  193|  14.7M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 14.7M, Folded]
  |  |  ------------------
  |  |  194|  14.7M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  14.7M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  14.7M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 14.7M]
  |  |  ------------------
  |  |  195|  14.7M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  14.7M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  14.7M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  14.7M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  14.7M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  14.7M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  14.7M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1541|  14.7M|          pFilt = filt_dummy;
 1542|  45.6M|        } else if (stretch == 2) {
  ------------------
  |  Branch (1542:20): [True: 24.5M, False: 21.1M]
  ------------------
 1543|  24.5M|          r = 0;
 1544|  24.5M|          sourceband = 2 * band / stretch - qmfOffset;
 1545|  24.5M|          pSlotStretch = slot_stretch2;
 1546|  24.5M|          factor = FL2FXCONST_DBL(1.f / 3.f);
  ------------------
  |  |  192|  24.5M|  (FIXP_DBL)(                                                                \
  |  |  193|  24.5M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 24.5M, Folded]
  |  |  ------------------
  |  |  194|  24.5M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  24.5M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.5M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 24.5M]
  |  |  ------------------
  |  |  195|  24.5M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  24.5M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  24.5M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  24.5M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  24.5M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.5M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  24.5M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1547|  24.5M|          pFilt = filt_dummy;
 1548|  24.5M|        } else {
 1549|  21.1M|          r = 2 * band - 3 * (2 * band / 3);
 1550|  21.1M|          sourceband = 2 * band / stretch - qmfOffset;
 1551|  21.1M|          pSlotStretch = slot_stretch3;
 1552|  21.1M|          factor = FL2FXCONST_DBL(1.4142f / 3.0f);
  ------------------
  |  |  192|  21.1M|  (FIXP_DBL)(                                                                \
  |  |  193|  21.1M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 21.1M, Folded]
  |  |  ------------------
  |  |  194|  21.1M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  21.1M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 21.1M]
  |  |  ------------------
  |  |  195|  21.1M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  21.1M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  21.1M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  21.1M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  21.1M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  21.1M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  21.1M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1553|  21.1M|          pFilt = filt_stretch3;
 1554|  21.1M|        }
 1555|       |
 1556|  60.4M|        if (r == 2) {
  ------------------
  |  Branch (1556:13): [True: 7.06M, False: 53.4M]
  ------------------
 1557|  7.06M|          calculateCenterFIXP(
 1558|  7.06M|              hQmfTransposer->qmfInBufReal_F[slotOffset][sourceband + 1],
 1559|  7.06M|              hQmfTransposer->qmfInBufImag_F[slotOffset][sourceband + 1],
 1560|  7.06M|              &gammaCenterReal_m[1], &gammaCenterImag_m[1], &gammaCenter_e[1],
 1561|  7.06M|              stretch, stretch - 2);
 1562|       |
 1563|  7.06M|          factor = FL2FXCONST_DBL(1.4142f / 6.0f);
  ------------------
  |  |  192|  7.06M|  (FIXP_DBL)(                                                                \
  |  |  193|  7.06M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.06M, Folded]
  |  |  ------------------
  |  |  194|  7.06M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.06M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.06M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.06M]
  |  |  ------------------
  |  |  195|  7.06M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.06M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.06M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.06M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.06M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.06M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.06M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1564|  7.06M|        }
 1565|       |
 1566|  60.4M|        if (r == 2) {
  ------------------
  |  Branch (1566:13): [True: 7.06M, False: 53.4M]
  ------------------
 1567|  63.5M|          for (k = start; k < stop; k++) {
  ------------------
  |  Branch (1567:27): [True: 56.4M, False: 7.06M]
  ------------------
 1568|  56.4M|            gammaVecReal_m[0] =
 1569|  56.4M|                hQmfTransposer->qmfInBufReal_F[pSlotStretch[k]][sourceband];
 1570|  56.4M|            gammaVecReal_m[1] =
 1571|  56.4M|                hQmfTransposer->qmfInBufReal_F[pSlotStretch[k]][sourceband + 1];
 1572|  56.4M|            gammaVecImag_m[0] =
 1573|  56.4M|                hQmfTransposer->qmfInBufImag_F[pSlotStretch[k]][sourceband];
 1574|  56.4M|            gammaVecImag_m[1] =
 1575|  56.4M|                hQmfTransposer->qmfInBufImag_F[pSlotStretch[k]][sourceband + 1];
 1576|  56.4M|            gammaVec_e[0] = gammaVec_e[1] =
 1577|  56.4M|                SCALE2EXP(-hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
  ------------------
  |  |  414|  56.4M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1578|       |
 1579|  56.4M|            if (pFilt[k] == 1) {
  ------------------
  |  Branch (1579:17): [True: 28.2M, False: 28.2M]
  ------------------
 1580|  28.2M|              FIXP_DBL tmpRealF = gammaVecReal_m[0], tmpImagF;
 1581|  28.2M|              gammaVecReal_m[0] =
 1582|  28.2M|                  (fMult(gammaVecReal_m[0], hintReal_F[sourceband % 4][1]) -
 1583|  28.2M|                   fMult(gammaVecImag_m[0],
 1584|  28.2M|                         hintReal_F[(sourceband + 3) % 4][1])) >>
 1585|  28.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1586|  28.2M|              gammaVecImag_m[0] =
 1587|  28.2M|                  (fMult(tmpRealF, hintReal_F[(sourceband + 3) % 4][1]) +
 1588|  28.2M|                   fMult(gammaVecImag_m[0], hintReal_F[sourceband % 4][1])) >>
 1589|  28.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1590|       |
 1591|  28.2M|              tmpRealF = hQmfTransposer
 1592|  28.2M|                             ->qmfInBufReal_F[pSlotStretch[k] + 1][sourceband];
 1593|  28.2M|              tmpImagF = hQmfTransposer
 1594|  28.2M|                             ->qmfInBufImag_F[pSlotStretch[k] + 1][sourceband];
 1595|       |
 1596|  28.2M|              gammaVecReal_m[0] +=
 1597|  28.2M|                  (fMult(tmpRealF, hintReal_F[sourceband % 4][1]) -
 1598|  28.2M|                   fMult(tmpImagF, hintReal_F[(sourceband + 1) % 4][1])) >>
 1599|  28.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1600|  28.2M|              gammaVecImag_m[0] +=
 1601|  28.2M|                  (fMult(tmpRealF, hintReal_F[(sourceband + 1) % 4][1]) +
 1602|  28.2M|                   fMult(tmpImagF, hintReal_F[sourceband % 4][1])) >>
 1603|  28.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1604|  28.2M|              gammaVec_e[0]++;
 1605|       |
 1606|  28.2M|              tmpRealF = gammaVecReal_m[1];
 1607|       |
 1608|  28.2M|              gammaVecReal_m[1] =
 1609|  28.2M|                  (fMult(gammaVecReal_m[1], hintReal_F[sourceband % 4][2]) -
 1610|  28.2M|                   fMult(gammaVecImag_m[1],
 1611|  28.2M|                         hintReal_F[(sourceband + 3) % 4][2])) >>
 1612|  28.2M|                  1;
 1613|  28.2M|              gammaVecImag_m[1] =
 1614|  28.2M|                  (fMult(tmpRealF, hintReal_F[(sourceband + 3) % 4][2]) +
 1615|  28.2M|                   fMult(gammaVecImag_m[1], hintReal_F[sourceband % 4][2])) >>
 1616|  28.2M|                  1;
 1617|       |
 1618|  28.2M|              tmpRealF =
 1619|  28.2M|                  hQmfTransposer
 1620|  28.2M|                      ->qmfInBufReal_F[pSlotStretch[k] + 1][sourceband + 1];
 1621|  28.2M|              tmpImagF =
 1622|  28.2M|                  hQmfTransposer
 1623|  28.2M|                      ->qmfInBufImag_F[pSlotStretch[k] + 1][sourceband + 1];
 1624|       |
 1625|  28.2M|              gammaVecReal_m[1] +=
 1626|  28.2M|                  (fMult(tmpRealF, hintReal_F[sourceband % 4][2]) -
 1627|  28.2M|                   fMult(tmpImagF, hintReal_F[(sourceband + 1) % 4][2])) >>
 1628|  28.2M|                  1;
 1629|  28.2M|              gammaVecImag_m[1] +=
 1630|  28.2M|                  (fMult(tmpRealF, hintReal_F[(sourceband + 1) % 4][2]) +
 1631|  28.2M|                   fMult(tmpImagF, hintReal_F[sourceband % 4][2])) >>
 1632|  28.2M|                  1;
 1633|  28.2M|              gammaVec_e[1]++;
 1634|  28.2M|            }
 1635|       |
 1636|  56.4M|            addHighBandPart(gammaVecReal_m[1], gammaVecImag_m[1], gammaVec_e[1],
 1637|  56.4M|                            factor, gammaCenterReal_m[0], gammaCenterImag_m[0],
 1638|  56.4M|                            gammaCenter_e[0], stretch, scale_factor_hbe,
 1639|  56.4M|                            &hQmfTransposer->qmfHBEBufReal_F[k][band],
 1640|  56.4M|                            &hQmfTransposer->qmfHBEBufImag_F[k][band]);
 1641|       |
 1642|  56.4M|            addHighBandPart(gammaVecReal_m[0], gammaVecImag_m[0], gammaVec_e[0],
 1643|  56.4M|                            factor, gammaCenterReal_m[1], gammaCenterImag_m[1],
 1644|  56.4M|                            gammaCenter_e[1], stretch, scale_factor_hbe,
 1645|  56.4M|                            &hQmfTransposer->qmfHBEBufReal_F[k][band],
 1646|  56.4M|                            &hQmfTransposer->qmfHBEBufImag_F[k][band]);
 1647|  56.4M|          }
 1648|  53.4M|        } else {
 1649|   500M|          for (k = start; k < stop; k++) {
  ------------------
  |  Branch (1649:27): [True: 446M, False: 53.4M]
  ------------------
 1650|   446M|            gammaVecReal_m[0] =
 1651|   446M|                hQmfTransposer->qmfInBufReal_F[pSlotStretch[k]][sourceband];
 1652|   446M|            gammaVecImag_m[0] =
 1653|   446M|                hQmfTransposer->qmfInBufImag_F[pSlotStretch[k]][sourceband];
 1654|   446M|            gammaVec_e[0] =
 1655|   446M|                SCALE2EXP(-hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
  ------------------
  |  |  414|   446M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1656|       |
 1657|   446M|            if (pFilt[k] == 1) {
  ------------------
  |  Branch (1657:17): [True: 56.2M, False: 390M]
  ------------------
 1658|  56.2M|              FIXP_DBL tmpRealF = gammaVecReal_m[0], tmpImagF;
 1659|  56.2M|              gammaVecReal_m[0] =
 1660|  56.2M|                  (fMult(gammaVecReal_m[0], hintReal_F[sourceband % 4][1]) -
 1661|  56.2M|                   fMult(gammaVecImag_m[0],
 1662|  56.2M|                         hintReal_F[(sourceband + 3) % 4][1])) >>
 1663|  56.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1664|  56.2M|              gammaVecImag_m[0] =
 1665|  56.2M|                  (fMult(tmpRealF, hintReal_F[(sourceband + 3) % 4][1]) +
 1666|  56.2M|                   fMult(gammaVecImag_m[0], hintReal_F[sourceband % 4][1])) >>
 1667|  56.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1668|       |
 1669|  56.2M|              tmpRealF = hQmfTransposer
 1670|  56.2M|                             ->qmfInBufReal_F[pSlotStretch[k] + 1][sourceband];
 1671|  56.2M|              tmpImagF = hQmfTransposer
 1672|  56.2M|                             ->qmfInBufImag_F[pSlotStretch[k] + 1][sourceband];
 1673|       |
 1674|  56.2M|              gammaVecReal_m[0] +=
 1675|  56.2M|                  (fMult(tmpRealF, hintReal_F[sourceband % 4][1]) -
 1676|  56.2M|                   fMult(tmpImagF, hintReal_F[(sourceband + 1) % 4][1])) >>
 1677|  56.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1678|  56.2M|              gammaVecImag_m[0] +=
 1679|  56.2M|                  (fMult(tmpRealF, hintReal_F[(sourceband + 1) % 4][1]) +
 1680|  56.2M|                   fMult(tmpImagF, hintReal_F[sourceband % 4][1])) >>
 1681|  56.2M|                  1; /* sum should be <= 1 because of sin/cos multiplication */
 1682|  56.2M|              gammaVec_e[0]++;
 1683|  56.2M|            }
 1684|       |
 1685|   446M|            addHighBandPart(gammaVecReal_m[0], gammaVecImag_m[0], gammaVec_e[0],
 1686|   446M|                            factor, gammaCenterReal_m[0], gammaCenterImag_m[0],
 1687|   446M|                            gammaCenter_e[0], stretch, scale_factor_hbe,
 1688|   446M|                            &hQmfTransposer->qmfHBEBufReal_F[k][band],
 1689|   446M|                            &hQmfTransposer->qmfHBEBufImag_F[k][band]);
 1690|   446M|          }
 1691|  53.4M|        }
 1692|       |
 1693|       |        /* pitchInBins is given with the resolution of a 768 bins FFT and we
 1694|       |         * need 64 QMF units so factor 768/64 = 12 */
 1695|  60.4M|        if (pitchInBins >= pmin * (1 + bSbr41)) {
  ------------------
  |  Branch (1695:13): [True: 7.51M, False: 52.9M]
  ------------------
 1696|  7.51M|          int tr, ti1, ti2, mTr = 0, ts1 = 0, ts2 = 0, mVal_e = 0, temp_e = 0;
 1697|  7.51M|          int sqmag0_e =
 1698|  7.51M|              SCALE2EXP(-hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
  ------------------
  |  |  414|  7.51M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1699|       |
 1700|  7.51M|          FIXP_DBL mVal_F = FL2FXCONST_DBL(0.f), sqmag0_F, sqmag1_F, sqmag2_F,
  ------------------
  |  |  192|  7.51M|  (FIXP_DBL)(                                                                \
  |  |  193|  7.51M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.51M, Folded]
  |  |  ------------------
  |  |  194|  7.51M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.51M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.51M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.51M]
  |  |  ------------------
  |  |  195|  7.51M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.51M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.51M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.51M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.51M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.51M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.51M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1701|  7.51M|                   temp_F, f1_F; /* all equal exponent */
 1702|  7.51M|          sign = -1;
 1703|       |
 1704|  7.51M|          sourceband = 2 * band / stretch - qmfOffset; /* consistent with the
 1705|       |                                                          already computed for
 1706|       |                                                          stretch = 3,4. */
 1707|  7.51M|          FDK_ASSERT(sourceband >= 0);
  ------------------
  |  |  221|  7.51M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1707:11): [True: 7.51M, False: 0]
  ------------------
 1708|       |
 1709|  7.51M|          FIXP_DBL sqmag0R_F =
 1710|  7.51M|              hQmfTransposer->qmfInBufReal_F[slotOffset][sourceband];
 1711|  7.51M|          FIXP_DBL sqmag0I_F =
 1712|  7.51M|              hQmfTransposer->qmfInBufImag_F[slotOffset][sourceband];
 1713|  7.51M|          scaleUp(&sqmag0R_F, &sqmag0I_F, &sqmag0_e);
 1714|       |
 1715|  7.51M|          sqmag0_F = fPow2Div2(sqmag0R_F);
 1716|  7.51M|          sqmag0_F += fPow2Div2(sqmag0I_F);
 1717|  7.51M|          sqmag0_e = 2 * sqmag0_e + 1;
 1718|       |
 1719|  20.5M|          for (tr = 1; tr < stretch; tr++) {
  ------------------
  |  Branch (1719:24): [True: 13.0M, False: 7.51M]
  ------------------
 1720|  13.0M|            int sqmag1_e =
 1721|  13.0M|                SCALE2EXP(-hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
  ------------------
  |  |  414|  13.0M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1722|  13.0M|            int sqmag2_e =
 1723|  13.0M|                SCALE2EXP(-hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
  ------------------
  |  |  414|  13.0M|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1724|       |
 1725|  13.0M|            FIXP_DBL tmp_band = band_F[band];
 1726|  13.0M|            FIXP_DBL tr_p =
 1727|  13.0M|                fMult(p_F[pitchInBins] >> bSbr41, tr_str[tr - 1]); /* scale 7 */
 1728|  13.0M|            f1_F =
 1729|  13.0M|                fMult(tmp_band - tr_p, stretchfac[stretch - 2]); /* scale 7 */
 1730|  13.0M|            ti1 = (INT)(f1_F >> (DFRACT_BITS - 1 - 7)) - qmfOffset;
  ------------------
  |  |  113|  13.0M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1731|  13.0M|            ti2 = (INT)(((f1_F) + ((p_F[pitchInBins] >> bSbr41) >> 2)) >>
 1732|  13.0M|                        (DFRACT_BITS - 1 - 7)) -
  ------------------
  |  |  113|  13.0M|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1733|  13.0M|                  qmfOffset;
 1734|       |
 1735|  13.0M|            if (ti1 >= 0 && ti2 < 2 * hQmfTransposer->synthSize) {
  ------------------
  |  Branch (1735:17): [True: 13.0M, False: 3.48k]
  |  Branch (1735:29): [True: 12.7M, False: 317k]
  ------------------
 1736|  12.7M|              FIXP_DBL sqmag1R_F =
 1737|  12.7M|                  hQmfTransposer->qmfInBufReal_F[slotOffset][ti1];
 1738|  12.7M|              FIXP_DBL sqmag1I_F =
 1739|  12.7M|                  hQmfTransposer->qmfInBufImag_F[slotOffset][ti1];
 1740|  12.7M|              scaleUp(&sqmag1R_F, &sqmag1I_F, &sqmag1_e);
 1741|  12.7M|              sqmag1_F = fPow2Div2(sqmag1R_F);
 1742|  12.7M|              sqmag1_F += fPow2Div2(sqmag1I_F);
 1743|  12.7M|              sqmag1_e = 2 * sqmag1_e + 1;
 1744|       |
 1745|  12.7M|              FIXP_DBL sqmag2R_F =
 1746|  12.7M|                  hQmfTransposer->qmfInBufReal_F[slotOffset][ti2];
 1747|  12.7M|              FIXP_DBL sqmag2I_F =
 1748|  12.7M|                  hQmfTransposer->qmfInBufImag_F[slotOffset][ti2];
 1749|  12.7M|              scaleUp(&sqmag2R_F, &sqmag2I_F, &sqmag2_e);
 1750|  12.7M|              sqmag2_F = fPow2Div2(sqmag2R_F);
 1751|  12.7M|              sqmag2_F += fPow2Div2(sqmag2I_F);
 1752|  12.7M|              sqmag2_e = 2 * sqmag2_e + 1;
 1753|       |
 1754|  12.7M|              int shift1 = fMin(fMax(sqmag1_e, sqmag2_e) - sqmag1_e, 31);
 1755|  12.7M|              int shift2 = fMin(fMax(sqmag1_e, sqmag2_e) - sqmag2_e, 31);
 1756|       |
 1757|  12.7M|              temp_F = fMin((sqmag1_F >> shift1), (sqmag2_F >> shift2));
 1758|  12.7M|              temp_e = fMax(sqmag1_e, sqmag2_e);
 1759|       |
 1760|  12.7M|              int shift3 = fMin(fMax(temp_e, mVal_e) - temp_e, 31);
 1761|  12.7M|              int shift4 = fMin(fMax(temp_e, mVal_e) - mVal_e, 31);
 1762|       |
 1763|  12.7M|              if ((temp_F >> shift3) > (mVal_F >> shift4)) {
  ------------------
  |  Branch (1763:19): [True: 6.32M, False: 6.38M]
  ------------------
 1764|  6.32M|                mVal_F = temp_F;
 1765|  6.32M|                mVal_e = temp_e; /* equals sqmag2_e + shift2 */
 1766|  6.32M|                mTr = tr;
 1767|  6.32M|                ts1 = ti1;
 1768|  6.32M|                ts2 = ti2;
 1769|  6.32M|              }
 1770|  12.7M|            }
 1771|  13.0M|          }
 1772|       |
 1773|  7.51M|          int shift1 = fMin(fMax(sqmag0_e, mVal_e) - sqmag0_e, 31);
 1774|  7.51M|          int shift2 = fMin(fMax(sqmag0_e, mVal_e) - mVal_e, 31);
 1775|       |
 1776|  7.51M|          if ((mVal_F >> shift2) > (sqmag0_F >> shift1) && ts1 >= 0 &&
  ------------------
  |  Branch (1776:15): [True: 1.82M, False: 5.68M]
  |  Branch (1776:60): [True: 1.82M, False: 0]
  ------------------
 1777|  1.82M|              ts2 < 2 * hQmfTransposer->synthSize) {
  ------------------
  |  Branch (1777:15): [True: 1.82M, False: 0]
  ------------------
 1778|  1.82M|            INT gammaOut_e[2];
 1779|  1.82M|            FIXP_DBL gammaOutReal_m[2], gammaOutImag_m[2];
 1780|  1.82M|            FIXP_DBL tmpReal_m = (FIXP_DBL)0, tmpImag_m = (FIXP_DBL)0;
 1781|       |
 1782|  1.82M|            int Tcenter, Tvec;
 1783|       |
 1784|  1.82M|            Tcenter = stretch - mTr; /* default phase power parameters */
 1785|  1.82M|            Tvec = mTr;
 1786|  1.82M|            switch (stretch) /* 2 tap block creation design depends on stretch
 1787|       |                                order */
 1788|  1.82M|            {
 1789|   578k|              case 2:
  ------------------
  |  Branch (1789:15): [True: 578k, False: 1.24M]
  ------------------
 1790|   578k|                wingain =
 1791|   578k|                    FL2FXCONST_DBL(5.f / 12.f); /* sum of taps divided by two */
  ------------------
  |  |  192|   578k|  (FIXP_DBL)(                                                                \
  |  |  193|   578k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 578k, Folded]
  |  |  ------------------
  |  |  194|   578k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   578k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   578k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 578k]
  |  |  ------------------
  |  |  195|   578k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   578k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   578k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   578k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   578k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   578k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   578k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1792|       |
 1793|   578k|                if (hQmfTransposer->bXProducts[0]) {
  ------------------
  |  Branch (1793:21): [True: 578k, False: 0]
  ------------------
 1794|   578k|                  gammaCenterReal_m[0] =
 1795|   578k|                      hQmfTransposer->qmfInBufReal_F[slotOffset][ts1];
 1796|   578k|                  gammaCenterImag_m[0] =
 1797|   578k|                      hQmfTransposer->qmfInBufImag_F[slotOffset][ts1];
 1798|       |
 1799|  1.73M|                  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1799:31): [True: 1.15M, False: 578k]
  ------------------
 1800|  1.15M|                    gammaVecReal_m[k] =
 1801|  1.15M|                        hQmfTransposer->qmfInBufReal_F[slotOffset - 1 + k][ts2];
 1802|  1.15M|                    gammaVecImag_m[k] =
 1803|  1.15M|                        hQmfTransposer->qmfInBufImag_F[slotOffset - 1 + k][ts2];
 1804|  1.15M|                  }
 1805|       |
 1806|   578k|                  gammaCenter_e[0] = SCALE2EXP(
  ------------------
  |  |  414|   578k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1807|   578k|                      -hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
 1808|   578k|                  gammaVec_e[0] = gammaVec_e[1] = SCALE2EXP(
  ------------------
  |  |  414|   578k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1809|   578k|                      -hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
 1810|   578k|                }
 1811|   578k|                break;
 1812|       |
 1813|   534k|              case 4:
  ------------------
  |  Branch (1813:15): [True: 534k, False: 1.28M]
  ------------------
 1814|   534k|                wingain =
 1815|   534k|                    FL2FXCONST_DBL(6.f / 12.f); /* sum of taps divided by two */
  ------------------
  |  |  192|   534k|  (FIXP_DBL)(                                                                \
  |  |  193|   534k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 534k, Folded]
  |  |  ------------------
  |  |  194|   534k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   534k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   534k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 534k]
  |  |  ------------------
  |  |  195|   534k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   534k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   534k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   534k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   534k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   534k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   534k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1816|   534k|                if (hQmfTransposer->bXProducts[2]) {
  ------------------
  |  Branch (1816:21): [True: 534k, False: 0]
  ------------------
 1817|   534k|                  if (mTr == 1) {
  ------------------
  |  Branch (1817:23): [True: 176k, False: 357k]
  ------------------
 1818|   176k|                    gammaCenterReal_m[0] =
 1819|   176k|                        hQmfTransposer->qmfInBufReal_F[slotOffset][ts1];
 1820|   176k|                    gammaCenterImag_m[0] =
 1821|   176k|                        hQmfTransposer->qmfInBufImag_F[slotOffset][ts1];
 1822|       |
 1823|   529k|                    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1823:33): [True: 353k, False: 176k]
  ------------------
 1824|   353k|                      gammaVecReal_m[k] =
 1825|   353k|                          hQmfTransposer
 1826|   353k|                              ->qmfInBufReal_F[slotOffset + 2 * (k - 1)][ts2];
 1827|   353k|                      gammaVecImag_m[k] =
 1828|   353k|                          hQmfTransposer
 1829|   353k|                              ->qmfInBufImag_F[slotOffset + 2 * (k - 1)][ts2];
 1830|   353k|                    }
 1831|   357k|                  } else if (mTr == 2) {
  ------------------
  |  Branch (1831:30): [True: 208k, False: 149k]
  ------------------
 1832|   208k|                    gammaCenterReal_m[0] =
 1833|   208k|                        hQmfTransposer->qmfInBufReal_F[slotOffset][ts1];
 1834|   208k|                    gammaCenterImag_m[0] =
 1835|   208k|                        hQmfTransposer->qmfInBufImag_F[slotOffset][ts1];
 1836|       |
 1837|   624k|                    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1837:33): [True: 416k, False: 208k]
  ------------------
 1838|   416k|                      gammaVecReal_m[k] =
 1839|   416k|                          hQmfTransposer
 1840|   416k|                              ->qmfInBufReal_F[slotOffset + (k - 1)][ts2];
 1841|   416k|                      gammaVecImag_m[k] =
 1842|   416k|                          hQmfTransposer
 1843|   416k|                              ->qmfInBufImag_F[slotOffset + (k - 1)][ts2];
 1844|   416k|                    }
 1845|   208k|                  } else /* (mTr == 3) */
 1846|   149k|                  {
 1847|   149k|                    sign = 1;
 1848|   149k|                    Tcenter = mTr; /* opposite phase power parameters as ts2 is
 1849|       |                                      center */
 1850|   149k|                    Tvec = stretch - mTr;
 1851|       |
 1852|   149k|                    gammaCenterReal_m[0] =
 1853|   149k|                        hQmfTransposer->qmfInBufReal_F[slotOffset][ts2];
 1854|   149k|                    gammaCenterImag_m[0] =
 1855|   149k|                        hQmfTransposer->qmfInBufImag_F[slotOffset][ts2];
 1856|       |
 1857|   448k|                    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1857:33): [True: 299k, False: 149k]
  ------------------
 1858|   299k|                      gammaVecReal_m[k] =
 1859|   299k|                          hQmfTransposer
 1860|   299k|                              ->qmfInBufReal_F[slotOffset + 2 * (k - 1)][ts1];
 1861|   299k|                      gammaVecImag_m[k] =
 1862|   299k|                          hQmfTransposer
 1863|   299k|                              ->qmfInBufImag_F[slotOffset + 2 * (k - 1)][ts1];
 1864|   299k|                    }
 1865|   149k|                  }
 1866|       |
 1867|   534k|                  gammaCenter_e[0] = SCALE2EXP(
  ------------------
  |  |  414|   534k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1868|   534k|                      -hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
 1869|   534k|                  gammaVec_e[0] = gammaVec_e[1] = SCALE2EXP(
  ------------------
  |  |  414|   534k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1870|   534k|                      -hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
 1871|   534k|                }
 1872|   534k|                break;
 1873|       |
 1874|   711k|              case 3:
  ------------------
  |  Branch (1874:15): [True: 711k, False: 1.11M]
  ------------------
 1875|   711k|                wingain = FL2FXCONST_DBL(5.6568f /
  ------------------
  |  |  192|   711k|  (FIXP_DBL)(                                                                \
  |  |  193|   711k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 711k, Folded]
  |  |  ------------------
  |  |  194|   711k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   711k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   711k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 711k]
  |  |  ------------------
  |  |  195|   711k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   711k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   711k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   711k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   711k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   711k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   711k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1876|   711k|                                         12.f); /* sum of taps divided by two */
 1877|       |
 1878|   711k|                if (hQmfTransposer->bXProducts[1]) {
  ------------------
  |  Branch (1878:21): [True: 711k, False: 0]
  ------------------
 1879|   711k|                  FIXP_DBL tmpReal_F, tmpImag_F;
 1880|   711k|                  if (mTr == 1) {
  ------------------
  |  Branch (1880:23): [True: 324k, False: 386k]
  ------------------
 1881|   324k|                    gammaCenterReal_m[0] =
 1882|   324k|                        hQmfTransposer->qmfInBufReal_F[slotOffset][ts1];
 1883|   324k|                    gammaCenterImag_m[0] =
 1884|   324k|                        hQmfTransposer->qmfInBufImag_F[slotOffset][ts1];
 1885|   324k|                    gammaVecReal_m[1] =
 1886|   324k|                        hQmfTransposer->qmfInBufReal_F[slotOffset][ts2];
 1887|   324k|                    gammaVecImag_m[1] =
 1888|   324k|                        hQmfTransposer->qmfInBufImag_F[slotOffset][ts2];
 1889|       |
 1890|   324k|                    addrshift = -2;
 1891|   324k|                    tmpReal_F =
 1892|   324k|                        hQmfTransposer
 1893|   324k|                            ->qmfInBufReal_F[addrshift + slotOffset][ts2];
 1894|   324k|                    tmpImag_F =
 1895|   324k|                        hQmfTransposer
 1896|   324k|                            ->qmfInBufImag_F[addrshift + slotOffset][ts2];
 1897|       |
 1898|   324k|                    gammaVecReal_m[0] =
 1899|   324k|                        (fMult(factors[ts2 % 4], tmpReal_F) -
 1900|   324k|                         fMult(factors[(ts2 + 3) % 4], tmpImag_F)) >>
 1901|   324k|                        1;
 1902|   324k|                    gammaVecImag_m[0] =
 1903|   324k|                        (fMult(factors[(ts2 + 3) % 4], tmpReal_F) +
 1904|   324k|                         fMult(factors[ts2 % 4], tmpImag_F)) >>
 1905|   324k|                        1;
 1906|       |
 1907|   324k|                    tmpReal_F =
 1908|   324k|                        hQmfTransposer
 1909|   324k|                            ->qmfInBufReal_F[addrshift + 1 + slotOffset][ts2];
 1910|   324k|                    tmpImag_F =
 1911|   324k|                        hQmfTransposer
 1912|   324k|                            ->qmfInBufImag_F[addrshift + 1 + slotOffset][ts2];
 1913|       |
 1914|   324k|                    gammaVecReal_m[0] +=
 1915|   324k|                        (fMult(factors[ts2 % 4], tmpReal_F) -
 1916|   324k|                         fMult(factors[(ts2 + 1) % 4], tmpImag_F)) >>
 1917|   324k|                        1;
 1918|   324k|                    gammaVecImag_m[0] +=
 1919|   324k|                        (fMult(factors[(ts2 + 1) % 4], tmpReal_F) +
 1920|   324k|                         fMult(factors[ts2 % 4], tmpImag_F)) >>
 1921|   324k|                        1;
 1922|       |
 1923|   324k|                  } else /* (mTr == 2) */
 1924|   386k|                  {
 1925|   386k|                    sign = 1;
 1926|   386k|                    Tcenter = mTr; /* opposite phase power parameters as ts2 is
 1927|       |                                      center */
 1928|   386k|                    Tvec = stretch - mTr;
 1929|       |
 1930|   386k|                    gammaCenterReal_m[0] =
 1931|   386k|                        hQmfTransposer->qmfInBufReal_F[slotOffset][ts2];
 1932|   386k|                    gammaCenterImag_m[0] =
 1933|   386k|                        hQmfTransposer->qmfInBufImag_F[slotOffset][ts2];
 1934|   386k|                    gammaVecReal_m[1] =
 1935|   386k|                        hQmfTransposer->qmfInBufReal_F[slotOffset][ts1];
 1936|   386k|                    gammaVecImag_m[1] =
 1937|   386k|                        hQmfTransposer->qmfInBufImag_F[slotOffset][ts1];
 1938|       |
 1939|   386k|                    addrshift = -2;
 1940|   386k|                    tmpReal_F =
 1941|   386k|                        hQmfTransposer
 1942|   386k|                            ->qmfInBufReal_F[addrshift + slotOffset][ts1];
 1943|   386k|                    tmpImag_F =
 1944|   386k|                        hQmfTransposer
 1945|   386k|                            ->qmfInBufImag_F[addrshift + slotOffset][ts1];
 1946|       |
 1947|   386k|                    gammaVecReal_m[0] =
 1948|   386k|                        (fMult(factors[ts1 % 4], tmpReal_F) -
 1949|   386k|                         fMult(factors[(ts1 + 3) % 4], tmpImag_F)) >>
 1950|   386k|                        1;
 1951|   386k|                    gammaVecImag_m[0] =
 1952|   386k|                        (fMult(factors[(ts1 + 3) % 4], tmpReal_F) +
 1953|   386k|                         fMult(factors[ts1 % 4], tmpImag_F)) >>
 1954|   386k|                        1;
 1955|       |
 1956|   386k|                    tmpReal_F =
 1957|   386k|                        hQmfTransposer
 1958|   386k|                            ->qmfInBufReal_F[addrshift + 1 + slotOffset][ts1];
 1959|   386k|                    tmpImag_F =
 1960|   386k|                        hQmfTransposer
 1961|   386k|                            ->qmfInBufImag_F[addrshift + 1 + slotOffset][ts1];
 1962|       |
 1963|   386k|                    gammaVecReal_m[0] +=
 1964|   386k|                        (fMult(factors[ts1 % 4], tmpReal_F) -
 1965|   386k|                         fMult(factors[(ts1 + 1) % 4], tmpImag_F)) >>
 1966|   386k|                        1;
 1967|   386k|                    gammaVecImag_m[0] +=
 1968|   386k|                        (fMult(factors[(ts1 + 1) % 4], tmpReal_F) +
 1969|   386k|                         fMult(factors[ts1 % 4], tmpImag_F)) >>
 1970|   386k|                        1;
 1971|   386k|                  }
 1972|       |
 1973|   711k|                  gammaCenter_e[0] = gammaVec_e[1] = SCALE2EXP(
  ------------------
  |  |  414|   711k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1974|   711k|                      -hQmfTransposer->HBEAnalysiscQMF.outScalefactor);
 1975|   711k|                  gammaVec_e[0] =
 1976|   711k|                      SCALE2EXP(
  ------------------
  |  |  414|   711k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1977|   711k|                          -hQmfTransposer->HBEAnalysiscQMF.outScalefactor) +
 1978|   711k|                      1;
 1979|   711k|                }
 1980|   711k|                break;
 1981|      0|              default:
  ------------------
  |  Branch (1981:15): [True: 0, False: 1.82M]
  ------------------
 1982|      0|                FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1982:17): [Folded, False: 0]
  ------------------
 1983|      0|                break;
 1984|  1.82M|            } /* stretch cases */
 1985|       |
 1986|       |            /* parameter controlled phase modification parts */
 1987|       |            /* maximum *_e == 20 */
 1988|  1.82M|            calculateCenterFIXP(gammaCenterReal_m[0], gammaCenterImag_m[0],
 1989|  1.82M|                                &gammaCenterReal_m[0], &gammaCenterImag_m[0],
 1990|  1.82M|                                &gammaCenter_e[0], stretch, Tcenter - 1);
 1991|  1.82M|            calculateCenterFIXP(gammaVecReal_m[0], gammaVecImag_m[0],
 1992|  1.82M|                                &gammaVecReal_m[0], &gammaVecImag_m[0],
 1993|  1.82M|                                &gammaVec_e[0], stretch, Tvec - 1);
 1994|  1.82M|            calculateCenterFIXP(gammaVecReal_m[1], gammaVecImag_m[1],
 1995|  1.82M|                                &gammaVecReal_m[1], &gammaVecImag_m[1],
 1996|  1.82M|                                &gammaVec_e[1], stretch, Tvec - 1);
 1997|       |
 1998|       |            /*    Final multiplication of prepared parts  */
 1999|  5.47M|            for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1999:25): [True: 3.64M, False: 1.82M]
  ------------------
 2000|  3.64M|              gammaOutReal_m[k] =
 2001|  3.64M|                  fMultDiv2(gammaVecReal_m[k], gammaCenterReal_m[0]) -
 2002|  3.64M|                  fMultDiv2(gammaVecImag_m[k], gammaCenterImag_m[0]);
 2003|  3.64M|              gammaOutImag_m[k] =
 2004|  3.64M|                  fMultDiv2(gammaVecReal_m[k], gammaCenterImag_m[0]) +
 2005|  3.64M|                  fMultDiv2(gammaVecImag_m[k], gammaCenterReal_m[0]);
 2006|  3.64M|              gammaOut_e[k] = gammaCenter_e[0] + gammaVec_e[k] + 1;
 2007|  3.64M|            }
 2008|       |
 2009|  1.82M|            scaleUp(&gammaOutReal_m[0], &gammaOutImag_m[0], &gammaOut_e[0]);
 2010|  1.82M|            scaleUp(&gammaOutReal_m[1], &gammaOutImag_m[1], &gammaOut_e[1]);
 2011|  1.82M|            FDK_ASSERT(gammaOut_e[0] >= 0);
  ------------------
  |  |  221|  1.82M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2011:13): [True: 1.82M, False: 0]
  ------------------
 2012|  1.82M|            FDK_ASSERT(gammaOut_e[0] < 32);
  ------------------
  |  |  221|  1.82M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2012:13): [True: 1.82M, False: 0]
  ------------------
 2013|       |
 2014|  1.82M|            tmpReal_m = gammaOutReal_m[0];
 2015|  1.82M|            tmpImag_m = gammaOutImag_m[0];
 2016|       |
 2017|  1.82M|            INT modstretch4 = ((stretch == 4) && (mTr == 2));
  ------------------
  |  Branch (2017:32): [True: 534k, False: 1.28M]
  |  Branch (2017:50): [True: 208k, False: 326k]
  ------------------
 2018|       |
 2019|  1.82M|            FIXP_DBL cos_twid = twid_m_new[stretch - 2 - modstretch4][0];
 2020|  1.82M|            FIXP_DBL sin_twid = sign * twid_m_new[stretch - 2 - modstretch4][1];
 2021|       |
 2022|  1.82M|            gammaOutReal_m[0] =
 2023|  1.82M|                fMult(tmpReal_m, cos_twid) -
 2024|  1.82M|                fMult(tmpImag_m, sin_twid); /* sum should be <= 1 because of
 2025|       |                                               sin/cos multiplication */
 2026|  1.82M|            gammaOutImag_m[0] =
 2027|  1.82M|                fMult(tmpImag_m, cos_twid) +
 2028|  1.82M|                fMult(tmpReal_m, sin_twid); /* sum should be <= 1 because of
 2029|       |                                               sin/cos multiplication */
 2030|       |
 2031|       |            /* wingain */
 2032|  5.47M|            for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (2032:25): [True: 3.64M, False: 1.82M]
  ------------------
 2033|  3.64M|              gammaOutReal_m[k] = (fMult(gammaOutReal_m[k], wingain) << 1);
 2034|  3.64M|              gammaOutImag_m[k] = (fMult(gammaOutImag_m[k], wingain) << 1);
 2035|  3.64M|            }
 2036|       |
 2037|  1.82M|            gammaOutReal_m[1] >>= 1;
 2038|  1.82M|            gammaOutImag_m[1] >>= 1;
 2039|  1.82M|            gammaOut_e[0] += 2;
 2040|  1.82M|            gammaOut_e[1] += 2;
 2041|       |
 2042|       |            /* OLA including window scaling by wingain/3 */
 2043|  5.47M|            for (k = 0; k < 2; k++) /* need k=1 to correspond to
  ------------------
  |  Branch (2043:25): [True: 3.64M, False: 1.82M]
  ------------------
 2044|       |                                       grainModImag[slotOffset] -> out to
 2045|       |                                       j*2+(slotOffset-offset)  */
 2046|  3.64M|            {
 2047|  3.64M|              hQmfTransposer->qmfHBEBufReal_F[(k + slotOffset - 1)][band] +=
 2048|  3.64M|                  gammaOutReal_m[k] >> (scale_factor_hbe - gammaOut_e[k]);
 2049|  3.64M|              hQmfTransposer->qmfHBEBufImag_F[(k + slotOffset - 1)][band] +=
 2050|  3.64M|                  gammaOutImag_m[k] >> (scale_factor_hbe - gammaOut_e[k]);
 2051|  3.64M|            }
 2052|  1.82M|          } /* mVal > qThrQMF * qThrQMF * sqmag0 && ts1 > 0 && ts2 < 64 */
 2053|  7.51M|        }   /* p >= pmin */
 2054|  60.4M|      }     /* for band */
 2055|  4.53M|    }       /* for stretch */
 2056|       |
 2057|  25.3M|    for (i = 0; i < QMF_WIN_LEN - 1; i++) {
  ------------------
  |  |  118|  25.3M|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
  |  Branch (2057:17): [True: 23.4M, False: 1.95M]
  ------------------
 2058|  23.4M|      FDKmemcpy(hQmfTransposer->qmfInBufReal_F[i],
 2059|  23.4M|                hQmfTransposer->qmfInBufReal_F[i + 1],
 2060|  23.4M|                sizeof(FIXP_DBL) * hQmfTransposer->HBEAnalysiscQMF.no_channels);
 2061|  23.4M|      FDKmemcpy(hQmfTransposer->qmfInBufImag_F[i],
 2062|  23.4M|                hQmfTransposer->qmfInBufImag_F[i + 1],
 2063|  23.4M|                sizeof(FIXP_DBL) * hQmfTransposer->HBEAnalysiscQMF.no_channels);
 2064|  23.4M|    }
 2065|       |
 2066|  1.95M|    if (keepStatesSyncedMode != KEEP_STATES_SYNCED_NOOUT) {
  ------------------
  |  Branch (2066:9): [True: 1.78M, False: 170k]
  ------------------
 2067|  1.78M|      if (2 * j >= offset) {
  ------------------
  |  Branch (2067:11): [True: 1.18M, False: 594k]
  ------------------
 2068|       |        /* copy first two slots of internal buffer to output */
 2069|  1.18M|        if (keepStatesSyncedMode == KEEP_STATES_SYNCED_OUTDIFF) {
  ------------------
  |  Branch (2069:13): [True: 138k, False: 1.04M]
  ------------------
 2070|   414k|          for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2070:23): [True: 276k, False: 138k]
  ------------------
 2071|   276k|            FDKmemcpy(&ppQmfBufferOutReal_F[2 * j - offset + i]
 2072|   276k|                                           [hQmfTransposer->xOverQmf[0]],
 2073|   276k|                      &hQmfTransposer
 2074|   276k|                           ->qmfHBEBufReal_F[i][hQmfTransposer->xOverQmf[0]],
 2075|   276k|                      (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|   276k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2076|   276k|                          sizeof(FIXP_DBL));
 2077|   276k|            FDKmemcpy(&ppQmfBufferOutImag_F[2 * j - offset + i]
 2078|   276k|                                           [hQmfTransposer->xOverQmf[0]],
 2079|   276k|                      &hQmfTransposer
 2080|   276k|                           ->qmfHBEBufImag_F[i][hQmfTransposer->xOverQmf[0]],
 2081|   276k|                      (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|   276k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2082|   276k|                          sizeof(FIXP_DBL));
 2083|   276k|          }
 2084|  1.04M|        } else {
 2085|  3.14M|          for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2085:23): [True: 2.09M, False: 1.04M]
  ------------------
 2086|  2.09M|            FDKmemcpy(&ppQmfBufferOutReal_F[2 * j + i + ov_len]
 2087|  2.09M|                                           [hQmfTransposer->xOverQmf[0]],
 2088|  2.09M|                      &hQmfTransposer
 2089|  2.09M|                           ->qmfHBEBufReal_F[i][hQmfTransposer->xOverQmf[0]],
 2090|  2.09M|                      (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|  2.09M|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2091|  2.09M|                          sizeof(FIXP_DBL));
 2092|  2.09M|            FDKmemcpy(&ppQmfBufferOutImag_F[2 * j + i + ov_len]
 2093|  2.09M|                                           [hQmfTransposer->xOverQmf[0]],
 2094|  2.09M|                      &hQmfTransposer
 2095|  2.09M|                           ->qmfHBEBufImag_F[i][hQmfTransposer->xOverQmf[0]],
 2096|  2.09M|                      (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|  2.09M|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2097|  2.09M|                          sizeof(FIXP_DBL));
 2098|  2.09M|          }
 2099|  1.04M|        }
 2100|  1.18M|      }
 2101|  1.78M|    }
 2102|       |
 2103|       |    /* move slots up */
 2104|  19.5M|    for (i = 0; i < HBE_MAX_OUT_SLOTS - 2; i++) {
  ------------------
  |  |  115|  19.5M|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (2104:17): [True: 17.5M, False: 1.95M]
  ------------------
 2105|  17.5M|      FDKmemcpy(
 2106|  17.5M|          &hQmfTransposer->qmfHBEBufReal_F[i][hQmfTransposer->xOverQmf[0]],
 2107|  17.5M|          &hQmfTransposer->qmfHBEBufReal_F[i + 2][hQmfTransposer->xOverQmf[0]],
 2108|  17.5M|          (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|  17.5M|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2109|  17.5M|              sizeof(FIXP_DBL));
 2110|  17.5M|      FDKmemcpy(
 2111|  17.5M|          &hQmfTransposer->qmfHBEBufImag_F[i][hQmfTransposer->xOverQmf[0]],
 2112|  17.5M|          &hQmfTransposer->qmfHBEBufImag_F[i + 2][hQmfTransposer->xOverQmf[0]],
 2113|  17.5M|          (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|  17.5M|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2114|  17.5M|              sizeof(FIXP_DBL));
 2115|  17.5M|    }
 2116|       |
 2117|       |    /* finally set last two slot to zero */
 2118|  5.85M|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2118:17): [True: 3.90M, False: 1.95M]
  ------------------
 2119|  3.90M|      FDKmemset(&hQmfTransposer->qmfHBEBufReal_F[HBE_MAX_OUT_SLOTS - 1 - i]
  ------------------
  |  |  115|  3.90M|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
 2120|  3.90M|                                                [hQmfTransposer->xOverQmf[0]],
 2121|  3.90M|                0,
 2122|  3.90M|                (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|  3.90M|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2123|  3.90M|                    sizeof(FIXP_DBL));
 2124|  3.90M|      FDKmemset(&hQmfTransposer->qmfHBEBufImag_F[HBE_MAX_OUT_SLOTS - 1 - i]
  ------------------
  |  |  115|  3.90M|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
 2125|  3.90M|                                                [hQmfTransposer->xOverQmf[0]],
 2126|  3.90M|                0,
 2127|  3.90M|                (QMF_SYNTH_CHANNELS - hQmfTransposer->xOverQmf[0]) *
  ------------------
  |  |  109|  3.90M|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 2128|  3.90M|                    sizeof(FIXP_DBL));
 2129|  3.90M|    }
 2130|  1.95M|  } /* qmfVocoderColsIn */
 2131|       |
 2132|   109k|  if (keepStatesSyncedMode != KEEP_STATES_SYNCED_NOOUT) {
  ------------------
  |  Branch (2132:7): [True: 98.5k, False: 10.6k]
  ------------------
 2133|  98.5k|    if (keepStatesSyncedMode == KEEP_STATES_SYNCED_OUTDIFF) {
  ------------------
  |  Branch (2133:9): [True: 30.1k, False: 68.3k]
  ------------------
 2134|   306k|      for (i = 0; i < ov_len + LPC_ORDER; i++) {
  ------------------
  |  |  157|   306k|#define LPC_ORDER 2
  ------------------
  |  Branch (2134:19): [True: 276k, False: 30.1k]
  ------------------
 2135|  9.78M|        for (band = hQmfTransposer->startBand; band < hQmfTransposer->stopBand;
  ------------------
  |  Branch (2135:48): [True: 9.51M, False: 276k]
  ------------------
 2136|  9.51M|             band++) {
 2137|  9.51M|          FIXP_DBL tmpR = ppQmfBufferOutReal_F[i][band];
 2138|  9.51M|          FIXP_DBL tmpI = ppQmfBufferOutImag_F[i][band];
 2139|       |
 2140|  9.51M|          ppQmfBufferOutReal_F[i][band] =
 2141|  9.51M|              fMult(tmpR, cos_F[band]) -
 2142|  9.51M|              fMult(tmpI, (-cos_F[64 - band - 1])); /* sum should be <= 1
 2143|       |                                                       because of sin/cos
 2144|       |                                                       multiplication */
 2145|  9.51M|          ppQmfBufferOutImag_F[i][band] =
 2146|  9.51M|              fMult(tmpR, (-cos_F[64 - band - 1])) +
 2147|  9.51M|              fMult(tmpI, cos_F[band]); /* sum should by <= 1 because of sin/cos
 2148|       |                                           multiplication */
 2149|  9.51M|        }
 2150|   276k|      }
 2151|  68.3k|    } else {
 2152|  2.16M|      for (i = offset; i < hQmfTransposer->noCols; i++) {
  ------------------
  |  Branch (2152:24): [True: 2.09M, False: 68.3k]
  ------------------
 2153|  67.9M|        for (band = hQmfTransposer->startBand; band < hQmfTransposer->stopBand;
  ------------------
  |  Branch (2153:48): [True: 65.8M, False: 2.09M]
  ------------------
 2154|  65.8M|             band++) {
 2155|  65.8M|          FIXP_DBL tmpR = ppQmfBufferOutReal_F[i + ov_len][band];
 2156|  65.8M|          FIXP_DBL tmpI = ppQmfBufferOutImag_F[i + ov_len][band];
 2157|       |
 2158|  65.8M|          ppQmfBufferOutReal_F[i + ov_len][band] =
 2159|  65.8M|              fMult(tmpR, cos_F[band]) -
 2160|  65.8M|              fMult(tmpI, (-cos_F[64 - band - 1])); /* sum should be <= 1
 2161|       |                                                       because of sin/cos
 2162|       |                                                       multiplication */
 2163|  65.8M|          ppQmfBufferOutImag_F[i + ov_len][band] =
 2164|  65.8M|              fMult(tmpR, (-cos_F[64 - band - 1])) +
 2165|  65.8M|              fMult(tmpI, cos_F[band]); /* sum should by <= 1 because of sin/cos
 2166|       |                                           multiplication */
 2167|  65.8M|        }
 2168|  2.09M|      }
 2169|  68.3k|    }
 2170|  98.5k|  }
 2171|       |
 2172|   109k|  *scale_hb = EXP2SCALE(scale_factor_hbe);
  ------------------
  |  |  415|   109k|#define EXP2SCALE(e) (15 - (e))
  ------------------
 2173|   109k|}
_Z25GetxOverBandQmfTransposerP13hbeTransposer:
 2175|   285k|int* GetxOverBandQmfTransposer(HANDLE_HBE_TRANSPOSER hQmfTransposer) {
 2176|   285k|  if (hQmfTransposer)
  ------------------
  |  Branch (2176:7): [True: 79.3k, False: 206k]
  ------------------
 2177|  79.3k|    return hQmfTransposer->xOverQmf;
 2178|   206k|  else
 2179|   206k|    return NULL;
 2180|   285k|}
_Z21Get41SbrQmfTransposerP13hbeTransposer:
 2182|   259k|int Get41SbrQmfTransposer(HANDLE_HBE_TRANSPOSER hQmfTransposer) {
 2183|   259k|  if (hQmfTransposer != NULL)
  ------------------
  |  Branch (2183:7): [True: 53.5k, False: 206k]
  ------------------
 2184|  53.5k|    return hQmfTransposer->bSbr41;
 2185|   206k|  else
 2186|   206k|    return 0;
 2187|   259k|}
hbe.cpp:_ZL22getHBEScaleFactorFrameiii:
 1296|   109k|                                  const int pitchInBins) {
 1297|   109k|  if (pitchInBins >= pmin * (1 + bSbr41)) {
  ------------------
  |  Branch (1297:7): [True: 11.0k, False: 98.0k]
  ------------------
 1298|       |    /* crossproducts enabled */
 1299|  11.0k|    return 26;
 1300|  98.0k|  } else {
 1301|  98.0k|    return (maxStretch == 2) ? 24 : 25;
  ------------------
  |  Branch (1301:12): [True: 17.5k, False: 80.4k]
  ------------------
 1302|  98.0k|  }
 1303|   109k|}
hbe.cpp:_ZL19calculateCenterFIXPiiPiS_S_ii:
 1234|  73.0M|                                INT* exponent, int stretch, int mult) {
 1235|  73.0M|  scaleUp(&gammaVecReal, &gammaVecImag, exponent);
 1236|  73.0M|  FIXP_DBL energy = fPow2Div2(gammaVecReal) + fPow2Div2(gammaVecImag);
 1237|       |
 1238|  73.0M|  if (energy != FL2FXCONST_DBL(0.f)) {
  ------------------
  |  |  192|  73.0M|  (FIXP_DBL)(                                                                \
  |  |  193|  73.0M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 73.0M, Folded]
  |  |  ------------------
  |  |  194|  73.0M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  73.0M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  73.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 73.0M]
  |  |  ------------------
  |  |  195|  73.0M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  73.0M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  73.0M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  73.0M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  73.0M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  73.0M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  73.0M|          : ((((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 (1238:7): [True: 44.8M, False: 28.1M]
  ------------------
 1239|  44.8M|    FIXP_DBL gc_r_m, gc_i_m, factor_m = (FIXP_DBL)0;
 1240|  44.8M|    INT factor_e, gc_e;
 1241|  44.8M|    factor_e = 2 * (*exponent) + 1;
 1242|       |
 1243|  44.8M|    switch (stretch) {
  ------------------
  |  Branch (1243:13): [True: 44.8M, False: 0]
  ------------------
 1244|  16.4M|      case 2:
  ------------------
  |  Branch (1244:7): [True: 16.4M, False: 28.4M]
  ------------------
 1245|  16.4M|        factor_m = invFourthRootNorm2(energy, &factor_e);
 1246|  16.4M|        break;
 1247|  18.7M|      case 3:
  ------------------
  |  Branch (1247:7): [True: 18.7M, False: 26.0M]
  ------------------
 1248|  18.7M|        factor_m = invCubeRootNorm2(energy, &factor_e);
 1249|  18.7M|        break;
 1250|  9.63M|      case 4:
  ------------------
  |  Branch (1250:7): [True: 9.63M, False: 35.2M]
  ------------------
 1251|  9.63M|        factor_m = inv3EigthRootNorm2(energy, &factor_e);
 1252|  9.63M|        break;
 1253|  44.8M|    }
 1254|       |
 1255|  44.8M|    gc_r_m = fMultDiv2(gammaVecReal,
 1256|  44.8M|                       factor_m); /* exponent = HBE_SCALE + factor_e + 1 */
 1257|  44.8M|    gc_i_m = fMultDiv2(gammaVecImag,
 1258|  44.8M|                       factor_m); /* exponent = HBE_SCALE + factor_e + 1*/
 1259|  44.8M|    gc_e = *exponent + factor_e + 1;
 1260|       |
 1261|  44.8M|    scaleUp(&gc_r_m, &gc_i_m, &gc_e);
 1262|       |
 1263|  44.8M|    switch (mult) {
  ------------------
  |  Branch (1263:13): [True: 44.8M, False: 0]
  ------------------
 1264|  18.5M|      case 0:
  ------------------
  |  Branch (1264:7): [True: 18.5M, False: 26.3M]
  ------------------
 1265|  18.5M|        *centerReal = gc_r_m;
 1266|  18.5M|        *centerImag = gc_i_m;
 1267|  18.5M|        break;
 1268|  18.0M|      case 1:
  ------------------
  |  Branch (1268:7): [True: 18.0M, False: 26.8M]
  ------------------
 1269|  18.0M|        *centerReal = fPow2Div2(gc_r_m) - fPow2Div2(gc_i_m);
 1270|  18.0M|        *centerImag = fMult(gc_r_m, gc_i_m);
 1271|  18.0M|        gc_e = 2 * gc_e + 1;
 1272|  18.0M|        break;
 1273|  8.36M|      case 2:
  ------------------
  |  Branch (1273:7): [True: 8.36M, False: 36.5M]
  ------------------
 1274|  8.36M|        FIXP_DBL tmp_r = gc_r_m;
 1275|  8.36M|        FIXP_DBL tmp_i = gc_i_m;
 1276|  8.36M|        gc_r_m = fPow2Div2(gc_r_m) - fPow2Div2(gc_i_m);
 1277|  8.36M|        gc_i_m = fMult(tmp_r, gc_i_m);
 1278|  8.36M|        gc_e = 3 * gc_e + 1 + 1;
 1279|  8.36M|        cplxMultDiv2(&centerReal[0], &centerImag[0], gc_r_m, gc_i_m, tmp_r,
 1280|  8.36M|                     tmp_i);
 1281|  8.36M|        break;
 1282|  44.8M|    }
 1283|       |
 1284|  44.8M|    scaleUp(centerReal, centerImag, &gc_e);
 1285|       |
 1286|  44.8M|    FDK_ASSERT(gc_e >= 0);
  ------------------
  |  |  221|  44.8M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1286:5): [True: 44.8M, False: 0]
  ------------------
 1287|  44.8M|    *exponent = gc_e;
 1288|  44.8M|  } else {
 1289|  28.1M|    *centerReal = energy; /* energy = 0 */
 1290|  28.1M|    *centerImag = energy; /* energy = 0 */
 1291|  28.1M|    *exponent = (INT)energy;
 1292|  28.1M|  }
 1293|  73.0M|}
hbe.cpp:_ZL18invFourthRootNorm2iPi:
  772|   163M|{
  773|   163M|  FDK_ASSERT(op_m > FL2FXCONST_DBL(0.0));
  ------------------
  |  |  221|   163M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (773:3): [Folded, False: 163M]
  |  Branch (773:3): [Folded, False: 0]
  |  Branch (773:3): [True: 163M, Folded]
  |  Branch (773:3): [True: 163M, False: 0]
  ------------------
  774|       |
  775|       |  /* normalize input, calculate shift value */
  776|   163M|  INT exponent = (INT)fNormz(op_m) - 1;
  777|   163M|  op_m <<= exponent;
  778|       |
  779|   163M|  INT index = (INT)(op_m >> (DFRACT_BITS - 1 - (FOURTHROOT_BITS + 1))) &
  ------------------
  |  |  113|   163M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                INT index = (INT)(op_m >> (DFRACT_BITS - 1 - (FOURTHROOT_BITS + 1))) &
  ------------------
  |  |  702|   163M|#define FOURTHROOT_BITS 7
  ------------------
  780|   163M|              FOURTHROOT_BITS_MASK;
  ------------------
  |  |  704|   163M|#define FOURTHROOT_BITS_MASK 0x7f
  ------------------
  781|   163M|  FIXP_DBL fract = (FIXP_DBL)(((INT)op_m & FOURTHROOT_FRACT_BITS_MASK)
  ------------------
  |  |  705|   163M|#define FOURTHROOT_FRACT_BITS_MASK 0x007FFFFF
  ------------------
  782|   163M|                              << (FOURTHROOT_BITS + 1));
  ------------------
  |  |  702|   163M|#define FOURTHROOT_BITS 7
  ------------------
  783|   163M|  FIXP_DBL diff = invFourthRootTab[index + 1] - invFourthRootTab[index];
  784|   163M|  op_m = invFourthRootTab[index] + (fMultDiv2(diff, fract) << 1);
  785|       |
  786|       |#if defined(INVFOURTHROOTNORM2_LINEAR_INTERPOLATE_HQ)
  787|       |  /* reg1 = t[i] + (t[i+1]-t[i])*fract ... already computed ... +
  788|       |   * (1-fract)fract*(t[i+2]-t[i+1])/2 */
  789|       |  if (fract != (FIXP_DBL)0) {
  790|       |    /* fract = fract * (1 - fract) */
  791|       |    fract = fMultDiv2(fract, (FIXP_DBL)((LONG)0x80000000 - (LONG)fract)) << 1;
  792|       |    diff = diff - (invFourthRootTab[index + 2] - invFourthRootTab[index + 1]);
  793|       |    op_m = fMultAddDiv2(op_m, fract, diff);
  794|       |  }
  795|       |#endif /* INVFOURTHROOTNORM2_LINEAR_INTERPOLATE_HQ */
  796|       |
  797|   163M|  exponent = exponent - *op_e + 4;
  798|   163M|  INT rem = exponent & 0x00000003;
  799|   163M|  INT shift_tmp = (exponent >> 2);
  800|       |
  801|   163M|  *op_e = shift_tmp;
  802|   163M|  op_m = fMultDiv2(op_m, invFourthRootCorrection[rem]) << 2;
  803|       |
  804|   163M|  return (op_m);
  805|   163M|}
hbe.cpp:_ZL16invCubeRootNorm2iPi:
  650|   152M|{
  651|   152M|  FDK_ASSERT(op_m > FIXP_DBL(0));
  ------------------
  |  |  221|   152M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (651:3): [True: 152M, False: 0]
  ------------------
  652|       |
  653|       |  /* normalize input, calculate shift value */
  654|   152M|  INT exponent = (INT)fNormz(op_m) - 1;
  655|   152M|  op_m <<= exponent;
  656|       |
  657|   152M|  INT index = (INT)(op_m >> (DFRACT_BITS - 1 - (CUBE_ROOT_BITS + 1))) &
  ------------------
  |  |  113|   152M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                INT index = (INT)(op_m >> (DFRACT_BITS - 1 - (CUBE_ROOT_BITS + 1))) &
  ------------------
  |  |  582|   152M|#define CUBE_ROOT_BITS 7
  ------------------
  658|   152M|              CUBE_ROOT_BITS_MASK;
  ------------------
  |  |  584|   152M|#define CUBE_ROOT_BITS_MASK 0x7f
  ------------------
  659|   152M|  FIXP_DBL fract = (FIXP_DBL)(((INT)op_m & CUBE_ROOT_FRACT_BITS_MASK)
  ------------------
  |  |  585|   152M|#define CUBE_ROOT_FRACT_BITS_MASK 0x007FFFFF
  ------------------
  660|   152M|                              << (CUBE_ROOT_BITS + 1));
  ------------------
  |  |  582|   152M|#define CUBE_ROOT_BITS 7
  ------------------
  661|   152M|  FIXP_DBL diff = invCubeRootTab[index + 1] - invCubeRootTab[index];
  662|   152M|  op_m = fMultAddDiv2(invCubeRootTab[index], diff << 1, fract);
  663|       |#if defined(INVCUBEROOTNORM2_LINEAR_INTERPOLATE_HQ)
  664|       |  /* reg1 = t[i] + (t[i+1]-t[i])*fract ... already computed ... +
  665|       |   * (1-fract)fract*(t[i+2]-t[i+1])/2 */
  666|       |  if (fract != (FIXP_DBL)0) {
  667|       |    /* fract = fract * (1 - fract) */
  668|       |    fract = fMultDiv2(fract, (FIXP_DBL)((LONG)0x80000000 - (LONG)fract)) << 1;
  669|       |    diff = diff - (invCubeRootTab[index + 2] - invCubeRootTab[index + 1]);
  670|       |    op_m = fMultAddDiv2(op_m, fract, diff);
  671|       |  }
  672|       |#endif /* INVCUBEROOTNORM2_LINEAR_INTERPOLATE_HQ */
  673|       |
  674|       |  /* calculate the output exponent = input * exp/3 = cubicroot(m)*2^(exp/3)
  675|       |   * where 2^(exp/3) = 2^k'*2 or 2^k'*2^(1/3) or 2^k'*2^(2/3) */
  676|   152M|  exponent = exponent - *op_e + 3;
  677|   152M|  INT shift_tmp =
  678|   152M|      ((INT)fMultDiv2((FIXP_SGL)fAbs(exponent), (FIXP_SGL)0x5556)) >> 16;
  679|   152M|  if (exponent < 0) {
  ------------------
  |  Branch (679:7): [True: 86.2M, False: 65.8M]
  ------------------
  680|  86.2M|    shift_tmp = -shift_tmp;
  681|  86.2M|  }
  682|   152M|  INT rem = exponent - 3 * shift_tmp;
  683|   152M|  if (rem < 0) {
  ------------------
  |  Branch (683:7): [True: 57.8M, False: 94.2M]
  ------------------
  684|  57.8M|    rem += 3;
  685|  57.8M|    shift_tmp--;
  686|  57.8M|  }
  687|       |
  688|   152M|  *op_e = shift_tmp;
  689|   152M|  op_m = fMultDiv2(op_m, invCubeRootCorrection[rem]) << 2;
  690|       |
  691|   152M|  return (op_m);
  692|   152M|}
hbe.cpp:_ZL18inv3EigthRootNorm2iPi:
  888|  57.7M|{
  889|  57.7M|  FDK_ASSERT(op_m > FL2FXCONST_DBL(0.0));
  ------------------
  |  |  221|  57.7M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (889:3): [Folded, False: 57.7M]
  |  Branch (889:3): [Folded, False: 0]
  |  Branch (889:3): [True: 57.7M, Folded]
  |  Branch (889:3): [True: 57.7M, False: 0]
  ------------------
  890|       |
  891|       |  /* normalize input, calculate shift op_mue */
  892|  57.7M|  INT exponent = (INT)fNormz(op_m) - 1;
  893|  57.7M|  op_m <<= exponent;
  894|       |
  895|  57.7M|  INT index = (INT)(op_m >> (DFRACT_BITS - 1 - (THREEIGTHROOT_BITS + 1))) &
  ------------------
  |  |  113|  57.7M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                INT index = (INT)(op_m >> (DFRACT_BITS - 1 - (THREEIGTHROOT_BITS + 1))) &
  ------------------
  |  |  814|  57.7M|#define THREEIGTHROOT_BITS 7
  ------------------
  896|  57.7M|              THREEIGTHROOT_BITS_MASK;
  ------------------
  |  |  816|  57.7M|#define THREEIGTHROOT_BITS_MASK 0x7f
  ------------------
  897|  57.7M|  FIXP_DBL fract = (FIXP_DBL)(((INT)op_m & THREEIGTHROOT_FRACT_BITS_MASK)
  ------------------
  |  |  817|  57.7M|#define THREEIGTHROOT_FRACT_BITS_MASK 0x007FFFFF
  ------------------
  898|  57.7M|                              << (THREEIGTHROOT_BITS + 1));
  ------------------
  |  |  814|  57.7M|#define THREEIGTHROOT_BITS 7
  ------------------
  899|  57.7M|  FIXP_DBL diff = inv3EigthRootTab[index + 1] - inv3EigthRootTab[index];
  900|  57.7M|  op_m = inv3EigthRootTab[index] + (fMultDiv2(diff, fract) << 1);
  901|       |
  902|       |#if defined(INVTHREEIGTHROOTNORM2_LINEAR_INTERPOLATE_HQ)
  903|       |  /* op_m = t[i] + (t[i+1]-t[i])*fract ... already computed ... +
  904|       |   * (1-fract)fract*(t[i+2]-t[i+1])/2 */
  905|       |  if (fract != (FIXP_DBL)0) {
  906|       |    /* fract = fract * (1 - fract) */
  907|       |    fract = fMultDiv2(fract, (FIXP_DBL)((LONG)0x80000000 - (LONG)fract)) << 1;
  908|       |    diff = diff - (inv3EigthRootTab[index + 2] - inv3EigthRootTab[index + 1]);
  909|       |    op_m = fMultAddDiv2(op_m, fract, diff);
  910|       |  }
  911|       |#endif /* INVTHREEIGTHROOTNORM2_LINEAR_INTERPOLATE_HQ */
  912|       |
  913|  57.7M|  exponent = exponent - *op_e + 8;
  914|  57.7M|  INT rem = exponent & 0x00000007;
  915|  57.7M|  INT shift_tmp = (exponent >> 3);
  916|       |
  917|  57.7M|  *op_e = shift_tmp * 3;
  918|  57.7M|  op_m = fMultDiv2(op_m, inv3EigthRootCorrection[rem]) << 2;
  919|       |
  920|  57.7M|  return (fMult(op_m, fMult(op_m, op_m)));
  921|  57.7M|}
hbe.cpp:_ZL15addHighBandPartiiiiiiiiiPiS_:
 1310|   559M|                            FIXP_DBL* qmfHBEBufImag_F) {
 1311|   559M|  if ((g_r_m | g_i_m) != FL2FXCONST_DBL(0.f)) {
  ------------------
  |  |  192|   559M|  (FIXP_DBL)(                                                                \
  |  |  193|   559M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 559M, Folded]
  |  |  ------------------
  |  |  194|   559M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   559M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   559M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 559M]
  |  |  ------------------
  |  |  195|   559M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   559M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   559M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   559M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   559M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   559M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   559M|          : ((((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 (1311:7): [True: 328M, False: 231M]
  ------------------
 1312|   328M|    FIXP_DBL factor_m = (FIXP_DBL)0;
 1313|   328M|    INT factor_e;
 1314|   328M|    INT add = (stretch == 4) ? 1 : 0;
  ------------------
  |  Branch (1314:15): [True: 48.1M, False: 279M]
  ------------------
 1315|   328M|    INT shift = (stretch == 4) ? 1 : 2;
  ------------------
  |  Branch (1315:17): [True: 48.1M, False: 279M]
  ------------------
 1316|       |
 1317|   328M|    scaleUp(&g_r_m, &g_i_m, &g_e);
 1318|   328M|    FIXP_DBL energy = fPow2AddDiv2(fPow2Div2(g_r_m), g_i_m);
 1319|   328M|    factor_e = 2 * g_e + 1;
 1320|       |
 1321|   328M|    switch (stretch) {
  ------------------
  |  Branch (1321:13): [True: 328M, False: 0]
  ------------------
 1322|   146M|      case 2:
  ------------------
  |  Branch (1322:7): [True: 146M, False: 181M]
  ------------------
 1323|   146M|        factor_m = invFourthRootNorm2(energy, &factor_e);
 1324|   146M|        break;
 1325|   133M|      case 3:
  ------------------
  |  Branch (1325:7): [True: 133M, False: 194M]
  ------------------
 1326|   133M|        factor_m = invCubeRootNorm2(energy, &factor_e);
 1327|   133M|        break;
 1328|  48.1M|      case 4:
  ------------------
  |  Branch (1328:7): [True: 48.1M, False: 279M]
  ------------------
 1329|  48.1M|        factor_m = inv3EigthRootNorm2(energy, &factor_e);
 1330|  48.1M|        break;
 1331|   328M|    }
 1332|       |
 1333|   328M|    factor_m = fMult(factor_m, mult);
 1334|       |
 1335|   328M|    FIXP_DBL tmp_r, tmp_i;
 1336|   328M|    cplxMultDiv2(&tmp_r, &tmp_i, g_r_m, g_i_m, gammaCenterReal_m,
 1337|   328M|                 gammaCenterImag_m);
 1338|       |
 1339|   328M|    g_r_m = fMultDiv2(tmp_r, factor_m) << shift;
 1340|   328M|    g_i_m = fMultDiv2(tmp_i, factor_m) << shift;
 1341|   328M|    g_e = scale_factor_hbe - (g_e + factor_e + gammaCenter_e + add);
 1342|   328M|    g_e = fMax((INT)0, g_e);
 1343|   328M|    *qmfHBEBufReal_F += g_r_m >> g_e;
 1344|   328M|    *qmfHBEBufImag_F += g_i_m >> g_e;
 1345|   328M|  }
 1346|   559M|}
_Z7scaleUpPiS_S_:
 1216|   527M|inline void scaleUp(FIXP_DBL* real_m, FIXP_DBL* imag_m, INT* _e) {
 1217|   527M|  INT reserve;
 1218|       |  /* shift gc_r and gc_i up if possible */
 1219|   527M|  reserve = CntLeadingZeros((INT(*real_m) ^ INT((*real_m >> 31))) |
  ------------------
  |  |  308|   527M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
 1220|   527M|                            (INT(*imag_m) ^ INT((*imag_m >> 31)))) -
 1221|   527M|            1;
 1222|   527M|  reserve = fMax(reserve - 1,
 1223|   527M|                 0); /* Leave one bit headroom such that (real_m^2 + imag_m^2)
 1224|       |                        does not overflow later if both are 0x80000000. */
 1225|   527M|  reserve = fMin(reserve, *_e);
 1226|   527M|  FDK_ASSERT(reserve >= 0);
  ------------------
  |  |  221|   527M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1226:3): [True: 527M, False: 0]
  ------------------
 1227|   527M|  *real_m <<= reserve;
 1228|   527M|  *imag_m <<= reserve;
 1229|   527M|  *_e -= reserve;
 1230|   527M|}

_Z15DecodeHuffmanCWPA2_KaP13FDK_BITSTREAM:
  125|  3.33M|{
  126|  3.33M|  SCHAR index = 0;
  127|  3.33M|  int value, bit;
  128|       |
  129|  10.2M|  while (index >= 0) {
  ------------------
  |  Branch (129:10): [True: 6.92M, False: 3.33M]
  ------------------
  130|  6.92M|    bit = FDKreadBits(hBs, 1);
  131|  6.92M|    index = h[index][bit];
  132|  6.92M|  }
  133|       |
  134|  3.33M|  value = index + 64; /* Add offset */
  135|       |
  136|  3.33M|  return value;
  137|  3.33M|}

_Z13lppTransposerP13SBR_LPP_TRANSP16QMF_SCALE_FACTORPPiS3_S4_iiiiiiiP9INVF_MODES6_:
  275|   222k|) {
  276|   222k|  INT bwIndex[MAX_NUM_PATCHES];
  277|   222k|  FIXP_DBL bwVector[MAX_NUM_PATCHES]; /*!< pole moving factors */
  278|   222k|  FIXP_DBL preWhiteningGains[(64) / 2];
  279|   222k|  int preWhiteningGains_exp[(64) / 2];
  280|       |
  281|   222k|  int i;
  282|   222k|  int loBand, start, stop;
  283|   222k|  TRANSPOSER_SETTINGS *pSettings = hLppTrans->pSettings;
  284|   222k|  PATCH_PARAM *patchParam = pSettings->patchParam;
  285|   222k|  int patch;
  286|       |
  287|   222k|  FIXP_SGL alphar[LPC_ORDER], a0r, a1r;
  288|   222k|  FIXP_SGL alphai[LPC_ORDER], a0i = 0, a1i = 0;
  289|   222k|  FIXP_SGL bw = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   222k|  (FIXP_SGL)(                                                                \
  |  |  181|   222k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 222k, Folded]
  |  |  ------------------
  |  |  182|   222k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   222k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   222k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 222k]
  |  |  ------------------
  |  |  183|   222k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   222k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   222k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   222k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   222k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   222k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   222k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|       |
  291|   222k|  int autoCorrLength;
  292|       |
  293|   222k|  FIXP_DBL k1, k1_below = 0, k1_below2 = 0;
  294|       |
  295|   222k|  ACORR_COEFS ac;
  296|   222k|  int startSample;
  297|   222k|  int stopSample;
  298|   222k|  int stopSampleClear;
  299|       |
  300|   222k|  int comLowBandScale;
  301|   222k|  int ovLowBandShift;
  302|   222k|  int lowBandShift;
  303|       |  /*  int ovHighBandShift;*/
  304|       |
  305|   222k|  alphai[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   222k|  (FIXP_SGL)(                                                                \
  |  |  181|   222k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 222k, Folded]
  |  |  ------------------
  |  |  182|   222k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   222k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   222k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 222k]
  |  |  ------------------
  |  |  183|   222k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   222k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   222k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   222k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   222k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   222k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   222k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  306|   222k|  alphai[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   222k|  (FIXP_SGL)(                                                                \
  |  |  181|   222k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 222k, Folded]
  |  |  ------------------
  |  |  182|   222k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   222k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   222k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 222k]
  |  |  ------------------
  |  |  183|   222k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   222k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   222k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   222k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   222k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   222k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   222k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  307|       |
  308|   222k|  startSample = firstSlotOffs * timeStep;
  309|   222k|  stopSample = pSettings->nCols + lastSlotOffs * timeStep;
  310|   222k|  FDK_ASSERT((lastSlotOffs * timeStep) <= pSettings->overlap);
  ------------------
  |  |  221|   222k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 222k, False: 0]
  ------------------
  311|       |
  312|   222k|  inverseFilteringLevelEmphasis(hLppTrans, nInvfBands, sbr_invf_mode,
  313|   222k|                                sbr_invf_mode_prev, bwVector);
  314|       |
  315|   222k|  stopSampleClear = stopSample;
  316|       |
  317|   222k|  autoCorrLength = pSettings->nCols + pSettings->overlap;
  318|       |
  319|   222k|  if (pSettings->noOfPatches > 0) {
  ------------------
  |  Branch (319:7): [True: 222k, False: 0]
  ------------------
  320|       |    /* Set upper subbands to zero:
  321|       |       This is required in case that the patches do not cover the complete
  322|       |       highband (because the last patch would be too short). Possible
  323|       |       optimization: Clearing bands up to usb would be sufficient here. */
  324|   222k|    int targetStopBand =
  325|   222k|        patchParam[pSettings->noOfPatches - 1].targetStartBand +
  326|   222k|        patchParam[pSettings->noOfPatches - 1].numBandsInPatch;
  327|       |
  328|   222k|    int memSize = ((64) - targetStopBand) * sizeof(FIXP_DBL);
  329|       |
  330|   222k|    if (!useLP) {
  ------------------
  |  Branch (330:9): [True: 179k, False: 42.7k]
  ------------------
  331|  6.22M|      for (i = startSample; i < stopSampleClear; i++) {
  ------------------
  |  Branch (331:29): [True: 6.04M, False: 179k]
  ------------------
  332|  6.04M|        FDKmemclear(&qmfBufferReal[i][targetStopBand], memSize);
  333|  6.04M|        FDKmemclear(&qmfBufferImag[i][targetStopBand], memSize);
  334|  6.04M|      }
  335|   179k|    } else {
  336|  1.03M|      for (i = startSample; i < stopSampleClear; i++) {
  ------------------
  |  Branch (336:29): [True: 987k, False: 42.7k]
  ------------------
  337|   987k|        FDKmemclear(&qmfBufferReal[i][targetStopBand], memSize);
  338|   987k|      }
  339|  42.7k|    }
  340|   222k|  }
  341|       |#if defined __ANDROID__ && !defined __ANDROID_NDK__
  342|       |  else {
  343|       |    // Safetynet logging
  344|       |    android_errorWriteLog(0x534e4554, "112160868");
  345|       |  }
  346|       |#endif
  347|       |
  348|       |  /* init bwIndex for each patch */
  349|   222k|  FDKmemclear(bwIndex, sizeof(bwIndex));
  350|       |
  351|       |  /*
  352|       |    Calc common low band scale factor
  353|       |  */
  354|   222k|  comLowBandScale =
  355|   222k|      fixMin(sbrScaleFactor->ov_lb_scale, sbrScaleFactor->lb_scale);
  ------------------
  |  |  306|   222k|#define fixMin(a, b) fMin(a, b)
  ------------------
  356|       |
  357|   222k|  ovLowBandShift = sbrScaleFactor->ov_lb_scale - comLowBandScale;
  358|   222k|  lowBandShift = sbrScaleFactor->lb_scale - comLowBandScale;
  359|       |  /*  ovHighBandShift = firstSlotOffs == 0 ? ovLowBandShift:0;*/
  360|       |
  361|   222k|  if (fPreWhitening) {
  ------------------
  |  Branch (361:7): [True: 32.6k, False: 189k]
  ------------------
  362|  32.6k|    sbrDecoder_calculateGainVec(
  363|  32.6k|        qmfBufferReal, qmfBufferImag,
  364|  32.6k|        DFRACT_BITS - 1 - 16 -
  ------------------
  |  |  113|  32.6k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  365|  32.6k|            sbrScaleFactor->ov_lb_scale, /* convert scale to exponent */
  366|  32.6k|        DFRACT_BITS - 1 - 16 -
  ------------------
  |  |  113|  32.6k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  367|  32.6k|            sbrScaleFactor->lb_scale, /* convert scale to exponent */
  368|  32.6k|        pSettings->overlap, preWhiteningGains, preWhiteningGains_exp,
  369|  32.6k|        v_k_master0, startSample, stopSample);
  370|  32.6k|  }
  371|       |
  372|       |  /* outer loop over bands to do analysis only once for each band */
  373|       |
  374|   222k|  if (!useLP) {
  ------------------
  |  Branch (374:7): [True: 179k, False: 42.7k]
  ------------------
  375|   179k|    start = pSettings->lbStartPatching;
  376|   179k|    stop = pSettings->lbStopPatching;
  377|   179k|  } else {
  378|  42.7k|    start = fixMax(1, pSettings->lbStartPatching - 2);
  ------------------
  |  |  307|  42.7k|#define fixMax(a, b) fMax(a, b)
  ------------------
  379|  42.7k|    stop = patchParam[0].targetStartBand;
  380|  42.7k|  }
  381|       |
  382|  3.32M|  for (loBand = start; loBand < stop; loBand++) {
  ------------------
  |  Branch (382:24): [True: 3.10M, False: 222k]
  ------------------
  383|  3.10M|    FIXP_DBL lowBandReal[(((1024) / (32) * (4) / 2) + (3 * (4))) + LPC_ORDER];
  384|  3.10M|    FIXP_DBL *plowBandReal = lowBandReal;
  385|  3.10M|    FIXP_DBL **pqmfBufferReal =
  386|  3.10M|        qmfBufferReal + firstSlotOffs * timeStep /* + pSettings->overlap */;
  387|  3.10M|    FIXP_DBL lowBandImag[(((1024) / (32) * (4) / 2) + (3 * (4))) + LPC_ORDER];
  388|  3.10M|    FIXP_DBL *plowBandImag = lowBandImag;
  389|  3.10M|    FIXP_DBL **pqmfBufferImag =
  390|  3.10M|        qmfBufferImag + firstSlotOffs * timeStep /* + pSettings->overlap */;
  391|  3.10M|    int resetLPCCoeffs = 0;
  392|  3.10M|    int dynamicScale = DFRACT_BITS - 1 - LPC_SCALE_FACTOR;
  ------------------
  |  |  113|  3.10M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  int dynamicScale = DFRACT_BITS - 1 - LPC_SCALE_FACTOR;
  ------------------
  |  |  139|  3.10M|#define LPC_SCALE_FACTOR 2
  ------------------
  393|  3.10M|    int acDetScale = 0; /* scaling of autocorrelation determinant */
  394|       |
  395|  3.10M|    for (i = 0;
  396|  15.9M|         i < LPC_ORDER + firstSlotOffs * timeStep /*+pSettings->overlap*/;
  ------------------
  |  |  122|  15.9M|#define LPC_ORDER 2
  ------------------
  |  Branch (396:10): [True: 12.8M, False: 3.10M]
  ------------------
  397|  12.8M|         i++) {
  398|  12.8M|      *plowBandReal++ = hLppTrans->lpcFilterStatesRealLegSBR[i][loBand];
  399|  12.8M|      if (!useLP)
  ------------------
  |  Branch (399:11): [True: 11.2M, False: 1.67M]
  ------------------
  400|  11.2M|        *plowBandImag++ = hLppTrans->lpcFilterStatesImagLegSBR[i][loBand];
  401|  12.8M|    }
  402|       |
  403|       |    /*
  404|       |      Take old slope length qmf slot source values out of (overlap)qmf buffer
  405|       |    */
  406|  3.10M|    if (!useLP) {
  ------------------
  |  Branch (406:9): [True: 2.40M, False: 695k]
  ------------------
  407|  2.40M|      for (i = 0;
  408|  88.6M|           i < pSettings->nCols + pSettings->overlap - firstSlotOffs * timeStep;
  ------------------
  |  Branch (408:12): [True: 86.2M, False: 2.40M]
  ------------------
  409|  86.2M|           i++) {
  410|  86.2M|        *plowBandReal++ = (*pqmfBufferReal++)[loBand];
  411|  86.2M|        *plowBandImag++ = (*pqmfBufferImag++)[loBand];
  412|  86.2M|      }
  413|  2.40M|    } else {
  414|       |      /* pSettings->overlap is always even */
  415|   695k|      FDK_ASSERT((pSettings->overlap & 1) == 0);
  ------------------
  |  |  221|   695k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (415:7): [True: 695k, False: 0]
  ------------------
  416|  11.3M|      for (i = 0; i < ((pSettings->nCols + pSettings->overlap -
  ------------------
  |  Branch (416:19): [True: 10.6M, False: 695k]
  ------------------
  417|  11.3M|                        firstSlotOffs * timeStep) >>
  418|  11.3M|                       1);
  419|  10.6M|           i++) {
  420|  10.6M|        *plowBandReal++ = (*pqmfBufferReal++)[loBand];
  421|  10.6M|        *plowBandReal++ = (*pqmfBufferReal++)[loBand];
  422|  10.6M|      }
  423|   695k|      if (pSettings->nCols & 1) {
  ------------------
  |  Branch (423:11): [True: 153k, False: 542k]
  ------------------
  424|   153k|        *plowBandReal++ = (*pqmfBufferReal++)[loBand];
  425|   153k|      }
  426|   695k|    }
  427|       |
  428|       |    /*
  429|       |      Determine dynamic scaling value.
  430|       |     */
  431|  3.10M|    dynamicScale =
  432|  3.10M|        fixMin(dynamicScale,
  ------------------
  |  |  306|  3.10M|#define fixMin(a, b) fMin(a, b)
  ------------------
  433|  3.10M|               getScalefactor(lowBandReal, LPC_ORDER + pSettings->overlap) +
  434|  3.10M|                   ovLowBandShift);
  435|  3.10M|    dynamicScale =
  436|  3.10M|        fixMin(dynamicScale,
  ------------------
  |  |  306|  3.10M|#define fixMin(a, b) fMin(a, b)
  ------------------
  437|  3.10M|               getScalefactor(&lowBandReal[LPC_ORDER + pSettings->overlap],
  438|  3.10M|                              pSettings->nCols) +
  439|  3.10M|                   lowBandShift);
  440|  3.10M|    if (!useLP) {
  ------------------
  |  Branch (440:9): [True: 2.40M, False: 695k]
  ------------------
  441|  2.40M|      dynamicScale =
  442|  2.40M|          fixMin(dynamicScale,
  ------------------
  |  |  306|  2.40M|#define fixMin(a, b) fMin(a, b)
  ------------------
  443|  2.40M|                 getScalefactor(lowBandImag, LPC_ORDER + pSettings->overlap) +
  444|  2.40M|                     ovLowBandShift);
  445|  2.40M|      dynamicScale =
  446|  2.40M|          fixMin(dynamicScale,
  ------------------
  |  |  306|  2.40M|#define fixMin(a, b) fMin(a, b)
  ------------------
  447|  2.40M|                 getScalefactor(&lowBandImag[LPC_ORDER + pSettings->overlap],
  448|  2.40M|                                pSettings->nCols) +
  449|  2.40M|                     lowBandShift);
  450|  2.40M|    }
  451|       |
  452|  3.10M|    if (dynamicScale == 0) {
  ------------------
  |  Branch (452:9): [True: 90.4k, False: 3.01M]
  ------------------
  453|       |      /* In this special case the available headroom bits as well as
  454|       |         ovLowBandShift and lowBandShift are zero. The spectrum is limited to
  455|       |         prevent -1.0, so negative values for dynamicScale can be avoided. */
  456|  3.67M|      for (i = 0; i < (LPC_ORDER + pSettings->overlap + pSettings->nCols);
  ------------------
  |  |  122|  3.67M|#define LPC_ORDER 2
  ------------------
  |  Branch (456:19): [True: 3.58M, False: 90.4k]
  ------------------
  457|  3.58M|           i++) {
  458|  3.58M|        lowBandReal[i] = fixMax(lowBandReal[i], (FIXP_DBL)0x80000001);
  ------------------
  |  |  307|  3.58M|#define fixMax(a, b) fMax(a, b)
  ------------------
  459|  3.58M|      }
  460|  90.4k|      if (!useLP) {
  ------------------
  |  Branch (460:11): [True: 87.5k, False: 2.95k]
  ------------------
  461|  3.58M|        for (i = 0; i < (LPC_ORDER + pSettings->overlap + pSettings->nCols);
  ------------------
  |  |  122|  3.58M|#define LPC_ORDER 2
  ------------------
  |  Branch (461:21): [True: 3.49M, False: 87.5k]
  ------------------
  462|  3.49M|             i++) {
  463|  3.49M|          lowBandImag[i] = fixMax(lowBandImag[i], (FIXP_DBL)0x80000001);
  ------------------
  |  |  307|  3.49M|#define fixMax(a, b) fMax(a, b)
  ------------------
  464|  3.49M|        }
  465|  87.5k|      }
  466|  3.01M|    } else {
  467|  3.01M|      dynamicScale =
  468|  3.01M|          fixMax(0, dynamicScale -
  ------------------
  |  |  307|  3.01M|#define fixMax(a, b) fMax(a, b)
  ------------------
  469|  3.01M|                        1); /* one additional bit headroom to prevent -1.0 */
  470|  3.01M|    }
  471|       |
  472|       |    /*
  473|       |      Scale temporal QMF buffer.
  474|       |     */
  475|  3.10M|    scaleValues(&lowBandReal[0], LPC_ORDER + pSettings->overlap,
  ------------------
  |  |  122|  3.10M|#define LPC_ORDER 2
  ------------------
  476|  3.10M|                dynamicScale - ovLowBandShift);
  477|  3.10M|    scaleValues(&lowBandReal[LPC_ORDER + pSettings->overlap], pSettings->nCols,
  ------------------
  |  |  122|  3.10M|#define LPC_ORDER 2
  ------------------
  478|  3.10M|                dynamicScale - lowBandShift);
  479|       |
  480|  3.10M|    if (!useLP) {
  ------------------
  |  Branch (480:9): [True: 2.40M, False: 695k]
  ------------------
  481|  2.40M|      scaleValues(&lowBandImag[0], LPC_ORDER + pSettings->overlap,
  ------------------
  |  |  122|  2.40M|#define LPC_ORDER 2
  ------------------
  482|  2.40M|                  dynamicScale - ovLowBandShift);
  483|  2.40M|      scaleValues(&lowBandImag[LPC_ORDER + pSettings->overlap],
  ------------------
  |  |  122|  2.40M|#define LPC_ORDER 2
  ------------------
  484|  2.40M|                  pSettings->nCols, dynamicScale - lowBandShift);
  485|  2.40M|    }
  486|       |
  487|  3.10M|    if (!useLP) {
  ------------------
  |  Branch (487:9): [True: 2.40M, False: 695k]
  ------------------
  488|  2.40M|      acDetScale += autoCorr2nd_cplx(&ac, lowBandReal + LPC_ORDER,
  ------------------
  |  |  122|  2.40M|#define LPC_ORDER 2
  ------------------
  489|  2.40M|                                     lowBandImag + LPC_ORDER, autoCorrLength);
  ------------------
  |  |  122|  2.40M|#define LPC_ORDER 2
  ------------------
  490|  2.40M|    } else {
  491|   695k|      acDetScale +=
  492|   695k|          autoCorr2nd_real(&ac, lowBandReal + LPC_ORDER, autoCorrLength);
  ------------------
  |  |  122|   695k|#define LPC_ORDER 2
  ------------------
  493|   695k|    }
  494|       |
  495|       |    /* Examine dynamic of determinant in autocorrelation. */
  496|  3.10M|    acDetScale += 2 * (comLowBandScale + dynamicScale);
  497|  3.10M|    acDetScale *= 2;            /* two times reflection coefficent scaling */
  498|  3.10M|    acDetScale += ac.det_scale; /* ac scaling of determinant */
  499|       |
  500|       |    /* In case of determinant < 10^-38, resetLPCCoeffs=1 has to be enforced. */
  501|  3.10M|    if (acDetScale > 126) {
  ------------------
  |  Branch (501:9): [True: 1.07M, False: 2.03M]
  ------------------
  502|  1.07M|      resetLPCCoeffs = 1;
  503|  1.07M|    }
  504|       |
  505|  3.10M|    alphar[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  3.10M|  (FIXP_SGL)(                                                                \
  |  |  181|  3.10M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 3.10M, Folded]
  |  |  ------------------
  |  |  182|  3.10M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  3.10M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.10M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 3.10M]
  |  |  ------------------
  |  |  183|  3.10M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  3.10M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  3.10M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  3.10M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  3.10M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.10M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  3.10M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  506|  3.10M|    if (!useLP) alphai[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  2.40M|  (FIXP_SGL)(                                                                \
  |  |  181|  2.40M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 2.40M, Folded]
  |  |  ------------------
  |  |  182|  2.40M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  2.40M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.40M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 2.40M]
  |  |  ------------------
  |  |  183|  2.40M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  2.40M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  2.40M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  2.40M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  2.40M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.40M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  2.40M|          : ((((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 (506:9): [True: 2.40M, False: 695k]
  ------------------
  507|       |
  508|  3.10M|    if (ac.det != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  3.10M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.10M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.10M, Folded]
  |  |  ------------------
  |  |  194|  3.10M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.10M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.10M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.10M]
  |  |  ------------------
  |  |  195|  3.10M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.10M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.10M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.10M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.10M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.10M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.10M|          : ((((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 (508:9): [True: 2.02M, False: 1.08M]
  ------------------
  509|  2.02M|      FIXP_DBL tmp, absTmp, absDet;
  510|       |
  511|  2.02M|      absDet = fixp_abs(ac.det);
  ------------------
  |  |  305|  2.02M|#define fixp_abs(x) fAbs(x)
  ------------------
  512|       |
  513|  2.02M|      if (!useLP) {
  ------------------
  |  Branch (513:11): [True: 1.86M, False: 156k]
  ------------------
  514|  1.86M|        tmp = (fMultDiv2(ac.r01r, ac.r12r) >> (LPC_SCALE_FACTOR - 1)) -
  ------------------
  |  |  139|  1.86M|#define LPC_SCALE_FACTOR 2
  ------------------
  515|  1.86M|              ((fMultDiv2(ac.r01i, ac.r12i) + fMultDiv2(ac.r02r, ac.r11r)) >>
  516|  1.86M|               (LPC_SCALE_FACTOR - 1));
  ------------------
  |  |  139|  1.86M|#define LPC_SCALE_FACTOR 2
  ------------------
  517|  1.86M|      } else {
  518|   156k|        tmp = (fMultDiv2(ac.r01r, ac.r12r) >> (LPC_SCALE_FACTOR - 1)) -
  ------------------
  |  |  139|   156k|#define LPC_SCALE_FACTOR 2
  ------------------
  519|   156k|              (fMultDiv2(ac.r02r, ac.r11r) >> (LPC_SCALE_FACTOR - 1));
  ------------------
  |  |  139|   156k|#define LPC_SCALE_FACTOR 2
  ------------------
  520|   156k|      }
  521|  2.02M|      absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|  2.02M|#define fixp_abs(x) fAbs(x)
  ------------------
  522|       |
  523|       |      /*
  524|       |        Quick check: is first filter coeff >= 1(4)
  525|       |       */
  526|  2.02M|      {
  527|  2.02M|        INT scale;
  528|  2.02M|        FIXP_DBL result = fDivNorm(absTmp, absDet, &scale);
  529|  2.02M|        scale = scale + ac.det_scale;
  530|       |
  531|  2.02M|        if ((scale > 0) && (result >= (FIXP_DBL)MAXVAL_DBL >> scale)) {
  ------------------
  |  |  156|  65.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (531:13): [True: 65.2k, False: 1.95M]
  |  Branch (531:28): [True: 5.39k, False: 59.8k]
  ------------------
  532|  5.39k|          resetLPCCoeffs = 1;
  533|  2.01M|        } else {
  534|  2.01M|          alphar[1] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale));
  ------------------
  |  |  220|  2.01M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  2.01M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  2.01M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  535|  2.01M|          if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|  2.01M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 2.01M]
  |  |  ------------------
  |  |  211|  2.01M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  2.01M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.01M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|  2.01M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 2.01M]
  |  |  ------------------
  |  |  211|  2.01M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  2.01M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.01M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (535:15): [True: 1.75M, False: 261k]
  ------------------
  536|  1.75M|            alphar[1] = -alphar[1];
  537|  1.75M|          }
  538|  2.01M|        }
  539|  2.02M|      }
  540|       |
  541|  2.02M|      if (!useLP) {
  ------------------
  |  Branch (541:11): [True: 1.86M, False: 156k]
  ------------------
  542|  1.86M|        tmp = (fMultDiv2(ac.r01i, ac.r12r) >> (LPC_SCALE_FACTOR - 1)) +
  ------------------
  |  |  139|  1.86M|#define LPC_SCALE_FACTOR 2
  ------------------
  543|  1.86M|              ((fMultDiv2(ac.r01r, ac.r12i) -
  544|  1.86M|                (FIXP_DBL)fMultDiv2(ac.r02i, ac.r11r)) >>
  545|  1.86M|               (LPC_SCALE_FACTOR - 1));
  ------------------
  |  |  139|  1.86M|#define LPC_SCALE_FACTOR 2
  ------------------
  546|       |
  547|  1.86M|        absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|  1.86M|#define fixp_abs(x) fAbs(x)
  ------------------
  548|       |
  549|       |        /*
  550|       |        Quick check: is second filter coeff >= 1(4)
  551|       |        */
  552|  1.86M|        {
  553|  1.86M|          INT scale;
  554|  1.86M|          FIXP_DBL result = fDivNorm(absTmp, absDet, &scale);
  555|  1.86M|          scale = scale + ac.det_scale;
  556|       |
  557|  1.86M|          if ((scale > 0) &&
  ------------------
  |  Branch (557:15): [True: 115k, False: 1.75M]
  ------------------
  558|   115k|              (result >= /*FL2FXCONST_DBL(1.f)*/ (FIXP_DBL)MAXVAL_DBL >>
  ------------------
  |  |  156|   115k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (558:15): [True: 2.85k, False: 112k]
  ------------------
  559|   115k|               scale)) {
  560|  2.85k|            resetLPCCoeffs = 1;
  561|  1.86M|          } else {
  562|  1.86M|            alphai[1] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale));
  ------------------
  |  |  220|  1.86M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.86M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  563|  1.86M|            if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|  1.86M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 1.86M]
  |  |  ------------------
  |  |  211|  1.86M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  1.86M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|  1.86M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 1.86M]
  |  |  ------------------
  |  |  211|  1.86M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  1.86M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (563:17): [True: 688k, False: 1.17M]
  ------------------
  564|   688k|              alphai[1] = -alphai[1];
  565|   688k|            }
  566|  1.86M|          }
  567|  1.86M|        }
  568|  1.86M|      }
  569|  2.02M|    }
  570|       |
  571|  3.10M|    alphar[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  3.10M|  (FIXP_SGL)(                                                                \
  |  |  181|  3.10M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 3.10M, Folded]
  |  |  ------------------
  |  |  182|  3.10M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  3.10M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.10M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 3.10M]
  |  |  ------------------
  |  |  183|  3.10M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  3.10M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  3.10M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  3.10M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  3.10M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.10M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  3.10M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|  3.10M|    if (!useLP) alphai[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  2.40M|  (FIXP_SGL)(                                                                \
  |  |  181|  2.40M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 2.40M, Folded]
  |  |  ------------------
  |  |  182|  2.40M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  2.40M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.40M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 2.40M]
  |  |  ------------------
  |  |  183|  2.40M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  2.40M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  2.40M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  2.40M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  2.40M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.40M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  2.40M|          : ((((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 (572:9): [True: 2.40M, False: 695k]
  ------------------
  573|       |
  574|  3.10M|    if (ac.r11r != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  3.10M|  (FIXP_DBL)(                                                                \
  |  |  193|  3.10M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 3.10M, Folded]
  |  |  ------------------
  |  |  194|  3.10M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  3.10M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.10M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 3.10M]
  |  |  ------------------
  |  |  195|  3.10M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  3.10M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  3.10M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  3.10M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  3.10M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.10M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.10M|          : ((((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 (574:9): [True: 2.02M, False: 1.08M]
  ------------------
  575|       |      /* ac.r11r is always >=0 */
  576|  2.02M|      FIXP_DBL tmp, absTmp;
  577|       |
  578|  2.02M|      if (!useLP) {
  ------------------
  |  Branch (578:11): [True: 1.86M, False: 158k]
  ------------------
  579|  1.86M|        tmp = (ac.r01r >> (LPC_SCALE_FACTOR + 1)) +
  ------------------
  |  |  139|  1.86M|#define LPC_SCALE_FACTOR 2
  ------------------
  580|  1.86M|              (fMultDiv2(alphar[1], ac.r12r) + fMultDiv2(alphai[1], ac.r12i));
  581|  1.86M|      } else {
  582|   158k|        if (ac.r01r >= FL2FXCONST_DBL(0.0f))
  ------------------
  |  |  192|   158k|  (FIXP_DBL)(                                                                \
  |  |  193|   158k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 158k, Folded]
  |  |  ------------------
  |  |  194|   158k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   158k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   158k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 158k]
  |  |  ------------------
  |  |  195|   158k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   158k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   158k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   158k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   158k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   158k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   158k|          : ((((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 (582:13): [True: 104k, False: 53.9k]
  ------------------
  583|   104k|          tmp = (ac.r01r >> (LPC_SCALE_FACTOR + 1)) +
  ------------------
  |  |  139|   104k|#define LPC_SCALE_FACTOR 2
  ------------------
  584|   104k|                fMultDiv2(alphar[1], ac.r12r);
  585|  53.9k|        else
  586|  53.9k|          tmp = -((-ac.r01r) >> (LPC_SCALE_FACTOR + 1)) +
  ------------------
  |  |  139|  53.9k|#define LPC_SCALE_FACTOR 2
  ------------------
  587|  53.9k|                fMultDiv2(alphar[1], ac.r12r);
  588|   158k|      }
  589|       |
  590|  2.02M|      absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|  2.02M|#define fixp_abs(x) fAbs(x)
  ------------------
  591|       |
  592|       |      /*
  593|       |        Quick check: is first filter coeff >= 1(4)
  594|       |      */
  595|       |
  596|  2.02M|      if (absTmp >= (ac.r11r >> 1)) {
  ------------------
  |  Branch (596:11): [True: 2.83k, False: 2.02M]
  ------------------
  597|  2.83k|        resetLPCCoeffs = 1;
  598|  2.02M|      } else {
  599|  2.02M|        INT scale;
  600|  2.02M|        FIXP_DBL result = fDivNorm(absTmp, fixp_abs(ac.r11r), &scale);
  ------------------
  |  |  305|  2.02M|#define fixp_abs(x) fAbs(x)
  ------------------
  601|  2.02M|        alphar[0] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale + 1));
  ------------------
  |  |  220|  2.02M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  2.02M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  2.02M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  602|       |
  603|  2.02M|        if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))
  ------------------
  |  |  210|  2.02M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 2.02M]
  |  |  ------------------
  |  |  211|  2.02M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  2.02M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.02M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))
  ------------------
  |  |  210|  2.02M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 2.02M]
  |  |  ------------------
  |  |  211|  2.02M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  2.02M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.02M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (603:13): [True: 1.12M, False: 900k]
  ------------------
  604|  1.12M|          alphar[0] = -alphar[0];
  605|  2.02M|      }
  606|       |
  607|  2.02M|      if (!useLP) {
  ------------------
  |  Branch (607:11): [True: 1.86M, False: 158k]
  ------------------
  608|  1.86M|        tmp = (ac.r01i >> (LPC_SCALE_FACTOR + 1)) +
  ------------------
  |  |  139|  1.86M|#define LPC_SCALE_FACTOR 2
  ------------------
  609|  1.86M|              (fMultDiv2(alphai[1], ac.r12r) - fMultDiv2(alphar[1], ac.r12i));
  610|       |
  611|  1.86M|        absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|  1.86M|#define fixp_abs(x) fAbs(x)
  ------------------
  612|       |
  613|       |        /*
  614|       |        Quick check: is second filter coeff >= 1(4)
  615|       |        */
  616|  1.86M|        if (absTmp >= (ac.r11r >> 1)) {
  ------------------
  |  Branch (616:13): [True: 752, False: 1.86M]
  ------------------
  617|    752|          resetLPCCoeffs = 1;
  618|  1.86M|        } else {
  619|  1.86M|          INT scale;
  620|  1.86M|          FIXP_DBL result = fDivNorm(absTmp, fixp_abs(ac.r11r), &scale);
  ------------------
  |  |  305|  1.86M|#define fixp_abs(x) fAbs(x)
  ------------------
  621|  1.86M|          alphai[0] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale + 1));
  ------------------
  |  |  220|  1.86M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.86M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  622|  1.86M|          if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))
  ------------------
  |  |  210|  1.86M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 1.86M]
  |  |  ------------------
  |  |  211|  1.86M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  1.86M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))
  ------------------
  |  |  210|  1.86M|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 1.86M]
  |  |  ------------------
  |  |  211|  1.86M|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  1.86M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.86M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (622:15): [True: 847k, False: 1.01M]
  ------------------
  623|   847k|            alphai[0] = -alphai[0];
  624|  1.86M|        }
  625|  1.86M|      }
  626|  2.02M|    }
  627|       |
  628|  3.10M|    if (!useLP) {
  ------------------
  |  Branch (628:9): [True: 2.40M, False: 695k]
  ------------------
  629|       |      /* Now check the quadratic criteria */
  630|  2.40M|      if ((fMultDiv2(alphar[0], alphar[0]) + fMultDiv2(alphai[0], alphai[0])) >=
  ------------------
  |  Branch (630:11): [True: 793, False: 2.40M]
  ------------------
  631|  2.40M|          FL2FXCONST_DBL(0.5f))
  ------------------
  |  |  192|  2.40M|  (FIXP_DBL)(                                                                \
  |  |  193|  2.40M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.40M, Folded]
  |  |  ------------------
  |  |  194|  2.40M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.40M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.40M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.40M]
  |  |  ------------------
  |  |  195|  2.40M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.40M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.40M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.40M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.40M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.40M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.40M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  632|    793|        resetLPCCoeffs = 1;
  633|  2.40M|      if ((fMultDiv2(alphar[1], alphar[1]) + fMultDiv2(alphai[1], alphai[1])) >=
  ------------------
  |  Branch (633:11): [True: 564, False: 2.40M]
  ------------------
  634|  2.40M|          FL2FXCONST_DBL(0.5f))
  ------------------
  |  |  192|  2.40M|  (FIXP_DBL)(                                                                \
  |  |  193|  2.40M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.40M, Folded]
  |  |  ------------------
  |  |  194|  2.40M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.40M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.40M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.40M]
  |  |  ------------------
  |  |  195|  2.40M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.40M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.40M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.40M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.40M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.40M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.40M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  635|    564|        resetLPCCoeffs = 1;
  636|  2.40M|    }
  637|       |
  638|  3.10M|    if (resetLPCCoeffs) {
  ------------------
  |  Branch (638:9): [True: 1.08M, False: 2.02M]
  ------------------
  639|  1.08M|      alphar[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  1.08M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.08M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.08M, Folded]
  |  |  ------------------
  |  |  182|  1.08M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.08M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.08M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.08M]
  |  |  ------------------
  |  |  183|  1.08M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.08M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.08M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.08M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.08M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.08M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.08M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  640|  1.08M|      alphar[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  1.08M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.08M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.08M, Folded]
  |  |  ------------------
  |  |  182|  1.08M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.08M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.08M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.08M]
  |  |  ------------------
  |  |  183|  1.08M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.08M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.08M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.08M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.08M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.08M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.08M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  641|  1.08M|      if (!useLP) {
  ------------------
  |  Branch (641:11): [True: 542k, False: 540k]
  ------------------
  642|   542k|        alphai[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   542k|  (FIXP_SGL)(                                                                \
  |  |  181|   542k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 542k, Folded]
  |  |  ------------------
  |  |  182|   542k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   542k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   542k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 542k]
  |  |  ------------------
  |  |  183|   542k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   542k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   542k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   542k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   542k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   542k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   542k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  643|   542k|        alphai[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   542k|  (FIXP_SGL)(                                                                \
  |  |  181|   542k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 542k, Folded]
  |  |  ------------------
  |  |  182|   542k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   542k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   542k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 542k]
  |  |  ------------------
  |  |  183|   542k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   542k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   542k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   542k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   542k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   542k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   542k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  644|   542k|      }
  645|  1.08M|    }
  646|       |
  647|  3.10M|    if (useLP) {
  ------------------
  |  Branch (647:9): [True: 695k, False: 2.40M]
  ------------------
  648|       |      /* Aliasing detection */
  649|   695k|      if (ac.r11r == FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   695k|  (FIXP_DBL)(                                                                \
  |  |  193|   695k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 695k, Folded]
  |  |  ------------------
  |  |  194|   695k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   695k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   695k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 695k]
  |  |  ------------------
  |  |  195|   695k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   695k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   695k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   695k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   695k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   695k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   695k|          : ((((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 (649:11): [True: 537k, False: 158k]
  ------------------
  650|   537k|        k1 = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   537k|  (FIXP_DBL)(                                                                \
  |  |  193|   537k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 537k, Folded]
  |  |  ------------------
  |  |  194|   537k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   537k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   537k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 537k]
  |  |  ------------------
  |  |  195|   537k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   537k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   537k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   537k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   537k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   537k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   537k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  651|   537k|      } else {
  652|   158k|        if (fixp_abs(ac.r01r) >= fixp_abs(ac.r11r)) {
  ------------------
  |  |  305|   158k|#define fixp_abs(x) fAbs(x)
  ------------------
                      if (fixp_abs(ac.r01r) >= fixp_abs(ac.r11r)) {
  ------------------
  |  |  305|   158k|#define fixp_abs(x) fAbs(x)
  ------------------
  |  Branch (652:13): [True: 5.21k, False: 153k]
  ------------------
  653|  5.21k|          if (fMultDiv2(ac.r01r, ac.r11r) < FL2FX_DBL(0.0f)) {
  ------------------
  |  |  210|  5.21k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 5.21k]
  |  |  ------------------
  |  |  211|  5.21k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|  5.21k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.21k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (653:15): [True: 1.00k, False: 4.20k]
  ------------------
  654|  1.00k|            k1 = (FIXP_DBL)MAXVAL_DBL /*FL2FXCONST_SGL(1.0f)*/;
  ------------------
  |  |  156|  1.00k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  655|  4.20k|          } else {
  656|       |            /* Since this value is squared later, it must not ever become -1.0f.
  657|       |             */
  658|  4.20k|            k1 = (FIXP_DBL)(MINVAL_DBL + 1) /*FL2FXCONST_SGL(-1.0f)*/;
  ------------------
  |  |  158|  4.20k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  659|  4.20k|          }
  660|   153k|        } else {
  661|   153k|          INT scale;
  662|   153k|          FIXP_DBL result =
  663|   153k|              fDivNorm(fixp_abs(ac.r01r), fixp_abs(ac.r11r), &scale);
  ------------------
  |  |  305|   153k|#define fixp_abs(x) fAbs(x)
  ------------------
                            fDivNorm(fixp_abs(ac.r01r), fixp_abs(ac.r11r), &scale);
  ------------------
  |  |  305|   153k|#define fixp_abs(x) fAbs(x)
  ------------------
  664|   153k|          k1 = scaleValueSaturate(result, scale);
  665|       |
  666|   153k|          if (!((ac.r01r < FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))) {
  ------------------
  |  |  210|   153k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 153k]
  |  |  ------------------
  |  |  211|   153k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   153k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   153k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        if (!((ac.r01r < FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))) {
  ------------------
  |  |  210|   153k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 153k]
  |  |  ------------------
  |  |  211|   153k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   153k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   153k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (666:15): [True: 100k, False: 52.9k]
  ------------------
  667|   100k|            k1 = -k1;
  668|   100k|          }
  669|   153k|        }
  670|   158k|      }
  671|   695k|      if ((loBand > 1) && (loBand < v_k_master0)) {
  ------------------
  |  Branch (671:11): [True: 688k, False: 7.07k]
  |  Branch (671:27): [True: 574k, False: 114k]
  ------------------
  672|       |        /* Check if the gain should be locked */
  673|   574k|        FIXP_DBL deg =
  674|   574k|            /*FL2FXCONST_DBL(1.0f)*/ (FIXP_DBL)MAXVAL_DBL - fPow2(k1_below);
  ------------------
  |  |  156|   574k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  675|   574k|        degreeAlias[loBand] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   574k|  (FIXP_DBL)(                                                                \
  |  |  193|   574k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 574k, Folded]
  |  |  ------------------
  |  |  194|   574k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   574k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   574k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 574k]
  |  |  ------------------
  |  |  195|   574k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   574k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   574k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   574k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   574k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   574k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   574k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  676|   574k|        if (((loBand & 1) == 0) && (k1 < FL2FXCONST_DBL(0.0f))) {
  ------------------
  |  |  192|   288k|  (FIXP_DBL)(                                                                \
  |  |  193|   288k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 288k, Folded]
  |  |  ------------------
  |  |  194|   288k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   288k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   288k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 288k]
  |  |  ------------------
  |  |  195|   288k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   288k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   288k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   288k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   288k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   288k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   288k|          : ((((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 (676:13): [True: 288k, False: 286k]
  |  Branch (676:36): [True: 46.2k, False: 242k]
  ------------------
  677|  46.2k|          if (k1_below < FL2FXCONST_DBL(0.0f)) { /* 2-Ch Aliasing Detection */
  ------------------
  |  |  192|  46.2k|  (FIXP_DBL)(                                                                \
  |  |  193|  46.2k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 46.2k, Folded]
  |  |  ------------------
  |  |  194|  46.2k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  46.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  46.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 46.2k]
  |  |  ------------------
  |  |  195|  46.2k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  46.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  46.2k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  46.2k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  46.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  46.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  46.2k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (677:15): [True: 24.1k, False: 22.1k]
  ------------------
  678|  24.1k|            degreeAlias[loBand] = (FIXP_DBL)MAXVAL_DBL /*FL2FXCONST_DBL(1.0f)*/;
  ------------------
  |  |  156|  24.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  679|  24.1k|            if (k1_below2 >
  ------------------
  |  Branch (679:17): [True: 6.00k, False: 18.1k]
  ------------------
  680|  24.1k|                FL2FXCONST_DBL(0.0f)) { /* 3-Ch Aliasing Detection */
  ------------------
  |  |  192|  24.1k|  (FIXP_DBL)(                                                                \
  |  |  193|  24.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 24.1k, Folded]
  |  |  ------------------
  |  |  194|  24.1k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  24.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 24.1k]
  |  |  ------------------
  |  |  195|  24.1k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  24.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  24.1k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  24.1k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  24.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  24.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  681|  6.00k|              degreeAlias[loBand - 1] = deg;
  682|  6.00k|            }
  683|  24.1k|          } else if (k1_below2 >
  ------------------
  |  Branch (683:22): [True: 3.95k, False: 18.1k]
  ------------------
  684|  22.1k|                     FL2FXCONST_DBL(0.0f)) { /* 3-Ch Aliasing Detection */
  ------------------
  |  |  192|  22.1k|  (FIXP_DBL)(                                                                \
  |  |  193|  22.1k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 22.1k, Folded]
  |  |  ------------------
  |  |  194|  22.1k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  22.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  22.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 22.1k]
  |  |  ------------------
  |  |  195|  22.1k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  22.1k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  22.1k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  22.1k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  22.1k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  22.1k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  22.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  685|  3.95k|            degreeAlias[loBand] = deg;
  686|  3.95k|          }
  687|  46.2k|        }
  688|   574k|        if (((loBand & 1) == 1) && (k1 > FL2FXCONST_DBL(0.0f))) {
  ------------------
  |  |  192|   286k|  (FIXP_DBL)(                                                                \
  |  |  193|   286k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 286k, Folded]
  |  |  ------------------
  |  |  194|   286k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   286k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   286k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 286k]
  |  |  ------------------
  |  |  195|   286k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   286k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   286k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   286k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   286k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   286k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   286k|          : ((((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 (688:13): [True: 286k, False: 288k]
  |  Branch (688:36): [True: 24.9k, False: 261k]
  ------------------
  689|  24.9k|          if (k1_below > FL2FXCONST_DBL(0.0f)) { /* 2-CH Aliasing Detection */
  ------------------
  |  |  192|  24.9k|  (FIXP_DBL)(                                                                \
  |  |  193|  24.9k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 24.9k, Folded]
  |  |  ------------------
  |  |  194|  24.9k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  24.9k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 24.9k]
  |  |  ------------------
  |  |  195|  24.9k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  24.9k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  24.9k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  24.9k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  24.9k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  24.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  24.9k|          : ((((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 (689:15): [True: 8.90k, False: 16.0k]
  ------------------
  690|  8.90k|            degreeAlias[loBand] = (FIXP_DBL)MAXVAL_DBL /*FL2FXCONST_DBL(1.0f)*/;
  ------------------
  |  |  156|  8.90k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  691|  8.90k|            if (k1_below2 <
  ------------------
  |  Branch (691:17): [True: 2.30k, False: 6.60k]
  ------------------
  692|  8.90k|                FL2FXCONST_DBL(0.0f)) { /* 3-CH Aliasing Detection */
  ------------------
  |  |  192|  8.90k|  (FIXP_DBL)(                                                                \
  |  |  193|  8.90k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 8.90k, Folded]
  |  |  ------------------
  |  |  194|  8.90k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  8.90k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.90k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 8.90k]
  |  |  ------------------
  |  |  195|  8.90k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  8.90k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  8.90k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  8.90k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  8.90k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.90k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  8.90k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  693|  2.30k|              degreeAlias[loBand - 1] = deg;
  694|  2.30k|            }
  695|  16.0k|          } else if (k1_below2 <
  ------------------
  |  Branch (695:22): [True: 7.30k, False: 8.75k]
  ------------------
  696|  16.0k|                     FL2FXCONST_DBL(0.0f)) { /* 3-CH Aliasing Detection */
  ------------------
  |  |  192|  16.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.0k, Folded]
  |  |  ------------------
  |  |  194|  16.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.0k]
  |  |  ------------------
  |  |  195|  16.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  697|  7.30k|            degreeAlias[loBand] = deg;
  698|  7.30k|          }
  699|  24.9k|        }
  700|   574k|      }
  701|       |      /* remember k1 values of the 2 QMF channels below the current channel */
  702|   695k|      k1_below2 = k1_below;
  703|   695k|      k1_below = k1;
  704|   695k|    }
  705|       |
  706|  3.10M|    patch = 0;
  707|       |
  708|  10.7M|    while (patch < pSettings->noOfPatches) { /* inner loop over every patch */
  ------------------
  |  Branch (708:12): [True: 7.63M, False: 3.10M]
  ------------------
  709|       |
  710|  7.63M|      int hiBand = loBand + patchParam[patch].targetBandOffs;
  711|       |
  712|  7.63M|      if (loBand < patchParam[patch].sourceStartBand ||
  ------------------
  |  Branch (712:11): [True: 2.24M, False: 5.38M]
  ------------------
  713|  5.38M|          loBand >= patchParam[patch].sourceStopBand
  ------------------
  |  Branch (713:11): [True: 346k, False: 5.03M]
  ------------------
  714|       |          //|| hiBand >= hLppTrans->pSettings->noChannels
  715|  7.63M|      ) {
  716|       |        /* Lowband not in current patch - proceed */
  717|  2.59M|        patch++;
  718|  2.59M|        continue;
  719|  2.59M|      }
  720|       |
  721|  5.03M|      FDK_ASSERT(hiBand < (64));
  ------------------
  |  |  221|  5.03M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (721:7): [True: 5.03M, False: 0]
  ------------------
  722|       |
  723|       |      /* bwIndex[patch] is already initialized with value from previous band
  724|       |       * inside this patch */
  725|  5.71M|      while (hiBand >= pSettings->bwBorders[bwIndex[patch]] &&
  ------------------
  |  Branch (725:14): [True: 679k, False: 5.03M]
  ------------------
  726|   679k|             bwIndex[patch] < MAX_NUM_PATCHES - 1) {
  ------------------
  |  |  161|   679k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (726:14): [True: 679k, False: 0]
  ------------------
  727|   679k|        bwIndex[patch]++;
  728|   679k|      }
  729|       |
  730|       |      /*
  731|       |        Filter Step 2: add the left slope with the current filter to the buffer
  732|       |                       pure source values are already in there
  733|       |      */
  734|  5.03M|      bw = FX_DBL2FX_SGL(bwVector[bwIndex[patch]]);
  ------------------
  |  |  220|  5.03M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  5.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  5.03M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  735|       |
  736|  5.03M|      a0r = FX_DBL2FX_SGL(
  ------------------
  |  |  220|  5.03M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  5.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  5.03M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  737|  5.03M|          fMult(bw, alphar[0])); /* Apply current bandwidth expansion factor */
  738|       |
  739|  5.03M|      if (!useLP) a0i = FX_DBL2FX_SGL(fMult(bw, alphai[0]));
  ------------------
  |  |  220|  4.47M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  4.47M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  4.47M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  |  Branch (739:11): [True: 4.47M, False: 559k]
  ------------------
  740|  5.03M|      bw = FX_DBL2FX_SGL(fPow2(bw));
  ------------------
  |  |  220|  5.03M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  5.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  5.03M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  741|  5.03M|      a1r = FX_DBL2FX_SGL(fMult(bw, alphar[1]));
  ------------------
  |  |  220|  5.03M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  5.03M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  5.03M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  742|  5.03M|      if (!useLP) a1i = FX_DBL2FX_SGL(fMult(bw, alphai[1]));
  ------------------
  |  |  220|  4.47M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  4.47M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  4.47M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  |  Branch (742:11): [True: 4.47M, False: 559k]
  ------------------
  743|       |
  744|       |      /*
  745|       |        Filter Step 3: insert the middle part which won't be windowed
  746|       |      */
  747|  5.03M|      if (bw <= FL2FXCONST_SGL(0.0f)) {
  ------------------
  |  |  180|  5.03M|  (FIXP_SGL)(                                                                \
  |  |  181|  5.03M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.03M, Folded]
  |  |  ------------------
  |  |  182|  5.03M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.03M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.03M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.03M]
  |  |  ------------------
  |  |  183|  5.03M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.03M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.03M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.03M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.03M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.03M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.03M|          : ((((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 (747:11): [True: 1.91M, False: 3.12M]
  ------------------
  748|  1.91M|        if (!useLP) {
  ------------------
  |  Branch (748:13): [True: 1.51M, False: 394k]
  ------------------
  749|  1.51M|          int descale =
  750|  1.51M|              fixMin(DFRACT_BITS - 1, (LPC_SCALE_FACTOR + dynamicScale));
  ------------------
  |  |  306|  1.51M|#define fixMin(a, b) fMin(a, b)
  ------------------
  751|  51.4M|          for (i = startSample; i < stopSample; i++) {
  ------------------
  |  Branch (751:33): [True: 49.9M, False: 1.51M]
  ------------------
  752|  49.9M|            FIXP_DBL accu1, accu2;
  753|  49.9M|            accu1 = lowBandReal[LPC_ORDER + i] >> descale;
  ------------------
  |  |  122|  49.9M|#define LPC_ORDER 2
  ------------------
  754|  49.9M|            accu2 = lowBandImag[LPC_ORDER + i] >> descale;
  ------------------
  |  |  122|  49.9M|#define LPC_ORDER 2
  ------------------
  755|  49.9M|            if (fPreWhitening) {
  ------------------
  |  Branch (755:17): [True: 19.7M, False: 30.1M]
  ------------------
  756|  19.7M|              accu1 = scaleValueSaturate(
  757|  19.7M|                  fMultDiv2(accu1, preWhiteningGains[loBand]),
  758|  19.7M|                  preWhiteningGains_exp[loBand] + 1);
  759|  19.7M|              accu2 = scaleValueSaturate(
  760|  19.7M|                  fMultDiv2(accu2, preWhiteningGains[loBand]),
  761|  19.7M|                  preWhiteningGains_exp[loBand] + 1);
  762|  19.7M|            }
  763|  49.9M|            qmfBufferReal[i][hiBand] = accu1;
  764|  49.9M|            qmfBufferImag[i][hiBand] = accu2;
  765|  49.9M|          }
  766|  1.51M|        } else {
  767|   394k|          int descale =
  768|   394k|              fixMin(DFRACT_BITS - 1, (LPC_SCALE_FACTOR + dynamicScale));
  ------------------
  |  |  306|   394k|#define fixMin(a, b) fMin(a, b)
  ------------------
  769|  11.9M|          for (i = startSample; i < stopSample; i++) {
  ------------------
  |  Branch (769:33): [True: 11.5M, False: 394k]
  ------------------
  770|  11.5M|            qmfBufferReal[i][hiBand] = lowBandReal[LPC_ORDER + i] >> descale;
  ------------------
  |  |  122|  11.5M|#define LPC_ORDER 2
  ------------------
  771|  11.5M|          }
  772|   394k|        }
  773|  3.12M|      } else { /* bw <= 0 */
  774|       |
  775|  3.12M|        if (!useLP) {
  ------------------
  |  Branch (775:13): [True: 2.95M, False: 165k]
  ------------------
  776|  2.95M|          const int dynscale = fixMax(0, dynamicScale - 2) + 1;
  ------------------
  |  |  307|  2.95M|#define fixMax(a, b) fMax(a, b)
  ------------------
  777|  2.95M|          const int rescale = -fixMin(0, dynamicScale - 2) + 1;
  ------------------
  |  |  306|  2.95M|#define fixMin(a, b) fMin(a, b)
  ------------------
  778|  2.95M|          const int descale = fixMin(DFRACT_BITS - 1,
  ------------------
  |  |  306|  2.95M|#define fixMin(a, b) fMin(a, b)
  ------------------
  779|  2.95M|                                     LPC_SCALE_FACTOR + dynamicScale + rescale);
  780|       |
  781|   100M|          for (i = startSample; i < stopSample; i++) {
  ------------------
  |  Branch (781:33): [True: 97.6M, False: 2.95M]
  ------------------
  782|  97.6M|            FIXP_DBL accu1, accu2;
  783|       |
  784|  97.6M|            accu1 = ((fMultDiv2(a0r, lowBandReal[LPC_ORDER + i - 1]) -
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  785|  97.6M|                      fMultDiv2(a0i, lowBandImag[LPC_ORDER + i - 1])) >>
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  786|  97.6M|                     1) +
  787|  97.6M|                    ((fMultDiv2(a1r, lowBandReal[LPC_ORDER + i - 2]) -
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  788|  97.6M|                      fMultDiv2(a1i, lowBandImag[LPC_ORDER + i - 2])) >>
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  789|  97.6M|                     1);
  790|  97.6M|            accu2 = ((fMultDiv2(a0i, lowBandReal[LPC_ORDER + i - 1]) +
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  791|  97.6M|                      fMultDiv2(a0r, lowBandImag[LPC_ORDER + i - 1])) >>
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  792|  97.6M|                     1) +
  793|  97.6M|                    ((fMultDiv2(a1i, lowBandReal[LPC_ORDER + i - 2]) +
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  794|  97.6M|                      fMultDiv2(a1r, lowBandImag[LPC_ORDER + i - 2])) >>
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  795|  97.6M|                     1);
  796|       |
  797|  97.6M|            accu1 =
  798|  97.6M|                (lowBandReal[LPC_ORDER + i] >> descale) + (accu1 >> dynscale);
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  799|  97.6M|            accu2 =
  800|  97.6M|                (lowBandImag[LPC_ORDER + i] >> descale) + (accu2 >> dynscale);
  ------------------
  |  |  122|  97.6M|#define LPC_ORDER 2
  ------------------
  801|  97.6M|            if (fPreWhitening) {
  ------------------
  |  Branch (801:17): [True: 14.4M, False: 83.1M]
  ------------------
  802|  14.4M|              qmfBufferReal[i][hiBand] = scaleValueSaturate(
  803|  14.4M|                  fMultDiv2(accu1, preWhiteningGains[loBand]),
  804|  14.4M|                  preWhiteningGains_exp[loBand] + 1 + rescale);
  805|  14.4M|              qmfBufferImag[i][hiBand] = scaleValueSaturate(
  806|  14.4M|                  fMultDiv2(accu2, preWhiteningGains[loBand]),
  807|  14.4M|                  preWhiteningGains_exp[loBand] + 1 + rescale);
  808|  83.1M|            } else {
  809|  83.1M|              qmfBufferReal[i][hiBand] =
  810|  83.1M|                  SATURATE_LEFT_SHIFT(accu1, rescale, DFRACT_BITS);
  ------------------
  |  |  251|  83.1M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 83.1M]
  |  |  ------------------
  |  |  252|  83.1M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  83.1M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 83.1M]
  |  |  ------------------
  |  |  254|  83.1M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  83.1M|             : ((LONG)(src) << (scale)))
  ------------------
  811|  83.1M|              qmfBufferImag[i][hiBand] =
  812|  83.1M|                  SATURATE_LEFT_SHIFT(accu2, rescale, DFRACT_BITS);
  ------------------
  |  |  251|  83.1M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 83.1M]
  |  |  ------------------
  |  |  252|  83.1M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  83.1M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 83.1M]
  |  |  ------------------
  |  |  254|  83.1M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  83.1M|             : ((LONG)(src) << (scale)))
  ------------------
  813|  83.1M|            }
  814|  97.6M|          }
  815|  2.95M|        } else {
  816|   165k|          FDK_ASSERT(dynamicScale >= 0);
  ------------------
  |  |  221|   165k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (816:11): [True: 165k, False: 0]
  ------------------
  817|   165k|          calc_qmfBufferReal(
  818|   165k|              qmfBufferReal, &(lowBandReal[LPC_ORDER + startSample - 2]),
  ------------------
  |  |  122|   165k|#define LPC_ORDER 2
  ------------------
  819|   165k|              startSample, stopSample, hiBand, dynamicScale, a0r, a1r);
  820|   165k|        }
  821|  3.12M|      } /* bw <= 0 */
  822|       |
  823|  5.03M|      patch++;
  824|       |
  825|  5.03M|    } /* inner loop over patches */
  826|       |
  827|       |    /*
  828|       |     * store the unmodified filter coefficients if there is
  829|       |     * an overlapping envelope
  830|       |     *****************************************************************/
  831|       |
  832|  3.10M|  } /* outer loop over bands (loBand) */
  833|       |
  834|   222k|  if (useLP) {
  ------------------
  |  Branch (834:7): [True: 42.7k, False: 179k]
  ------------------
  835|  42.7k|    for (loBand = pSettings->lbStartPatching;
  836|   512k|         loBand < pSettings->lbStopPatching; loBand++) {
  ------------------
  |  Branch (836:10): [True: 469k, False: 42.7k]
  ------------------
  837|   469k|      patch = 0;
  838|  1.07M|      while (patch < pSettings->noOfPatches) {
  ------------------
  |  Branch (838:14): [True: 600k, False: 469k]
  ------------------
  839|   600k|        UCHAR hiBand = loBand + patchParam[patch].targetBandOffs;
  840|       |
  841|   600k|        if (loBand < patchParam[patch].sourceStartBand ||
  ------------------
  |  Branch (841:13): [True: 37.6k, False: 562k]
  ------------------
  842|   562k|            loBand >= patchParam[patch].sourceStopBand ||
  ------------------
  |  Branch (842:13): [True: 3.01k, False: 559k]
  ------------------
  843|   559k|            hiBand >= (64) /* Highband out of range (biterror) */
  ------------------
  |  Branch (843:13): [True: 0, False: 559k]
  ------------------
  844|   600k|        ) {
  845|       |          /* Lowband not in current patch or highband out of range (might be
  846|       |           * caused by biterrors)- proceed */
  847|  40.6k|          patch++;
  848|  40.6k|          continue;
  849|  40.6k|        }
  850|       |
  851|   559k|        if (hiBand != patchParam[patch].targetStartBand)
  ------------------
  |  Branch (851:13): [True: 507k, False: 52.7k]
  ------------------
  852|   507k|          degreeAlias[hiBand] = degreeAlias[loBand];
  853|       |
  854|   559k|        patch++;
  855|   559k|      }
  856|   469k|    } /* end  for loop */
  857|  42.7k|  }
  858|       |
  859|   719k|  for (i = 0; i < nInvfBands; i++) {
  ------------------
  |  Branch (859:15): [True: 496k, False: 222k]
  ------------------
  860|   496k|    hLppTrans->bwVectorOld[i] = bwVector[i];
  861|   496k|  }
  862|       |
  863|       |  /*
  864|       |    set high band scale factor
  865|       |  */
  866|   222k|  sbrScaleFactor->hb_scale = comLowBandScale - (LPC_SCALE_FACTOR);
  ------------------
  |  |  139|   222k|#define LPC_SCALE_FACTOR 2
  ------------------
  867|   222k|}
_Z16lppTransposerHBEP13SBR_LPP_TRANSP13hbeTransposerP16QMF_SCALE_FACTORPPiS6_iiiiP9INVF_MODES8_:
  883|  36.8k|) {
  884|  36.8k|  INT bwIndex;
  885|  36.8k|  FIXP_DBL bwVector[MAX_NUM_PATCHES_HBE]; /*!< pole moving factors */
  886|       |
  887|  36.8k|  int i;
  888|  36.8k|  int loBand, start, stop;
  889|  36.8k|  TRANSPOSER_SETTINGS *pSettings = hLppTrans->pSettings;
  890|  36.8k|  PATCH_PARAM *patchParam = pSettings->patchParam;
  891|       |
  892|  36.8k|  FIXP_SGL alphar[LPC_ORDER], a0r, a1r;
  893|  36.8k|  FIXP_SGL alphai[LPC_ORDER], a0i = 0, a1i = 0;
  894|  36.8k|  FIXP_SGL bw = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  36.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  36.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 36.8k, Folded]
  |  |  ------------------
  |  |  182|  36.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  36.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  36.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 36.8k]
  |  |  ------------------
  |  |  183|  36.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  36.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  36.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  36.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  36.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  36.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  36.8k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  895|       |
  896|  36.8k|  int autoCorrLength;
  897|       |
  898|  36.8k|  ACORR_COEFS ac;
  899|  36.8k|  int startSample;
  900|  36.8k|  int stopSample;
  901|  36.8k|  int stopSampleClear;
  902|       |
  903|  36.8k|  int comBandScale;
  904|  36.8k|  int ovLowBandShift;
  905|  36.8k|  int lowBandShift;
  906|       |  /*  int ovHighBandShift;*/
  907|       |
  908|  36.8k|  alphai[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  36.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  36.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 36.8k, Folded]
  |  |  ------------------
  |  |  182|  36.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  36.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  36.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 36.8k]
  |  |  ------------------
  |  |  183|  36.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  36.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  36.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  36.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  36.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  36.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  36.8k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  909|  36.8k|  alphai[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  36.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  36.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 36.8k, Folded]
  |  |  ------------------
  |  |  182|  36.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  36.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  36.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 36.8k]
  |  |  ------------------
  |  |  183|  36.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  36.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  36.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  36.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  36.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  36.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  36.8k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  910|       |
  911|  36.8k|  startSample = firstSlotOffs * timeStep;
  912|  36.8k|  stopSample = pSettings->nCols + lastSlotOffs * timeStep;
  913|       |
  914|  36.8k|  inverseFilteringLevelEmphasis(hLppTrans, nInvfBands, sbr_invf_mode,
  915|  36.8k|                                sbr_invf_mode_prev, bwVector);
  916|       |
  917|  36.8k|  stopSampleClear = stopSample;
  918|       |
  919|  36.8k|  autoCorrLength = pSettings->nCols + pSettings->overlap;
  920|       |
  921|  36.8k|  if (pSettings->noOfPatches > 0) {
  ------------------
  |  Branch (921:7): [True: 36.8k, False: 0]
  ------------------
  922|       |    /* Set upper subbands to zero:
  923|       |       This is required in case that the patches do not cover the complete
  924|       |       highband (because the last patch would be too short). Possible
  925|       |       optimization: Clearing bands up to usb would be sufficient here. */
  926|  36.8k|    int targetStopBand =
  927|  36.8k|        patchParam[pSettings->noOfPatches - 1].targetStartBand +
  928|  36.8k|        patchParam[pSettings->noOfPatches - 1].numBandsInPatch;
  929|       |
  930|  36.8k|    int memSize = ((64) - targetStopBand) * sizeof(FIXP_DBL);
  931|       |
  932|  1.81M|    for (i = startSample; i < stopSampleClear; i++) {
  ------------------
  |  Branch (932:27): [True: 1.78M, False: 36.8k]
  ------------------
  933|  1.78M|      FDKmemclear(&qmfBufferReal[i][targetStopBand], memSize);
  934|  1.78M|      FDKmemclear(&qmfBufferImag[i][targetStopBand], memSize);
  935|  1.78M|    }
  936|  36.8k|  }
  937|       |#if defined __ANDROID__ && !defined __ANDROID_NDK__
  938|       |  else {
  939|       |    // Safetynet logging
  940|       |    android_errorWriteLog(0x534e4554, "112160868");
  941|       |  }
  942|       |#endif
  943|       |
  944|       |  /*
  945|       |  Calc common low band scale factor
  946|       |  */
  947|  36.8k|  comBandScale = sbrScaleFactor->hb_scale;
  948|       |
  949|  36.8k|  ovLowBandShift = sbrScaleFactor->hb_scale - comBandScale;
  950|  36.8k|  lowBandShift = sbrScaleFactor->hb_scale - comBandScale;
  951|       |  /*  ovHighBandShift = firstSlotOffs == 0 ? ovLowBandShift:0;*/
  952|       |
  953|       |  /* outer loop over bands to do analysis only once for each band */
  954|       |
  955|  36.8k|  start = hQmfTransposer->startBand;
  956|  36.8k|  stop = hQmfTransposer->stopBand;
  957|       |
  958|  1.29M|  for (loBand = start; loBand < stop; loBand++) {
  ------------------
  |  Branch (958:24): [True: 1.26M, False: 36.8k]
  ------------------
  959|  1.26M|    bwIndex = 0;
  960|       |
  961|  1.26M|    FIXP_DBL lowBandReal[(((1024) / (32) * (4) / 2) + (3 * (4))) + LPC_ORDER];
  962|  1.26M|    FIXP_DBL lowBandImag[(((1024) / (32) * (4) / 2) + (3 * (4))) + LPC_ORDER];
  963|       |
  964|  1.26M|    int resetLPCCoeffs = 0;
  965|  1.26M|    int dynamicScale = DFRACT_BITS - 1 - LPC_SCALE_FACTOR;
  ------------------
  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                  int dynamicScale = DFRACT_BITS - 1 - LPC_SCALE_FACTOR;
  ------------------
  |  |  139|  1.26M|#define LPC_SCALE_FACTOR 2
  ------------------
  966|  1.26M|    int acDetScale = 0; /* scaling of autocorrelation determinant */
  967|       |
  968|  3.78M|    for (i = 0; i < LPC_ORDER; i++) {
  ------------------
  |  |  122|  3.78M|#define LPC_ORDER 2
  ------------------
  |  Branch (968:17): [True: 2.52M, False: 1.26M]
  ------------------
  969|  2.52M|      lowBandReal[i] = hLppTrans->lpcFilterStatesRealHBE[i][loBand];
  970|  2.52M|      lowBandImag[i] = hLppTrans->lpcFilterStatesImagHBE[i][loBand];
  971|  2.52M|    }
  972|       |
  973|  2.78M|    for (; i < LPC_ORDER + firstSlotOffs * timeStep; i++) {
  ------------------
  |  |  122|  2.78M|#define LPC_ORDER 2
  ------------------
  |  Branch (973:12): [True: 1.52M, False: 1.26M]
  ------------------
  974|  1.52M|      lowBandReal[i] = hLppTrans->lpcFilterStatesRealHBE[i][loBand];
  975|  1.52M|      lowBandImag[i] = hLppTrans->lpcFilterStatesImagHBE[i][loBand];
  976|  1.52M|    }
  977|       |
  978|       |    /*
  979|       |    Take old slope length qmf slot source values out of (overlap)qmf buffer
  980|       |    */
  981|  1.26M|    for (i = firstSlotOffs * timeStep;
  982|  66.8M|         i < pSettings->nCols + pSettings->overlap; i++) {
  ------------------
  |  Branch (982:10): [True: 65.5M, False: 1.26M]
  ------------------
  983|  65.5M|      lowBandReal[i + LPC_ORDER] = qmfBufferReal[i][loBand];
  ------------------
  |  |  122|  65.5M|#define LPC_ORDER 2
  ------------------
  984|  65.5M|      lowBandImag[i + LPC_ORDER] = qmfBufferImag[i][loBand];
  ------------------
  |  |  122|  65.5M|#define LPC_ORDER 2
  ------------------
  985|  65.5M|    }
  986|       |
  987|       |    /* store unmodified values to buffer */
  988|  14.3M|    for (i = 0; i < LPC_ORDER + pSettings->overlap; i++) {
  ------------------
  |  |  122|  14.3M|#define LPC_ORDER 2
  ------------------
  |  Branch (988:17): [True: 13.1M, False: 1.26M]
  ------------------
  989|  13.1M|      hLppTrans->lpcFilterStatesRealHBE[i][loBand] =
  990|  13.1M|          qmfBufferReal[pSettings->nCols - LPC_ORDER + i][loBand];
  ------------------
  |  |  122|  13.1M|#define LPC_ORDER 2
  ------------------
  991|  13.1M|      hLppTrans->lpcFilterStatesImagHBE[i][loBand] =
  992|  13.1M|          qmfBufferImag[pSettings->nCols - LPC_ORDER + i][loBand];
  ------------------
  |  |  122|  13.1M|#define LPC_ORDER 2
  ------------------
  993|  13.1M|    }
  994|       |
  995|       |    /*
  996|       |    Determine dynamic scaling value.
  997|       |    */
  998|  1.26M|    dynamicScale =
  999|  1.26M|        fixMin(dynamicScale,
  ------------------
  |  |  306|  1.26M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1000|  1.26M|               getScalefactor(lowBandReal, LPC_ORDER + pSettings->overlap) +
 1001|  1.26M|                   ovLowBandShift);
 1002|  1.26M|    dynamicScale =
 1003|  1.26M|        fixMin(dynamicScale,
  ------------------
  |  |  306|  1.26M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1004|  1.26M|               getScalefactor(&lowBandReal[LPC_ORDER + pSettings->overlap],
 1005|  1.26M|                              pSettings->nCols) +
 1006|  1.26M|                   lowBandShift);
 1007|  1.26M|    dynamicScale =
 1008|  1.26M|        fixMin(dynamicScale,
  ------------------
  |  |  306|  1.26M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1009|  1.26M|               getScalefactor(lowBandImag, LPC_ORDER + pSettings->overlap) +
 1010|  1.26M|                   ovLowBandShift);
 1011|  1.26M|    dynamicScale =
 1012|  1.26M|        fixMin(dynamicScale,
  ------------------
  |  |  306|  1.26M|#define fixMin(a, b) fMin(a, b)
  ------------------
 1013|  1.26M|               getScalefactor(&lowBandImag[LPC_ORDER + pSettings->overlap],
 1014|  1.26M|                              pSettings->nCols) +
 1015|  1.26M|                   lowBandShift);
 1016|       |
 1017|  1.26M|    dynamicScale =
 1018|  1.26M|        dynamicScale - 1; /* one additional bit headroom to prevent -1.0 */
 1019|       |
 1020|       |    /*
 1021|       |    Scale temporal QMF buffer.
 1022|       |    */
 1023|  1.26M|    scaleValues(&lowBandReal[0], LPC_ORDER + pSettings->overlap,
  ------------------
  |  |  122|  1.26M|#define LPC_ORDER 2
  ------------------
 1024|  1.26M|                dynamicScale - ovLowBandShift);
 1025|  1.26M|    scaleValues(&lowBandReal[LPC_ORDER + pSettings->overlap], pSettings->nCols,
  ------------------
  |  |  122|  1.26M|#define LPC_ORDER 2
  ------------------
 1026|  1.26M|                dynamicScale - lowBandShift);
 1027|  1.26M|    scaleValues(&lowBandImag[0], LPC_ORDER + pSettings->overlap,
  ------------------
  |  |  122|  1.26M|#define LPC_ORDER 2
  ------------------
 1028|  1.26M|                dynamicScale - ovLowBandShift);
 1029|  1.26M|    scaleValues(&lowBandImag[LPC_ORDER + pSettings->overlap], pSettings->nCols,
  ------------------
  |  |  122|  1.26M|#define LPC_ORDER 2
  ------------------
 1030|  1.26M|                dynamicScale - lowBandShift);
 1031|       |
 1032|  1.26M|    acDetScale += autoCorr2nd_cplx(&ac, lowBandReal + LPC_ORDER,
  ------------------
  |  |  122|  1.26M|#define LPC_ORDER 2
  ------------------
 1033|  1.26M|                                   lowBandImag + LPC_ORDER, autoCorrLength);
  ------------------
  |  |  122|  1.26M|#define LPC_ORDER 2
  ------------------
 1034|       |
 1035|       |    /* Examine dynamic of determinant in autocorrelation. */
 1036|  1.26M|    acDetScale += 2 * (comBandScale + dynamicScale);
 1037|  1.26M|    acDetScale *= 2;            /* two times reflection coefficent scaling */
 1038|  1.26M|    acDetScale += ac.det_scale; /* ac scaling of determinant */
 1039|       |
 1040|       |    /* In case of determinant < 10^-38, resetLPCCoeffs=1 has to be enforced. */
 1041|  1.26M|    if (acDetScale > 126) {
  ------------------
  |  Branch (1041:9): [True: 564k, False: 695k]
  ------------------
 1042|   564k|      resetLPCCoeffs = 1;
 1043|   564k|    }
 1044|       |
 1045|  1.26M|    alphar[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  1.26M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  182|  1.26M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  183|  1.26M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.26M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.26M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.26M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.26M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1046|  1.26M|    alphai[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  1.26M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  182|  1.26M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  183|  1.26M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.26M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.26M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.26M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.26M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1047|       |
 1048|  1.26M|    if (ac.det != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  1.26M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  194|  1.26M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  195|  1.26M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.26M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.26M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.26M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.26M|          : ((((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 (1048:9): [True: 692k, False: 568k]
  ------------------
 1049|   692k|      FIXP_DBL tmp, absTmp, absDet;
 1050|       |
 1051|   692k|      absDet = fixp_abs(ac.det);
  ------------------
  |  |  305|   692k|#define fixp_abs(x) fAbs(x)
  ------------------
 1052|       |
 1053|   692k|      tmp = (fMultDiv2(ac.r01r, ac.r12r) >> (LPC_SCALE_FACTOR - 1)) -
  ------------------
  |  |  139|   692k|#define LPC_SCALE_FACTOR 2
  ------------------
 1054|   692k|            ((fMultDiv2(ac.r01i, ac.r12i) + fMultDiv2(ac.r02r, ac.r11r)) >>
 1055|   692k|             (LPC_SCALE_FACTOR - 1));
  ------------------
  |  |  139|   692k|#define LPC_SCALE_FACTOR 2
  ------------------
 1056|   692k|      absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|   692k|#define fixp_abs(x) fAbs(x)
  ------------------
 1057|       |
 1058|       |      /*
 1059|       |      Quick check: is first filter coeff >= 1(4)
 1060|       |      */
 1061|   692k|      {
 1062|   692k|        INT scale;
 1063|   692k|        FIXP_DBL result = fDivNorm(absTmp, absDet, &scale);
 1064|   692k|        scale = scale + ac.det_scale;
 1065|       |
 1066|   692k|        if ((scale > 0) && (result >= (FIXP_DBL)MAXVAL_DBL >> scale)) {
  ------------------
  |  |  156|  39.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1066:13): [True: 39.2k, False: 653k]
  |  Branch (1066:28): [True: 24.2k, False: 15.0k]
  ------------------
 1067|  24.2k|          resetLPCCoeffs = 1;
 1068|   668k|        } else {
 1069|   668k|          alphar[1] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale));
  ------------------
  |  |  220|   668k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   668k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   668k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1070|   668k|          if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|   668k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 668k]
  |  |  ------------------
  |  |  211|   668k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   668k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   668k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|   668k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 668k]
  |  |  ------------------
  |  |  211|   668k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   668k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   668k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1070:15): [True: 445k, False: 223k]
  ------------------
 1071|   445k|            alphar[1] = -alphar[1];
 1072|   445k|          }
 1073|   668k|        }
 1074|   692k|      }
 1075|       |
 1076|   692k|      tmp = (fMultDiv2(ac.r01i, ac.r12r) >> (LPC_SCALE_FACTOR - 1)) +
  ------------------
  |  |  139|   692k|#define LPC_SCALE_FACTOR 2
  ------------------
 1077|   692k|            ((fMultDiv2(ac.r01r, ac.r12i) -
 1078|   692k|              (FIXP_DBL)fMultDiv2(ac.r02i, ac.r11r)) >>
 1079|   692k|             (LPC_SCALE_FACTOR - 1));
  ------------------
  |  |  139|   692k|#define LPC_SCALE_FACTOR 2
  ------------------
 1080|       |
 1081|   692k|      absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|   692k|#define fixp_abs(x) fAbs(x)
  ------------------
 1082|       |
 1083|       |      /*
 1084|       |      Quick check: is second filter coeff >= 1(4)
 1085|       |      */
 1086|   692k|      {
 1087|   692k|        INT scale;
 1088|   692k|        FIXP_DBL result = fDivNorm(absTmp, absDet, &scale);
 1089|   692k|        scale = scale + ac.det_scale;
 1090|       |
 1091|   692k|        if ((scale > 0) &&
  ------------------
  |  Branch (1091:13): [True: 40.2k, False: 652k]
  ------------------
 1092|  40.2k|            (result >= /*FL2FXCONST_DBL(1.f)*/ (FIXP_DBL)MAXVAL_DBL >> scale)) {
  ------------------
  |  |  156|  40.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1092:13): [True: 24.9k, False: 15.3k]
  ------------------
 1093|  24.9k|          resetLPCCoeffs = 1;
 1094|   667k|        } else {
 1095|   667k|          alphai[1] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale));
  ------------------
  |  |  220|   667k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   667k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   667k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1096|   667k|          if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|   667k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 667k]
  |  |  ------------------
  |  |  211|   667k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   667k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   667k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        if ((tmp < FL2FX_DBL(0.0f)) ^ (ac.det < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|   667k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 667k]
  |  |  ------------------
  |  |  211|   667k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   667k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   667k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1096:15): [True: 310k, False: 357k]
  ------------------
 1097|   310k|            alphai[1] = -alphai[1];
 1098|   310k|          }
 1099|   667k|        }
 1100|   692k|      }
 1101|   692k|    }
 1102|       |
 1103|  1.26M|    alphar[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  1.26M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  182|  1.26M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  183|  1.26M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.26M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.26M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.26M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.26M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1104|  1.26M|    alphai[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  1.26M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  182|  1.26M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  183|  1.26M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.26M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.26M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.26M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.26M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1105|       |
 1106|  1.26M|    if (ac.r11r != FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  1.26M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  194|  1.26M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  195|  1.26M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.26M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.26M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.26M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.26M|          : ((((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 (1106:9): [True: 694k, False: 566k]
  ------------------
 1107|       |      /* ac.r11r is always >=0 */
 1108|   694k|      FIXP_DBL tmp, absTmp;
 1109|       |
 1110|   694k|      tmp = (ac.r01r >> (LPC_SCALE_FACTOR + 1)) +
  ------------------
  |  |  139|   694k|#define LPC_SCALE_FACTOR 2
  ------------------
 1111|   694k|            (fMultDiv2(alphar[1], ac.r12r) + fMultDiv2(alphai[1], ac.r12i));
 1112|       |
 1113|   694k|      absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|   694k|#define fixp_abs(x) fAbs(x)
  ------------------
 1114|       |
 1115|       |      /*
 1116|       |      Quick check: is first filter coeff >= 1(4)
 1117|       |      */
 1118|       |
 1119|   694k|      if (absTmp >= (ac.r11r >> 1)) {
  ------------------
  |  Branch (1119:11): [True: 1.35k, False: 693k]
  ------------------
 1120|  1.35k|        resetLPCCoeffs = 1;
 1121|   693k|      } else {
 1122|   693k|        INT scale;
 1123|   693k|        FIXP_DBL result = fDivNorm(absTmp, fixp_abs(ac.r11r), &scale);
  ------------------
  |  |  305|   693k|#define fixp_abs(x) fAbs(x)
  ------------------
 1124|   693k|        alphar[0] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale + 1));
  ------------------
  |  |  220|   693k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   693k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   693k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1125|       |
 1126|   693k|        if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))
  ------------------
  |  |  210|   693k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 693k]
  |  |  ------------------
  |  |  211|   693k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   693k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   693k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f)))
  ------------------
  |  |  210|   693k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 693k]
  |  |  ------------------
  |  |  211|   693k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   693k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   693k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1126:13): [True: 453k, False: 239k]
  ------------------
 1127|   453k|          alphar[0] = -alphar[0];
 1128|   693k|      }
 1129|       |
 1130|   694k|      tmp = (ac.r01i >> (LPC_SCALE_FACTOR + 1)) +
  ------------------
  |  |  139|   694k|#define LPC_SCALE_FACTOR 2
  ------------------
 1131|   694k|            (fMultDiv2(alphai[1], ac.r12r) - fMultDiv2(alphar[1], ac.r12i));
 1132|       |
 1133|   694k|      absTmp = fixp_abs(tmp);
  ------------------
  |  |  305|   694k|#define fixp_abs(x) fAbs(x)
  ------------------
 1134|       |
 1135|       |      /*
 1136|       |      Quick check: is second filter coeff >= 1(4)
 1137|       |      */
 1138|   694k|      if (absTmp >= (ac.r11r >> 1)) {
  ------------------
  |  Branch (1138:11): [True: 2.64k, False: 692k]
  ------------------
 1139|  2.64k|        resetLPCCoeffs = 1;
 1140|   692k|      } else {
 1141|   692k|        INT scale;
 1142|   692k|        FIXP_DBL result = fDivNorm(absTmp, fixp_abs(ac.r11r), &scale);
  ------------------
  |  |  305|   692k|#define fixp_abs(x) fAbs(x)
  ------------------
 1143|   692k|        alphai[0] = FX_DBL2FX_SGL(scaleValueSaturate(result, scale + 1));
  ------------------
  |  |  220|   692k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   692k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   692k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1144|   692k|        if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|   692k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 692k]
  |  |  ------------------
  |  |  211|   692k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   692k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   692k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if ((tmp > FL2FX_DBL(0.0f)) ^ (ac.r11r < FL2FX_DBL(0.0f))) {
  ------------------
  |  |  210|   692k|  ((val) > 0.0f ? (LONG)((val) * (float)(DFRACT_FIX_SCALE) + 0.5f) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (210:4): [Folded, False: 692k]
  |  |  ------------------
  |  |  211|   692k|                : (LONG)((val) * (float)(DFRACT_FIX_SCALE)-0.5f))
  |  |  ------------------
  |  |  |  |  147|   692k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   692k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1144:13): [True: 344k, False: 347k]
  ------------------
 1145|   344k|          alphai[0] = -alphai[0];
 1146|   344k|        }
 1147|   692k|      }
 1148|   694k|    }
 1149|       |
 1150|       |    /* Now check the quadratic criteria */
 1151|  1.26M|    if ((fMultDiv2(alphar[0], alphar[0]) + fMultDiv2(alphai[0], alphai[0])) >=
  ------------------
  |  Branch (1151:9): [True: 792, False: 1.26M]
  ------------------
 1152|  1.26M|        FL2FXCONST_DBL(0.5f)) {
  ------------------
  |  |  192|  1.26M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  194|  1.26M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  195|  1.26M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.26M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.26M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.26M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.26M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1153|    792|      resetLPCCoeffs = 1;
 1154|    792|    }
 1155|  1.26M|    if ((fMultDiv2(alphar[1], alphar[1]) + fMultDiv2(alphai[1], alphai[1])) >=
  ------------------
  |  Branch (1155:9): [True: 4.00k, False: 1.25M]
  ------------------
 1156|  1.26M|        FL2FXCONST_DBL(0.5f)) {
  ------------------
  |  |  192|  1.26M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  194|  1.26M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  195|  1.26M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.26M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.26M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.26M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.26M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.26M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1157|  4.00k|      resetLPCCoeffs = 1;
 1158|  4.00k|    }
 1159|       |
 1160|  1.26M|    if (resetLPCCoeffs) {
  ------------------
  |  Branch (1160:9): [True: 608k, False: 652k]
  ------------------
 1161|   608k|      alphar[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   608k|  (FIXP_SGL)(                                                                \
  |  |  181|   608k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 608k, Folded]
  |  |  ------------------
  |  |  182|   608k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 608k]
  |  |  ------------------
  |  |  183|   608k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   608k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   608k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   608k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   608k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1162|   608k|      alphar[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   608k|  (FIXP_SGL)(                                                                \
  |  |  181|   608k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 608k, Folded]
  |  |  ------------------
  |  |  182|   608k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 608k]
  |  |  ------------------
  |  |  183|   608k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   608k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   608k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   608k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   608k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1163|   608k|      alphai[0] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   608k|  (FIXP_SGL)(                                                                \
  |  |  181|   608k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 608k, Folded]
  |  |  ------------------
  |  |  182|   608k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 608k]
  |  |  ------------------
  |  |  183|   608k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   608k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   608k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   608k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   608k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1164|   608k|      alphai[1] = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   608k|  (FIXP_SGL)(                                                                \
  |  |  181|   608k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 608k, Folded]
  |  |  ------------------
  |  |  182|   608k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 608k]
  |  |  ------------------
  |  |  183|   608k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   608k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   608k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   608k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   608k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   608k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   608k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1165|   608k|    }
 1166|       |
 1167|  3.77M|    while (bwIndex < MAX_NUM_PATCHES - 1 &&
  ------------------
  |  |  161|  3.77M|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1167:12): [True: 3.77M, False: 0]
  ------------------
 1168|  3.77M|           loBand >= pSettings->bwBorders[bwIndex]) {
  ------------------
  |  Branch (1168:12): [True: 2.51M, False: 1.26M]
  ------------------
 1169|  2.51M|      bwIndex++;
 1170|  2.51M|    }
 1171|       |
 1172|       |    /*
 1173|       |    Filter Step 2: add the left slope with the current filter to the buffer
 1174|       |    pure source values are already in there
 1175|       |    */
 1176|  1.26M|    bw = FX_DBL2FX_SGL(bwVector[bwIndex]);
  ------------------
  |  |  220|  1.26M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1177|       |
 1178|  1.26M|    a0r = FX_DBL2FX_SGL(
  ------------------
  |  |  220|  1.26M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1179|  1.26M|        fMult(bw, alphar[0])); /* Apply current bandwidth expansion factor */
 1180|  1.26M|    a0i = FX_DBL2FX_SGL(fMult(bw, alphai[0]));
  ------------------
  |  |  220|  1.26M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1181|  1.26M|    bw = FX_DBL2FX_SGL(fPow2(bw));
  ------------------
  |  |  220|  1.26M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1182|  1.26M|    a1r = FX_DBL2FX_SGL(fMult(bw, alphar[1]));
  ------------------
  |  |  220|  1.26M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1183|  1.26M|    a1i = FX_DBL2FX_SGL(fMult(bw, alphai[1]));
  ------------------
  |  |  220|  1.26M|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  1.26M|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 1184|       |
 1185|       |    /*
 1186|       |    Filter Step 3: insert the middle part which won't be windowed
 1187|       |    */
 1188|  1.26M|    if (bw <= FL2FXCONST_SGL(0.0f)) {
  ------------------
  |  |  180|  1.26M|  (FIXP_SGL)(                                                                \
  |  |  181|  1.26M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.26M, Folded]
  |  |  ------------------
  |  |  182|  1.26M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  183|  1.26M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.26M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.26M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.26M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.26M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.26M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.26M|          : ((((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 (1188:9): [True: 871k, False: 389k]
  ------------------
 1189|   871k|      int descale = fixMin(DFRACT_BITS - 1, (LPC_SCALE_FACTOR + dynamicScale));
  ------------------
  |  |  306|   871k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1190|  35.1M|      for (i = startSample; i < stopSample; i++) {
  ------------------
  |  Branch (1190:29): [True: 34.2M, False: 871k]
  ------------------
 1191|  34.2M|        qmfBufferReal[i][loBand] = lowBandReal[LPC_ORDER + i] >> descale;
  ------------------
  |  |  122|  34.2M|#define LPC_ORDER 2
  ------------------
 1192|  34.2M|        qmfBufferImag[i][loBand] = lowBandImag[LPC_ORDER + i] >> descale;
  ------------------
  |  |  122|  34.2M|#define LPC_ORDER 2
  ------------------
 1193|  34.2M|      }
 1194|   871k|    } else { /* bw <= 0 */
 1195|       |
 1196|   389k|      int descale = fixMin(DFRACT_BITS - 1, (LPC_SCALE_FACTOR + dynamicScale));
  ------------------
  |  |  306|   389k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1197|   389k|      dynamicScale +=
 1198|   389k|          1; /* prevent negativ scale factor due to 'one additional bit
 1199|       |                headroom' */
 1200|       |
 1201|  21.8M|      for (i = startSample; i < stopSample; i++) {
  ------------------
  |  Branch (1201:29): [True: 21.4M, False: 389k]
  ------------------
 1202|  21.4M|        FIXP_DBL accu1, accu2;
 1203|       |
 1204|  21.4M|        accu1 = (fMultDiv2(a0r, lowBandReal[LPC_ORDER + i - 1]) -
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1205|  21.4M|                 fMultDiv2(a0i, lowBandImag[LPC_ORDER + i - 1]) +
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1206|  21.4M|                 fMultDiv2(a1r, lowBandReal[LPC_ORDER + i - 2]) -
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1207|  21.4M|                 fMultDiv2(a1i, lowBandImag[LPC_ORDER + i - 2])) >>
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1208|  21.4M|                dynamicScale;
 1209|  21.4M|        accu2 = (fMultDiv2(a0i, lowBandReal[LPC_ORDER + i - 1]) +
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1210|  21.4M|                 fMultDiv2(a0r, lowBandImag[LPC_ORDER + i - 1]) +
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1211|  21.4M|                 fMultDiv2(a1i, lowBandReal[LPC_ORDER + i - 2]) +
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1212|  21.4M|                 fMultDiv2(a1r, lowBandImag[LPC_ORDER + i - 2])) >>
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1213|  21.4M|                dynamicScale;
 1214|       |
 1215|  21.4M|        qmfBufferReal[i][loBand] =
 1216|  21.4M|            (lowBandReal[LPC_ORDER + i] >> descale) + (accu1 << (1 + 1));
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1217|  21.4M|        qmfBufferImag[i][loBand] =
 1218|  21.4M|            (lowBandImag[LPC_ORDER + i] >> descale) + (accu2 << (1 + 1));
  ------------------
  |  |  122|  21.4M|#define LPC_ORDER 2
  ------------------
 1219|  21.4M|      }
 1220|   389k|    } /* bw <= 0 */
 1221|       |
 1222|       |    /*
 1223|       |     * store the unmodified filter coefficients if there is
 1224|       |     * an overlapping envelope
 1225|       |     *****************************************************************/
 1226|       |
 1227|  1.26M|  } /* outer loop over bands (loBand) */
 1228|       |
 1229|   151k|  for (i = 0; i < nInvfBands; i++) {
  ------------------
  |  Branch (1229:15): [True: 114k, False: 36.8k]
  ------------------
 1230|   114k|    hLppTrans->bwVectorOld[i] = bwVector[i];
 1231|   114k|  }
 1232|       |
 1233|       |  /*
 1234|       |  set high band scale factor
 1235|       |  */
 1236|  36.8k|  sbrScaleFactor->hb_scale = comBandScale - (LPC_SCALE_FACTOR);
  ------------------
  |  |  139|  36.8k|#define LPC_SCALE_FACTOR 2
  ------------------
 1237|  36.8k|}
_Z19createLppTransposerP13SBR_LPP_TRANSP19TRANSPOSER_SETTINGSiPhiiiiS3_ijii:
 1259|   147k|    const int overlap) {
 1260|       |  /* FB inverse filtering settings */
 1261|   147k|  hs->pSettings = pSettings;
 1262|       |
 1263|   147k|  pSettings->nCols = nCols;
 1264|   147k|  pSettings->overlap = overlap;
 1265|       |
 1266|   147k|  switch (timeSlots) {
 1267|  50.0k|    case 15:
  ------------------
  |  Branch (1267:5): [True: 50.0k, False: 97.9k]
  ------------------
 1268|   147k|    case 16:
  ------------------
  |  Branch (1268:5): [True: 97.9k, False: 50.0k]
  ------------------
 1269|   147k|      break;
 1270|       |
 1271|      0|    default:
  ------------------
  |  Branch (1271:5): [True: 0, False: 147k]
  ------------------
 1272|      0|      return SBRDEC_UNSUPPORTED_CONFIG; /* Unimplemented */
 1273|   147k|  }
 1274|       |
 1275|   147k|  if (chan == 0) {
  ------------------
  |  Branch (1275:7): [True: 94.8k, False: 53.1k]
  ------------------
 1276|       |    /* Init common data only once */
 1277|  94.8k|    hs->pSettings->nCols = nCols;
 1278|       |
 1279|  94.8k|    return resetLppTransposer(hs, highBandStartSb, v_k_master, numMaster,
 1280|  94.8k|                              noiseBandTable, noNoiseBands, usb, fs);
 1281|  94.8k|  }
 1282|  53.1k|  return SBRDEC_OK;
 1283|   147k|}
_Z18resetLppTransposerP13SBR_LPP_TRANShPhhS1_hhj:
 1324|   343k|) {
 1325|   343k|  TRANSPOSER_SETTINGS *pSettings = hLppTrans->pSettings;
 1326|   343k|  PATCH_PARAM *patchParam = pSettings->patchParam;
 1327|       |
 1328|   343k|  int i, patch;
 1329|   343k|  int targetStopBand;
 1330|   343k|  int sourceStartBand;
 1331|   343k|  int patchDistance;
 1332|   343k|  int numBandsInPatch;
 1333|       |
 1334|   343k|  int lsb = v_k_master[0]; /* Start subband expressed in "non-critical" sampling
 1335|       |                              terms*/
 1336|   343k|  int xoverOffset = highBandStartSb -
 1337|   343k|                    lsb; /* Calculate distance in QMF bands between k0 and kx */
 1338|   343k|  int startFreqHz;
 1339|       |
 1340|   343k|  int desiredBorder;
 1341|       |
 1342|   343k|  usb = fixMin(usb, v_k_master[numMaster]); /* Avoid endless loops (compare with
  ------------------
  |  |  306|   343k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1343|       |                                               float code). */
 1344|       |
 1345|       |  /*
 1346|       |   * Plausibility check
 1347|       |   */
 1348|       |
 1349|   343k|  if (pSettings->nCols == 64) {
  ------------------
  |  Branch (1349:7): [True: 21.4k, False: 321k]
  ------------------
 1350|  21.4k|    if (lsb < 4) {
  ------------------
  |  Branch (1350:9): [True: 58, False: 21.4k]
  ------------------
 1351|       |      /* 4:1 SBR Requirement k0 >= 4 missed! */
 1352|     58|      return SBRDEC_UNSUPPORTED_CONFIG;
 1353|     58|    }
 1354|   321k|  } else if (lsb - SHIFT_START_SB < 4) {
  ------------------
  |  |  162|   321k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
  |  Branch (1354:14): [True: 148, False: 321k]
  ------------------
 1355|    148|    return SBRDEC_UNSUPPORTED_CONFIG;
 1356|    148|  }
 1357|       |
 1358|       |  /*
 1359|       |   * Initialize the patching parameter
 1360|       |   */
 1361|       |  /* ISO/IEC 14496-3 (Figure 4.48): goalSb = round( 2.048e6 / fs ) */
 1362|   343k|  desiredBorder = (((2048000 * 2) / fs) + 1) >> 1;
 1363|       |
 1364|   343k|  desiredBorder = findClosestEntry(desiredBorder, v_k_master, numMaster,
 1365|   343k|                                   1); /* Adapt region to master-table */
 1366|       |
 1367|       |  /* First patch */
 1368|   343k|  sourceStartBand = SHIFT_START_SB + xoverOffset;
  ------------------
  |  |  162|   343k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
 1369|   343k|  targetStopBand = lsb + xoverOffset; /* upperBand */
 1370|       |
 1371|       |  /* Even (odd) numbered channel must be patched to even (odd) numbered channel
 1372|       |   */
 1373|   343k|  patch = 0;
 1374|   979k|  while (targetStopBand < usb) {
  ------------------
  |  Branch (1374:10): [True: 636k, False: 342k]
  ------------------
 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|   636k|    if (patch > MAX_NUM_PATCHES) {
  ------------------
  |  |  161|   636k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1381:9): [True: 437, False: 636k]
  ------------------
 1382|    437|      return SBRDEC_UNSUPPORTED_CONFIG;
 1383|    437|    }
 1384|       |
 1385|   636k|    patchParam[patch].guardStartBand = targetStopBand;
 1386|   636k|    patchParam[patch].targetStartBand = targetStopBand;
 1387|       |
 1388|   636k|    numBandsInPatch =
 1389|   636k|        desiredBorder - targetStopBand; /* Get the desired range of the patch */
 1390|       |
 1391|   636k|    if (numBandsInPatch >= lsb - sourceStartBand) {
  ------------------
  |  Branch (1391:9): [True: 357k, False: 279k]
  ------------------
 1392|       |      /* Desired number bands are not available -> patch whole source range */
 1393|   357k|      patchDistance =
 1394|   357k|          targetStopBand - sourceStartBand; /* Get the targetOffset */
 1395|   357k|      patchDistance =
 1396|   357k|          patchDistance & ~1; /* Rounding off odd numbers and make all even */
 1397|   357k|      numBandsInPatch =
 1398|   357k|          lsb - (targetStopBand -
 1399|   357k|                 patchDistance); /* Update number of bands to be patched */
 1400|   357k|      numBandsInPatch = findClosestEntry(targetStopBand + numBandsInPatch,
 1401|   357k|                                         v_k_master, numMaster, 0) -
 1402|   357k|                        targetStopBand; /* Adapt region to master-table */
 1403|   357k|    }
 1404|       |
 1405|   636k|    if (pSettings->nCols == 64) {
  ------------------
  |  Branch (1405:9): [True: 62.3k, False: 574k]
  ------------------
 1406|  62.3k|      if (numBandsInPatch == 0 && sourceStartBand == SHIFT_START_SB) {
  ------------------
  |  |  162|    204|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
  |  Branch (1406:11): [True: 204, False: 62.1k]
  |  Branch (1406:35): [True: 142, False: 62]
  ------------------
 1407|    142|        return SBRDEC_UNSUPPORTED_CONFIG;
 1408|    142|      }
 1409|  62.3k|    }
 1410|       |
 1411|       |    /* Desired number bands are available -> get the minimal even patching
 1412|       |     * distance */
 1413|   636k|    patchDistance =
 1414|   636k|        numBandsInPatch + targetStopBand - lsb; /* Get minimal distance */
 1415|   636k|    patchDistance = (patchDistance + 1) &
 1416|   636k|                    ~1; /* Rounding up odd numbers and make all even */
 1417|       |
 1418|   636k|    if (numBandsInPatch > 0) {
  ------------------
  |  Branch (1418:9): [True: 609k, False: 27.2k]
  ------------------
 1419|   609k|      patchParam[patch].sourceStartBand = targetStopBand - patchDistance;
 1420|   609k|      patchParam[patch].targetBandOffs = patchDistance;
 1421|   609k|      patchParam[patch].numBandsInPatch = numBandsInPatch;
 1422|   609k|      patchParam[patch].sourceStopBand =
 1423|   609k|          patchParam[patch].sourceStartBand + numBandsInPatch;
 1424|       |
 1425|   609k|      targetStopBand += patchParam[patch].numBandsInPatch;
 1426|   609k|      patch++;
 1427|   609k|    }
 1428|       |
 1429|       |    /* All patches but first */
 1430|   636k|    sourceStartBand = SHIFT_START_SB;
  ------------------
  |  |  162|   636k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
 1431|       |
 1432|       |    /* Check if we are close to desiredBorder */
 1433|   636k|    if (desiredBorder - targetStopBand < 3) /* MPEG doc */
  ------------------
  |  Branch (1433:9): [True: 309k, False: 327k]
  ------------------
 1434|   309k|    {
 1435|   309k|      desiredBorder = usb;
 1436|   309k|    }
 1437|   636k|  }
 1438|       |
 1439|   342k|  patch--;
 1440|       |
 1441|       |  /* If highest patch contains less than three subband: skip it */
 1442|   342k|  if ((patch > 0) && (patchParam[patch].numBandsInPatch < 3)) {
  ------------------
  |  Branch (1442:7): [True: 189k, False: 153k]
  |  Branch (1442:22): [True: 23.0k, False: 166k]
  ------------------
 1443|  23.0k|    patch--;
 1444|  23.0k|    targetStopBand =
 1445|  23.0k|        patchParam[patch].targetStartBand + patchParam[patch].numBandsInPatch;
 1446|  23.0k|  }
 1447|       |
 1448|       |  /* now check if we don't have one too many */
 1449|   342k|  if (patch >= MAX_NUM_PATCHES) {
  ------------------
  |  |  161|   342k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1449:7): [True: 1.49k, False: 341k]
  ------------------
 1450|  1.49k|    return SBRDEC_UNSUPPORTED_CONFIG;
 1451|  1.49k|  }
 1452|       |
 1453|   341k|  pSettings->noOfPatches = patch + 1;
 1454|       |
 1455|       |  /* Check lowest and highest source subband */
 1456|   341k|  pSettings->lbStartPatching = targetStopBand;
 1457|   341k|  pSettings->lbStopPatching = 0;
 1458|   913k|  for (patch = 0; patch < pSettings->noOfPatches; patch++) {
  ------------------
  |  Branch (1458:19): [True: 571k, False: 341k]
  ------------------
 1459|   571k|    pSettings->lbStartPatching =
 1460|   571k|        fixMin(pSettings->lbStartPatching, patchParam[patch].sourceStartBand);
  ------------------
  |  |  306|   571k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1461|   571k|    pSettings->lbStopPatching =
 1462|   571k|        fixMax(pSettings->lbStopPatching, patchParam[patch].sourceStopBand);
  ------------------
  |  |  307|   571k|#define fixMax(a, b) fMax(a, b)
  ------------------
 1463|   571k|  }
 1464|       |
 1465|  1.15M|  for (i = 0; i < noNoiseBands; i++) {
  ------------------
  |  Branch (1465:15): [True: 811k, False: 341k]
  ------------------
 1466|   811k|    pSettings->bwBorders[i] = noiseBandTable[i + 1];
 1467|   811k|  }
 1468|  2.94M|  for (; i < MAX_NUM_NOISE_VALUES; i++) {
  ------------------
  |  |  129|  2.94M|#define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |  127|  2.94M|#define MAX_NOISE_ENVELOPES 2
  |  |  ------------------
  |  |               #define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |  128|  2.94M|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (1468:10): [True: 2.59M, False: 341k]
  ------------------
 1469|  2.59M|    pSettings->bwBorders[i] = 255;
 1470|  2.59M|  }
 1471|       |
 1472|       |  /*
 1473|       |   * Choose whitening factors
 1474|       |   */
 1475|       |
 1476|   341k|  startFreqHz =
 1477|   341k|      ((lsb + xoverOffset) * fs) >> 7; /* Shift does a division by 2*(64) */
 1478|       |
 1479|  1.02M|  for (i = 1; i < NUM_WHFACTOR_TABLE_ENTRIES; i++) {
  ------------------
  |  |  139|  1.02M|#define NUM_WHFACTOR_TABLE_ENTRIES 9
  ------------------
  |  Branch (1479:15): [True: 971k, False: 49.6k]
  ------------------
 1480|   971k|    if (startFreqHz < FDK_sbrDecoder_sbr_whFactorsIndex[i]) break;
  ------------------
  |  Branch (1480:9): [True: 291k, False: 680k]
  ------------------
 1481|   971k|  }
 1482|   341k|  i--;
 1483|       |
 1484|   341k|  pSettings->whFactors.off = FDK_sbrDecoder_sbr_whFactorsTable[i][0];
 1485|   341k|  pSettings->whFactors.transitionLevel =
 1486|   341k|      FDK_sbrDecoder_sbr_whFactorsTable[i][1];
 1487|   341k|  pSettings->whFactors.lowLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][2];
 1488|   341k|  pSettings->whFactors.midLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][3];
 1489|   341k|  pSettings->whFactors.highLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][4];
 1490|       |
 1491|   341k|  return SBRDEC_OK;
 1492|   342k|}
lpp_tran.cpp:_ZL29inverseFilteringLevelEmphasisP13SBR_LPP_TRANShP9INVF_MODES2_Pi:
  188|   259k|) {
  189|   870k|  for (int i = 0; i < nInvfBands; i++) {
  ------------------
  |  Branch (189:19): [True: 610k, False: 259k]
  ------------------
  190|   610k|    FIXP_DBL accu;
  191|   610k|    FIXP_DBL bwTmp = mapInvfMode(sbr_invf_mode[i], sbr_invf_mode_prev[i],
  192|   610k|                                 hLppTrans->pSettings->whFactors);
  193|       |
  194|   610k|    if (bwTmp < hLppTrans->bwVectorOld[i]) {
  ------------------
  |  Branch (194:9): [True: 85.2k, False: 525k]
  ------------------
  195|  85.2k|      accu = fMultDiv2(FL2FXCONST_DBL(0.75f), bwTmp) +
  ------------------
  |  |  192|  85.2k|  (FIXP_DBL)(                                                                \
  |  |  193|  85.2k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 85.2k, Folded]
  |  |  ------------------
  |  |  194|  85.2k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  85.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  85.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 85.2k]
  |  |  ------------------
  |  |  195|  85.2k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  85.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  85.2k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  85.2k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  85.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  85.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  85.2k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|  85.2k|             fMultDiv2(FL2FXCONST_DBL(0.25f), hLppTrans->bwVectorOld[i]);
  ------------------
  |  |  192|  85.2k|  (FIXP_DBL)(                                                                \
  |  |  193|  85.2k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 85.2k, Folded]
  |  |  ------------------
  |  |  194|  85.2k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  85.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  85.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 85.2k]
  |  |  ------------------
  |  |  195|  85.2k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  85.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  85.2k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  85.2k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  85.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  85.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  85.2k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|   525k|    } else {
  198|   525k|      accu = fMultDiv2(FL2FXCONST_DBL(0.90625f), bwTmp) +
  ------------------
  |  |  192|   525k|  (FIXP_DBL)(                                                                \
  |  |  193|   525k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 525k, Folded]
  |  |  ------------------
  |  |  194|   525k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   525k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   525k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 525k]
  |  |  ------------------
  |  |  195|   525k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   525k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   525k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   525k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   525k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   525k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   525k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|   525k|             fMultDiv2(FL2FXCONST_DBL(0.09375f), hLppTrans->bwVectorOld[i]);
  ------------------
  |  |  192|   525k|  (FIXP_DBL)(                                                                \
  |  |  193|   525k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 525k, Folded]
  |  |  ------------------
  |  |  194|   525k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   525k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   525k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 525k]
  |  |  ------------------
  |  |  195|   525k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   525k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   525k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   525k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   525k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   525k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   525k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|   525k|    }
  201|       |
  202|   610k|    if (accu<FL2FXCONST_DBL(0.015625f)>> 1) {
  ------------------
  |  |  192|   610k|  (FIXP_DBL)(                                                                \
  |  |  193|   610k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 610k, Folded]
  |  |  ------------------
  |  |  194|   610k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   610k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   610k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 610k]
  |  |  ------------------
  |  |  195|   610k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   610k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   610k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   610k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   610k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   610k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   610k|          : ((((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 (202:9): [True: 244k, False: 366k]
  ------------------
  203|   244k|      bwVector[i] = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   244k|  (FIXP_DBL)(                                                                \
  |  |  193|   244k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 244k, Folded]
  |  |  ------------------
  |  |  194|   244k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   244k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   244k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 244k]
  |  |  ------------------
  |  |  195|   244k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   244k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   244k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   244k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   244k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   244k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   244k|          : ((((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|   366k|    } else {
  205|   366k|      bwVector[i] = fixMin(accu << 1, FL2FXCONST_DBL(0.99609375f));
  ------------------
  |  |  306|  1.46M|#define fixMin(a, b) fMin(a, b)
  |  |  ------------------
  |  |  |  Branch (306:30): [Folded, False: 366k]
  |  |  |  Branch (306:30): [Folded, False: 0]
  |  |  |  Branch (306:30): [True: 366k, Folded]
  |  |  ------------------
  ------------------
  206|   366k|    }
  207|   610k|  }
  208|   259k|}
lpp_tran.cpp:_ZL11mapInvfMode9INVF_MODES_17WHITENING_FACTORS:
  152|   610k|                            WHITENING_FACTORS whFactors) {
  153|   610k|  switch (mode) {
  154|   185k|    case INVF_LOW_LEVEL:
  ------------------
  |  Branch (154:5): [True: 185k, False: 425k]
  ------------------
  155|   185k|      if (prevMode == INVF_OFF)
  ------------------
  |  Branch (155:11): [True: 20.2k, False: 165k]
  ------------------
  156|  20.2k|        return whFactors.transitionLevel;
  157|   165k|      else
  158|   165k|        return whFactors.lowLevel;
  159|       |
  160|  38.6k|    case INVF_MID_LEVEL:
  ------------------
  |  Branch (160:5): [True: 38.6k, False: 572k]
  ------------------
  161|  38.6k|      return whFactors.midLevel;
  162|       |
  163|  85.9k|    case INVF_HIGH_LEVEL:
  ------------------
  |  Branch (163:5): [True: 85.9k, False: 524k]
  ------------------
  164|  85.9k|      return whFactors.highLevel;
  165|       |
  166|   300k|    default:
  ------------------
  |  Branch (166:5): [True: 300k, False: 310k]
  ------------------
  167|   300k|      if (prevMode == INVF_LOW_LEVEL)
  ------------------
  |  Branch (167:11): [True: 15.7k, False: 284k]
  ------------------
  168|  15.7k|        return whFactors.transitionLevel;
  169|   284k|      else
  170|   284k|        return whFactors.off;
  171|   610k|  }
  172|   610k|}
lpp_tran.cpp:_ZL18calc_qmfBufferRealPPiPKiiihiss:
  224|   165k|                                      const FIXP_SGL a0r, const FIXP_SGL a1r) {
  225|   165k|  const int dynscale = fixMax(0, dynamicScale - 1) + 1;
  ------------------
  |  |  307|   165k|#define fixMax(a, b) fMax(a, b)
  ------------------
  226|   165k|  const int rescale = -fixMin(0, dynamicScale - 1) + 1;
  ------------------
  |  |  306|   165k|#define fixMin(a, b) fMin(a, b)
  ------------------
  227|   165k|  const int descale =
  228|   165k|      fixMin(DFRACT_BITS - 1, LPC_SCALE_FACTOR + dynamicScale + rescale);
  ------------------
  |  |  306|   165k|#define fixMin(a, b) fMin(a, b)
  ------------------
  229|       |
  230|  4.54M|  for (int i = 0; i < stopSample - startSample; i++) {
  ------------------
  |  Branch (230:19): [True: 4.37M, False: 165k]
  ------------------
  231|  4.37M|    FIXP_DBL accu;
  232|       |
  233|  4.37M|    accu = fMultDiv2(a1r, lowBandReal[i]) + fMultDiv2(a0r, lowBandReal[i + 1]);
  234|  4.37M|    accu = (lowBandReal[i + 2] >> descale) + (accu >> dynscale);
  235|       |
  236|  4.37M|    qmfBufferReal[i + startSample][hiBand] =
  237|  4.37M|        SATURATE_LEFT_SHIFT(accu, rescale, DFRACT_BITS);
  ------------------
  |  |  251|  4.37M|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 4.37M]
  |  |  ------------------
  |  |  252|  4.37M|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  4.37M|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 4.37M]
  |  |  ------------------
  |  |  254|  4.37M|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  4.37M|             : ((LONG)(src) << (scale)))
  ------------------
  238|  4.37M|  }
  239|   165k|}
lpp_tran.cpp:_ZL16findClosestEntryhPhhh:
 1286|   700k|                            UCHAR direction) {
 1287|   700k|  int index;
 1288|       |
 1289|   700k|  if (goalSb <= v_k_master[0]) return v_k_master[0];
  ------------------
  |  Branch (1289:7): [True: 25.6k, False: 674k]
  ------------------
 1290|       |
 1291|   674k|  if (goalSb >= v_k_master[numMaster]) return v_k_master[numMaster];
  ------------------
  |  Branch (1291:7): [True: 306k, False: 367k]
  ------------------
 1292|       |
 1293|   367k|  if (direction) {
  ------------------
  |  Branch (1293:7): [True: 16.8k, False: 350k]
  ------------------
 1294|  16.8k|    index = 0;
 1295|   214k|    while (v_k_master[index] < goalSb) {
  ------------------
  |  Branch (1295:12): [True: 197k, False: 16.8k]
  ------------------
 1296|   197k|      index++;
 1297|   197k|    }
 1298|   350k|  } else {
 1299|   350k|    index = numMaster;
 1300|  1.93M|    while (v_k_master[index] > goalSb) {
  ------------------
  |  Branch (1300:12): [True: 1.58M, False: 350k]
  ------------------
 1301|  1.58M|      index--;
 1302|  1.58M|    }
 1303|   350k|  }
 1304|       |
 1305|   367k|  return v_k_master[index];
 1306|   674k|}

_Z8DecodePsP6PS_DEChP19PS_DEC_COEFFICIENTS:
  247|  3.74k|             PS_DEC_COEFFICIENTS *pScratch) {
  248|  3.74k|  MPEG_PS_BS_DATA *pBsData;
  249|  3.74k|  UCHAR gr, env;
  250|  3.74k|  int bPsHeaderValid, bPsDataAvail;
  251|       |
  252|       |  /* Assign Scratch */
  253|  3.74k|  h_ps_d->specificTo.mpeg.pCoef = pScratch;
  254|       |
  255|       |  /* Shortcuts to avoid deferencing and keep the code readable */
  256|  3.74k|  pBsData = &h_ps_d->bsData[h_ps_d->processSlot].mpeg;
  257|  3.74k|  bPsHeaderValid = pBsData->bPsHeaderValid;
  258|  3.74k|  bPsDataAvail =
  259|  3.74k|      (h_ps_d->bPsDataAvail[h_ps_d->processSlot] == ppt_mpeg) ? 1 : 0;
  ------------------
  |  Branch (259:7): [True: 1.66k, False: 2.07k]
  ------------------
  260|       |
  261|       |  /***************************************************************************************
  262|       |   * Decide whether to process or to conceal PS data or not. */
  263|       |
  264|  3.74k|  if ((h_ps_d->psDecodedPrv && !frameError && !bPsDataAvail) ||
  ------------------
  |  Branch (264:8): [True: 2.81k, False: 928]
  |  Branch (264:32): [True: 930, False: 1.88k]
  |  Branch (264:47): [True: 31, False: 899]
  ------------------
  265|  3.71k|      (!h_ps_d->psDecodedPrv &&
  ------------------
  |  Branch (265:8): [True: 928, False: 2.78k]
  ------------------
  266|    928|       (frameError || !bPsDataAvail || !bPsHeaderValid))) {
  ------------------
  |  Branch (266:9): [True: 162, False: 766]
  |  Branch (266:23): [True: 129, False: 637]
  |  Branch (266:40): [True: 48, False: 589]
  ------------------
  267|       |    /* Don't apply PS processing.
  268|       |     * Declare current PS header and bitstream data invalid. */
  269|    370|    pBsData->bPsHeaderValid = 0;
  270|    370|    h_ps_d->bPsDataAvail[h_ps_d->processSlot] = ppt_none;
  271|    370|    return (0);
  272|    370|  }
  273|       |
  274|  3.37k|  if (frameError ||
  ------------------
  |  Branch (274:7): [True: 1.88k, False: 1.48k]
  ------------------
  275|  1.95k|      !bPsHeaderValid) { /* no new PS data available (e.g. frame loss) */
  ------------------
  |  Branch (275:7): [True: 73, False: 1.41k]
  ------------------
  276|       |    /* => keep latest data constant (i.e. FIX with noEnv=0) */
  277|  1.95k|    pBsData->noEnv = 0;
  278|  1.95k|  }
  279|       |
  280|       |  /***************************************************************************************
  281|       |   * Decode bitstream payload or prepare parameter for concealment:
  282|       |   */
  283|  8.15k|  for (env = 0; env < pBsData->noEnv; env++) {
  ------------------
  |  Branch (283:17): [True: 4.78k, False: 3.37k]
  ------------------
  284|  4.78k|    SCHAR *aPrevIidIndex;
  285|  4.78k|    SCHAR *aPrevIccIndex;
  286|       |
  287|  4.78k|    UCHAR noIidSteps = pBsData->bFineIidQ ? NO_IID_STEPS_FINE : NO_IID_STEPS;
  ------------------
  |  |  162|    774|#define NO_IID_STEPS_FINE (15) /* 1 .. +15 */
  ------------------
                  UCHAR noIidSteps = pBsData->bFineIidQ ? NO_IID_STEPS_FINE : NO_IID_STEPS;
  ------------------
  |  |  161|  8.79k|#define NO_IID_STEPS (7)       /* 1 .. + 7 */
  ------------------
  |  Branch (287:24): [True: 774, False: 4.00k]
  ------------------
  288|       |
  289|  4.78k|    if (env == 0) {
  ------------------
  |  Branch (289:9): [True: 1.32k, False: 3.45k]
  ------------------
  290|  1.32k|      aPrevIidIndex = h_ps_d->specificTo.mpeg.aIidPrevFrameIndex;
  291|  1.32k|      aPrevIccIndex = h_ps_d->specificTo.mpeg.aIccPrevFrameIndex;
  292|  3.45k|    } else {
  293|  3.45k|      aPrevIidIndex = pBsData->aaIidIndex[env - 1];
  294|  3.45k|      aPrevIccIndex = pBsData->aaIccIndex[env - 1];
  295|  3.45k|    }
  296|       |
  297|  4.78k|    deltaDecodeArray(pBsData->bEnableIid, pBsData->aaIidIndex[env],
  298|  4.78k|                     aPrevIidIndex, pBsData->abIidDtFlag[env],
  299|  4.78k|                     FDK_sbrDecoder_aNoIidBins[pBsData->freqResIid],
  300|  4.78k|                     (pBsData->freqResIid) ? 1 : 2, -noIidSteps, noIidSteps);
  ------------------
  |  Branch (300:22): [True: 1.54k, False: 3.23k]
  ------------------
  301|       |
  302|  4.78k|    deltaDecodeArray(pBsData->bEnableIcc, pBsData->aaIccIndex[env],
  303|  4.78k|                     aPrevIccIndex, pBsData->abIccDtFlag[env],
  304|  4.78k|                     FDK_sbrDecoder_aNoIccBins[pBsData->freqResIcc],
  305|  4.78k|                     (pBsData->freqResIcc) ? 1 : 2, 0, NO_ICC_STEPS - 1);
  ------------------
  |  |  163|  4.78k|#define NO_ICC_STEPS (8)       /* 0 .. + 7 */
  ------------------
  |  Branch (305:22): [True: 867, False: 3.91k]
  ------------------
  306|  4.78k|  } /* for (env=0; env<pBsData->noEnv; env++) */
  307|       |
  308|       |  /* handling of FIX noEnv=0 */
  309|  3.37k|  if (pBsData->noEnv == 0) {
  ------------------
  |  Branch (309:7): [True: 2.04k, False: 1.32k]
  ------------------
  310|       |    /* set noEnv=1, keep last parameters or force 0 if not enabled */
  311|  2.04k|    pBsData->noEnv = 1;
  312|       |
  313|  2.04k|    if (pBsData->bEnableIid) {
  ------------------
  |  Branch (313:9): [True: 334, False: 1.71k]
  ------------------
  314|    334|      pBsData->bFineIidQ = h_ps_d->specificTo.mpeg.bPrevFrameFineIidQ;
  315|    334|      pBsData->freqResIid = h_ps_d->specificTo.mpeg.prevFreqResIid;
  316|  11.6k|      for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
  ------------------
  |  |  142|  11.6k|#define NO_HI_RES_IID_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  11.6k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (316:20): [True: 11.3k, False: 334]
  ------------------
  317|  11.3k|        pBsData->aaIidIndex[pBsData->noEnv - 1][gr] =
  318|  11.3k|            h_ps_d->specificTo.mpeg.aIidPrevFrameIndex[gr];
  319|  11.3k|      }
  320|  1.71k|    } else {
  321|  59.9k|      for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
  ------------------
  |  |  142|  59.9k|#define NO_HI_RES_IID_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  59.9k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (321:20): [True: 58.2k, False: 1.71k]
  ------------------
  322|  58.2k|        pBsData->aaIidIndex[pBsData->noEnv - 1][gr] = 0;
  323|  58.2k|      }
  324|  1.71k|    }
  325|       |
  326|  2.04k|    if (pBsData->bEnableIcc) {
  ------------------
  |  Branch (326:9): [True: 306, False: 1.74k]
  ------------------
  327|    306|      pBsData->freqResIcc = h_ps_d->specificTo.mpeg.prevFreqResIcc;
  328|  10.7k|      for (gr = 0; gr < NO_HI_RES_ICC_BINS; gr++) {
  ------------------
  |  |  143|  10.7k|#define NO_HI_RES_ICC_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  10.7k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (328:20): [True: 10.4k, False: 306]
  ------------------
  329|  10.4k|        pBsData->aaIccIndex[pBsData->noEnv - 1][gr] =
  330|  10.4k|            h_ps_d->specificTo.mpeg.aIccPrevFrameIndex[gr];
  331|  10.4k|      }
  332|  1.74k|    } else {
  333|  60.9k|      for (gr = 0; gr < NO_HI_RES_ICC_BINS; gr++) {
  ------------------
  |  |  143|  60.9k|#define NO_HI_RES_ICC_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  60.9k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (333:20): [True: 59.1k, False: 1.74k]
  ------------------
  334|  59.1k|        pBsData->aaIccIndex[pBsData->noEnv - 1][gr] = 0;
  335|  59.1k|      }
  336|  1.74k|    }
  337|  2.04k|  }
  338|       |
  339|       |  /* Update previous frame Iid quantization */
  340|  3.37k|  h_ps_d->specificTo.mpeg.bPrevFrameFineIidQ = pBsData->bFineIidQ;
  341|       |
  342|       |  /* Update previous frequency resolution for IID */
  343|  3.37k|  h_ps_d->specificTo.mpeg.prevFreqResIid = pBsData->freqResIid;
  344|       |
  345|       |  /* Update previous frequency resolution for ICC */
  346|  3.37k|  h_ps_d->specificTo.mpeg.prevFreqResIcc = pBsData->freqResIcc;
  347|       |
  348|       |  /* Update previous frame index buffers */
  349|   118k|  for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
  ------------------
  |  |  142|   118k|#define NO_HI_RES_IID_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|   118k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (349:16): [True: 114k, False: 3.37k]
  ------------------
  350|   114k|    h_ps_d->specificTo.mpeg.aIidPrevFrameIndex[gr] =
  351|   114k|        pBsData->aaIidIndex[pBsData->noEnv - 1][gr];
  352|   114k|  }
  353|   118k|  for (gr = 0; gr < NO_HI_RES_ICC_BINS; gr++) {
  ------------------
  |  |  143|   118k|#define NO_HI_RES_ICC_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|   118k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (353:16): [True: 114k, False: 3.37k]
  ------------------
  354|   114k|    h_ps_d->specificTo.mpeg.aIccPrevFrameIndex[gr] =
  355|   114k|        pBsData->aaIccIndex[pBsData->noEnv - 1][gr];
  356|   114k|  }
  357|       |
  358|       |  /* PS data from bitstream (if avail) was decoded now */
  359|  3.37k|  h_ps_d->bPsDataAvail[h_ps_d->processSlot] = ppt_none;
  360|       |
  361|       |  /* handling of env borders for FIX & VAR */
  362|  3.37k|  if (pBsData->bFrameClass == 0) {
  ------------------
  |  Branch (362:7): [True: 1.42k, False: 1.94k]
  ------------------
  363|       |    /* FIX_BORDERS NoEnv=0,1,2,4 */
  364|  1.42k|    pBsData->aEnvStartStop[0] = 0;
  365|  1.91k|    for (env = 1; env < pBsData->noEnv; env++) {
  ------------------
  |  Branch (365:19): [True: 485, False: 1.42k]
  ------------------
  366|    485|      pBsData->aEnvStartStop[env] =
  367|    485|          (env * h_ps_d->noSubSamples) / pBsData->noEnv;
  368|    485|    }
  369|  1.42k|    pBsData->aEnvStartStop[pBsData->noEnv] = h_ps_d->noSubSamples;
  370|       |    /* 1024 (32 slots) env borders:  0, 8, 16, 24, 32 */
  371|       |    /*  960 (30 slots) env borders:  0, 7, 15, 22, 30 */
  372|  1.94k|  } else { /* if (h_ps_d->bFrameClass == 0) */
  373|       |    /* VAR_BORDERS NoEnv=1,2,3,4 */
  374|  1.94k|    pBsData->aEnvStartStop[0] = 0;
  375|       |
  376|       |    /* handle case aEnvStartStop[noEnv]<noSubSample for VAR_BORDERS by
  377|       |       duplicating last PS parameters and incrementing noEnv */
  378|  1.94k|    if (pBsData->aEnvStartStop[pBsData->noEnv] < h_ps_d->noSubSamples) {
  ------------------
  |  Branch (378:9): [True: 1.73k, False: 216]
  ------------------
  379|  60.6k|      for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
  ------------------
  |  |  142|  60.6k|#define NO_HI_RES_IID_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  60.6k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (379:20): [True: 58.8k, False: 1.73k]
  ------------------
  380|  58.8k|        pBsData->aaIidIndex[pBsData->noEnv][gr] =
  381|  58.8k|            pBsData->aaIidIndex[pBsData->noEnv - 1][gr];
  382|  58.8k|      }
  383|  60.6k|      for (gr = 0; gr < NO_HI_RES_ICC_BINS; gr++) {
  ------------------
  |  |  143|  60.6k|#define NO_HI_RES_ICC_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  60.6k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (383:20): [True: 58.8k, False: 1.73k]
  ------------------
  384|  58.8k|        pBsData->aaIccIndex[pBsData->noEnv][gr] =
  385|  58.8k|            pBsData->aaIccIndex[pBsData->noEnv - 1][gr];
  386|  58.8k|      }
  387|  1.73k|      pBsData->noEnv++;
  388|  1.73k|      pBsData->aEnvStartStop[pBsData->noEnv] = h_ps_d->noSubSamples;
  389|  1.73k|    }
  390|       |
  391|       |    /* enforce strictly monotonic increasing borders */
  392|  6.65k|    for (env = 1; env < pBsData->noEnv; env++) {
  ------------------
  |  Branch (392:19): [True: 4.70k, False: 1.94k]
  ------------------
  393|  4.70k|      UCHAR thr;
  394|  4.70k|      thr = (UCHAR)h_ps_d->noSubSamples - (pBsData->noEnv - env);
  395|  4.70k|      if (pBsData->aEnvStartStop[env] > thr) {
  ------------------
  |  Branch (395:11): [True: 924, False: 3.77k]
  ------------------
  396|    924|        pBsData->aEnvStartStop[env] = thr;
  397|  3.77k|      } else {
  398|  3.77k|        thr = pBsData->aEnvStartStop[env - 1] + 1;
  399|  3.77k|        if (pBsData->aEnvStartStop[env] < thr) {
  ------------------
  |  Branch (399:13): [True: 2.54k, False: 1.23k]
  ------------------
  400|  2.54k|          pBsData->aEnvStartStop[env] = thr;
  401|  2.54k|        }
  402|  3.77k|      }
  403|  4.70k|    }
  404|  1.94k|  } /* if (h_ps_d->bFrameClass == 0) ... else */
  405|       |
  406|       |  /* copy data prior to possible 20<->34 in-place mapping */
  407|  11.9k|  for (env = 0; env < pBsData->noEnv; env++) {
  ------------------
  |  Branch (407:17): [True: 8.56k, False: 3.37k]
  ------------------
  408|  8.56k|    UCHAR i;
  409|   299k|    for (i = 0; i < NO_HI_RES_IID_BINS; i++) {
  ------------------
  |  |  142|   299k|#define NO_HI_RES_IID_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|   299k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (409:17): [True: 291k, False: 8.56k]
  ------------------
  410|   291k|      h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env][i] =
  411|   291k|          pBsData->aaIidIndex[env][i];
  412|   291k|    }
  413|   299k|    for (i = 0; i < NO_HI_RES_ICC_BINS; i++) {
  ------------------
  |  |  143|   299k|#define NO_HI_RES_ICC_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|   299k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  |  Branch (413:17): [True: 291k, False: 8.56k]
  ------------------
  414|   291k|      h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][i] =
  415|   291k|          pBsData->aaIccIndex[env][i];
  416|   291k|    }
  417|  8.56k|  }
  418|       |
  419|       |  /* MPEG baseline PS */
  420|       |  /* Baseline version of PS always uses the hybrid filter structure with 20
  421|       |   * stereo bands. */
  422|       |  /* If ICC/IID parameters for 34 stereo bands are decoded they have to be
  423|       |   * mapped to 20   */
  424|       |  /* stereo bands. */
  425|       |  /* Additionaly the IPD/OPD parameters won't be used. */
  426|       |
  427|  11.9k|  for (env = 0; env < pBsData->noEnv; env++) {
  ------------------
  |  Branch (427:17): [True: 8.56k, False: 3.37k]
  ------------------
  428|  8.56k|    if (pBsData->freqResIid == 2)
  ------------------
  |  Branch (428:9): [True: 1.98k, False: 6.57k]
  ------------------
  429|  1.98k|      map34IndexTo20(h_ps_d->specificTo.mpeg.pCoef->aaIidIndexMapped[env],
  430|  1.98k|                     NO_HI_RES_IID_BINS);
  ------------------
  |  |  142|  1.98k|#define NO_HI_RES_IID_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  1.98k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  431|  8.56k|    if (pBsData->freqResIcc == 2)
  ------------------
  |  Branch (431:9): [True: 1.15k, False: 7.41k]
  ------------------
  432|  1.15k|      map34IndexTo20(h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env],
  433|  1.15k|                     NO_HI_RES_ICC_BINS);
  ------------------
  |  |  143|  1.15k|#define NO_HI_RES_ICC_BINS (NO_HI_RES_BINS)
  |  |  ------------------
  |  |  |  |  138|  1.15k|#define NO_HI_RES_BINS (34)
  |  |  ------------------
  ------------------
  434|       |
  435|       |    /* IPD/OPD is disabled in baseline version and thus was removed here */
  436|  8.56k|  }
  437|       |
  438|  3.37k|  return (1);
  439|  3.74k|}
_Z10ReadPsDataP6PS_DECP13FDK_BITSTREAMi:
  453|  8.92k|) {
  454|  8.92k|  MPEG_PS_BS_DATA *pBsData;
  455|       |
  456|  8.92k|  UCHAR gr, env;
  457|  8.92k|  SCHAR dtFlag;
  458|  8.92k|  INT startbits;
  459|  8.92k|  Huffman CurrentTable;
  460|  8.92k|  SCHAR bEnableHeader;
  461|       |
  462|  8.92k|  if (!h_ps_d) return 0;
  ------------------
  |  Branch (462:7): [True: 0, False: 8.92k]
  ------------------
  463|       |
  464|  8.92k|  pBsData = &h_ps_d->bsData[h_ps_d->bsReadSlot].mpeg;
  465|       |
  466|  8.92k|  if (h_ps_d->bsReadSlot != h_ps_d->bsLastSlot) {
  ------------------
  |  Branch (466:7): [True: 6.65k, False: 2.27k]
  ------------------
  467|       |    /* Copy last header data */
  468|  6.65k|    FDKmemcpy(pBsData, &h_ps_d->bsData[h_ps_d->bsLastSlot].mpeg,
  469|  6.65k|              sizeof(MPEG_PS_BS_DATA));
  470|  6.65k|  }
  471|       |
  472|  8.92k|  startbits = (INT)FDKgetValidBits(hBitBuf);
  473|       |
  474|  8.92k|  bEnableHeader = (SCHAR)FDKreadBits(hBitBuf, 1);
  475|       |
  476|       |  /* Read header */
  477|  8.92k|  if (bEnableHeader) {
  ------------------
  |  Branch (477:7): [True: 4.50k, False: 4.41k]
  ------------------
  478|  4.50k|    pBsData->bPsHeaderValid = 1;
  479|  4.50k|    pBsData->bEnableIid = (UCHAR)FDKreadBits(hBitBuf, 1);
  480|  4.50k|    if (pBsData->bEnableIid) {
  ------------------
  |  Branch (480:9): [True: 2.16k, False: 2.33k]
  ------------------
  481|  2.16k|      pBsData->modeIid = (UCHAR)FDKreadBits(hBitBuf, 3);
  482|  2.16k|    }
  483|       |
  484|  4.50k|    pBsData->bEnableIcc = (UCHAR)FDKreadBits(hBitBuf, 1);
  485|  4.50k|    if (pBsData->bEnableIcc) {
  ------------------
  |  Branch (485:9): [True: 1.45k, False: 3.05k]
  ------------------
  486|  1.45k|      pBsData->modeIcc = (UCHAR)FDKreadBits(hBitBuf, 3);
  487|  1.45k|    }
  488|       |
  489|  4.50k|    pBsData->bEnableExt = (UCHAR)FDKreadBits(hBitBuf, 1);
  490|  4.50k|  }
  491|       |
  492|  8.92k|  pBsData->bFrameClass = (UCHAR)FDKreadBits(hBitBuf, 1);
  493|  8.92k|  if (pBsData->bFrameClass == 0) {
  ------------------
  |  Branch (493:7): [True: 2.14k, False: 6.77k]
  ------------------
  494|       |    /* FIX_BORDERS NoEnv=0,1,2,4 */
  495|  2.14k|    pBsData->noEnv =
  496|  2.14k|        FDK_sbrDecoder_aFixNoEnvDecode[(UCHAR)FDKreadBits(hBitBuf, 2)];
  497|       |    /* all additional handling of env borders is now in DecodePs() */
  498|  6.77k|  } else {
  499|       |    /* VAR_BORDERS NoEnv=1,2,3,4 */
  500|  6.77k|    pBsData->noEnv = 1 + (UCHAR)FDKreadBits(hBitBuf, 2);
  501|  27.8k|    for (env = 1; env < pBsData->noEnv + 1; env++)
  ------------------
  |  Branch (501:19): [True: 21.0k, False: 6.77k]
  ------------------
  502|  21.0k|      pBsData->aEnvStartStop[env] = ((UCHAR)FDKreadBits(hBitBuf, 5)) + 1;
  503|       |    /* all additional handling of env borders is now in DecodePs() */
  504|  6.77k|  }
  505|       |
  506|       |  /* verify that IID & ICC modes (quant grid, freq res) are supported */
  507|  8.92k|  if ((pBsData->modeIid > 5) || (pBsData->modeIcc > 5)) {
  ------------------
  |  Branch (507:7): [True: 309, False: 8.61k]
  |  Branch (507:33): [True: 431, False: 8.18k]
  ------------------
  508|       |    /* no useful PS data could be read from bitstream */
  509|    740|    h_ps_d->bPsDataAvail[h_ps_d->bsReadSlot] = ppt_none;
  510|       |    /* discard all remaining bits */
  511|    740|    nBitsLeft -= startbits - (INT)FDKgetValidBits(hBitBuf);
  512|  14.3k|    while (nBitsLeft > 0) {
  ------------------
  |  Branch (512:12): [True: 13.6k, False: 740]
  ------------------
  513|  13.6k|      int i = nBitsLeft;
  514|  13.6k|      if (i > 8) {
  ------------------
  |  Branch (514:11): [True: 13.2k, False: 375]
  ------------------
  515|  13.2k|        i = 8;
  516|  13.2k|      }
  517|  13.6k|      FDKreadBits(hBitBuf, i);
  518|  13.6k|      nBitsLeft -= i;
  519|  13.6k|    }
  520|    740|    return (UINT)(startbits - (INT)FDKgetValidBits(hBitBuf));
  521|    740|  }
  522|       |
  523|  8.18k|  if (pBsData->modeIid > 2) {
  ------------------
  |  Branch (523:7): [True: 1.96k, False: 6.21k]
  ------------------
  524|  1.96k|    pBsData->freqResIid = pBsData->modeIid - 3;
  525|  1.96k|    pBsData->bFineIidQ = 1;
  526|  6.21k|  } else {
  527|  6.21k|    pBsData->freqResIid = pBsData->modeIid;
  528|  6.21k|    pBsData->bFineIidQ = 0;
  529|  6.21k|  }
  530|       |
  531|  8.18k|  if (pBsData->modeIcc > 2) {
  ------------------
  |  Branch (531:7): [True: 1.96k, False: 6.22k]
  ------------------
  532|  1.96k|    pBsData->freqResIcc = pBsData->modeIcc - 3;
  533|  6.22k|  } else {
  534|  6.22k|    pBsData->freqResIcc = pBsData->modeIcc;
  535|  6.22k|  }
  536|       |
  537|       |  /* Extract IID data */
  538|  8.18k|  if (pBsData->bEnableIid) {
  ------------------
  |  Branch (538:7): [True: 3.55k, False: 4.62k]
  ------------------
  539|  13.7k|    for (env = 0; env < pBsData->noEnv; env++) {
  ------------------
  |  Branch (539:19): [True: 10.1k, False: 3.55k]
  ------------------
  540|  10.1k|      dtFlag = (SCHAR)FDKreadBits(hBitBuf, 1);
  541|  10.1k|      if (!dtFlag) {
  ------------------
  |  Branch (541:11): [True: 5.73k, False: 4.42k]
  ------------------
  542|  5.73k|        if (pBsData->bFineIidQ)
  ------------------
  |  Branch (542:13): [True: 3.12k, False: 2.61k]
  ------------------
  543|  3.12k|          CurrentTable = (Huffman)&aBookPsIidFineFreqDecode;
  544|  2.61k|        else
  545|  2.61k|          CurrentTable = (Huffman)&aBookPsIidFreqDecode;
  546|  5.73k|      } else {
  547|  4.42k|        if (pBsData->bFineIidQ)
  ------------------
  |  Branch (547:13): [True: 2.43k, False: 1.98k]
  ------------------
  548|  2.43k|          CurrentTable = (Huffman)&aBookPsIidFineTimeDecode;
  549|  1.98k|        else
  550|  1.98k|          CurrentTable = (Huffman)&aBookPsIidTimeDecode;
  551|  4.42k|      }
  552|       |
  553|   231k|      for (gr = 0; gr < FDK_sbrDecoder_aNoIidBins[pBsData->freqResIid]; gr++)
  ------------------
  |  Branch (553:20): [True: 221k, False: 10.1k]
  ------------------
  554|   221k|        pBsData->aaIidIndex[env][gr] =
  555|   221k|            decode_huff_cw(CurrentTable, hBitBuf, NULL);
  556|  10.1k|      pBsData->abIidDtFlag[env] = dtFlag;
  557|  10.1k|    }
  558|  3.55k|  }
  559|       |
  560|       |  /* Extract ICC data */
  561|  8.18k|  if (pBsData->bEnableIcc) {
  ------------------
  |  Branch (561:7): [True: 2.79k, False: 5.38k]
  ------------------
  562|  9.41k|    for (env = 0; env < pBsData->noEnv; env++) {
  ------------------
  |  Branch (562:19): [True: 6.61k, False: 2.79k]
  ------------------
  563|  6.61k|      dtFlag = (SCHAR)FDKreadBits(hBitBuf, 1);
  564|  6.61k|      if (!dtFlag)
  ------------------
  |  Branch (564:11): [True: 4.89k, False: 1.72k]
  ------------------
  565|  4.89k|        CurrentTable = (Huffman)&aBookPsIccFreqDecode;
  566|  1.72k|      else
  567|  1.72k|        CurrentTable = (Huffman)&aBookPsIccTimeDecode;
  568|       |
  569|   133k|      for (gr = 0; gr < FDK_sbrDecoder_aNoIccBins[pBsData->freqResIcc]; gr++)
  ------------------
  |  Branch (569:20): [True: 126k, False: 6.61k]
  ------------------
  570|   126k|        pBsData->aaIccIndex[env][gr] =
  571|   126k|            decode_huff_cw(CurrentTable, hBitBuf, NULL);
  572|  6.61k|      pBsData->abIccDtFlag[env] = dtFlag;
  573|  6.61k|    }
  574|  2.79k|  }
  575|       |
  576|  8.18k|  if (pBsData->bEnableExt) {
  ------------------
  |  Branch (576:7): [True: 2.88k, False: 5.30k]
  ------------------
  577|       |    /*!
  578|       |    Decoders that support only the baseline version of the PS tool are allowed
  579|       |    to ignore the IPD/OPD data, but according header data has to be parsed.
  580|       |    ISO/IEC 14496-3 Subpart 8 Annex 4
  581|       |    */
  582|       |
  583|  2.88k|    int cnt = FDKreadBits(hBitBuf, PS_EXTENSION_SIZE_BITS);
  ------------------
  |  |  126|  2.88k|#define PS_EXTENSION_SIZE_BITS (4)
  ------------------
  584|  2.88k|    if (cnt == (1 << PS_EXTENSION_SIZE_BITS) - 1) {
  ------------------
  |  |  126|  2.88k|#define PS_EXTENSION_SIZE_BITS (4)
  ------------------
  |  Branch (584:9): [True: 665, False: 2.21k]
  ------------------
  585|    665|      cnt += FDKreadBits(hBitBuf, PS_EXTENSION_ESC_COUNT_BITS);
  ------------------
  |  |  127|    665|#define PS_EXTENSION_ESC_COUNT_BITS (8)
  ------------------
  586|    665|    }
  587|   131k|    while (cnt--) FDKreadBits(hBitBuf, 8);
  ------------------
  |  Branch (587:12): [True: 128k, False: 2.88k]
  ------------------
  588|  2.88k|  }
  589|       |
  590|       |  /* new PS data was read from bitstream */
  591|  8.18k|  h_ps_d->bPsDataAvail[h_ps_d->bsReadSlot] = ppt_mpeg;
  592|       |
  593|  8.18k|  return (startbits - (INT)FDKgetValidBits(hBitBuf));
  594|  8.92k|}
psbitdec.cpp:_ZL16deltaDecodeArrayaPaS_ahhaa:
  172|  9.56k|    SCHAR minIdx, SCHAR maxIdx) {
  173|  9.56k|  int i;
  174|       |
  175|       |  /* Delta decode */
  176|  9.56k|  if (enable == 1) {
  ------------------
  |  Branch (176:7): [True: 1.75k, False: 7.80k]
  ------------------
  177|  1.75k|    if (DtDf == 0) { /* Delta coded in freq */
  ------------------
  |  Branch (177:9): [True: 1.14k, False: 609]
  ------------------
  178|  1.14k|      aIndex[0] = 0 + aIndex[0];
  179|  1.14k|      aIndex[0] = limitMinMax(aIndex[0], minIdx, maxIdx);
  180|  32.0k|      for (i = 1; i < nrElements; i++) {
  ------------------
  |  Branch (180:19): [True: 30.9k, False: 1.14k]
  ------------------
  181|  30.9k|        aIndex[i] = aIndex[i - 1] + aIndex[i];
  182|  30.9k|        aIndex[i] = limitMinMax(aIndex[i], minIdx, maxIdx);
  183|  30.9k|      }
  184|  1.14k|    } else { /* Delta time */
  185|  19.7k|      for (i = 0; i < nrElements; i++) {
  ------------------
  |  Branch (185:19): [True: 19.1k, False: 609]
  ------------------
  186|  19.1k|        aIndex[i] = aPrevFrameIndex[i * stride] + aIndex[i];
  187|  19.1k|        aIndex[i] = limitMinMax(aIndex[i], minIdx, maxIdx);
  188|  19.1k|      }
  189|    609|    }
  190|  7.80k|  } else { /* No data is sent, set index to zero */
  191|   107k|    for (i = 0; i < nrElements; i++) {
  ------------------
  |  Branch (191:17): [True: 100k, False: 7.80k]
  ------------------
  192|   100k|      aIndex[i] = 0;
  193|   100k|    }
  194|  7.80k|  }
  195|  9.56k|  if (stride == 2) {
  ------------------
  |  Branch (195:7): [True: 7.15k, False: 2.41k]
  ------------------
  196|   143k|    for (i = nrElements * stride - 1; i > 0; i--) {
  ------------------
  |  Branch (196:39): [True: 135k, False: 7.15k]
  ------------------
  197|   135k|      aIndex[i] = aIndex[i >> 1];
  198|   135k|    }
  199|  7.15k|  }
  200|  9.56k|}
psbitdec.cpp:_ZL11limitMinMaxaaa:
  146|  51.1k|static SCHAR limitMinMax(SCHAR i, SCHAR min, SCHAR max) {
  147|  51.1k|  if (i < min)
  ------------------
  |  Branch (147:7): [True: 2.31k, False: 48.8k]
  ------------------
  148|  2.31k|    return min;
  149|  48.8k|  else if (i > max)
  ------------------
  |  Branch (149:12): [True: 1.33k, False: 47.5k]
  ------------------
  150|  1.33k|    return max;
  151|  47.5k|  else
  152|  47.5k|    return i;
  153|  51.1k|}
psbitdec.cpp:_ZL14map34IndexTo20Pah:
  211|  3.13k|{
  212|  3.13k|  aIndex[0] = (2 * aIndex[0] + aIndex[1]) / 3;
  213|  3.13k|  aIndex[1] = (aIndex[1] + 2 * aIndex[2]) / 3;
  214|  3.13k|  aIndex[2] = (2 * aIndex[3] + aIndex[4]) / 3;
  215|  3.13k|  aIndex[3] = (aIndex[4] + 2 * aIndex[5]) / 3;
  216|  3.13k|  aIndex[4] = (aIndex[6] + aIndex[7]) / 2;
  217|  3.13k|  aIndex[5] = (aIndex[8] + aIndex[9]) / 2;
  218|  3.13k|  aIndex[6] = aIndex[10];
  219|  3.13k|  aIndex[7] = aIndex[11];
  220|  3.13k|  aIndex[8] = (aIndex[12] + aIndex[13]) / 2;
  221|  3.13k|  aIndex[9] = (aIndex[14] + aIndex[15]) / 2;
  222|  3.13k|  aIndex[10] = aIndex[16];
  223|       |  /* For IPD/OPD it stops here */
  224|       |
  225|  3.13k|  if (noBins == NO_HI_RES_BINS) {
  ------------------
  |  |  138|  3.13k|#define NO_HI_RES_BINS (34)
  ------------------
  |  Branch (225:7): [True: 3.13k, False: 0]
  ------------------
  226|  3.13k|    aIndex[11] = aIndex[17];
  227|  3.13k|    aIndex[12] = aIndex[18];
  228|  3.13k|    aIndex[13] = aIndex[19];
  229|  3.13k|    aIndex[14] = (aIndex[20] + aIndex[21]) / 2;
  230|  3.13k|    aIndex[15] = (aIndex[22] + aIndex[23]) / 2;
  231|  3.13k|    aIndex[16] = (aIndex[24] + aIndex[25]) / 2;
  232|  3.13k|    aIndex[17] = (aIndex[26] + aIndex[27]) / 2;
  233|  3.13k|    aIndex[18] = (aIndex[28] + aIndex[29] + aIndex[30] + aIndex[31]) / 4;
  234|  3.13k|    aIndex[19] = (aIndex[32] + aIndex[33]) / 2;
  235|  3.13k|  }
  236|  3.13k|}
psbitdec.cpp:_ZL14decode_huff_cwPA2_KaP13FDK_BITSTREAMPi:
  122|   347k|{
  123|   347k|  UCHAR bit = 0;
  124|   347k|  SCHAR index = 0;
  125|   347k|  UCHAR bitCount = 0;
  126|       |
  127|  1.14M|  while (index >= 0) {
  ------------------
  |  Branch (127:10): [True: 793k, False: 347k]
  ------------------
  128|   793k|    bit = FDKreadBits(hBitBuf, 1);
  129|   793k|    bitCount++;
  130|   793k|    index = h[index][bit];
  131|   793k|  }
  132|   347k|  if (length) {
  ------------------
  |  Branch (132:7): [True: 0, False: 347k]
  ------------------
  133|      0|    *length = bitCount;
  134|      0|  }
  135|   347k|  return (index + 64); /* Add offset */
  136|   347k|}

_Z11CreatePsDecPP6PS_DECi:
  140|  3.44k|                int aacSamplesPerFrame) {
  141|  3.44k|  SBR_ERROR errorInfo = SBRDEC_OK;
  142|  3.44k|  HANDLE_PS_DEC h_ps_d;
  143|  3.44k|  int i;
  144|       |
  145|  3.44k|  if (*h_PS_DEC == NULL) {
  ------------------
  |  Branch (145:7): [True: 1.68k, False: 1.76k]
  ------------------
  146|       |    /* Get ps dec ram */
  147|  1.68k|    h_ps_d = GetRam_ps_dec();
  148|  1.68k|    if (h_ps_d == NULL) {
  ------------------
  |  Branch (148:9): [True: 0, False: 1.68k]
  ------------------
  149|      0|      goto bail;
  150|      0|    }
  151|  1.76k|  } else {
  152|       |    /* Reset an open instance */
  153|  1.76k|    h_ps_d = *h_PS_DEC;
  154|  1.76k|  }
  155|       |
  156|       |  /*
  157|       |   * Create Analysis Hybrid filterbank.
  158|       |   */
  159|  3.44k|  FDKhybridAnalysisOpen(&h_ps_d->specificTo.mpeg.hybridAnalysis,
  160|  3.44k|                        h_ps_d->specificTo.mpeg.pHybridAnaStatesLFdmx,
  161|  3.44k|                        sizeof(h_ps_d->specificTo.mpeg.pHybridAnaStatesLFdmx),
  162|  3.44k|                        NULL, 0);
  163|       |
  164|       |  /* initialisation */
  165|  3.44k|  switch (aacSamplesPerFrame) {
  166|  1.69k|    case 960:
  ------------------
  |  Branch (166:5): [True: 1.69k, False: 1.75k]
  ------------------
  167|  1.69k|      h_ps_d->noSubSamples = 30; /* col */
  168|  1.69k|      break;
  169|  1.75k|    case 1024:
  ------------------
  |  Branch (169:5): [True: 1.75k, False: 1.69k]
  ------------------
  170|  1.75k|      h_ps_d->noSubSamples = 32; /* col */
  171|  1.75k|      break;
  172|      0|    default:
  ------------------
  |  Branch (172:5): [True: 0, False: 3.44k]
  ------------------
  173|      0|      h_ps_d->noSubSamples = -1;
  174|      0|      break;
  175|  3.44k|  }
  176|       |
  177|  3.44k|  if (h_ps_d->noSubSamples > MAX_NUM_COL || h_ps_d->noSubSamples <= 0) {
  ------------------
  |  |  130|  6.89k|#define MAX_NUM_COL (32)
  ------------------
  |  Branch (177:7): [True: 0, False: 3.44k]
  |  Branch (177:45): [True: 0, False: 3.44k]
  ------------------
  178|      0|    goto bail;
  179|      0|  }
  180|  3.44k|  h_ps_d->noChannels = NO_QMF_CHANNELS; /* row */
  ------------------
  |  |  129|  3.44k|#define NO_QMF_CHANNELS (64)
  ------------------
  181|       |
  182|  3.44k|  h_ps_d->psDecodedPrv = 0;
  183|  3.44k|  h_ps_d->procFrameBased = -1;
  184|  10.3k|  for (i = 0; i < (1) + 1; i++) {
  ------------------
  |  Branch (184:15): [True: 6.89k, False: 3.44k]
  ------------------
  185|  6.89k|    h_ps_d->bPsDataAvail[i] = ppt_none;
  186|  6.89k|  }
  187|  3.44k|  {
  188|  3.44k|    int error;
  189|  3.44k|    error = FDKdecorrelateOpen(&(h_ps_d->specificTo.mpeg.apDecor),
  190|  3.44k|                               h_ps_d->specificTo.mpeg.decorrBufferCplx,
  191|  3.44k|                               (2 * ((825) + (373))));
  192|  3.44k|    if (error) goto bail;
  ------------------
  |  Branch (192:9): [True: 0, False: 3.44k]
  ------------------
  193|  3.44k|  }
  194|       |
  195|  10.3k|  for (i = 0; i < (1) + 1; i++) {
  ------------------
  |  Branch (195:15): [True: 6.89k, False: 3.44k]
  ------------------
  196|  6.89k|    FDKmemclear(&h_ps_d->bsData[i].mpeg, sizeof(MPEG_PS_BS_DATA));
  197|  6.89k|  }
  198|       |
  199|  3.44k|  errorInfo = ResetPsDec(h_ps_d);
  200|       |
  201|  3.44k|  if (errorInfo != SBRDEC_OK) goto bail;
  ------------------
  |  Branch (201:7): [True: 0, False: 3.44k]
  ------------------
  202|       |
  203|  3.44k|  *h_PS_DEC = h_ps_d;
  204|       |
  205|  3.44k|  return 0;
  206|       |
  207|      0|bail:
  208|      0|  if (h_ps_d != NULL) {
  ------------------
  |  Branch (208:7): [True: 0, False: 0]
  ------------------
  209|      0|    DeletePsDec(&h_ps_d);
  210|      0|  }
  211|       |
  212|      0|  return -1;
  213|  3.44k|} /*END CreatePsDec */
_Z11DeletePsDecPP6PS_DEC:
  223|  1.68k|{
  224|  1.68k|  if (*h_PS_DEC == NULL) {
  ------------------
  |  Branch (224:7): [True: 0, False: 1.68k]
  ------------------
  225|      0|    return -1;
  226|      0|  }
  227|       |
  228|  1.68k|  {
  229|  1.68k|    HANDLE_PS_DEC h_ps_d = *h_PS_DEC;
  230|  1.68k|    FDKdecorrelateClose(&(h_ps_d->specificTo.mpeg.apDecor));
  231|  1.68k|  }
  232|       |
  233|  1.68k|  FreeRam_ps_dec(h_PS_DEC);
  234|       |
  235|  1.68k|  return 0;
  236|  1.68k|} /*END DeletePsDec */
_Z10ResetPsDecP6PS_DEC:
  246|  3.44k|{
  247|  3.44k|  SBR_ERROR errorInfo = SBRDEC_OK;
  248|  3.44k|  INT i;
  249|       |
  250|       |  /* explicitly init state variables to safe values (until first ps header
  251|       |   * arrives) */
  252|       |
  253|  3.44k|  h_ps_d->specificTo.mpeg.lastUsb = 0;
  254|       |
  255|       |  /*
  256|       |   * Initialize Analysis Hybrid filterbank.
  257|       |   */
  258|  3.44k|  FDKhybridAnalysisInit(&h_ps_d->specificTo.mpeg.hybridAnalysis, THREE_TO_TEN,
  259|  3.44k|                        NO_QMF_BANDS_HYBRID20, NO_QMF_BANDS_HYBRID20, 1);
  ------------------
  |  |  132|  3.44k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
                                      NO_QMF_BANDS_HYBRID20, NO_QMF_BANDS_HYBRID20, 1);
  ------------------
  |  |  132|  3.44k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  260|       |
  261|       |  /*
  262|       |   * Initialize Synthesis Hybrid filterbank.
  263|       |   */
  264|  10.3k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (264:15): [True: 6.89k, False: 3.44k]
  ------------------
  265|  6.89k|    FDKhybridSynthesisInit(&h_ps_d->specificTo.mpeg.hybridSynthesis[i],
  266|  6.89k|                           THREE_TO_TEN, NO_QMF_CHANNELS, NO_QMF_CHANNELS);
  ------------------
  |  |  129|  6.89k|#define NO_QMF_CHANNELS (64)
  ------------------
                                         THREE_TO_TEN, NO_QMF_CHANNELS, NO_QMF_CHANNELS);
  ------------------
  |  |  129|  6.89k|#define NO_QMF_CHANNELS (64)
  ------------------
  267|  6.89k|  }
  268|  3.44k|  {
  269|  3.44k|    INT error;
  270|  3.44k|    error = FDKdecorrelateInit(&h_ps_d->specificTo.mpeg.apDecor, 71, DECORR_PS,
  271|  3.44k|                               DUCKER_AUTOMATIC, 0, 0, 0, 0, 1, /* isLegacyPS */
  272|  3.44k|                               1);
  273|  3.44k|    if (error) return SBRDEC_NOT_INITIALIZED;
  ------------------
  |  Branch (273:9): [True: 0, False: 3.44k]
  ------------------
  274|  3.44k|  }
  275|       |
  276|  79.2k|  for (i = 0; i < NO_IID_GROUPS; i++) {
  ------------------
  |  |  157|  79.2k|#define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |  151|  79.2k|#define SUBQMF_GROUPS (10)
  |  |  ------------------
  |  |               #define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |  152|  79.2k|#define QMF_GROUPS (12)
  |  |  ------------------
  ------------------
  |  Branch (276:15): [True: 75.8k, False: 3.44k]
  ------------------
  277|  75.8k|    h_ps_d->specificTo.mpeg.h11rPrev[i] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  75.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  75.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 75.8k, Folded]
  |  |  ------------------
  |  |  194|  75.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  75.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  75.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 75.8k]
  |  |  ------------------
  |  |  195|  75.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  75.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  75.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  75.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  75.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  75.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  75.8k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  75.8k|    h_ps_d->specificTo.mpeg.h12rPrev[i] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  75.8k|  (FIXP_DBL)(                                                                \
  |  |  193|  75.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 75.8k, Folded]
  |  |  ------------------
  |  |  194|  75.8k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  75.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  75.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 75.8k]
  |  |  ------------------
  |  |  195|  75.8k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  75.8k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  75.8k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  75.8k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  75.8k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  75.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  75.8k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|  75.8k|  }
  280|       |
  281|  3.44k|  FDKmemclear(h_ps_d->specificTo.mpeg.h21rPrev,
  282|  3.44k|              sizeof(h_ps_d->specificTo.mpeg.h21rPrev));
  283|  3.44k|  FDKmemclear(h_ps_d->specificTo.mpeg.h22rPrev,
  284|  3.44k|              sizeof(h_ps_d->specificTo.mpeg.h22rPrev));
  285|       |
  286|  3.44k|  return errorInfo;
  287|  3.44k|}
_Z19PreparePsProcessingP6PS_DECPKPKiS4_i:
  297|  3.37k|                         const int scaleFactorLowBand) {
  298|  3.37k|  if (h_ps_d->procFrameBased ==
  ------------------
  |  Branch (298:7): [True: 446, False: 2.92k]
  ------------------
  299|  3.37k|      1) /* If we have switched from frame to slot based processing  */
  300|    446|  {      /* fill hybrid delay buffer.                                */
  301|    446|    int i, j;
  302|       |
  303|  3.12k|    for (i = 0; i < HYBRID_FILTER_DELAY; i++) {
  ------------------
  |  |  134|  3.12k|#define HYBRID_FILTER_DELAY (6)
  ------------------
  |  Branch (303:17): [True: 2.67k, False: 446]
  ------------------
  304|  2.67k|      FIXP_DBL qmfInputData[2][NO_QMF_BANDS_HYBRID20];
  305|  2.67k|      FIXP_DBL hybridOutputData[2][NO_SUB_QMF_CHANNELS];
  306|       |
  307|  10.7k|      for (j = 0; j < NO_QMF_BANDS_HYBRID20; j++) {
  ------------------
  |  |  132|  10.7k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  |  Branch (307:19): [True: 8.02k, False: 2.67k]
  ------------------
  308|  8.02k|        qmfInputData[0][j] =
  309|  8.02k|            scaleValue(rIntBufferLeft[i][j], scaleFactorLowBand);
  310|  8.02k|        qmfInputData[1][j] =
  311|  8.02k|            scaleValue(iIntBufferLeft[i][j], scaleFactorLowBand);
  312|  8.02k|      }
  313|       |
  314|  2.67k|      FDKhybridAnalysisApply(&h_ps_d->specificTo.mpeg.hybridAnalysis,
  315|  2.67k|                             qmfInputData[0], qmfInputData[1],
  316|  2.67k|                             hybridOutputData[0], hybridOutputData[1]);
  317|  2.67k|    }
  318|    446|    h_ps_d->procFrameBased = 0; /* switch to slot based processing. */
  319|       |
  320|    446|  } /* procFrameBased==1 */
  321|  3.37k|}
_Z21initSlotBasedRotationP6PS_DECii:
  325|  8.56k|    int env, int usb) {
  326|  8.56k|  INT group = 0;
  327|  8.56k|  INT bin = 0;
  328|  8.56k|  INT noIidSteps;
  329|       |
  330|  8.56k|  FIXP_SGL invL;
  331|  8.56k|  FIXP_DBL ScaleL, ScaleR;
  332|  8.56k|  FIXP_DBL Alpha, Beta;
  333|  8.56k|  FIXP_DBL h11r, h12r, h21r, h22r;
  334|       |
  335|  8.56k|  const FIXP_DBL *PScaleFactors;
  336|       |
  337|  8.56k|  if (h_ps_d->bsData[h_ps_d->processSlot].mpeg.bFineIidQ) {
  ------------------
  |  Branch (337:7): [True: 1.05k, False: 7.50k]
  ------------------
  338|  1.05k|    PScaleFactors = ScaleFactorsFine; /* values are shiftet right by one */
  339|  1.05k|    noIidSteps = NO_IID_STEPS_FINE;
  ------------------
  |  |  162|  1.05k|#define NO_IID_STEPS_FINE (15) /* 1 .. +15 */
  ------------------
  340|  7.50k|  } else {
  341|  7.50k|    PScaleFactors = ScaleFactors; /* values are shiftet right by one */
  342|  7.50k|    noIidSteps = NO_IID_STEPS;
  ------------------
  |  |  161|  7.50k|#define NO_IID_STEPS (7)       /* 1 .. + 7 */
  ------------------
  343|  7.50k|  }
  344|       |
  345|       |  /* dequantize and decode */
  346|   196k|  for (group = 0; group < NO_IID_GROUPS; group++) {
  ------------------
  |  |  157|   196k|#define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |  151|   196k|#define SUBQMF_GROUPS (10)
  |  |  ------------------
  |  |               #define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |  152|   196k|#define QMF_GROUPS (12)
  |  |  ------------------
  ------------------
  |  Branch (346:19): [True: 188k, False: 8.56k]
  ------------------
  347|   188k|    bin = bins2groupMap20[group];
  348|       |
  349|       |    /*!
  350|       |    <h3> type 'A' rotation </h3>
  351|       |    mixing procedure R_a, used in baseline version<br>
  352|       |
  353|       |     Scale-factor vectors c1 and c2 are precalculated in initPsTables () and
  354|       |    stored in scaleFactors[] and scaleFactorsFine[] = pScaleFactors []. From the
  355|       |    linearized IID parameters (intensity differences), two scale factors are
  356|       |     calculated. They are used to obtain the coefficients h11... h22.
  357|       |    */
  358|       |
  359|       |    /* ScaleR and ScaleL are scaled by 1 shift right */
  360|       |
  361|   188k|    ScaleR = PScaleFactors[noIidSteps + h_ps_d->specificTo.mpeg.pCoef
  362|   188k|                                            ->aaIidIndexMapped[env][bin]];
  363|   188k|    ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.pCoef
  364|   188k|                                            ->aaIidIndexMapped[env][bin]];
  365|       |
  366|   188k|    Beta = fMult(
  367|   188k|        fMult(Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]],
  368|   188k|              (ScaleR - ScaleL)),
  369|   188k|        FIXP_SQRT05);
  ------------------
  |  |  169|   188k|#define FIXP_SQRT05 ((FIXP_DBL)0x5a827980) /* 1/SQRT2 */
  ------------------
  370|   188k|    Alpha =
  371|   188k|        Alphas[h_ps_d->specificTo.mpeg.pCoef->aaIccIndexMapped[env][bin]] >> 1;
  372|       |
  373|       |    /* Alpha and Beta are now both scaled by 2 shifts right */
  374|       |
  375|       |    /* calculate the coefficients h11... h22 from scale-factors and ICC
  376|       |     * parameters */
  377|       |
  378|       |    /* h values are scaled by 1 shift right */
  379|   188k|    {
  380|   188k|      FIXP_DBL trigData[4];
  381|       |
  382|   188k|      inline_fixp_cos_sin(Beta + Alpha, Beta - Alpha, 2, trigData);
  383|   188k|      h11r = fMult(ScaleL, trigData[0]);
  384|   188k|      h12r = fMult(ScaleR, trigData[2]);
  385|   188k|      h21r = fMult(ScaleL, trigData[1]);
  386|   188k|      h22r = fMult(ScaleR, trigData[3]);
  387|   188k|    }
  388|       |    /*****************************************************************************************/
  389|       |    /* Interpolation of the matrices H11... H22: */
  390|       |    /*                                                                                       */
  391|       |    /* H11(k,n) = H11(k,n[e]) + (n-n[e]) * (H11(k,n[e+1] - H11(k,n[e])) /
  392|       |     * (n[e+1] - n[e])    */
  393|       |    /* ... */
  394|       |    /*****************************************************************************************/
  395|       |
  396|       |    /* invL = 1/(length of envelope) */
  397|   188k|    invL = FX_DBL2FX_SGL(GetInvInt(
  ------------------
  |  |  220|   188k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   188k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   188k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  398|   188k|        h_ps_d->bsData[h_ps_d->processSlot].mpeg.aEnvStartStop[env + 1] -
  399|   188k|        h_ps_d->bsData[h_ps_d->processSlot].mpeg.aEnvStartStop[env]));
  400|       |
  401|   188k|    h_ps_d->specificTo.mpeg.pCoef->H11r[group] =
  402|   188k|        h_ps_d->specificTo.mpeg.h11rPrev[group];
  403|   188k|    h_ps_d->specificTo.mpeg.pCoef->H12r[group] =
  404|   188k|        h_ps_d->specificTo.mpeg.h12rPrev[group];
  405|   188k|    h_ps_d->specificTo.mpeg.pCoef->H21r[group] =
  406|   188k|        h_ps_d->specificTo.mpeg.h21rPrev[group];
  407|   188k|    h_ps_d->specificTo.mpeg.pCoef->H22r[group] =
  408|   188k|        h_ps_d->specificTo.mpeg.h22rPrev[group];
  409|       |
  410|   188k|    h_ps_d->specificTo.mpeg.pCoef->DeltaH11r[group] =
  411|   188k|        fMult(h11r - h_ps_d->specificTo.mpeg.pCoef->H11r[group], invL);
  412|   188k|    h_ps_d->specificTo.mpeg.pCoef->DeltaH12r[group] =
  413|   188k|        fMult(h12r - h_ps_d->specificTo.mpeg.pCoef->H12r[group], invL);
  414|   188k|    h_ps_d->specificTo.mpeg.pCoef->DeltaH21r[group] =
  415|   188k|        fMult(h21r - h_ps_d->specificTo.mpeg.pCoef->H21r[group], invL);
  416|   188k|    h_ps_d->specificTo.mpeg.pCoef->DeltaH22r[group] =
  417|   188k|        fMult(h22r - h_ps_d->specificTo.mpeg.pCoef->H22r[group], invL);
  418|       |
  419|       |    /* update prev coefficients for interpolation in next envelope */
  420|       |
  421|   188k|    h_ps_d->specificTo.mpeg.h11rPrev[group] = h11r;
  422|   188k|    h_ps_d->specificTo.mpeg.h12rPrev[group] = h12r;
  423|   188k|    h_ps_d->specificTo.mpeg.h21rPrev[group] = h21r;
  424|   188k|    h_ps_d->specificTo.mpeg.h22rPrev[group] = h22r;
  425|       |
  426|   188k|  } /* group loop */
  427|  8.56k|}
_Z11ApplyPsSlotP6PS_DECPPiS2_S1_S1_iiiii:
  553|   104k|    const int scaleFactorHighBand, const int lsb, const int usb) {
  554|       |/*!
  555|       |The 64-band QMF representation of the monaural signal generated by the SBR tool
  556|       |is used as input of the PS tool. After the PS processing, the outputs of the
  557|       |left and right hybrid synthesis filterbanks are used to generate the stereo
  558|       |output signal.
  559|       |
  560|       |<pre>
  561|       |
  562|       |           -------------            ----------            -------------
  563|       |          | Hybrid      | M_n[k,m] |          | L_n[k,m] | Hybrid      | l[n]
  564|       | m[n] --->| analysis    |--------->|          |--------->| synthesis   |----->
  565|       |           -------------           | Stereo   |           -------------
  566|       |                 |                 | recon-   |
  567|       |                 |                 | stuction |
  568|       |                \|/                |          |
  569|       |           -------------           |          |
  570|       |          | De-         | D_n[k,m] |          |
  571|       |          | correlation |--------->|          |
  572|       |           -------------           |          |           -------------
  573|       |                                   |          | R_n[k,m] | Hybrid      | r[n]
  574|       |                                   |          |--------->| synthesis   |----->
  575|       | IID, ICC ------------------------>|          |          | filter bank |
  576|       |(IPD, OPD)                          ----------            -------------
  577|       |
  578|       |m[n]:      QMF represantation of the mono input
  579|       |M_n[k,m]:  (sub-)sub-band domain signals of the mono input
  580|       |D_n[k,m]:  decorrelated (sub-)sub-band domain signals
  581|       |L_n[k,m]:  (sub-)sub-band domain signals of the left output
  582|       |R_n[k,m]:  (sub-)sub-band domain signals of the right output
  583|       |l[n],r[n]: left/right output signals
  584|       |
  585|       |</pre>
  586|       |*/
  587|   104k|#define NO_HYBRID_DATA_BANDS (71)
  588|       |
  589|   104k|  int i;
  590|   104k|  FIXP_DBL qmfInputData[2][NO_QMF_BANDS_HYBRID20];
  591|   104k|  FIXP_DBL *hybridData[2][2];
  592|   104k|  C_ALLOC_SCRATCH_START(pHybridData, FIXP_DBL, 4 * NO_HYBRID_DATA_BANDS);
  ------------------
  |  |  324|   104k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
  593|       |
  594|   104k|  hybridData[0][0] =
  595|   104k|      pHybridData + 0 * NO_HYBRID_DATA_BANDS; /* left real hybrid data */
  ------------------
  |  |  587|   104k|#define NO_HYBRID_DATA_BANDS (71)
  ------------------
  596|   104k|  hybridData[0][1] =
  597|   104k|      pHybridData + 1 * NO_HYBRID_DATA_BANDS; /* left imag hybrid data */
  ------------------
  |  |  587|   104k|#define NO_HYBRID_DATA_BANDS (71)
  ------------------
  598|   104k|  hybridData[1][0] =
  599|   104k|      pHybridData + 2 * NO_HYBRID_DATA_BANDS; /* right real hybrid data */
  ------------------
  |  |  587|   104k|#define NO_HYBRID_DATA_BANDS (71)
  ------------------
  600|   104k|  hybridData[1][1] =
  601|   104k|      pHybridData + 3 * NO_HYBRID_DATA_BANDS; /* right imag hybrid data */
  ------------------
  |  |  587|   104k|#define NO_HYBRID_DATA_BANDS (71)
  ------------------
  602|       |
  603|       |  /*!
  604|       |  Hybrid analysis filterbank:
  605|       |  The lower 3 (5) of the 64 QMF subbands are further split to provide better
  606|       |  frequency resolution. for PS processing. For the 10 and 20 stereo bands
  607|       |  configuration, the QMF band H_0(w) is split up into 8 (sub-) sub-bands and the
  608|       |  QMF bands H_1(w) and H_2(w) are spit into 2 (sub-) 4th. (See figures 8.20
  609|       |  and 8.22 of ISO/IEC 14496-3:2001/FDAM 2:2004(E) )
  610|       |  */
  611|       |
  612|       |  /*
  613|       |   * Hybrid analysis.
  614|       |   */
  615|       |
  616|       |  /* Get qmf input data and apply descaling */
  617|   419k|  for (i = 0; i < NO_QMF_BANDS_HYBRID20; i++) {
  ------------------
  |  |  132|   419k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  |  Branch (617:15): [True: 314k, False: 104k]
  ------------------
  618|   314k|    qmfInputData[0][i] = scaleValue(rIntBufferLeft[HYBRID_FILTER_DELAY][i],
  ------------------
  |  |  134|   314k|#define HYBRID_FILTER_DELAY (6)
  ------------------
  619|   314k|                                    scaleFactorLowBand_no_ov);
  620|   314k|    qmfInputData[1][i] = scaleValue(iIntBufferLeft[HYBRID_FILTER_DELAY][i],
  ------------------
  |  |  134|   314k|#define HYBRID_FILTER_DELAY (6)
  ------------------
  621|   314k|                                    scaleFactorLowBand_no_ov);
  622|   314k|  }
  623|       |
  624|       |  /* LF - part */
  625|   104k|  FDKhybridAnalysisApply(&h_ps_d->specificTo.mpeg.hybridAnalysis,
  626|   104k|                         qmfInputData[0], qmfInputData[1], hybridData[0][0],
  627|   104k|                         hybridData[0][1]);
  628|       |
  629|       |  /* HF - part */
  630|       |  /* bands up to lsb */
  631|   104k|  scaleValues(&hybridData[0][0][NO_SUB_QMF_CHANNELS - 2],
  ------------------
  |  |  133|   104k|#define NO_SUB_QMF_CHANNELS (12)
  ------------------
  632|   104k|              &rIntBufferLeft[0][NO_QMF_BANDS_HYBRID20],
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  633|   104k|              lsb - NO_QMF_BANDS_HYBRID20, scaleFactorLowBand);
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  634|   104k|  scaleValues(&hybridData[0][1][NO_SUB_QMF_CHANNELS - 2],
  ------------------
  |  |  133|   104k|#define NO_SUB_QMF_CHANNELS (12)
  ------------------
  635|   104k|              &iIntBufferLeft[0][NO_QMF_BANDS_HYBRID20],
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  636|   104k|              lsb - NO_QMF_BANDS_HYBRID20, scaleFactorLowBand);
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  637|       |
  638|       |  /* bands from lsb to usb */
  639|   104k|  scaleValues(&hybridData[0][0][lsb + (NO_SUB_QMF_CHANNELS - 2 -
  ------------------
  |  |  133|   104k|#define NO_SUB_QMF_CHANNELS (12)
  ------------------
  640|   104k|                                       NO_QMF_BANDS_HYBRID20)],
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  641|   104k|              &rIntBufferLeft[0][lsb], usb - lsb, scaleFactorHighBand);
  642|   104k|  scaleValues(&hybridData[0][1][lsb + (NO_SUB_QMF_CHANNELS - 2 -
  ------------------
  |  |  133|   104k|#define NO_SUB_QMF_CHANNELS (12)
  ------------------
  643|   104k|                                       NO_QMF_BANDS_HYBRID20)],
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  644|   104k|              &iIntBufferLeft[0][lsb], usb - lsb, scaleFactorHighBand);
  645|       |
  646|       |  /* bands from usb to NO_SUB_QMF_CHANNELS which should be zero for non-overlap
  647|       |     slots but can be non-zero for overlap slots */
  648|   104k|  FDKmemcpy(
  649|   104k|      &hybridData[0][0]
  650|   104k|                 [usb + (NO_SUB_QMF_CHANNELS - 2 - NO_QMF_BANDS_HYBRID20)],
  ------------------
  |  |  133|   104k|#define NO_SUB_QMF_CHANNELS (12)
  ------------------
                               [usb + (NO_SUB_QMF_CHANNELS - 2 - NO_QMF_BANDS_HYBRID20)],
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  651|   104k|      &rIntBufferLeft[0][usb], sizeof(FIXP_DBL) * (NO_QMF_CHANNELS - usb));
  ------------------
  |  |  129|   104k|#define NO_QMF_CHANNELS (64)
  ------------------
  652|   104k|  FDKmemcpy(
  653|   104k|      &hybridData[0][1]
  654|   104k|                 [usb + (NO_SUB_QMF_CHANNELS - 2 - NO_QMF_BANDS_HYBRID20)],
  ------------------
  |  |  133|   104k|#define NO_SUB_QMF_CHANNELS (12)
  ------------------
                               [usb + (NO_SUB_QMF_CHANNELS - 2 - NO_QMF_BANDS_HYBRID20)],
  ------------------
  |  |  132|   104k|#define NO_QMF_BANDS_HYBRID20 (3)
  ------------------
  655|   104k|      &iIntBufferLeft[0][usb], sizeof(FIXP_DBL) * (NO_QMF_CHANNELS - usb));
  ------------------
  |  |  129|   104k|#define NO_QMF_CHANNELS (64)
  ------------------
  656|       |
  657|       |  /*!
  658|       |  Decorrelation:
  659|       |  By means of all-pass filtering and delaying, the (sub-)sub-band samples s_k(n)
  660|       |  are converted into de-correlated (sub-)sub-band samples d_k(n).
  661|       |  - k: frequency in hybrid spectrum
  662|       |  - n: time index
  663|       |  */
  664|       |
  665|   104k|  FDKdecorrelateApply(&h_ps_d->specificTo.mpeg.apDecor,
  666|   104k|                      &hybridData[0][0][0], /* left real hybrid data */
  667|   104k|                      &hybridData[0][1][0], /* left imag hybrid data */
  668|   104k|                      &hybridData[1][0][0], /* right real hybrid data */
  669|   104k|                      &hybridData[1][1][0], /* right imag hybrid data */
  670|   104k|                      0                     /* startHybBand */
  671|   104k|  );
  672|       |
  673|       |  /*!
  674|       |  Stereo Processing:
  675|       |  The sets of (sub-)sub-band samples s_k(n) and d_k(n) are processed according
  676|       |  to the stereo cues which are defined per stereo band.
  677|       |  */
  678|       |
  679|   104k|  applySlotBasedRotation(h_ps_d,
  680|   104k|                         &hybridData[0][0][0], /* left real hybrid data */
  681|   104k|                         &hybridData[0][1][0], /* left imag hybrid data */
  682|   104k|                         &hybridData[1][0][0], /* right real hybrid data */
  683|   104k|                         &hybridData[1][1][0]  /* right imag hybrid data */
  684|   104k|  );
  685|       |
  686|       |  /*!
  687|       |  Hybrid synthesis filterbank:
  688|       |  The stereo processed hybrid subband signals l_k(n) and r_k(n) are fed into the
  689|       |  hybrid synthesis filterbanks which are identical to the 64 complex synthesis
  690|       |  filterbank of the SBR tool. The input to the filterbank are slots of 64 QMF
  691|       |  samples. For each slot the filterbank outputs one block of 64 samples of one
  692|       |  reconstructed stereo channel. The hybrid synthesis filterbank is computed
  693|       |  seperatly for the left and right channel.
  694|       |  */
  695|       |
  696|       |  /*
  697|       |   * Hybrid synthesis.
  698|       |   */
  699|   314k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (699:15): [True: 209k, False: 104k]
  ------------------
  700|   209k|    FDKhybridSynthesisApply(
  701|   209k|        &h_ps_d->specificTo.mpeg.hybridSynthesis[i],
  702|   209k|        hybridData[i][0], /* real hybrid data */
  703|   209k|        hybridData[i][1], /* imag hybrid data */
  704|   209k|        (i == 0) ? rIntBufferLeft[0]
  ------------------
  |  Branch (704:9): [True: 104k, False: 104k]
  ------------------
  705|   209k|                 : rIntBufferRight, /* output real qmf buffer */
  706|   209k|        (i == 0) ? iIntBufferLeft[0]
  ------------------
  |  Branch (706:9): [True: 104k, False: 104k]
  ------------------
  707|   209k|                 : iIntBufferRight /* output imag qmf buffer */
  708|   209k|    );
  709|   209k|  }
  710|       |
  711|       |  /* free temporary hybrid qmf values of one timeslot */
  712|   104k|  C_ALLOC_SCRATCH_END(pHybridData, FIXP_DBL, 4 * NO_HYBRID_DATA_BANDS);
  713|       |
  714|   104k|} /* END ApplyPsSlot */
psdec.cpp:_ZL22applySlotBasedRotationP6PS_DECPiS1_S1_S1_:
  441|   104k|) {
  442|   104k|  INT group;
  443|   104k|  INT subband;
  444|       |
  445|       |  /**********************************************************************************************/
  446|       |  /*!
  447|       |  <h2> Mapping </h2>
  448|       |
  449|       |  The number of stereo bands that is actually used depends on the number of
  450|       |  availble parameters for IID and ICC: <pre> nr. of IID para.| nr. of ICC para.
  451|       |  | nr. of Stereo bands
  452|       |   ----------------|------------------|-------------------
  453|       |     10,20         |     10,20        |        20
  454|       |     10,20         |     34           |        34
  455|       |     34            |     10,20        |        34
  456|       |     34            |     34           |        34
  457|       |  </pre>
  458|       |  In the case the number of parameters for IIS and ICC differs from the number
  459|       |  of stereo bands, a mapping from the lower number to the higher number of
  460|       |  parameters is applied. Index mapping of IID and ICC parameters is already done
  461|       |  in psbitdec.cpp. Further mapping is not needed here in baseline version.
  462|       |  **********************************************************************************************/
  463|       |
  464|       |  /************************************************************************************************/
  465|       |  /*!
  466|       |  <h2> Mixing </h2>
  467|       |
  468|       |  To generate the QMF subband signals for the subband samples n = n[e]+1 ,,,
  469|       |  n_[e+1] the parameters at position n[e] and n[e+1] are required as well as the
  470|       |  subband domain signals s_k(n) and d_k(n) for n = n[e]+1... n_[e+1]. n[e]
  471|       |  represents the start position for envelope e. The border positions n[e] are
  472|       |  handled in DecodePS().
  473|       |
  474|       |  The stereo sub subband signals are constructed as:
  475|       |  <pre>
  476|       |  l_k(n) = H11(k,n) s_k(n) + H21(k,n) d_k(n)
  477|       |  r_k(n) = H21(k,n) s_k(n) + H22(k,n) d_k(n)
  478|       |  </pre>
  479|       |  In order to obtain the matrices H11(k,n)... H22 (k,n), the vectors h11(b)...
  480|       |  h22(b) need to be calculated first (b: parameter index). Depending on ICC mode
  481|       |  either mixing procedure R_a or R_b is used for that. For both procedures, the
  482|       |  parameters for parameter position n[e+1] is used.
  483|       |  ************************************************************************************************/
  484|       |
  485|       |  /************************************************************************************************/
  486|       |  /*!
  487|       |  <h2>Phase parameters </h2>
  488|       |  With disabled phase parameters (which is the case in baseline version), the
  489|       |  H-matrices are just calculated by:
  490|       |
  491|       |  <pre>
  492|       |  H11(k,n[e+1] = h11(b(k))
  493|       |  (...)
  494|       |  b(k): parameter index according to mapping table
  495|       |  </pre>
  496|       |
  497|       |  <h2>Processing of the samples in the sub subbands </h2>
  498|       |  this loop includes the interpolation of the coefficients Hxx
  499|       |  ************************************************************************************************/
  500|       |
  501|       |  /******************************************************/
  502|       |  /* construct stereo sub subband signals according to: */
  503|       |  /*                                                    */
  504|       |  /* l_k(n) = H11(k,n) s_k(n) + H21(k,n) d_k(n)         */
  505|       |  /* r_k(n) = H12(k,n) s_k(n) + H22(k,n) d_k(n)         */
  506|       |  /******************************************************/
  507|   104k|  PS_DEC_COEFFICIENTS *pCoef = h_ps_d->specificTo.mpeg.pCoef;
  508|       |
  509|  2.41M|  for (group = 0; group < NO_IID_GROUPS; group++) {
  ------------------
  |  |  157|  2.41M|#define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |  151|  2.41M|#define SUBQMF_GROUPS (10)
  |  |  ------------------
  |  |               #define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |  152|  2.41M|#define QMF_GROUPS (12)
  |  |  ------------------
  ------------------
  |  Branch (509:19): [True: 2.30M, False: 104k]
  ------------------
  510|  2.30M|    pCoef->H11r[group] += pCoef->DeltaH11r[group];
  511|  2.30M|    pCoef->H12r[group] += pCoef->DeltaH12r[group];
  512|  2.30M|    pCoef->H21r[group] += pCoef->DeltaH21r[group];
  513|  2.30M|    pCoef->H22r[group] += pCoef->DeltaH22r[group];
  514|       |
  515|  2.30M|    const int start = groupTable[group];
  516|  2.30M|    const int stop = groupTable[group + 1];
  517|  9.75M|    for (subband = start; subband < stop; subband++) {
  ------------------
  |  Branch (517:27): [True: 7.44M, False: 2.30M]
  ------------------
  518|  7.44M|      FIXP_DBL tmpLeft =
  519|  7.44M|          fMultAdd(fMultDiv2(pCoef->H11r[group], mHybridRealLeft[subband]),
  520|  7.44M|                   pCoef->H21r[group], mHybridRealRight[subband]);
  521|  7.44M|      FIXP_DBL tmpRight =
  522|  7.44M|          fMultAdd(fMultDiv2(pCoef->H12r[group], mHybridRealLeft[subband]),
  523|  7.44M|                   pCoef->H22r[group], mHybridRealRight[subband]);
  524|  7.44M|      mHybridRealLeft[subband] = tmpLeft;
  525|  7.44M|      mHybridRealRight[subband] = tmpRight;
  526|       |
  527|  7.44M|      tmpLeft =
  528|  7.44M|          fMultAdd(fMultDiv2(pCoef->H11r[group], mHybridImagLeft[subband]),
  529|  7.44M|                   pCoef->H21r[group], mHybridImagRight[subband]);
  530|  7.44M|      tmpRight =
  531|  7.44M|          fMultAdd(fMultDiv2(pCoef->H12r[group], mHybridImagLeft[subband]),
  532|  7.44M|                   pCoef->H22r[group], mHybridImagRight[subband]);
  533|  7.44M|      mHybridImagLeft[subband] = tmpLeft;
  534|  7.44M|      mHybridImagRight[subband] = tmpRight;
  535|  7.44M|    } /* subband */
  536|  2.30M|  }
  537|   104k|}

_Z12pvcInitFrameP15PVC_STATIC_DATAP16PVC_DYNAMIC_DATAhhiiiPKh:
  398|   259k|                 const int pvcBorder0, const UCHAR *pPvcID) {
  399|   259k|  int lbw, hbw, i, temp;
  400|   259k|  pPvcDynamicData->pvc_mode = pvcMode;
  401|   259k|  pPvcDynamicData->kx = kx;
  402|   259k|  pPvcDynamicData->RATE = RATE;
  403|       |
  404|   259k|  switch (pvcMode) {
  405|   174k|    case 0:
  ------------------
  |  Branch (405:5): [True: 174k, False: 84.6k]
  ------------------
  406|       |      /* legacy SBR, nothing to do */
  407|   174k|      return 0;
  408|  11.5k|    case 1:
  ------------------
  |  Branch (408:5): [True: 11.5k, False: 247k]
  ------------------
  409|  11.5k|      pPvcDynamicData->nbHigh = 8;
  410|  11.5k|      pPvcDynamicData->pPVCTab1 = (const UCHAR *)g_3a_pvcTab1_mode1;
  411|  11.5k|      pPvcDynamicData->pPVCTab2 = (const UCHAR *)g_2a_pvcTab2_mode1;
  412|  11.5k|      pPvcDynamicData->pPVCTab1_dp = g_a_pvcTab1_dp_mode1;
  413|  11.5k|      pPvcDynamicData->pScalingCoef = g_a_scalingCoef_mode1;
  414|  11.5k|      hbw = 8 / RATE;
  415|  11.5k|      break;
  416|  73.1k|    case 2:
  ------------------
  |  Branch (416:5): [True: 73.1k, False: 186k]
  ------------------
  417|  73.1k|      pPvcDynamicData->nbHigh = 6;
  418|  73.1k|      pPvcDynamicData->pPVCTab1 = (const UCHAR *)g_3a_pvcTab1_mode2;
  419|  73.1k|      pPvcDynamicData->pPVCTab2 = (const UCHAR *)g_2a_pvcTab2_mode2;
  420|  73.1k|      pPvcDynamicData->pPVCTab1_dp = g_a_pvcTab1_dp_mode2;
  421|  73.1k|      pPvcDynamicData->pScalingCoef = g_a_scalingCoef_mode2;
  422|  73.1k|      hbw = 12 / RATE;
  423|  73.1k|      break;
  424|      0|    default:
  ------------------
  |  Branch (424:5): [True: 0, False: 259k]
  ------------------
  425|       |      /* invalid pvcMode */
  426|      0|      return 1;
  427|   259k|  }
  428|       |
  429|  84.6k|  pPvcDynamicData->pvcBorder0 = pvcBorder0;
  430|  84.6k|  UCHAR pvcBorder0_last = pPvcStaticData->pvcBorder0;
  431|  84.6k|  pPvcStaticData->pvcBorder0 = pvcBorder0;
  432|  84.6k|  pPvcDynamicData->pPvcID = pPvcID;
  433|       |
  434|  84.6k|  pPvcDynamicData->ns = ns;
  435|  84.6k|  switch (ns) {
  436|  6.33k|    case 16:
  ------------------
  |  Branch (436:5): [True: 6.33k, False: 78.3k]
  ------------------
  437|  6.33k|      pPvcDynamicData->pSCcoeffs = pvc_SC_16;
  438|  6.33k|      break;
  439|  4.51k|    case 12:
  ------------------
  |  Branch (439:5): [True: 4.51k, False: 80.1k]
  ------------------
  440|  4.51k|      pPvcDynamicData->pSCcoeffs = pvc_SC_12;
  441|  4.51k|      break;
  442|  5.24k|    case 4:
  ------------------
  |  Branch (442:5): [True: 5.24k, False: 79.4k]
  ------------------
  443|  5.24k|      pPvcDynamicData->pSCcoeffs = pvc_SC_4;
  444|  5.24k|      break;
  445|  68.6k|    case 3:
  ------------------
  |  Branch (445:5): [True: 68.6k, False: 16.0k]
  ------------------
  446|  68.6k|      pPvcDynamicData->pSCcoeffs = pvc_SC_3;
  447|  68.6k|      break;
  448|      0|    default:
  ------------------
  |  Branch (448:5): [True: 0, False: 84.6k]
  ------------------
  449|      0|      return 1;
  450|  84.6k|  }
  451|       |
  452|       |  /* in the lower part of Esg-array there are previous values of Esg (from last
  453|       |     call to this function In case of an previous legay-SBR frame, or if there
  454|       |     was a change in cross-over FQ the value of first PVC SBR timeslot is
  455|       |     propagated to prev-values in order to have reasonable values for
  456|       |     smooth-filtering
  457|       |  */
  458|  84.6k|  if ((pPvcStaticData->pvc_mode_last == 0) || (pPvcStaticData->kx_last != kx)) {
  ------------------
  |  Branch (458:7): [True: 5.67k, False: 79.0k]
  |  Branch (458:47): [True: 5.47k, False: 73.5k]
  ------------------
  459|  11.1k|    pPvcDynamicData->pastEsgSlotsAvail = 0;
  460|  73.5k|  } else {
  461|  73.5k|    pPvcDynamicData->pastEsgSlotsAvail = PVC_NS_MAX - pvcBorder0_last;
  ------------------
  |  |  120|  73.5k|#define PVC_NS_MAX 16
  ------------------
  462|  73.5k|  }
  463|       |
  464|  84.6k|  lbw = 8 / RATE;
  465|       |
  466|  84.6k|  temp = kx;
  467|   423k|  for (i = PVC_NBLOW; i >= 0; i--) {
  ------------------
  |  |  112|  84.6k|#define PVC_NBLOW 3 /* max. number of grouped QMF subbands below SBR range */
  ------------------
  |  Branch (467:23): [True: 338k, False: 84.6k]
  ------------------
  468|   338k|    pPvcDynamicData->sg_offset_low[i] = temp;
  469|   338k|    temp -= lbw;
  470|   338k|  }
  471|       |
  472|  84.6k|  temp = 0;
  473|   700k|  for (i = 0; i <= pPvcDynamicData->nbHigh; i++) {
  ------------------
  |  Branch (473:15): [True: 616k, False: 84.6k]
  ------------------
  474|   616k|    pPvcDynamicData->sg_offset_high_kx[i] = temp;
  475|   616k|    temp += hbw;
  476|   616k|  }
  477|       |
  478|  84.6k|  return 0;
  479|  84.6k|}
_Z14pvcDecodeFrameP15PVC_STATIC_DATAP16PVC_DYNAMIC_DATAPPiS4_iii:
  486|  84.6k|                    const int qmfExponentCurrent) {
  487|  84.6k|  int t;
  488|  84.6k|  FIXP_DBL *predictedEsgSlot;
  489|  84.6k|  int RATE = pPvcDynamicData->RATE;
  490|  84.6k|  int pvcBorder0 = pPvcDynamicData->pvcBorder0;
  491|       |
  492|  1.43M|  for (t = pvcBorder0; t < PVC_NTIMESLOT; t++) {
  ------------------
  |  |  114|  1.43M|#define PVC_NTIMESLOT 16
  ------------------
  |  Branch (492:24): [True: 1.35M, False: 84.6k]
  ------------------
  493|  1.35M|    int *pPredEsg_exp = &pPvcDynamicData->predEsg_exp[t];
  494|  1.35M|    predictedEsgSlot = pPvcDynamicData->predEsg[t];
  495|       |
  496|  1.35M|    pvcDecodeTimeSlot(
  497|  1.35M|        pPvcStaticData, pPvcDynamicData, &qmfBufferReal[t * RATE],
  498|  1.35M|        &qmfBufferImag[t * RATE],
  499|  1.35M|        (t * RATE < overlap) ? qmfExponentOverlap : qmfExponentCurrent,
  ------------------
  |  Branch (499:9): [True: 253k, False: 1.10M]
  ------------------
  500|  1.35M|        pvcBorder0, t, predictedEsgSlot, pPredEsg_exp);
  501|  1.35M|  }
  502|       |
  503|  84.6k|  return;
  504|  84.6k|}
_Z17pvcDecodeTimeSlotP15PVC_STATIC_DATAP16PVC_DYNAMIC_DATAPPiS4_iiiS3_S3_:
  511|  1.35M|                       int *predictedEsg_exp) {
  512|  1.35M|  int i, band, ksg, ksg_start = 0;
  513|  1.35M|  int RATE = pPvcDynamicData->RATE;
  514|  1.35M|  int Esg_index = pPvcStaticData->Esg_slot_index;
  515|  1.35M|  const SCHAR *sg_borders = pPvcDynamicData->sg_offset_low;
  516|  1.35M|  FIXP_DBL *pEsg = pPvcStaticData->Esg[Esg_index];
  517|  1.35M|  FIXP_DBL E[PVC_NBLOW] = {0};
  518|       |
  519|       |  /* Subband grouping in QMF subbands below SBR range */
  520|       |  /* Within one timeslot ( i = [0...(RATE-1)] QMF subsamples) calculate energy
  521|       |     E(ib,t) and group them to Esg(ksg,t). Then transfer values to logarithmical
  522|       |     domain and store them for time domain smoothing. (7.5.6.3 Subband grouping
  523|       |     in QMF subbands below SBR range)
  524|       |  */
  525|  1.36M|  for (ksg = 0; sg_borders[ksg] < 0; ksg++) {
  ------------------
  |  Branch (525:17): [True: 8.32k, False: 1.35M]
  ------------------
  526|  8.32k|    pEsg[ksg] = FL2FXCONST_DBL(-10.0 / (1 << PVC_ESG_EXP)); /* 10*log10(0.1) */
  ------------------
  |  |  192|  8.32k|  (FIXP_DBL)(                                                                \
  |  |  193|  8.32k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 8.32k]
  |  |  ------------------
  |  |  194|  8.32k|          ? ((((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|  8.32k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  8.32k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.32k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 8.32k]
  |  |  ------------------
  |  |  199|  8.32k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  8.32k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  8.32k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  8.32k|                 ? (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|  8.32k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  8.32k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  8.32k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  8.32k|    ksg_start++;
  528|  8.32k|  }
  529|       |
  530|  4.34M|  for (i = 0; i < RATE; i++) {
  ------------------
  |  Branch (530:15): [True: 2.98M, False: 1.35M]
  ------------------
  531|  2.98M|    FIXP_DBL *qmfR, *qmfI;
  532|  2.98M|    qmfR = qmfSlotReal[i];
  533|  2.98M|    qmfI = qmfSlotImag[i];
  534|  11.9M|    for (ksg = ksg_start; ksg < PVC_NBLOW; ksg++) {
  ------------------
  |  |  112|  11.9M|#define PVC_NBLOW 3 /* max. number of grouped QMF subbands below SBR range */
  ------------------
  |  Branch (534:27): [True: 8.94M, False: 2.98M]
  ------------------
  535|  41.3M|      for (band = sg_borders[ksg]; band < sg_borders[ksg + 1]; band++) {
  ------------------
  |  Branch (535:36): [True: 32.4M, False: 8.94M]
  ------------------
  536|       |        /* The division by 8 == (RATE*lbw) is required algorithmically */
  537|  32.4M|        E[ksg] +=
  538|  32.4M|            ((fPow2Div2(qmfR[band]) >> 1) + (fPow2Div2(qmfI[band]) >> 1)) >> 3;
  539|  32.4M|      }
  540|  8.94M|    }
  541|  2.98M|  }
  542|  5.41M|  for (ksg = ksg_start; ksg < PVC_NBLOW; ksg++) {
  ------------------
  |  |  112|  5.41M|#define PVC_NBLOW 3 /* max. number of grouped QMF subbands below SBR range */
  ------------------
  |  Branch (542:25): [True: 4.05M, False: 1.35M]
  ------------------
  543|  4.05M|    if (E[ksg] > (FIXP_DBL)0) {
  ------------------
  |  Branch (543:9): [True: 2.90M, False: 1.15M]
  ------------------
  544|       |      /* 10/log2(10) = 0.752574989159953 * 2^2 */
  545|  2.90M|      int exp_log;
  546|  2.90M|      FIXP_DBL nrg = CalcLog2(E[ksg], 2 * qmfExponent + 2, &exp_log);
  547|  2.90M|      nrg = fMult(nrg, FL2FXCONST_SGL(LOG10FAC));
  ------------------
  |  |  180|  2.90M|  (FIXP_SGL)(                                                                \
  |  |  181|  2.90M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 2.90M, Folded]
  |  |  ------------------
  |  |  182|  2.90M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  2.90M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.90M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 2.90M]
  |  |  ------------------
  |  |  183|  2.90M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  2.90M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  2.90M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  2.90M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  2.90M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  2.90M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  2.90M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  2.90M|      nrg = scaleValue(nrg, exp_log - PVC_ESG_EXP + 2);
  ------------------
  |  |  123|  2.90M|#define PVC_ESG_EXP 7
  ------------------
  549|  2.90M|      pEsg[ksg] = fMax(nrg, FL2FXCONST_DBL(-10.0 / (1 << PVC_ESG_EXP)));
  ------------------
  |  |  192|  2.90M|  (FIXP_DBL)(                                                                \
  |  |  193|  2.90M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 2.90M]
  |  |  ------------------
  |  |  194|  2.90M|          ? ((((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.90M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  2.90M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.90M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 2.90M]
  |  |  ------------------
  |  |  199|  2.90M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  2.90M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  2.90M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  2.90M|                 ? (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.90M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  2.90M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.90M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  550|  2.90M|    } else {
  551|  1.15M|      pEsg[ksg] =
  552|  1.15M|          FL2FXCONST_DBL(-10.0 / (1 << PVC_ESG_EXP)); /* 10*log10(0.1) */
  ------------------
  |  |  192|  1.15M|  (FIXP_DBL)(                                                                \
  |  |  193|  1.15M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 1.15M]
  |  |  ------------------
  |  |  194|  1.15M|          ? ((((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|  1.15M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  1.15M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.15M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 1.15M]
  |  |  ------------------
  |  |  199|  1.15M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  1.15M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  1.15M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  1.15M|                 ? (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|  1.15M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  1.15M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.15M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  553|  1.15M|    }
  554|  4.05M|  }
  555|       |
  556|       |  /* Time domain smoothing of subband-grouped energy */
  557|  1.35M|  {
  558|  1.35M|    int idx = pPvcStaticData->Esg_slot_index;
  559|  1.35M|    FIXP_DBL *pEsg_filt;
  560|  1.35M|    FIXP_SGL SCcoeff;
  561|       |
  562|  1.35M|    E[0] = E[1] = E[2] = (FIXP_DBL)0;
  563|  7.47M|    for (i = 0; i < pPvcDynamicData->ns; i++) {
  ------------------
  |  Branch (563:17): [True: 6.11M, False: 1.35M]
  ------------------
  564|  6.11M|      SCcoeff = pPvcDynamicData->pSCcoeffs[i];
  565|  6.11M|      pEsg_filt = pPvcStaticData->Esg[idx];
  566|       |      /* Div2 is compensated by scaling of coeff table */
  567|  6.11M|      E[0] = fMultAddDiv2(E[0], pEsg_filt[0], SCcoeff);
  568|  6.11M|      E[1] = fMultAddDiv2(E[1], pEsg_filt[1], SCcoeff);
  569|  6.11M|      E[2] = fMultAddDiv2(E[2], pEsg_filt[2], SCcoeff);
  570|  6.11M|      if (i >= pPvcDynamicData->pastEsgSlotsAvail) {
  ------------------
  |  Branch (570:11): [True: 424k, False: 5.69M]
  ------------------
  571|       |        /* if past Esg values are not available use the ones from the last valid
  572|       |         * slot */
  573|   424k|        continue;
  574|   424k|      }
  575|  5.69M|      if (idx > 0) {
  ------------------
  |  Branch (575:11): [True: 5.37M, False: 313k]
  ------------------
  576|  5.37M|        idx--;
  577|  5.37M|      } else {
  578|   313k|        idx += PVC_NS_MAX - 1;
  ------------------
  |  |  120|   313k|#define PVC_NS_MAX 16
  ------------------
  579|   313k|      }
  580|  5.69M|    }
  581|  1.35M|  }
  582|       |
  583|       |  /* SBR envelope scalefactor prediction */
  584|  1.35M|  {
  585|  1.35M|    int E_high_exp[PVC_NBHIGH_MAX];
  586|  1.35M|    int E_high_exp_max = 0;
  587|  1.35M|    int pvcTab1ID;
  588|  1.35M|    int pvcTab2ID = (int)pPvcDynamicData->pPvcID[timeSlotNumber];
  589|  1.35M|    const UCHAR *pTab1, *pTab2;
  590|  1.35M|    if (pvcTab2ID < pPvcDynamicData->pPVCTab1_dp[0]) {
  ------------------
  |  Branch (590:9): [True: 154k, False: 1.20M]
  ------------------
  591|   154k|      pvcTab1ID = 0;
  592|  1.20M|    } else if (pvcTab2ID < pPvcDynamicData->pPVCTab1_dp[1]) {
  ------------------
  |  Branch (592:16): [True: 208k, False: 991k]
  ------------------
  593|   208k|      pvcTab1ID = 1;
  594|   991k|    } else {
  595|   991k|      pvcTab1ID = 2;
  596|   991k|    }
  597|  1.35M|    pTab1 = &(pPvcDynamicData
  598|  1.35M|                  ->pPVCTab1[pvcTab1ID * PVC_NBLOW * pPvcDynamicData->nbHigh]);
  ------------------
  |  |  112|  1.35M|#define PVC_NBLOW 3 /* max. number of grouped QMF subbands below SBR range */
  ------------------
  599|  1.35M|    pTab2 = &(pPvcDynamicData->pPVCTab2[pvcTab2ID * pPvcDynamicData->nbHigh]);
  600|  9.85M|    for (ksg = 0; ksg < pPvcDynamicData->nbHigh; ksg++) {
  ------------------
  |  Branch (600:19): [True: 8.49M, False: 1.35M]
  ------------------
  601|  8.49M|      FIXP_SGL predCoeff;
  602|  8.49M|      FIXP_DBL accu;
  603|  8.49M|      int predCoeff_exp, kb;
  604|  8.49M|      E_high_exp[ksg] = 0;
  605|       |
  606|       |      /* residual part */
  607|  8.49M|      accu = ((LONG)(SCHAR)*pTab2++) << (DFRACT_BITS - 8 - PVC_ESG_EXP - 2 +
  ------------------
  |  |  113|  8.49M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                    accu = ((LONG)(SCHAR)*pTab2++) << (DFRACT_BITS - 8 - PVC_ESG_EXP - 2 +
  ------------------
  |  |  123|  8.49M|#define PVC_ESG_EXP 7
  ------------------
  608|  8.49M|                                         pPvcDynamicData->pScalingCoef[3]);
  609|       |
  610|       |      /* linear combination of lower grouped energies part */
  611|  33.9M|      for (kb = 0; kb < PVC_NBLOW; kb++) {
  ------------------
  |  |  112|  33.9M|#define PVC_NBLOW 3 /* max. number of grouped QMF subbands below SBR range */
  ------------------
  |  Branch (611:20): [True: 25.4M, False: 8.49M]
  ------------------
  612|  25.4M|        predCoeff = (FIXP_SGL)(
  613|  25.4M|            (SHORT)(SCHAR)pTab1[kb * pPvcDynamicData->nbHigh + ksg] << 8);
  614|  25.4M|        predCoeff_exp = -(pPvcDynamicData->pScalingCoef[kb] + 1 -
  615|  25.4M|                          2); /* +1 to compensate for Div2; -2 for accu */
  616|  25.4M|        accu += fMultDiv2(E[kb], predCoeff) >> predCoeff_exp;
  617|  25.4M|      }
  618|       |      /* convert back to linear domain */
  619|  8.49M|      accu = fMult(accu, FL2FXCONST_SGL(LOG10FAC_INV));
  ------------------
  |  |  180|  8.49M|  (FIXP_SGL)(                                                                \
  |  |  181|  8.49M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 8.49M, Folded]
  |  |  ------------------
  |  |  182|  8.49M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  8.49M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  8.49M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 8.49M]
  |  |  ------------------
  |  |  183|  8.49M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  8.49M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  8.49M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  8.49M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  8.49M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  8.49M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  8.49M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  620|  8.49M|      accu = f2Pow(accu, PVC_ESG_EXP - 1 + 2,
  ------------------
  |  |  123|  8.49M|#define PVC_ESG_EXP 7
  ------------------
  621|  8.49M|                   &predCoeff_exp); /* -1 compensates for exponent of
  622|       |                                       LOG10FAC_INV; +2 for accu */
  623|  8.49M|      predictedEsgSlot[ksg] = accu;
  624|  8.49M|      E_high_exp[ksg] = predCoeff_exp;
  625|  8.49M|      if (predCoeff_exp > E_high_exp_max) {
  ------------------
  |  Branch (625:11): [True: 1.57M, False: 6.92M]
  ------------------
  626|  1.57M|        E_high_exp_max = predCoeff_exp;
  627|  1.57M|      }
  628|  8.49M|    }
  629|       |
  630|       |    /* rescale output vector according to largest exponent */
  631|  9.85M|    for (ksg = 0; ksg < pPvcDynamicData->nbHigh; ksg++) {
  ------------------
  |  Branch (631:19): [True: 8.49M, False: 1.35M]
  ------------------
  632|  8.49M|      int scale = fMin(E_high_exp_max - E_high_exp[ksg], DFRACT_BITS - 1);
  ------------------
  |  |  113|  8.49M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  633|  8.49M|      predictedEsgSlot[ksg] = predictedEsgSlot[ksg] >> scale;
  634|  8.49M|    }
  635|  1.35M|    *predictedEsg_exp = E_high_exp_max;
  636|  1.35M|  }
  637|       |
  638|  1.35M|  pPvcStaticData->Esg_slot_index =
  639|  1.35M|      (pPvcStaticData->Esg_slot_index + 1) & (PVC_NS_MAX - 1);
  ------------------
  |  |  120|  1.35M|#define PVC_NS_MAX 16
  ------------------
  640|  1.35M|  pPvcDynamicData->pastEsgSlotsAvail =
  641|  1.35M|      fMin(pPvcDynamicData->pastEsgSlotsAvail + 1, PVC_NS_MAX - 1);
  ------------------
  |  |  120|  1.35M|#define PVC_NS_MAX 16
  ------------------
  642|  1.35M|  return;
  643|  1.35M|}
_Z11pvcEndFrameP15PVC_STATIC_DATAP16PVC_DYNAMIC_DATA:
  647|   259k|                 PVC_DYNAMIC_DATA *pPvcDynamicData) {
  648|   259k|  pPvcStaticData->pvc_mode_last = pPvcDynamicData->pvc_mode;
  649|   259k|  pPvcStaticData->kx_last = pPvcDynamicData->kx;
  650|       |
  651|   259k|  if (pPvcDynamicData->pvc_mode == 0) return;
  ------------------
  |  Branch (651:7): [True: 174k, False: 84.6k]
  ------------------
  652|       |
  653|  84.6k|  {
  654|  84.6k|    int t, max = -100;
  655|  1.43M|    for (t = pPvcDynamicData->pvcBorder0; t < PVC_NTIMESLOT; t++) {
  ------------------
  |  |  114|  1.43M|#define PVC_NTIMESLOT 16
  ------------------
  |  Branch (655:43): [True: 1.35M, False: 84.6k]
  ------------------
  656|  1.35M|      if (pPvcDynamicData->predEsg_exp[t] > max) {
  ------------------
  |  Branch (656:11): [True: 157k, False: 1.19M]
  ------------------
  657|   157k|        max = pPvcDynamicData->predEsg_exp[t];
  658|   157k|      }
  659|  1.35M|    }
  660|  84.6k|    pPvcDynamicData->predEsg_expMax = max;
  661|  84.6k|  }
  662|  84.6k|  return;
  663|   259k|}
_Z13expandPredEsgPK16PVC_DYNAMIC_DATAiiPiPa:
  667|  1.35M|                   SCHAR *pOutput_exp) {
  668|  1.35M|  int k = 0, ksg;
  669|  1.35M|  const FIXP_DBL *predEsg = pPvcDynamicData->predEsg[timeSlot];
  670|       |
  671|  9.85M|  for (ksg = 0; ksg < pPvcDynamicData->nbHigh; ksg++) {
  ------------------
  |  Branch (671:17): [True: 8.49M, False: 1.35M]
  ------------------
  672|  54.2M|    for (; k < pPvcDynamicData->sg_offset_high_kx[ksg + 1]; k++) {
  ------------------
  |  Branch (672:12): [True: 45.7M, False: 8.49M]
  ------------------
  673|  45.7M|      pOutput[k] = predEsg[ksg];
  674|  45.7M|      pOutput_exp[k] = (SCHAR)pPvcDynamicData->predEsg_exp[timeSlot];
  675|  45.7M|    }
  676|  8.49M|  }
  677|  1.35M|  ksg--;
  678|  31.4M|  for (; k < lengthOutputVector; k++) {
  ------------------
  |  Branch (678:10): [True: 30.0M, False: 1.35M]
  ------------------
  679|  30.0M|    pOutput[k] = predEsg[ksg];
  680|  30.0M|    pOutput_exp[k] = (SCHAR)pPvcDynamicData->predEsg_exp[timeSlot];
  681|  30.0M|  }
  682|       |
  683|  1.35M|  return;
  684|  1.35M|}

_Z7sbr_decP7SBR_DECPiS1_S0_S1_iP15SBR_HEADER_DATAP14SBR_FRAME_DATAP19SBR_PREV_FRAME_DATAiP6PS_DECjii:
  273|   432k|    const INT sbrInDataHeadroom) {
  274|   432k|  int i, slot, reserve;
  275|   432k|  int saveLbScale;
  276|   432k|  int lastSlotOffs;
  277|   432k|  FIXP_DBL maxVal;
  278|       |
  279|       |  /* temporary pointer / variable for QMF;
  280|       |     required as we want to use temporary buffer
  281|       |     creating one frame delay for HBE in LP mode */
  282|   432k|  LONG *pTimeInQmf = timeIn;
  ------------------
  |  |  181|   432k|#define LONG INT
  ------------------
  283|       |
  284|       |  /* Number of QMF timeslots in the overlap buffer: */
  285|   432k|  int ov_len = hSbrDec->LppTrans.pSettings->overlap;
  286|       |
  287|       |  /* Number of QMF slots per frame */
  288|   432k|  int noCols = hHeaderData->numberTimeSlots * hHeaderData->timeStep;
  289|       |
  290|       |  /* create pointer array for data to use for HBE and legacy sbr */
  291|   432k|  FIXP_DBL *pLowBandReal[(3 * 4) + 2 * ((1024) / (32) * (4) / 2)];
  292|   432k|  FIXP_DBL *pLowBandImag[(3 * 4) + 2 * ((1024) / (32) * (4) / 2)];
  293|       |
  294|       |  /* set pReal to where QMF analysis writes in case of legacy SBR */
  295|   432k|  FIXP_DBL **pReal = pLowBandReal + ov_len;
  296|   432k|  FIXP_DBL **pImag = pLowBandImag + ov_len;
  297|       |
  298|       |  /* map QMF buffer to pointer array (Overlap + Frame)*/
  299|  15.0M|  for (i = 0; i < noCols + ov_len; i++) {
  ------------------
  |  Branch (299:15): [True: 14.5M, False: 432k]
  ------------------
  300|  14.5M|    pLowBandReal[i] = hSbrDec->qmfDomainInCh->hQmfSlotsReal[i];
  301|  14.5M|    pLowBandImag[i] = hSbrDec->qmfDomainInCh->hQmfSlotsImag[i];
  302|  14.5M|  }
  303|       |
  304|   432k|  if ((flags & SBRDEC_USAC_HARMONICSBR)) {
  ------------------
  |  |  218|   432k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (304:7): [True: 80.0k, False: 352k]
  ------------------
  305|       |    /* in case of harmonic SBR and no HBE_LP map additional buffer for
  306|       |       one more frame to pointer arry */
  307|  3.57M|    for (i = 0; i < noCols; i++) {
  ------------------
  |  Branch (307:17): [True: 3.49M, False: 80.0k]
  ------------------
  308|  3.49M|      pLowBandReal[i + noCols + ov_len] = hSbrDec->hQmfHBESlotsReal[i];
  309|  3.49M|      pLowBandImag[i + noCols + ov_len] = hSbrDec->hQmfHBESlotsImag[i];
  310|  3.49M|    }
  311|       |
  312|       |    /* shift scale values according to buffer */
  313|  80.0k|    hSbrDec->scale_ov = hSbrDec->scale_lb;
  314|  80.0k|    hSbrDec->scale_lb = hSbrDec->scale_hbe;
  315|       |
  316|       |    /* set pReal to where QMF analysis writes in case of HBE */
  317|  80.0k|    pReal += noCols;
  318|  80.0k|    pImag += noCols;
  319|  80.0k|    if (flags & SBRDEC_SKIP_QMF_ANA) {
  ------------------
  |  |  233|  80.0k|  (1 << 21) /* Flag indicating that the input data is provided in the QMF \
  ------------------
  |  Branch (319:9): [True: 23.5k, False: 56.5k]
  ------------------
  320|       |      /* stereoCfgIndex3 with HBE */
  321|  23.5k|      FDK_QmfDomain_QmfData2HBE(hSbrDec->qmfDomainInCh,
  322|  23.5k|                                hSbrDec->hQmfHBESlotsReal,
  323|  23.5k|                                hSbrDec->hQmfHBESlotsImag);
  324|  56.5k|    } else {
  325|       |      /* We have to move old hbe frame data to lb area of buffer */
  326|  2.19M|      for (i = 0; i < noCols; i++) {
  ------------------
  |  Branch (326:19): [True: 2.14M, False: 56.5k]
  ------------------
  327|  2.14M|        FDKmemcpy(pLowBandReal[ov_len + i], hSbrDec->hQmfHBESlotsReal[i],
  328|  2.14M|                  hHeaderData->numberOfAnalysisBands * sizeof(FIXP_DBL));
  329|  2.14M|        FDKmemcpy(pLowBandImag[ov_len + i], hSbrDec->hQmfHBESlotsImag[i],
  330|  2.14M|                  hHeaderData->numberOfAnalysisBands * sizeof(FIXP_DBL));
  331|  2.14M|      }
  332|  56.5k|    }
  333|  80.0k|  }
  334|       |
  335|       |  /*
  336|       |    low band codec signal subband filtering
  337|       |   */
  338|       |
  339|   432k|  if (flags & SBRDEC_SKIP_QMF_ANA) {
  ------------------
  |  |  233|   432k|  (1 << 21) /* Flag indicating that the input data is provided in the QMF \
  ------------------
  |  Branch (339:7): [True: 24.5k, False: 407k]
  ------------------
  340|  24.5k|    if (!(flags & SBRDEC_USAC_HARMONICSBR)) /* stereoCfgIndex3 w/o HBE */
  ------------------
  |  |  218|  24.5k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (340:9): [True: 1.01k, False: 23.5k]
  ------------------
  341|  1.01k|      FDK_QmfDomain_WorkBuffer2ProcChannel(hSbrDec->qmfDomainInCh);
  342|   407k|  } else {
  343|   407k|    C_AALLOC_SCRATCH_START(qmfTemp, FIXP_DBL, 2 * (64));
  ------------------
  |  |  319|   407k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|   407k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|   407k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|   407k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   407k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|   407k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   407k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|   407k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   407k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|   407k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  344|   407k|    qmfAnalysisFiltering(&hSbrDec->qmfDomainInCh->fb, pReal, pImag,
  345|   407k|                         &hSbrDec->qmfDomainInCh->scaling, pTimeInQmf,
  346|   407k|                         0 + sbrInDataHeadroom, 1, qmfTemp);
  347|       |
  348|   407k|    C_AALLOC_SCRATCH_END(qmfTemp, FIXP_DBL, 2 * (64));
  ------------------
  |  |  327|   407k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
  349|   407k|  }
  350|       |
  351|       |  /*
  352|       |    Clear upper half of spectrum
  353|       |  */
  354|   432k|  if (!((flags & SBRDEC_USAC_HARMONICSBR) &&
  ------------------
  |  |  218|   432k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (354:9): [True: 80.0k, False: 352k]
  ------------------
  355|   386k|        (hFrameData->sbrPatchingMode == 0))) {
  ------------------
  |  Branch (355:9): [True: 45.4k, False: 34.5k]
  ------------------
  356|   386k|    int nAnalysisBands = hHeaderData->numberOfAnalysisBands;
  357|       |
  358|   386k|    if (!(flags & SBRDEC_LOW_POWER)) {
  ------------------
  |  |  211|   386k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (358:9): [True: 221k, False: 165k]
  ------------------
  359|  7.67M|      for (slot = ov_len; slot < noCols + ov_len; slot++) {
  ------------------
  |  Branch (359:27): [True: 7.45M, False: 221k]
  ------------------
  360|  7.45M|        FDKmemclear(&pLowBandReal[slot][nAnalysisBands],
  361|  7.45M|                    ((64) - nAnalysisBands) * sizeof(FIXP_DBL));
  362|  7.45M|        FDKmemclear(&pLowBandImag[slot][nAnalysisBands],
  363|  7.45M|                    ((64) - nAnalysisBands) * sizeof(FIXP_DBL));
  364|  7.45M|      }
  365|   221k|    } else {
  366|  3.20M|      for (slot = ov_len; slot < noCols + ov_len; slot++) {
  ------------------
  |  Branch (366:27): [True: 3.04M, False: 165k]
  ------------------
  367|  3.04M|        FDKmemclear(&pLowBandReal[slot][nAnalysisBands],
  368|  3.04M|                    ((64) - nAnalysisBands) * sizeof(FIXP_DBL));
  369|  3.04M|      }
  370|   165k|    }
  371|   386k|  }
  372|       |
  373|       |  /*
  374|       |    Shift spectral data left to gain accuracy in transposer and adjustor
  375|       |  */
  376|       |  /* Range was increased from lsb to no_channels because in some cases (e.g.
  377|       |     USAC conf eSbr_4_Pvc.mp4 and some HBE cases) it could be observed that the
  378|       |     signal between lsb and no_channels is used for the patching process.
  379|       |  */
  380|   432k|  maxVal = maxSubbandSample(pReal, (flags & SBRDEC_LOW_POWER) ? NULL : pImag, 0,
  ------------------
  |  |  211|   432k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (380:36): [True: 165k, False: 267k]
  ------------------
  381|   432k|                            hSbrDec->qmfDomainInCh->fb.no_channels, 0, noCols);
  382|       |
  383|   432k|  reserve = fixMax(0, CntLeadingZeros(maxVal) - 1);
  ------------------
  |  |  307|   432k|#define fixMax(a, b) fMax(a, b)
  ------------------
  384|   432k|  reserve = fixMin(reserve,
  ------------------
  |  |  306|   432k|#define fixMin(a, b) fMin(a, b)
  ------------------
  385|   432k|                   DFRACT_BITS - 1 - hSbrDec->qmfDomainInCh->scaling.lb_scale);
  386|       |
  387|       |  /* If all data is zero, lb_scale could become too large */
  388|   432k|  rescaleSubbandSamples(pReal, (flags & SBRDEC_LOW_POWER) ? NULL : pImag, 0,
  ------------------
  |  |  211|   432k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (388:32): [True: 165k, False: 267k]
  ------------------
  389|   432k|                        hSbrDec->qmfDomainInCh->fb.no_channels, 0, noCols,
  390|   432k|                        reserve);
  391|       |
  392|   432k|  hSbrDec->qmfDomainInCh->scaling.lb_scale += reserve;
  393|       |
  394|   432k|  if ((flags & SBRDEC_USAC_HARMONICSBR)) {
  ------------------
  |  |  218|   432k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (394:7): [True: 80.0k, False: 352k]
  ------------------
  395|       |    /* actually this is our hbe_scale */
  396|  80.0k|    hSbrDec->scale_hbe = hSbrDec->qmfDomainInCh->scaling.lb_scale;
  397|       |    /* the real lb_scale is stored in scale_lb from sbr */
  398|  80.0k|    hSbrDec->qmfDomainInCh->scaling.lb_scale = hSbrDec->scale_lb;
  399|  80.0k|  }
  400|       |  /*
  401|       |    save low band scale, wavecoding or parametric stereo may modify it
  402|       |  */
  403|   432k|  saveLbScale = hSbrDec->qmfDomainInCh->scaling.lb_scale;
  404|       |
  405|   432k|  if (applyProcessing) {
  ------------------
  |  Branch (405:7): [True: 259k, False: 172k]
  ------------------
  406|   259k|    UCHAR *borders = hFrameData->frameInfo.borders;
  407|   259k|    lastSlotOffs = borders[hFrameData->frameInfo.nEnvelopes] -
  408|   259k|                   hHeaderData->numberTimeSlots;
  409|       |
  410|   259k|    FIXP_DBL degreeAlias[(64)];
  411|   259k|    PVC_DYNAMIC_DATA pvcDynamicData;
  412|   259k|    pvcInitFrame(
  413|   259k|        &hSbrDec->PvcStaticData, &pvcDynamicData,
  414|   259k|        (hHeaderData->frameErrorFlag ? 0 : hHeaderData->bs_info.pvc_mode),
  ------------------
  |  Branch (414:10): [True: 94.5k, False: 164k]
  ------------------
  415|   259k|        hFrameData->ns, hHeaderData->timeStep,
  416|   259k|        hHeaderData->freqBandData.lowSubband,
  417|   259k|        hFrameData->frameInfo.pvcBorders[0], hFrameData->pvcID);
  418|       |
  419|   259k|    if (!hHeaderData->frameErrorFlag && (hHeaderData->bs_info.pvc_mode > 0)) {
  ------------------
  |  Branch (419:9): [True: 164k, False: 94.5k]
  |  Branch (419:41): [True: 84.6k, False: 80.1k]
  ------------------
  420|  84.6k|      pvcDecodeFrame(&hSbrDec->PvcStaticData, &pvcDynamicData, pLowBandReal,
  421|  84.6k|                     pLowBandImag, ov_len,
  422|  84.6k|                     SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.ov_lb_scale),
  ------------------
  |  |  414|  84.6k|#define SCALE2EXP(s) (15 - (s))
  ------------------
  423|  84.6k|                     SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.lb_scale));
  ------------------
  |  |  414|  84.6k|#define SCALE2EXP(s) (15 - (s))
  ------------------
  424|  84.6k|    }
  425|   259k|    pvcEndFrame(&hSbrDec->PvcStaticData, &pvcDynamicData);
  426|       |
  427|       |    /* The transposer will override most values in degreeAlias[].
  428|       |       The array needs to be cleared at least from lowSubband to highSubband
  429|       |       before. */
  430|   259k|    if (flags & SBRDEC_LOW_POWER)
  ------------------
  |  |  211|   259k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (430:9): [True: 42.7k, False: 216k]
  ------------------
  431|  42.7k|      FDKmemclear(&degreeAlias[hHeaderData->freqBandData.lowSubband],
  432|  42.7k|                  (hHeaderData->freqBandData.highSubband -
  433|  42.7k|                   hHeaderData->freqBandData.lowSubband) *
  434|  42.7k|                      sizeof(FIXP_DBL));
  435|       |
  436|       |    /*
  437|       |      Inverse filtering of lowband and transposition into the SBR-frequency
  438|       |      range
  439|       |    */
  440|       |
  441|   259k|    {
  442|   259k|      KEEP_STATES_SYNCED_MODE keepStatesSyncedMode =
  443|   259k|          ((flags & SBRDEC_USAC_HARMONICSBR) &&
  ------------------
  |  |  218|   259k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (443:12): [True: 68.3k, False: 191k]
  ------------------
  444|  68.3k|           (hFrameData->sbrPatchingMode != 0))
  ------------------
  |  Branch (444:12): [True: 31.5k, False: 36.8k]
  ------------------
  445|   259k|              ? KEEP_STATES_SYNCED_NORMAL
  446|   259k|              : KEEP_STATES_SYNCED_OFF;
  447|       |
  448|   259k|      if (flags & SBRDEC_USAC_HARMONICSBR) {
  ------------------
  |  |  218|   259k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (448:11): [True: 68.3k, False: 191k]
  ------------------
  449|  68.3k|        if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  68.3k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (449:13): [True: 27.0k, False: 41.3k]
  ------------------
  450|  27.0k|          pReal -= 32;
  451|  27.0k|          pImag -= 32;
  452|  27.0k|        }
  453|       |
  454|  68.3k|        if ((hSbrDec->savedStates == 0) && (hFrameData->sbrPatchingMode == 1)) {
  ------------------
  |  Branch (454:13): [True: 37.6k, False: 30.6k]
  |  Branch (454:44): [True: 17.2k, False: 20.4k]
  ------------------
  455|       |          /* copy saved states from previous frame to legacy SBR lpc filterstate
  456|       |           * buffer   */
  457|   198k|          for (i = 0; i < LPC_ORDER + ov_len; i++) {
  ------------------
  |  |  157|   198k|#define LPC_ORDER 2
  ------------------
  |  Branch (457:23): [True: 180k, False: 17.2k]
  ------------------
  458|   180k|            FDKmemcpy(
  459|   180k|                hSbrDec->LppTrans.lpcFilterStatesRealLegSBR[i],
  460|   180k|                hSbrDec->codecQMFBufferReal[noCols - LPC_ORDER - ov_len + i],
  ------------------
  |  |  157|   180k|#define LPC_ORDER 2
  ------------------
  461|   180k|                hSbrDec->hHBE->noChannels * sizeof(FIXP_DBL));
  462|   180k|            FDKmemcpy(
  463|   180k|                hSbrDec->LppTrans.lpcFilterStatesImagLegSBR[i],
  464|   180k|                hSbrDec->codecQMFBufferImag[noCols - LPC_ORDER - ov_len + i],
  ------------------
  |  |  157|   180k|#define LPC_ORDER 2
  ------------------
  465|   180k|                hSbrDec->hHBE->noChannels * sizeof(FIXP_DBL));
  466|   180k|          }
  467|  17.2k|        }
  468|       |
  469|       |        /* saving unmodified QMF states in case we are switching from legacy SBR
  470|       |         * to HBE */
  471|  3.11M|        for (i = 0; i < hSbrDec->hHBE->noCols; i++) {
  ------------------
  |  Branch (471:21): [True: 3.05M, False: 68.3k]
  ------------------
  472|  3.05M|          FDKmemcpy(hSbrDec->codecQMFBufferReal[i], pLowBandReal[ov_len + i],
  473|  3.05M|                    hSbrDec->hHBE->noChannels * sizeof(FIXP_DBL));
  474|  3.05M|          FDKmemcpy(hSbrDec->codecQMFBufferImag[i], pLowBandImag[ov_len + i],
  475|  3.05M|                    hSbrDec->hHBE->noChannels * sizeof(FIXP_DBL));
  476|  3.05M|        }
  477|       |
  478|  68.3k|        QmfTransposerApply(
  479|  68.3k|            hSbrDec->hHBE, pReal, pImag, noCols, pLowBandReal, pLowBandImag,
  480|  68.3k|            hSbrDec->LppTrans.lpcFilterStatesRealHBE,
  481|  68.3k|            hSbrDec->LppTrans.lpcFilterStatesImagHBE,
  482|  68.3k|            hFrameData->sbrPitchInBins, hSbrDec->scale_lb, hSbrDec->scale_hbe,
  483|  68.3k|            &hSbrDec->qmfDomainInCh->scaling.hb_scale, hHeaderData->timeStep,
  484|  68.3k|            borders[0], ov_len, keepStatesSyncedMode);
  485|       |
  486|  68.3k|        if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  68.3k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (486:13): [True: 27.0k, False: 41.3k]
  ------------------
  487|  27.0k|          int *xOverQmf = GetxOverBandQmfTransposer(hSbrDec->hHBE);
  488|       |
  489|  27.0k|          copyHarmonicSpectrum(xOverQmf, pLowBandReal, pLowBandImag, noCols,
  490|  27.0k|                               ov_len, keepStatesSyncedMode);
  491|  27.0k|        }
  492|  68.3k|      }
  493|   259k|    }
  494|       |
  495|   259k|    if ((flags & SBRDEC_USAC_HARMONICSBR) &&
  ------------------
  |  |  218|   259k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (495:9): [True: 68.3k, False: 191k]
  ------------------
  496|  68.3k|        (hFrameData->sbrPatchingMode == 0)) {
  ------------------
  |  Branch (496:9): [True: 36.8k, False: 31.5k]
  ------------------
  497|  36.8k|      hSbrDec->prev_frame_lSbr = 0;
  498|  36.8k|      hSbrDec->prev_frame_hbeSbr = 1;
  499|       |
  500|  36.8k|      lppTransposerHBE(
  501|  36.8k|          &hSbrDec->LppTrans, hSbrDec->hHBE, &hSbrDec->qmfDomainInCh->scaling,
  502|  36.8k|          pLowBandReal, pLowBandImag, hHeaderData->timeStep, borders[0],
  503|  36.8k|          lastSlotOffs, hHeaderData->freqBandData.nInvfBands,
  504|  36.8k|          hFrameData->sbr_invf_mode, hPrevFrameData->sbr_invf_mode);
  505|       |
  506|   222k|    } else {
  507|   222k|      if (flags & SBRDEC_USAC_HARMONICSBR) {
  ------------------
  |  |  218|   222k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (507:11): [True: 31.5k, False: 191k]
  ------------------
  508|   329k|        for (i = 0; i < LPC_ORDER + hSbrDec->LppTrans.pSettings->overlap; i++) {
  ------------------
  |  |  157|   329k|#define LPC_ORDER 2
  ------------------
  |  Branch (508:21): [True: 298k, False: 31.5k]
  ------------------
  509|       |          /*
  510|       |          Store the unmodified qmf Slots values for upper part of spectrum
  511|       |          (required for LPC filtering) required if next frame is a HBE frame
  512|       |          */
  513|   298k|          FDKmemcpy(hSbrDec->LppTrans.lpcFilterStatesRealHBE[i],
  514|   298k|                    hSbrDec->qmfDomainInCh
  515|   298k|                        ->hQmfSlotsReal[hSbrDec->hHBE->noCols - LPC_ORDER + i],
  ------------------
  |  |  157|   298k|#define LPC_ORDER 2
  ------------------
  516|   298k|                    (64) * sizeof(FIXP_DBL));
  517|   298k|          FDKmemcpy(hSbrDec->LppTrans.lpcFilterStatesImagHBE[i],
  518|   298k|                    hSbrDec->qmfDomainInCh
  519|   298k|                        ->hQmfSlotsImag[hSbrDec->hHBE->noCols - LPC_ORDER + i],
  ------------------
  |  |  157|   298k|#define LPC_ORDER 2
  ------------------
  520|   298k|                    (64) * sizeof(FIXP_DBL));
  521|   298k|        }
  522|  31.5k|      }
  523|   222k|      {
  524|   222k|        hSbrDec->prev_frame_lSbr = 1;
  525|   222k|        hSbrDec->prev_frame_hbeSbr = 0;
  526|   222k|      }
  527|       |
  528|   222k|      lppTransposer(
  529|   222k|          &hSbrDec->LppTrans, &hSbrDec->qmfDomainInCh->scaling, pLowBandReal,
  530|   222k|          degreeAlias,  // only used if useLP = 1
  531|   222k|          pLowBandImag, flags & SBRDEC_LOW_POWER,
  ------------------
  |  |  211|   222k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  532|   222k|          hHeaderData->bs_info.sbr_preprocessing,
  533|   222k|          hHeaderData->freqBandData.v_k_master[0], hHeaderData->timeStep,
  534|   222k|          borders[0], lastSlotOffs, hHeaderData->freqBandData.nInvfBands,
  535|   222k|          hFrameData->sbr_invf_mode, hPrevFrameData->sbr_invf_mode);
  536|   222k|    }
  537|       |
  538|       |    /*
  539|       |      Adjust envelope of current frame.
  540|       |    */
  541|       |
  542|   259k|    if ((hFrameData->sbrPatchingMode !=
  ------------------
  |  Branch (542:9): [True: 12.0k, False: 247k]
  ------------------
  543|   259k|         hSbrDec->SbrCalculateEnvelope.sbrPatchingMode)) {
  544|  12.0k|      ResetLimiterBands(hHeaderData->freqBandData.limiterBandTable,
  545|  12.0k|                        &hHeaderData->freqBandData.noLimiterBands,
  546|  12.0k|                        hHeaderData->freqBandData.freqBandTable[0],
  547|  12.0k|                        hHeaderData->freqBandData.nSfb[0],
  548|  12.0k|                        hSbrDec->LppTrans.pSettings->patchParam,
  549|  12.0k|                        hSbrDec->LppTrans.pSettings->noOfPatches,
  550|  12.0k|                        hHeaderData->bs_data.limiterBands,
  551|  12.0k|                        hFrameData->sbrPatchingMode,
  552|  12.0k|                        (flags & SBRDEC_USAC_HARMONICSBR) &&
  ------------------
  |  |  218|  12.0k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (552:25): [True: 11.9k, False: 189]
  ------------------
  553|  11.9k|                                (hFrameData->sbrPatchingMode == 0)
  ------------------
  |  Branch (553:33): [True: 4.87k, False: 7.02k]
  ------------------
  554|  12.0k|                            ? GetxOverBandQmfTransposer(hSbrDec->hHBE)
  555|  12.0k|                            : NULL,
  556|  12.0k|                        Get41SbrQmfTransposer(hSbrDec->hHBE));
  557|       |
  558|  12.0k|      hSbrDec->SbrCalculateEnvelope.sbrPatchingMode =
  559|  12.0k|          hFrameData->sbrPatchingMode;
  560|  12.0k|    }
  561|       |
  562|   259k|    calculateSbrEnvelope(
  563|   259k|        &hSbrDec->qmfDomainInCh->scaling, &hSbrDec->SbrCalculateEnvelope,
  564|   259k|        hHeaderData, hFrameData, &pvcDynamicData, pLowBandReal, pLowBandImag,
  565|   259k|        flags & SBRDEC_LOW_POWER,
  ------------------
  |  |  211|   259k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  566|       |
  567|   259k|        degreeAlias, flags,
  568|   259k|        (hHeaderData->frameErrorFlag || hPrevFrameData->frameErrorFlag));
  ------------------
  |  Branch (568:10): [True: 94.5k, False: 164k]
  |  Branch (568:41): [True: 39.9k, False: 124k]
  ------------------
  569|       |
  570|       |#if (SBRDEC_MAX_HB_FADE_FRAMES > 0)
  571|       |    /* Avoid hard onsets of high band */
  572|       |    if (hHeaderData->frameErrorFlag) {
  573|       |      if (hSbrDec->highBandFadeCnt < SBRDEC_MAX_HB_FADE_FRAMES) {
  574|       |        hSbrDec->highBandFadeCnt += 1;
  575|       |      }
  576|       |    } else {
  577|       |      if (hSbrDec->highBandFadeCnt >
  578|       |          0) { /* Manipulate high band scale factor to get a smooth fade-in */
  579|       |        hSbrDec->qmfDomainInCh->scaling.hb_scale += hSbrDec->highBandFadeCnt;
  580|       |        hSbrDec->qmfDomainInCh->scaling.hb_scale =
  581|       |            fMin(hSbrDec->qmfDomainInCh->scaling.hb_scale, DFRACT_BITS - 1);
  582|       |        hSbrDec->highBandFadeCnt -= 1;
  583|       |      }
  584|       |    }
  585|       |
  586|       |#endif
  587|       |    /*
  588|       |      Update hPrevFrameData (to be used in the next frame)
  589|       |    */
  590|   870k|    for (i = 0; i < hHeaderData->freqBandData.nInvfBands; i++) {
  ------------------
  |  Branch (590:17): [True: 610k, False: 259k]
  ------------------
  591|   610k|      hPrevFrameData->sbr_invf_mode[i] = hFrameData->sbr_invf_mode[i];
  592|   610k|    }
  593|   259k|    hPrevFrameData->coupling = hFrameData->coupling;
  594|   259k|    hPrevFrameData->stopPos = borders[hFrameData->frameInfo.nEnvelopes];
  595|   259k|    hPrevFrameData->ampRes = hFrameData->ampResolutionCurrentFrame;
  596|   259k|    hPrevFrameData->prevSbrPitchInBins = hFrameData->sbrPitchInBins;
  597|       |    /* could be done in extractFrameInfo_pvc() but hPrevFrameData is not
  598|       |     * available there */
  599|   259k|    FDKmemcpy(&hPrevFrameData->prevFrameInfo, &hFrameData->frameInfo,
  600|   259k|              sizeof(FRAME_INFO));
  601|   259k|  } else {
  602|       |    /* rescale from lsb to nAnalysisBands in order to compensate scaling with
  603|       |     * hb_scale in this area, done by synthesisFiltering*/
  604|   172k|    int rescale;
  605|   172k|    int lsb;
  606|   172k|    int length;
  607|       |
  608|       |    /* Reset hb_scale if no highband is present, because hb_scale is considered
  609|       |     * in the QMF-synthesis */
  610|   172k|    hSbrDec->qmfDomainInCh->scaling.hb_scale = saveLbScale;
  611|       |
  612|   172k|    rescale = hSbrDec->qmfDomainInCh->scaling.hb_scale -
  613|   172k|              hSbrDec->qmfDomainInCh->scaling.ov_lb_scale;
  614|   172k|    lsb = hSbrDec->qmfDomainOutCh->fb.lsb;
  615|   172k|    length = (hSbrDec->qmfDomainInCh->fb.no_channels - lsb);
  616|       |
  617|   172k|    if ((rescale < 0) && (length > 0)) {
  ------------------
  |  Branch (617:9): [True: 33.1k, False: 139k]
  |  Branch (617:26): [True: 14.8k, False: 18.2k]
  ------------------
  618|  14.8k|      if (!(flags & SBRDEC_LOW_POWER)) {
  ------------------
  |  |  211|  14.8k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (618:11): [True: 4.63k, False: 10.2k]
  ------------------
  619|  33.1k|        for (i = 0; i < ov_len; i++) {
  ------------------
  |  Branch (619:21): [True: 28.5k, False: 4.63k]
  ------------------
  620|  28.5k|          scaleValues(&pLowBandReal[i][lsb], length, rescale);
  621|  28.5k|          scaleValues(&pLowBandImag[i][lsb], length, rescale);
  622|  28.5k|        }
  623|  10.2k|      } else {
  624|  12.2k|        for (i = 0; i < ov_len; i++) {
  ------------------
  |  Branch (624:21): [True: 2.01k, False: 10.2k]
  ------------------
  625|  2.01k|          scaleValues(&pLowBandReal[i][lsb], length, rescale);
  626|  2.01k|        }
  627|  10.2k|      }
  628|  14.8k|    }
  629|   172k|  }
  630|       |
  631|   432k|  if (!(flags & SBRDEC_USAC_HARMONICSBR)) {
  ------------------
  |  |  218|   432k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (631:7): [True: 352k, False: 80.0k]
  ------------------
  632|   352k|    int length = hSbrDec->qmfDomainInCh->fb.lsb;
  633|   352k|    if (flags & SBRDEC_SYNTAX_USAC) {
  ------------------
  |  |  206|   352k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (633:9): [True: 178k, False: 173k]
  ------------------
  634|   178k|      length = hSbrDec->qmfDomainInCh->fb.no_channels;
  635|   178k|    }
  636|       |
  637|       |    /* in case of legacy sbr saving of filter states here */
  638|  2.38M|    for (i = 0; i < LPC_ORDER + ov_len; i++) {
  ------------------
  |  |  157|  2.38M|#define LPC_ORDER 2
  ------------------
  |  Branch (638:17): [True: 2.03M, False: 352k]
  ------------------
  639|       |      /*
  640|       |        Store the unmodified qmf Slots values (required for LPC filtering)
  641|       |      */
  642|  2.03M|      if (!(flags & SBRDEC_LOW_POWER)) {
  ------------------
  |  |  211|  2.03M|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (642:11): [True: 1.50M, False: 529k]
  ------------------
  643|  1.50M|        FDKmemcpy(hSbrDec->LppTrans.lpcFilterStatesRealLegSBR[i],
  644|  1.50M|                  pLowBandReal[noCols - LPC_ORDER + i],
  ------------------
  |  |  157|  1.50M|#define LPC_ORDER 2
  ------------------
  645|  1.50M|                  length * sizeof(FIXP_DBL));
  646|  1.50M|        FDKmemcpy(hSbrDec->LppTrans.lpcFilterStatesImagLegSBR[i],
  647|  1.50M|                  pLowBandImag[noCols - LPC_ORDER + i],
  ------------------
  |  |  157|  1.50M|#define LPC_ORDER 2
  ------------------
  648|  1.50M|                  length * sizeof(FIXP_DBL));
  649|  1.50M|      } else
  650|   529k|        FDKmemcpy(hSbrDec->LppTrans.lpcFilterStatesRealLegSBR[i],
  651|   529k|                  pLowBandReal[noCols - LPC_ORDER + i],
  ------------------
  |  |  157|   529k|#define LPC_ORDER 2
  ------------------
  652|   529k|                  length * sizeof(FIXP_DBL));
  653|  2.03M|    }
  654|   352k|  }
  655|       |
  656|       |  /*
  657|       |    Synthesis subband filtering.
  658|       |  */
  659|       |
  660|   432k|  if (!(flags & SBRDEC_PS_DECODED)) {
  ------------------
  |  |  213|   432k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
  |  Branch (660:7): [True: 429k, False: 3.37k]
  ------------------
  661|   429k|    if (!(flags & SBRDEC_SKIP_QMF_SYN)) {
  ------------------
  |  |  236|   429k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  |  Branch (661:9): [True: 318k, False: 110k]
  ------------------
  662|   318k|      int outScalefactor = -(8);
  663|       |
  664|   318k|      if (h_ps_d != NULL) {
  ------------------
  |  Branch (664:11): [True: 21.9k, False: 296k]
  ------------------
  665|  21.9k|        h_ps_d->procFrameBased = 1; /* we here do frame based processing */
  666|  21.9k|      }
  667|       |
  668|   318k|      sbrDecoder_drcApply(&hSbrDec->sbrDrcChannel, pLowBandReal,
  669|   318k|                          (flags & SBRDEC_LOW_POWER) ? NULL : pLowBandImag,
  ------------------
  |  |  211|   318k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (669:27): [True: 165k, False: 153k]
  ------------------
  670|   318k|                          hSbrDec->qmfDomainOutCh->fb.no_col, &outScalefactor);
  671|       |
  672|   318k|      qmfChangeOutScalefactor(&hSbrDec->qmfDomainOutCh->fb, outScalefactor);
  673|       |
  674|   318k|      {
  675|   318k|        HANDLE_FREQ_BAND_DATA hFreq = &hHeaderData->freqBandData;
  676|   318k|        int save_usb = hSbrDec->qmfDomainOutCh->fb.usb;
  677|       |
  678|   318k|#if (QMF_MAX_SYNTHESIS_BANDS <= 64)
  679|   318k|        C_AALLOC_SCRATCH_START(qmfTemp, FIXP_DBL, 2 * QMF_MAX_SYNTHESIS_BANDS);
  ------------------
  |  |  319|   318k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|   318k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|   318k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|   318k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   318k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|   318k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   318k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|   318k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|   318k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|   318k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  680|       |#else
  681|       |        C_AALLOC_STACK_START(qmfTemp, FIXP_DBL, 2 * QMF_MAX_SYNTHESIS_BANDS);
  682|       |#endif
  683|   318k|        if (hSbrDec->qmfDomainOutCh->fb.usb < hFreq->ov_highSubband) {
  ------------------
  |  Branch (683:13): [True: 36.9k, False: 281k]
  ------------------
  684|       |          /* we need to patch usb for this frame as overlap may contain higher
  685|       |             frequency range if headerchange occured; fb. usb is always limited
  686|       |             to maximum fb.no_channels; In case of wrongly decoded headers it
  687|       |             might be that ov_highSubband is higher than the number of synthesis
  688|       |             channels (fb.no_channels), which is forbidden, therefore we need to
  689|       |             limit ov_highSubband with fMin function to avoid not allowed usb in
  690|       |             synthesis filterbank. */
  691|  36.9k|          hSbrDec->qmfDomainOutCh->fb.usb =
  692|  36.9k|              fMin((UINT)hFreq->ov_highSubband,
  693|  36.9k|                   (UINT)hSbrDec->qmfDomainOutCh->fb.no_channels);
  694|  36.9k|        }
  695|   318k|        {
  696|   318k|          qmfSynthesisFiltering(
  697|   318k|              &hSbrDec->qmfDomainOutCh->fb, pLowBandReal,
  698|   318k|              (flags & SBRDEC_LOW_POWER) ? NULL : pLowBandImag,
  ------------------
  |  |  211|   318k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (698:15): [True: 165k, False: 153k]
  ------------------
  699|   318k|              &hSbrDec->qmfDomainInCh->scaling,
  700|   318k|              hSbrDec->LppTrans.pSettings->overlap, timeOut, strideOut,
  701|   318k|              qmfTemp);
  702|   318k|        }
  703|       |        /* restore saved value */
  704|   318k|        hSbrDec->qmfDomainOutCh->fb.usb = save_usb;
  705|   318k|        hFreq->ov_highSubband = save_usb;
  706|   318k|#if (QMF_MAX_SYNTHESIS_BANDS <= 64)
  707|   318k|        C_AALLOC_SCRATCH_END(qmfTemp, FIXP_DBL, 2 * QMF_MAX_SYNTHESIS_BANDS);
  ------------------
  |  |  327|   318k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
  708|       |#else
  709|       |        C_AALLOC_STACK_END(qmfTemp, FIXP_DBL, 2 * QMF_MAX_SYNTHESIS_BANDS);
  710|       |#endif
  711|   318k|      }
  712|   318k|    }
  713|       |
  714|   429k|  } else { /* (flags & SBRDEC_PS_DECODED) */
  715|  3.37k|    INT sdiff;
  716|  3.37k|    INT scaleFactorHighBand, scaleFactorLowBand_ov, scaleFactorLowBand_no_ov,
  717|  3.37k|        outScalefactor, outScalefactorR, outScalefactorL;
  718|       |
  719|  3.37k|    HANDLE_QMF_FILTER_BANK synQmf = &hSbrDec->qmfDomainOutCh->fb;
  720|  3.37k|    HANDLE_QMF_FILTER_BANK synQmfRight = &hSbrDecRight->qmfDomainOutCh->fb;
  721|       |
  722|       |    /* adapt scaling */
  723|  3.37k|    sdiff = hSbrDec->qmfDomainInCh->scaling.lb_scale -
  724|  3.37k|            reserve; /* Scaling difference */
  725|  3.37k|    scaleFactorHighBand = sdiff - hSbrDec->qmfDomainInCh->scaling.hb_scale;
  726|  3.37k|    scaleFactorLowBand_ov = sdiff - hSbrDec->qmfDomainInCh->scaling.ov_lb_scale;
  727|  3.37k|    scaleFactorLowBand_no_ov = sdiff - hSbrDec->qmfDomainInCh->scaling.lb_scale;
  728|       |
  729|       |    /* Scale of low band overlapping QMF data */
  730|  3.37k|    scaleFactorLowBand_ov =
  731|  3.37k|        fMin(DFRACT_BITS - 1, fMax(-(DFRACT_BITS - 1), scaleFactorLowBand_ov));
  ------------------
  |  |  113|  3.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                      fMin(DFRACT_BITS - 1, fMax(-(DFRACT_BITS - 1), scaleFactorLowBand_ov));
  ------------------
  |  |  113|  3.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  732|       |    /* Scale of low band current QMF data     */
  733|  3.37k|    scaleFactorLowBand_no_ov = fMin(
  734|  3.37k|        DFRACT_BITS - 1, fMax(-(DFRACT_BITS - 1), scaleFactorLowBand_no_ov));
  ------------------
  |  |  113|  3.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                      DFRACT_BITS - 1, fMax(-(DFRACT_BITS - 1), scaleFactorLowBand_no_ov));
  ------------------
  |  |  113|  3.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  735|       |    /* Scale of current high band */
  736|  3.37k|    scaleFactorHighBand =
  737|  3.37k|        fMin(DFRACT_BITS - 1, fMax(-(DFRACT_BITS - 1), scaleFactorHighBand));
  ------------------
  |  |  113|  3.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                      fMin(DFRACT_BITS - 1, fMax(-(DFRACT_BITS - 1), scaleFactorHighBand));
  ------------------
  |  |  113|  3.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  738|       |
  739|  3.37k|    if (h_ps_d->procFrameBased == 1) /* If we have switched from frame to slot
  ------------------
  |  Branch (739:9): [True: 446, False: 2.92k]
  ------------------
  740|       |                                        based processing copy filter states */
  741|    446|    {                                /* procFrameBased will be unset later */
  742|       |      /* copy filter states from left to right */
  743|       |      /* was ((640)-(64))*sizeof(FIXP_QSS)
  744|       |         flexible amount of synthesis bands needed for QMF based resampling
  745|       |      */
  746|    446|      FDK_ASSERT(hSbrDec->qmfDomainInCh->pGlobalConf->nBandsSynthesis <=
  ------------------
  |  |  221|    446|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (746:7): [True: 446, False: 0]
  ------------------
  747|    446|                 QMF_MAX_SYNTHESIS_BANDS);
  748|    446|      synQmfRight->outScalefactor = synQmf->outScalefactor;
  749|    446|      FDKmemcpy(synQmfRight->FilterStates, synQmf->FilterStates,
  750|    446|                9 * hSbrDec->qmfDomainInCh->pGlobalConf->nBandsSynthesis *
  751|    446|                    sizeof(FIXP_QSS));
  752|    446|    }
  753|       |
  754|       |    /* Feed delaylines when parametric stereo is switched on. */
  755|  3.37k|    PreparePsProcessing(h_ps_d, pLowBandReal, pLowBandImag,
  756|  3.37k|                        scaleFactorLowBand_ov);
  757|       |
  758|       |    /* use the same synthese qmf values for left and right channel */
  759|  3.37k|    synQmfRight->no_col = synQmf->no_col;
  760|  3.37k|    synQmfRight->lsb = synQmf->lsb;
  761|  3.37k|    synQmfRight->usb = synQmf->usb;
  762|       |
  763|  3.37k|    int env = 0;
  764|       |
  765|  3.37k|    {
  766|  3.37k|#if (QMF_MAX_SYNTHESIS_BANDS <= 64)
  767|  3.37k|      C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL,
  ------------------
  |  |  319|  3.37k|  type _##name[(n) + (ALIGNMENT_DEFAULT + sizeof(type) - 1)]; \
  |  |  320|  3.37k|  type *name = (type *)ALIGN_PTR(_##name);                    \
  |  |  ------------------
  |  |  |  |  312|  3.37k|  ((void *)((unsigned char *)(a) +                        \
  |  |  |  |  313|  3.37k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  3.37k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  314|  3.37k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  3.37k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  |  |  315|  3.37k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  3.37k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  3.37k|  C_ALLOC_ALIGNED_REGISTER(name, (n) * sizeof(type));
  ------------------
  768|  3.37k|                             2 * QMF_MAX_SYNTHESIS_BANDS);
  769|       |#else
  770|       |      C_AALLOC_STACK_START(pWorkBuffer, FIXP_DBL, 2 * QMF_MAX_SYNTHESIS_BANDS);
  771|       |#endif
  772|       |
  773|  3.37k|      int maxShift = 0;
  774|       |
  775|  3.37k|      if (hSbrDec->sbrDrcChannel.enable != 0) {
  ------------------
  |  Branch (775:11): [True: 788, False: 2.58k]
  ------------------
  776|    788|        if (hSbrDec->sbrDrcChannel.prevFact_exp > maxShift) {
  ------------------
  |  Branch (776:13): [True: 302, False: 486]
  ------------------
  777|    302|          maxShift = hSbrDec->sbrDrcChannel.prevFact_exp;
  778|    302|        }
  779|    788|        if (hSbrDec->sbrDrcChannel.currFact_exp > maxShift) {
  ------------------
  |  Branch (779:13): [True: 57, False: 731]
  ------------------
  780|     57|          maxShift = hSbrDec->sbrDrcChannel.currFact_exp;
  781|     57|        }
  782|    788|        if (hSbrDec->sbrDrcChannel.nextFact_exp > maxShift) {
  ------------------
  |  Branch (782:13): [True: 52, False: 736]
  ------------------
  783|     52|          maxShift = hSbrDec->sbrDrcChannel.nextFact_exp;
  784|     52|        }
  785|    788|      }
  786|       |
  787|       |      /* copy DRC data to right channel (with PS both channels use the same DRC
  788|       |       * gains) */
  789|  3.37k|      FDKmemcpy(&hSbrDecRight->sbrDrcChannel, &hSbrDec->sbrDrcChannel,
  790|  3.37k|                sizeof(SBRDEC_DRC_CHANNEL));
  791|       |
  792|  3.37k|      outScalefactor = maxShift - (8);
  793|  3.37k|      outScalefactorL = outScalefactorR =
  794|  3.37k|          sbrInDataHeadroom + 1; /* +1: psDiffScale! (MPEG-PS) */
  795|       |
  796|   108k|      for (i = 0; i < synQmf->no_col; i++) { /* ----- no_col loop ----- */
  ------------------
  |  Branch (796:19): [True: 104k, False: 3.37k]
  ------------------
  797|       |
  798|       |        /* qmf timeslot of right channel */
  799|   104k|        FIXP_DBL *rQmfReal = pWorkBuffer;
  800|   104k|        FIXP_DBL *rQmfImag = pWorkBuffer + synQmf->no_channels;
  801|       |
  802|   104k|        {
  803|   104k|          if (i ==
  ------------------
  |  Branch (803:15): [True: 8.56k, False: 96.3k]
  ------------------
  804|   104k|              h_ps_d->bsData[h_ps_d->processSlot].mpeg.aEnvStartStop[env]) {
  805|  8.56k|            initSlotBasedRotation(h_ps_d, env,
  806|  8.56k|                                  hHeaderData->freqBandData.highSubband);
  807|  8.56k|            env++;
  808|  8.56k|          }
  809|       |
  810|   104k|          ApplyPsSlot(
  811|   104k|              h_ps_d,             /* parametric stereo decoder handle  */
  812|   104k|              (pLowBandReal + i), /* one timeslot of left/mono channel */
  813|   104k|              (pLowBandImag + i), /* one timeslot of left/mono channel */
  814|   104k|              rQmfReal,           /* one timeslot or right channel     */
  815|   104k|              rQmfImag,           /* one timeslot or right channel     */
  816|   104k|              scaleFactorLowBand_no_ov,
  817|   104k|              (i < hSbrDec->LppTrans.pSettings->overlap)
  ------------------
  |  Branch (817:15): [True: 20.2k, False: 84.6k]
  ------------------
  818|   104k|                  ? scaleFactorLowBand_ov
  819|   104k|                  : scaleFactorLowBand_no_ov,
  820|   104k|              scaleFactorHighBand, synQmf->lsb, synQmf->usb);
  821|   104k|        }
  822|       |
  823|   104k|        sbrDecoder_drcApplySlot(/* right channel */
  824|   104k|                                &hSbrDecRight->sbrDrcChannel, rQmfReal,
  825|   104k|                                rQmfImag, i, synQmfRight->no_col, maxShift);
  826|       |
  827|   104k|        sbrDecoder_drcApplySlot(/* left channel */
  828|   104k|                                &hSbrDec->sbrDrcChannel, *(pLowBandReal + i),
  829|   104k|                                *(pLowBandImag + i), i, synQmf->no_col,
  830|   104k|                                maxShift);
  831|       |
  832|   104k|        if (!(flags & SBRDEC_SKIP_QMF_SYN)) {
  ------------------
  |  |  236|   104k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  |  Branch (832:13): [True: 104k, False: 0]
  ------------------
  833|   104k|          qmfChangeOutScalefactor(synQmf, outScalefactor);
  834|   104k|          qmfChangeOutScalefactor(synQmfRight, outScalefactor);
  835|       |
  836|   104k|          qmfSynthesisFilteringSlot(
  837|   104k|              synQmfRight, rQmfReal, /* QMF real buffer */
  838|   104k|              rQmfImag,              /* QMF imag buffer */
  839|   104k|              outScalefactorL, outScalefactorL,
  840|   104k|              timeOutRight + (i * synQmf->no_channels * strideOut), strideOut,
  841|   104k|              pWorkBuffer);
  842|       |
  843|   104k|          qmfSynthesisFilteringSlot(
  844|   104k|              synQmf, *(pLowBandReal + i), /* QMF real buffer */
  845|   104k|              *(pLowBandImag + i),         /* QMF imag buffer */
  846|   104k|              outScalefactorR, outScalefactorR,
  847|   104k|              timeOut + (i * synQmf->no_channels * strideOut), strideOut,
  848|   104k|              pWorkBuffer);
  849|   104k|        }
  850|   104k|      } /* no_col loop  i  */
  851|  3.37k|#if (QMF_MAX_SYNTHESIS_BANDS <= 64)
  852|  3.37k|      C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, 2 * QMF_MAX_SYNTHESIS_BANDS);
  ------------------
  |  |  327|  3.37k|#define C_AALLOC_SCRATCH_END(name, type, n) C_ALLOC_ALIGNED_UNREGISTER(name);
  ------------------
  853|       |#else
  854|       |      C_AALLOC_STACK_END(pWorkBuffer, FIXP_DBL, 2 * QMF_MAX_SYNTHESIS_BANDS);
  855|       |#endif
  856|  3.37k|    }
  857|  3.37k|  }
  858|       |
  859|   432k|  sbrDecoder_drcUpdateChannel(&hSbrDec->sbrDrcChannel);
  860|       |
  861|       |  /*
  862|       |    Update overlap buffer
  863|       |    Even bands above usb are copied to avoid outdated spectral data in case
  864|       |    the stop frequency raises.
  865|       |  */
  866|       |
  867|   432k|  if (!(flags & SBRDEC_SKIP_QMF_SYN)) {
  ------------------
  |  |  236|   432k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  |  Branch (867:7): [True: 322k, False: 110k]
  ------------------
  868|   322k|    {
  869|   322k|      FDK_QmfDomain_SaveOverlap(hSbrDec->qmfDomainInCh, 0);
  870|   322k|      FDK_ASSERT(hSbrDec->qmfDomainInCh->scaling.ov_lb_scale == saveLbScale);
  ------------------
  |  |  221|   322k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (870:7): [True: 322k, False: 0]
  ------------------
  871|   322k|    }
  872|   322k|  }
  873|       |
  874|   432k|  hSbrDec->savedStates = 0;
  875|       |
  876|       |  /* Save current frame status */
  877|   432k|  hPrevFrameData->frameErrorFlag = hHeaderData->frameErrorFlag;
  878|   432k|  hSbrDec->applySbrProc_old = applyProcessing;
  879|       |
  880|   432k|} /* sbr_dec() */
_Z12createSbrDecP11SBR_CHANNELP15SBR_HEADER_DATAP19TRANSPOSER_SETTINGSijjiii:
  896|   149k|{
  897|   149k|  SBR_ERROR err = SBRDEC_OK;
  898|   149k|  int timeSlots =
  899|   149k|      hHeaderData->numberTimeSlots; /* Number of SBR slots per frame */
  900|   149k|  int noCols =
  901|   149k|      timeSlots * hHeaderData->timeStep; /* Number of QMF slots per frame */
  902|   149k|  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|   149k|  hs->scale_hbe = 15;
  909|   149k|  hs->scale_lb = 15;
  910|   149k|  hs->scale_ov = 15;
  911|       |
  912|   149k|  hs->prev_frame_lSbr = 0;
  913|   149k|  hs->prev_frame_hbeSbr = 0;
  914|       |
  915|   149k|  hs->codecFrameSize = codecFrameSize;
  916|       |
  917|       |  /*
  918|       |    create envelope calculator
  919|       |  */
  920|   149k|  err = createSbrEnvelopeCalc(&hs->SbrCalculateEnvelope, hHeaderData, chan,
  921|   149k|                              flags);
  922|   149k|  if (err != SBRDEC_OK) {
  ------------------
  |  Branch (922:7): [True: 1.24k, False: 147k]
  ------------------
  923|  1.24k|    return err;
  924|  1.24k|  }
  925|       |
  926|   147k|  initSbrPrevFrameData(&hSbrChannel->prevFrameData, timeSlots);
  927|       |
  928|       |  /*
  929|       |    create transposer
  930|       |  */
  931|   147k|  err = createLppTransposer(
  932|   147k|      &hs->LppTrans, pSettings, hHeaderData->freqBandData.lowSubband,
  933|   147k|      hHeaderData->freqBandData.v_k_master, hHeaderData->freqBandData.numMaster,
  934|   147k|      hHeaderData->freqBandData.highSubband, timeSlots, noCols,
  935|   147k|      hHeaderData->freqBandData.freqBandTableNoise,
  936|   147k|      hHeaderData->freqBandData.nNfb, hHeaderData->sbrProcSmplRate, chan,
  937|   147k|      overlap);
  938|   147k|  if (err != SBRDEC_OK) {
  ------------------
  |  Branch (938:7): [True: 1.62k, False: 146k]
  ------------------
  939|  1.62k|    return err;
  940|  1.62k|  }
  941|       |
  942|   146k|  if (flags & SBRDEC_USAC_HARMONICSBR) {
  ------------------
  |  |  218|   146k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (942:7): [True: 18.2k, False: 128k]
  ------------------
  943|  18.2k|    int noChannels, bSbr41 = flags & SBRDEC_QUAD_RATE ? 1 : 0;
  ------------------
  |  |  215|  18.2k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (943:30): [True: 7.75k, False: 10.4k]
  ------------------
  944|       |
  945|  18.2k|    noChannels =
  946|  18.2k|        QMF_SYNTH_CHANNELS /
  ------------------
  |  |  109|  18.2k|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  947|  18.2k|        ((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|  18.2k|    hSbrChannel->SbrDec.tmp_memory = (FIXP_DBL **)fdkCallocMatrix2D_aligned(
  952|  18.2k|        noCols, noChannels, sizeof(FIXP_DBL));
  953|  18.2k|    if (hSbrChannel->SbrDec.tmp_memory == NULL) {
  ------------------
  |  Branch (953:9): [True: 0, False: 18.2k]
  ------------------
  954|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  955|      0|    }
  956|       |
  957|  18.2k|    hSbrChannel->SbrDec.hQmfHBESlotsReal = hSbrChannel->SbrDec.tmp_memory;
  958|  18.2k|    hSbrChannel->SbrDec.hQmfHBESlotsImag =
  959|  18.2k|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  960|  18.2k|                                               sizeof(FIXP_DBL));
  961|  18.2k|    if (hSbrChannel->SbrDec.hQmfHBESlotsImag == NULL) {
  ------------------
  |  Branch (961:9): [True: 0, False: 18.2k]
  ------------------
  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|  18.2k|    hSbrChannel->SbrDec.codecQMFBufferReal =
  970|  18.2k|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  971|  18.2k|                                               sizeof(FIXP_DBL));
  972|  18.2k|    if (hSbrChannel->SbrDec.codecQMFBufferReal == NULL) {
  ------------------
  |  Branch (972:9): [True: 0, False: 18.2k]
  ------------------
  973|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  974|      0|    }
  975|       |
  976|  18.2k|    hSbrChannel->SbrDec.codecQMFBufferImag =
  977|  18.2k|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  978|  18.2k|                                               sizeof(FIXP_DBL));
  979|  18.2k|    if (hSbrChannel->SbrDec.codecQMFBufferImag == NULL) {
  ------------------
  |  Branch (979:9): [True: 0, False: 18.2k]
  ------------------
  980|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  981|      0|    }
  982|       |
  983|  18.2k|    err = QmfTransposerCreate(&hs->hHBE, codecFrameSize, 0, bSbr41);
  984|  18.2k|    if (err != SBRDEC_OK) {
  ------------------
  |  Branch (984:9): [True: 0, False: 18.2k]
  ------------------
  985|      0|      return err;
  986|      0|    }
  987|  18.2k|  }
  988|       |
  989|   146k|  return err;
  990|   146k|}
_Z12deleteSbrDecP11SBR_CHANNEL:
  996|   153k|int deleteSbrDec(SBR_CHANNEL *hSbrChannel) {
  997|   153k|  HANDLE_SBR_DEC hs = &hSbrChannel->SbrDec;
  998|       |
  999|   153k|  deleteSbrEnvelopeCalc(&hs->SbrCalculateEnvelope);
 1000|       |
 1001|   153k|  if (hs->tmp_memory != NULL) {
  ------------------
  |  Branch (1001:7): [True: 18.2k, False: 135k]
  ------------------
 1002|  18.2k|    FDK_FREE_MEMORY_2D_ALIGNED(hs->tmp_memory);
  ------------------
  |  |  207|  18.2k|  do {                                    \
  |  |  208|  18.2k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  18.2k|    (a) = NULL;                           \
  |  |  210|  18.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 18.2k]
  |  |  ------------------
  ------------------
 1003|  18.2k|  }
 1004|       |
 1005|       |  /* modify here */
 1006|   153k|  FDK_FREE_MEMORY_2D_ALIGNED(hs->hQmfHBESlotsImag);
  ------------------
  |  |  207|   153k|  do {                                    \
  |  |  208|   153k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|   153k|    (a) = NULL;                           \
  |  |  210|   153k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 153k]
  |  |  ------------------
  ------------------
 1007|       |
 1008|   153k|  if (hs->hHBE != NULL) QmfTransposerClose(hs->hHBE);
  ------------------
  |  Branch (1008:7): [True: 18.2k, False: 135k]
  ------------------
 1009|       |
 1010|   153k|  if (hs->codecQMFBufferReal != NULL) {
  ------------------
  |  Branch (1010:7): [True: 18.2k, False: 135k]
  ------------------
 1011|  18.2k|    FDK_FREE_MEMORY_2D_ALIGNED(hs->codecQMFBufferReal);
  ------------------
  |  |  207|  18.2k|  do {                                    \
  |  |  208|  18.2k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  18.2k|    (a) = NULL;                           \
  |  |  210|  18.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 18.2k]
  |  |  ------------------
  ------------------
 1012|  18.2k|  }
 1013|       |
 1014|   153k|  if (hs->codecQMFBufferImag != NULL) {
  ------------------
  |  Branch (1014:7): [True: 18.2k, False: 135k]
  ------------------
 1015|  18.2k|    FDK_FREE_MEMORY_2D_ALIGNED(hs->codecQMFBufferImag);
  ------------------
  |  |  207|  18.2k|  do {                                    \
  |  |  208|  18.2k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  18.2k|    (a) = NULL;                           \
  |  |  210|  18.2k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 18.2k]
  |  |  ------------------
  ------------------
 1016|  18.2k|  }
 1017|       |
 1018|   153k|  return 0;
 1019|   153k|}
_Z11resetSbrDecP7SBR_DECP15SBR_HEADER_DATAP19SBR_PREV_FRAME_DATAijP14SBR_FRAME_DATA:
 1028|   248k|            const UINT flags, HANDLE_SBR_FRAME_DATA hFrameData) {
 1029|   248k|  SBR_ERROR sbrError = SBRDEC_OK;
 1030|   248k|  int i;
 1031|   248k|  FIXP_DBL *pLowBandReal[128];
 1032|   248k|  FIXP_DBL *pLowBandImag[128];
 1033|   248k|  int useLP = flags & SBRDEC_LOW_POWER;
  ------------------
  |  |  211|   248k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
 1034|       |
 1035|   248k|  int old_lsb = hSbrDec->qmfDomainInCh->fb.lsb;
 1036|   248k|  int old_usb = hSbrDec->qmfDomainInCh->fb.usb;
 1037|   248k|  int new_lsb = hHeaderData->freqBandData.lowSubband;
 1038|       |  /* int new_usb = hHeaderData->freqBandData.highSubband; */
 1039|   248k|  int l, startBand, stopBand, startSlot, size;
 1040|       |
 1041|   248k|  FIXP_DBL **OverlapBufferReal = hSbrDec->qmfDomainInCh->hQmfSlotsReal;
 1042|   248k|  FIXP_DBL **OverlapBufferImag = hSbrDec->qmfDomainInCh->hQmfSlotsImag;
 1043|       |
 1044|       |  /* in case the previous frame was not active in terms of SBR processing, the
 1045|       |     full band from 0 to no_channels was rescaled and not overwritten. Thats why
 1046|       |     the scaling factor lb_scale can be seen as assigned to all bands from 0 to
 1047|       |     no_channels in the previous frame. The same states for the current frame if
 1048|       |     the current frame is not active in terms of SBR processing
 1049|       |  */
 1050|   248k|  int applySbrProc = (hHeaderData->syncState == SBR_ACTIVE ||
  ------------------
  |  Branch (1050:23): [True: 0, False: 248k]
  ------------------
 1051|   248k|                      (hHeaderData->frameErrorFlag == 0 &&
  ------------------
  |  Branch (1051:24): [True: 135k, False: 112k]
  ------------------
 1052|   135k|                       hHeaderData->syncState == SBR_HEADER));
  ------------------
  |  Branch (1052:24): [True: 73.5k, False: 62.1k]
  ------------------
 1053|   248k|  int applySbrProc_old = hSbrDec->applySbrProc_old;
 1054|       |
 1055|   248k|  if (!applySbrProc) {
  ------------------
  |  Branch (1055:7): [True: 175k, False: 73.5k]
  ------------------
 1056|   175k|    new_lsb = (hSbrDec->qmfDomainInCh->fb).no_channels;
 1057|   175k|  }
 1058|   248k|  if (!applySbrProc_old) {
  ------------------
  |  Branch (1058:7): [True: 186k, False: 62.3k]
  ------------------
 1059|   186k|    old_lsb = (hSbrDec->qmfDomainInCh->fb).no_channels;
 1060|   186k|    old_usb = old_lsb;
 1061|   186k|  }
 1062|       |
 1063|   248k|  resetSbrEnvelopeCalc(&hSbrDec->SbrCalculateEnvelope);
 1064|       |
 1065|       |  /* Change lsb and usb */
 1066|       |  /* Synthesis */
 1067|   248k|  FDK_ASSERT(hSbrDec->qmfDomainOutCh != NULL);
  ------------------
  |  |  221|   248k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1067:3): [True: 248k, False: 0]
  ------------------
 1068|   248k|  hSbrDec->qmfDomainOutCh->fb.lsb =
 1069|   248k|      fixMin((INT)hSbrDec->qmfDomainOutCh->fb.no_channels,
  ------------------
  |  |  306|   248k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1070|   248k|             (INT)hHeaderData->freqBandData.lowSubband);
 1071|   248k|  hSbrDec->qmfDomainOutCh->fb.usb =
 1072|   248k|      fixMin((INT)hSbrDec->qmfDomainOutCh->fb.no_channels,
  ------------------
  |  |  306|   248k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1073|   248k|             (INT)hHeaderData->freqBandData.highSubband);
 1074|       |  /* Analysis */
 1075|   248k|  FDK_ASSERT(hSbrDec->qmfDomainInCh != NULL);
  ------------------
  |  |  221|   248k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1075:3): [True: 248k, False: 0]
  ------------------
 1076|   248k|  hSbrDec->qmfDomainInCh->fb.lsb = hSbrDec->qmfDomainOutCh->fb.lsb;
 1077|   248k|  hSbrDec->qmfDomainInCh->fb.usb = hSbrDec->qmfDomainOutCh->fb.usb;
 1078|       |
 1079|       |  /*
 1080|       |    The following initialization of spectral data in the overlap buffer
 1081|       |    is required for dynamic x-over or a change of the start-freq for 2 reasons:
 1082|       |
 1083|       |    1. If the lowband gets _wider_, unadjusted data would remain
 1084|       |
 1085|       |    2. If the lowband becomes _smaller_, the highest bands of the old lowband
 1086|       |       must be cleared because the whitening would be affected
 1087|       |  */
 1088|   248k|  startBand = old_lsb;
 1089|   248k|  stopBand = new_lsb;
 1090|   248k|  startSlot = fMax(0, hHeaderData->timeStep * (hPrevFrameData->stopPos -
 1091|   248k|                                               hHeaderData->numberTimeSlots));
 1092|   248k|  size = fMax(0, stopBand - startBand);
 1093|       |
 1094|       |  /* in case of USAC we don't want to zero out the memory, as this can lead to
 1095|       |     holes in the spectrum; fix shall only be applied for USAC not for MPEG-4
 1096|       |     SBR, in this case setting zero remains         */
 1097|   248k|  if (!(flags & SBRDEC_SYNTAX_USAC)) {
  ------------------
  |  |  206|   248k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (1097:7): [True: 146k, False: 101k]
  ------------------
 1098|       |    /* keep already adjusted data in the x-over-area */
 1099|   146k|    if (!useLP) {
  ------------------
  |  Branch (1099:9): [True: 7.84k, False: 138k]
  ------------------
 1100|  42.5k|      for (l = startSlot; l < hSbrDec->LppTrans.pSettings->overlap; l++) {
  ------------------
  |  Branch (1100:27): [True: 34.6k, False: 7.84k]
  ------------------
 1101|  34.6k|        FDKmemclear(&OverlapBufferReal[l][startBand], size * sizeof(FIXP_DBL));
 1102|  34.6k|        FDKmemclear(&OverlapBufferImag[l][startBand], size * sizeof(FIXP_DBL));
 1103|  34.6k|      }
 1104|   138k|    } else {
 1105|   272k|      for (l = startSlot; l < hSbrDec->LppTrans.pSettings->overlap; l++) {
  ------------------
  |  Branch (1105:27): [True: 133k, False: 138k]
  ------------------
 1106|   133k|        FDKmemclear(&OverlapBufferReal[l][startBand], size * sizeof(FIXP_DBL));
 1107|   133k|      }
 1108|   138k|    }
 1109|       |
 1110|       |    /*
 1111|       |    reset LPC filter states
 1112|       |    */
 1113|   146k|    startBand = fixMin(old_lsb, new_lsb);
  ------------------
  |  |  306|   146k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1114|   146k|    stopBand = fixMax(old_lsb, new_lsb);
  ------------------
  |  |  307|   146k|#define fixMax(a, b) fMax(a, b)
  ------------------
 1115|   146k|    size = fixMax(0, stopBand - startBand);
  ------------------
  |  |  307|   146k|#define fixMax(a, b) fMax(a, b)
  ------------------
 1116|       |
 1117|   146k|    FDKmemclear(&hSbrDec->LppTrans.lpcFilterStatesRealLegSBR[0][startBand],
 1118|   146k|                size * sizeof(FIXP_DBL));
 1119|   146k|    FDKmemclear(&hSbrDec->LppTrans.lpcFilterStatesRealLegSBR[1][startBand],
 1120|   146k|                size * sizeof(FIXP_DBL));
 1121|   146k|    if (!useLP) {
  ------------------
  |  Branch (1121:9): [True: 7.84k, False: 138k]
  ------------------
 1122|  7.84k|      FDKmemclear(&hSbrDec->LppTrans.lpcFilterStatesImagLegSBR[0][startBand],
 1123|  7.84k|                  size * sizeof(FIXP_DBL));
 1124|  7.84k|      FDKmemclear(&hSbrDec->LppTrans.lpcFilterStatesImagLegSBR[1][startBand],
 1125|  7.84k|                  size * sizeof(FIXP_DBL));
 1126|  7.84k|    }
 1127|   146k|  }
 1128|       |
 1129|   248k|  if (startSlot != 0) {
  ------------------
  |  Branch (1129:7): [True: 26.2k, False: 222k]
  ------------------
 1130|  26.2k|    int source_exp, target_exp, delta_exp, target_lsb, target_usb, reserve;
 1131|  26.2k|    FIXP_DBL maxVal;
 1132|       |
 1133|       |    /*
 1134|       |    Rescale already processed spectral data between old and new x-over
 1135|       |    frequency. This must be done because of the separate scalefactors for
 1136|       |    lowband and highband.
 1137|       |    */
 1138|       |
 1139|       |    /* We have four relevant transitions to cover:
 1140|       |    1. old_usb is lower than new_lsb; old SBR area is completely below new SBR
 1141|       |    area.
 1142|       |       -> entire old area was highband and belongs to lowband now
 1143|       |          and has to be rescaled.
 1144|       |    2. old_lsb is higher than new_usb; new SBR area is completely below old SBR
 1145|       |    area.
 1146|       |       -> old area between new_lsb and old_lsb was lowband and belongs to
 1147|       |    highband now and has to be rescaled to match new highband scale.
 1148|       |    3. old_lsb is lower and old_usb is higher than new_lsb; old and new SBR
 1149|       |    areas overlap.
 1150|       |       -> old area between old_lsb and new_lsb was highband and belongs to
 1151|       |    lowband now and has to be rescaled to match new lowband scale.
 1152|       |    4. new_lsb is lower and new_usb_is higher than old_lsb; old and new SBR
 1153|       |    areas overlap.
 1154|       |       -> old area between new_lsb and old_usb was lowband and belongs to
 1155|       |    highband now and has to be rescaled to match new highband scale.
 1156|       |    */
 1157|       |
 1158|  26.2k|    if (new_lsb > old_lsb) {
  ------------------
  |  Branch (1158:9): [True: 8.19k, False: 18.0k]
  ------------------
 1159|       |      /* case 1 and 3 */
 1160|  8.19k|      source_exp = SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.ov_hb_scale);
  ------------------
  |  |  414|  8.19k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1161|  8.19k|      target_exp = SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.ov_lb_scale);
  ------------------
  |  |  414|  8.19k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1162|       |
 1163|  8.19k|      startBand = old_lsb;
 1164|       |
 1165|  8.19k|      if (new_lsb >= old_usb) {
  ------------------
  |  Branch (1165:11): [True: 592, False: 7.60k]
  ------------------
 1166|       |        /* case 1 */
 1167|    592|        stopBand = old_usb;
 1168|  7.60k|      } else {
 1169|       |        /* case 3 */
 1170|  7.60k|        stopBand = new_lsb;
 1171|  7.60k|      }
 1172|       |
 1173|  8.19k|      target_lsb = 0;
 1174|  8.19k|      target_usb = old_lsb;
 1175|  18.0k|    } else {
 1176|       |      /* case 2 and 4 */
 1177|  18.0k|      source_exp = SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.ov_lb_scale);
  ------------------
  |  |  414|  18.0k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1178|  18.0k|      target_exp = SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.ov_hb_scale);
  ------------------
  |  |  414|  18.0k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1179|       |
 1180|  18.0k|      startBand = new_lsb;
 1181|  18.0k|      stopBand = old_lsb;
 1182|       |
 1183|  18.0k|      target_lsb = old_lsb;
 1184|  18.0k|      target_usb = old_usb;
 1185|  18.0k|    }
 1186|       |
 1187|  26.2k|    maxVal =
 1188|  26.2k|        maxSubbandSample(OverlapBufferReal, (useLP) ? NULL : OverlapBufferImag,
  ------------------
  |  Branch (1188:45): [True: 3.06k, False: 23.2k]
  ------------------
 1189|  26.2k|                         startBand, stopBand, 0, startSlot);
 1190|       |
 1191|  26.2k|    reserve = ((LONG)maxVal != 0 ? CntLeadingZeros(maxVal) - 1 : 0);
  ------------------
  |  |  308|  19.4k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  |  Branch (1191:16): [True: 19.4k, False: 6.80k]
  ------------------
 1192|  26.2k|    reserve = fixMin(
  ------------------
  |  |  306|  26.2k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1193|  26.2k|        reserve,
 1194|  26.2k|        DFRACT_BITS - 1 -
 1195|  26.2k|            EXP2SCALE(
 1196|  26.2k|                source_exp)); /* what is this line for, why do we need it? */
 1197|       |
 1198|       |    /* process only if x-over-area is not dominant after rescale;
 1199|       |       otherwise I'm not sure if all buffers are scaled correctly;
 1200|       |    */
 1201|  26.2k|    if (target_exp - (source_exp - reserve) >= 0) {
  ------------------
  |  Branch (1201:9): [True: 15.5k, False: 10.7k]
  ------------------
 1202|  15.5k|      rescaleSubbandSamples(OverlapBufferReal,
 1203|  15.5k|                            (useLP) ? NULL : OverlapBufferImag, startBand,
  ------------------
  |  Branch (1203:29): [True: 1.36k, False: 14.2k]
  ------------------
 1204|  15.5k|                            stopBand, 0, startSlot, reserve);
 1205|  15.5k|      source_exp -= reserve;
 1206|  15.5k|    }
 1207|       |
 1208|  26.2k|    delta_exp = target_exp - source_exp;
 1209|       |
 1210|  26.2k|    if (delta_exp < 0) { /* x-over-area is dominant */
  ------------------
  |  Branch (1210:9): [True: 10.7k, False: 15.5k]
  ------------------
 1211|  10.7k|      startBand = target_lsb;
 1212|  10.7k|      stopBand = target_usb;
 1213|  10.7k|      delta_exp = -delta_exp;
 1214|       |
 1215|  10.7k|      if (new_lsb > old_lsb) {
  ------------------
  |  Branch (1215:11): [True: 2.38k, False: 8.31k]
  ------------------
 1216|       |        /* The lowband has to be rescaled */
 1217|  2.38k|        hSbrDec->qmfDomainInCh->scaling.ov_lb_scale = EXP2SCALE(source_exp);
  ------------------
  |  |  415|  2.38k|#define EXP2SCALE(e) (15 - (e))
  ------------------
 1218|  8.31k|      } else {
 1219|       |        /* The highband has to be rescaled */
 1220|  8.31k|        hSbrDec->qmfDomainInCh->scaling.ov_hb_scale = EXP2SCALE(source_exp);
  ------------------
  |  |  415|  8.31k|#define EXP2SCALE(e) (15 - (e))
  ------------------
 1221|  8.31k|      }
 1222|  10.7k|    }
 1223|       |
 1224|  26.2k|    FDK_ASSERT(startBand <= stopBand);
  ------------------
  |  |  221|  26.2k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1224:5): [True: 26.2k, False: 0]
  ------------------
 1225|       |
 1226|  26.2k|    if (!useLP) {
  ------------------
  |  Branch (1226:9): [True: 23.2k, False: 3.06k]
  ------------------
 1227|   138k|      for (l = 0; l < startSlot; l++) {
  ------------------
  |  Branch (1227:19): [True: 115k, False: 23.2k]
  ------------------
 1228|   115k|        scaleValues(OverlapBufferReal[l] + startBand, stopBand - startBand,
 1229|   115k|                    -delta_exp);
 1230|   115k|        scaleValues(OverlapBufferImag[l] + startBand, stopBand - startBand,
 1231|   115k|                    -delta_exp);
 1232|   115k|      }
 1233|  23.2k|    } else
 1234|  15.2k|      for (l = 0; l < startSlot; l++) {
  ------------------
  |  Branch (1234:19): [True: 12.2k, False: 3.06k]
  ------------------
 1235|  12.2k|        scaleValues(OverlapBufferReal[l] + startBand, stopBand - startBand,
 1236|  12.2k|                    -delta_exp);
 1237|  12.2k|      }
 1238|  26.2k|  } /* startSlot != 0 */
 1239|       |
 1240|       |  /*
 1241|       |    Initialize transposer and limiter
 1242|       |  */
 1243|   248k|  sbrError = resetLppTransposer(
 1244|   248k|      &hSbrDec->LppTrans, hHeaderData->freqBandData.lowSubband,
 1245|   248k|      hHeaderData->freqBandData.v_k_master, hHeaderData->freqBandData.numMaster,
 1246|   248k|      hHeaderData->freqBandData.freqBandTableNoise,
 1247|   248k|      hHeaderData->freqBandData.nNfb, hHeaderData->freqBandData.highSubband,
 1248|   248k|      hHeaderData->sbrProcSmplRate);
 1249|   248k|  if (sbrError != SBRDEC_OK) return sbrError;
  ------------------
  |  Branch (1249:7): [True: 649, False: 247k]
  ------------------
 1250|       |
 1251|   247k|  hSbrDec->savedStates = 0;
 1252|       |
 1253|   247k|  if ((flags & SBRDEC_USAC_HARMONICSBR) && applySbrProc) {
  ------------------
  |  |  218|   247k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (1253:7): [True: 41.6k, False: 206k]
  |  Branch (1253:44): [True: 30.6k, False: 10.9k]
  ------------------
 1254|  30.6k|    sbrError = QmfTransposerReInit(hSbrDec->hHBE,
 1255|  30.6k|                                   hHeaderData->freqBandData.freqBandTable,
 1256|  30.6k|                                   hHeaderData->freqBandData.nSfb);
 1257|  30.6k|    if (sbrError != SBRDEC_OK) return sbrError;
  ------------------
  |  Branch (1257:9): [True: 0, False: 30.6k]
  ------------------
 1258|       |
 1259|       |    /* copy saved states from previous frame to legacy SBR lpc filterstate
 1260|       |     * buffer   */
 1261|   314k|    for (i = 0; i < LPC_ORDER + hSbrDec->LppTrans.pSettings->overlap; i++) {
  ------------------
  |  |  157|   314k|#define LPC_ORDER 2
  ------------------
  |  Branch (1261:17): [True: 283k, False: 30.6k]
  ------------------
 1262|   283k|      FDKmemcpy(
 1263|   283k|          hSbrDec->LppTrans.lpcFilterStatesRealLegSBR[i],
 1264|   283k|          hSbrDec->codecQMFBufferReal[hSbrDec->hHBE->noCols - LPC_ORDER -
  ------------------
  |  |  157|   283k|#define LPC_ORDER 2
  ------------------
 1265|   283k|                                      hSbrDec->LppTrans.pSettings->overlap + i],
 1266|   283k|          hSbrDec->hHBE->noChannels * sizeof(FIXP_DBL));
 1267|   283k|      FDKmemcpy(
 1268|   283k|          hSbrDec->LppTrans.lpcFilterStatesImagLegSBR[i],
 1269|   283k|          hSbrDec->codecQMFBufferImag[hSbrDec->hHBE->noCols - LPC_ORDER -
  ------------------
  |  |  157|   283k|#define LPC_ORDER 2
  ------------------
 1270|   283k|                                      hSbrDec->LppTrans.pSettings->overlap + i],
 1271|   283k|          hSbrDec->hHBE->noChannels * sizeof(FIXP_DBL));
 1272|   283k|    }
 1273|  30.6k|    hSbrDec->savedStates = 1;
 1274|       |
 1275|  30.6k|    {
 1276|       |      /* map QMF buffer to pointer array (Overlap + Frame)*/
 1277|   314k|      for (i = 0; i < hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER; i++) {
  ------------------
  |  |  157|   314k|#define LPC_ORDER 2
  ------------------
  |  Branch (1277:19): [True: 283k, False: 30.6k]
  ------------------
 1278|   283k|        pLowBandReal[i] = hSbrDec->LppTrans.lpcFilterStatesRealHBE[i];
 1279|   283k|        pLowBandImag[i] = hSbrDec->LppTrans.lpcFilterStatesImagHBE[i];
 1280|   283k|      }
 1281|       |
 1282|       |      /* map QMF buffer to pointer array (Overlap + Frame)*/
 1283|  1.21M|      for (i = 0; i < hSbrDec->hHBE->noCols; i++) {
  ------------------
  |  Branch (1283:19): [True: 1.18M, False: 30.6k]
  ------------------
 1284|  1.18M|        pLowBandReal[i + hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER] =
  ------------------
  |  |  157|  1.18M|#define LPC_ORDER 2
  ------------------
 1285|  1.18M|            hSbrDec->codecQMFBufferReal[i];
 1286|  1.18M|        pLowBandImag[i + hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER] =
  ------------------
  |  |  157|  1.18M|#define LPC_ORDER 2
  ------------------
 1287|  1.18M|            hSbrDec->codecQMFBufferImag[i];
 1288|  1.18M|      }
 1289|       |
 1290|  30.6k|      if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  30.6k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (1290:11): [True: 6.34k, False: 24.3k]
  ------------------
 1291|  6.34k|        if (hFrameData->sbrPatchingMode == 0) {
  ------------------
  |  Branch (1291:13): [True: 5.81k, False: 537]
  ------------------
 1292|  5.81k|          int *xOverQmf = GetxOverBandQmfTransposer(hSbrDec->hHBE);
 1293|       |
 1294|       |          /* in case of harmonic SBR and no HBE_LP map additional buffer for
 1295|       |          one more frame to pointer arry */
 1296|   191k|          for (i = 0; i < hSbrDec->hHBE->noCols / 2; i++) {
  ------------------
  |  Branch (1296:23): [True: 185k, False: 5.81k]
  ------------------
 1297|   185k|            pLowBandReal[i + hSbrDec->hHBE->noCols +
 1298|   185k|                         hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER] =
  ------------------
  |  |  157|   185k|#define LPC_ORDER 2
  ------------------
 1299|   185k|                hSbrDec->hQmfHBESlotsReal[i];
 1300|   185k|            pLowBandImag[i + hSbrDec->hHBE->noCols +
 1301|   185k|                         hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER] =
  ------------------
  |  |  157|   185k|#define LPC_ORDER 2
  ------------------
 1302|   185k|                hSbrDec->hQmfHBESlotsImag[i];
 1303|   185k|          }
 1304|       |
 1305|  5.81k|          QmfTransposerApply(
 1306|  5.81k|              hSbrDec->hHBE,
 1307|  5.81k|              pLowBandReal + hSbrDec->LppTrans.pSettings->overlap +
 1308|  5.81k|                  hSbrDec->hHBE->noCols / 2 + LPC_ORDER,
  ------------------
  |  |  157|  5.81k|#define LPC_ORDER 2
  ------------------
 1309|  5.81k|              pLowBandImag + hSbrDec->LppTrans.pSettings->overlap +
 1310|  5.81k|                  hSbrDec->hHBE->noCols / 2 + LPC_ORDER,
  ------------------
  |  |  157|  5.81k|#define LPC_ORDER 2
  ------------------
 1311|  5.81k|              hSbrDec->hHBE->noCols, pLowBandReal, pLowBandImag,
 1312|  5.81k|              hSbrDec->LppTrans.lpcFilterStatesRealHBE,
 1313|  5.81k|              hSbrDec->LppTrans.lpcFilterStatesImagHBE,
 1314|  5.81k|              hPrevFrameData->prevSbrPitchInBins, hSbrDec->scale_lb,
 1315|  5.81k|              hSbrDec->scale_hbe, &hSbrDec->qmfDomainInCh->scaling.hb_scale,
 1316|  5.81k|              hHeaderData->timeStep, hFrameData->frameInfo.borders[0],
 1317|  5.81k|              hSbrDec->LppTrans.pSettings->overlap, KEEP_STATES_SYNCED_OUTDIFF);
 1318|       |
 1319|  5.81k|          copyHarmonicSpectrum(
 1320|  5.81k|              xOverQmf, pLowBandReal, pLowBandImag, hSbrDec->hHBE->noCols,
 1321|  5.81k|              hSbrDec->LppTrans.pSettings->overlap, KEEP_STATES_SYNCED_OUTDIFF);
 1322|  5.81k|        }
 1323|  24.3k|      } else {
 1324|       |        /* in case of harmonic SBR and no HBE_LP map additional buffer for
 1325|       |        one more frame to pointer arry */
 1326|   803k|        for (i = 0; i < hSbrDec->hHBE->noCols; i++) {
  ------------------
  |  Branch (1326:21): [True: 779k, False: 24.3k]
  ------------------
 1327|   779k|          pLowBandReal[i + hSbrDec->hHBE->noCols +
 1328|   779k|                       hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER] =
  ------------------
  |  |  157|   779k|#define LPC_ORDER 2
  ------------------
 1329|   779k|              hSbrDec->hQmfHBESlotsReal[i];
 1330|   779k|          pLowBandImag[i + hSbrDec->hHBE->noCols +
 1331|   779k|                       hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER] =
  ------------------
  |  |  157|   779k|#define LPC_ORDER 2
  ------------------
 1332|   779k|              hSbrDec->hQmfHBESlotsImag[i];
 1333|   779k|        }
 1334|       |
 1335|  24.3k|        if (hFrameData->sbrPatchingMode == 0) {
  ------------------
  |  Branch (1335:13): [True: 10.6k, False: 13.7k]
  ------------------
 1336|  10.6k|          QmfTransposerApply(
 1337|  10.6k|              hSbrDec->hHBE,
 1338|  10.6k|              pLowBandReal + hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER,
  ------------------
  |  |  157|  10.6k|#define LPC_ORDER 2
  ------------------
 1339|  10.6k|              pLowBandImag + hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER,
  ------------------
  |  |  157|  10.6k|#define LPC_ORDER 2
  ------------------
 1340|  10.6k|              hSbrDec->hHBE->noCols, pLowBandReal, pLowBandImag,
 1341|  10.6k|              hSbrDec->LppTrans.lpcFilterStatesRealHBE,
 1342|  10.6k|              hSbrDec->LppTrans.lpcFilterStatesImagHBE,
 1343|  10.6k|              0 /* not required for keeping states updated in this frame*/,
 1344|  10.6k|              hSbrDec->scale_lb, hSbrDec->scale_lb,
 1345|  10.6k|              &hSbrDec->qmfDomainInCh->scaling.hb_scale, hHeaderData->timeStep,
 1346|  10.6k|              hFrameData->frameInfo.borders[0],
 1347|  10.6k|              hSbrDec->LppTrans.pSettings->overlap, KEEP_STATES_SYNCED_NOOUT);
 1348|  10.6k|        }
 1349|       |
 1350|  24.3k|        QmfTransposerApply(
 1351|  24.3k|            hSbrDec->hHBE,
 1352|  24.3k|            pLowBandReal + hSbrDec->LppTrans.pSettings->overlap +
 1353|  24.3k|                hSbrDec->hHBE->noCols + LPC_ORDER,
  ------------------
  |  |  157|  24.3k|#define LPC_ORDER 2
  ------------------
 1354|  24.3k|            pLowBandImag + hSbrDec->LppTrans.pSettings->overlap +
 1355|  24.3k|                hSbrDec->hHBE->noCols + LPC_ORDER,
  ------------------
  |  |  157|  24.3k|#define LPC_ORDER 2
  ------------------
 1356|  24.3k|            hSbrDec->hHBE->noCols, pLowBandReal, pLowBandImag,
 1357|  24.3k|            hSbrDec->LppTrans.lpcFilterStatesRealHBE,
 1358|  24.3k|            hSbrDec->LppTrans.lpcFilterStatesImagHBE,
 1359|  24.3k|            hPrevFrameData->prevSbrPitchInBins, hSbrDec->scale_lb,
 1360|  24.3k|            hSbrDec->scale_hbe, &hSbrDec->qmfDomainInCh->scaling.hb_scale,
 1361|  24.3k|            hHeaderData->timeStep, hFrameData->frameInfo.borders[0],
 1362|  24.3k|            hSbrDec->LppTrans.pSettings->overlap, KEEP_STATES_SYNCED_OUTDIFF);
 1363|  24.3k|      }
 1364|       |
 1365|  30.6k|      if (hFrameData->sbrPatchingMode == 0) {
  ------------------
  |  Branch (1365:11): [True: 16.4k, False: 14.2k]
  ------------------
 1366|   133k|        for (i = startSlot; i < hSbrDec->LppTrans.pSettings->overlap; i++) {
  ------------------
  |  Branch (1366:29): [True: 116k, False: 16.4k]
  ------------------
 1367|       |          /*
 1368|       |          Store the unmodified qmf Slots values for upper part of spectrum
 1369|       |          (required for LPC filtering) required if next frame is a HBE frame
 1370|       |          */
 1371|   116k|          FDKmemcpy(hSbrDec->qmfDomainInCh->hQmfSlotsReal[i],
 1372|   116k|                    hSbrDec->LppTrans.lpcFilterStatesRealHBE[i + LPC_ORDER],
  ------------------
  |  |  157|   116k|#define LPC_ORDER 2
  ------------------
 1373|   116k|                    (64) * sizeof(FIXP_DBL));
 1374|   116k|          FDKmemcpy(hSbrDec->qmfDomainInCh->hQmfSlotsImag[i],
 1375|   116k|                    hSbrDec->LppTrans.lpcFilterStatesImagHBE[i + LPC_ORDER],
  ------------------
  |  |  157|   116k|#define LPC_ORDER 2
  ------------------
 1376|   116k|                    (64) * sizeof(FIXP_DBL));
 1377|   116k|        }
 1378|       |
 1379|   133k|        for (i = startSlot; i < hSbrDec->LppTrans.pSettings->overlap; i++) {
  ------------------
  |  Branch (1379:29): [True: 116k, False: 16.4k]
  ------------------
 1380|       |          /*
 1381|       |          Store the unmodified qmf Slots values for upper part of spectrum
 1382|       |          (required for LPC filtering) required if next frame is a HBE frame
 1383|       |          */
 1384|   116k|          FDKmemcpy(
 1385|   116k|              hSbrDec->qmfDomainInCh->hQmfSlotsReal[i],
 1386|   116k|              hSbrDec->codecQMFBufferReal[hSbrDec->hHBE->noCols -
 1387|   116k|                                          hSbrDec->LppTrans.pSettings->overlap +
 1388|   116k|                                          i],
 1389|   116k|              new_lsb * sizeof(FIXP_DBL));
 1390|   116k|          FDKmemcpy(
 1391|   116k|              hSbrDec->qmfDomainInCh->hQmfSlotsImag[i],
 1392|   116k|              hSbrDec->codecQMFBufferImag[hSbrDec->hHBE->noCols -
 1393|   116k|                                          hSbrDec->LppTrans.pSettings->overlap +
 1394|   116k|                                          i],
 1395|   116k|              new_lsb * sizeof(FIXP_DBL));
 1396|   116k|        }
 1397|  16.4k|      }
 1398|  30.6k|    }
 1399|  30.6k|  }
 1400|       |
 1401|   247k|  {
 1402|   247k|    int adapt_lb = 0, diff = 0,
 1403|   247k|        new_scale = hSbrDec->qmfDomainInCh->scaling.ov_lb_scale;
 1404|       |
 1405|   247k|    if ((hSbrDec->qmfDomainInCh->scaling.ov_lb_scale !=
  ------------------
  |  Branch (1405:9): [True: 11.5k, False: 236k]
  ------------------
 1406|   247k|         hSbrDec->qmfDomainInCh->scaling.lb_scale) &&
 1407|  11.5k|        startSlot != 0) {
  ------------------
  |  Branch (1407:9): [True: 2.49k, False: 9.05k]
  ------------------
 1408|       |      /* we need to adapt spectrum to have equal scale factor, always larger
 1409|       |       * than zero */
 1410|  2.49k|      diff = SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.ov_lb_scale) -
  ------------------
  |  |  414|  2.49k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1411|  2.49k|             SCALE2EXP(hSbrDec->qmfDomainInCh->scaling.lb_scale);
  ------------------
  |  |  414|  2.49k|#define SCALE2EXP(s) (15 - (s))
  ------------------
 1412|       |
 1413|  2.49k|      if (diff > 0) {
  ------------------
  |  Branch (1413:11): [True: 2.39k, False: 98]
  ------------------
 1414|  2.39k|        adapt_lb = 1;
 1415|  2.39k|        diff = -diff;
 1416|  2.39k|        new_scale = hSbrDec->qmfDomainInCh->scaling.ov_lb_scale;
 1417|  2.39k|      }
 1418|       |
 1419|  2.49k|      stopBand = new_lsb;
 1420|  2.49k|    }
 1421|       |
 1422|   247k|    if (hFrameData->sbrPatchingMode == 1) {
  ------------------
  |  Branch (1422:9): [True: 94.7k, False: 153k]
  ------------------
 1423|       |      /* scale states from LegSBR filterstates buffer */
 1424|   716k|      for (i = 0; i < hSbrDec->LppTrans.pSettings->overlap + LPC_ORDER; i++) {
  ------------------
  |  |  157|   716k|#define LPC_ORDER 2
  ------------------
  |  Branch (1424:19): [True: 621k, False: 94.7k]
  ------------------
 1425|   621k|        scaleValues(hSbrDec->LppTrans.lpcFilterStatesRealLegSBR[i], new_lsb,
 1426|   621k|                    diff);
 1427|   621k|        if (!useLP) {
  ------------------
  |  Branch (1427:13): [True: 466k, False: 155k]
  ------------------
 1428|   466k|          scaleValues(hSbrDec->LppTrans.lpcFilterStatesImagLegSBR[i], new_lsb,
 1429|   466k|                      diff);
 1430|   466k|        }
 1431|   621k|      }
 1432|       |
 1433|  94.7k|      if (flags & SBRDEC_SYNTAX_USAC) {
  ------------------
  |  |  206|  94.7k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (1433:11): [True: 56.0k, False: 38.7k]
  ------------------
 1434|       |        /* get missing states between old and new x_over from LegSBR
 1435|       |         * filterstates buffer */
 1436|       |        /* in case of legacy SBR we leave these values zeroed out */
 1437|   301k|        for (i = startSlot; i < hSbrDec->LppTrans.pSettings->overlap; i++) {
  ------------------
  |  Branch (1437:29): [True: 245k, False: 56.0k]
  ------------------
 1438|   245k|          FDKmemcpy(&OverlapBufferReal[i][old_lsb],
 1439|   245k|                    &hSbrDec->LppTrans
 1440|   245k|                         .lpcFilterStatesRealLegSBR[LPC_ORDER + i][old_lsb],
  ------------------
  |  |  157|   245k|#define LPC_ORDER 2
  ------------------
 1441|   245k|                    fMax(new_lsb - old_lsb, 0) * sizeof(FIXP_DBL));
 1442|   245k|          if (!useLP) {
  ------------------
  |  Branch (1442:15): [True: 245k, False: 0]
  ------------------
 1443|   245k|            FDKmemcpy(&OverlapBufferImag[i][old_lsb],
 1444|   245k|                      &hSbrDec->LppTrans
 1445|   245k|                           .lpcFilterStatesImagLegSBR[LPC_ORDER + i][old_lsb],
  ------------------
  |  |  157|   245k|#define LPC_ORDER 2
  ------------------
 1446|   245k|                      fMax(new_lsb - old_lsb, 0) * sizeof(FIXP_DBL));
 1447|   245k|          }
 1448|   245k|        }
 1449|  56.0k|      }
 1450|       |
 1451|  94.7k|      if (new_lsb > old_lsb) {
  ------------------
  |  Branch (1451:11): [True: 31.0k, False: 63.7k]
  ------------------
 1452|  31.0k|        stopBand = old_lsb;
 1453|  31.0k|      }
 1454|  94.7k|    }
 1455|   247k|    if ((adapt_lb == 1) && (stopBand > startBand)) {
  ------------------
  |  Branch (1455:9): [True: 2.39k, False: 245k]
  |  Branch (1455:28): [True: 2.37k, False: 18]
  ------------------
 1456|  6.28k|      for (l = startSlot; l < hSbrDec->LppTrans.pSettings->overlap; l++) {
  ------------------
  |  Branch (1456:27): [True: 3.91k, False: 2.37k]
  ------------------
 1457|  3.91k|        scaleValues(OverlapBufferReal[l] + startBand, stopBand - startBand,
 1458|  3.91k|                    diff);
 1459|  3.91k|        if (!useLP) {
  ------------------
  |  Branch (1459:13): [True: 504, False: 3.40k]
  ------------------
 1460|    504|          scaleValues(OverlapBufferImag[l] + startBand, stopBand - startBand,
 1461|    504|                      diff);
 1462|    504|        }
 1463|  3.91k|      }
 1464|  2.37k|    }
 1465|   247k|    hSbrDec->qmfDomainInCh->scaling.ov_lb_scale = new_scale;
 1466|   247k|  }
 1467|       |
 1468|   247k|  sbrError = ResetLimiterBands(hHeaderData->freqBandData.limiterBandTable,
 1469|   247k|                               &hHeaderData->freqBandData.noLimiterBands,
 1470|   247k|                               hHeaderData->freqBandData.freqBandTable[0],
 1471|   247k|                               hHeaderData->freqBandData.nSfb[0],
 1472|   247k|                               hSbrDec->LppTrans.pSettings->patchParam,
 1473|   247k|                               hSbrDec->LppTrans.pSettings->noOfPatches,
 1474|   247k|                               hHeaderData->bs_data.limiterBands,
 1475|   247k|                               hFrameData->sbrPatchingMode,
 1476|   247k|                               GetxOverBandQmfTransposer(hSbrDec->hHBE),
 1477|   247k|                               Get41SbrQmfTransposer(hSbrDec->hHBE));
 1478|       |
 1479|   247k|  hSbrDec->SbrCalculateEnvelope.sbrPatchingMode = hFrameData->sbrPatchingMode;
 1480|       |
 1481|   247k|  return sbrError;
 1482|   247k|}
sbr_dec.cpp:_ZL20copyHarmonicSpectrumPiPS_S0_ii23KEEP_STATES_SYNCED_MODE:
  134|  32.8k|                                 KEEP_STATES_SYNCED_MODE keepStatesSynced) {
  135|  32.8k|  int patchBands;
  136|  32.8k|  int patch, band, col, target, sourceBands, i;
  137|  32.8k|  int numPatches = 0;
  138|  32.8k|  int slotOffset = 0;
  139|       |
  140|  32.8k|  FIXP_DBL **ppqmfReal = qmfReal + overlap;
  141|  32.8k|  FIXP_DBL **ppqmfImag = qmfImag + overlap;
  142|       |
  143|  32.8k|  if (keepStatesSynced == KEEP_STATES_SYNCED_NORMAL) {
  ------------------
  |  Branch (143:7): [True: 7.68k, False: 25.1k]
  ------------------
  144|  7.68k|    slotOffset = noCols - overlap - LPC_ORDER;
  ------------------
  |  |  157|  7.68k|#define LPC_ORDER 2
  ------------------
  145|  7.68k|  }
  146|       |
  147|  32.8k|  if (keepStatesSynced == KEEP_STATES_SYNCED_OUTDIFF) {
  ------------------
  |  Branch (147:7): [True: 5.81k, False: 27.0k]
  ------------------
  148|  5.81k|    ppqmfReal = qmfReal;
  149|  5.81k|    ppqmfImag = qmfImag;
  150|  5.81k|  }
  151|       |
  152|   196k|  for (i = 1; i < MAX_NUM_PATCHES; i++) {
  ------------------
  |  |  161|   196k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (152:15): [True: 164k, False: 32.8k]
  ------------------
  153|   164k|    if (xOverQmf[i] != 0) {
  ------------------
  |  Branch (153:9): [True: 84.9k, False: 79.1k]
  ------------------
  154|  84.9k|      numPatches++;
  155|  84.9k|    }
  156|   164k|  }
  157|       |
  158|  51.3k|  for (patch = (MAX_STRETCH_HBE - 1); patch < numPatches; patch++) {
  ------------------
  |  |  118|  32.8k|#define MAX_STRETCH_HBE (4)
  ------------------
  |  Branch (158:39): [True: 18.4k, False: 32.8k]
  ------------------
  159|  18.4k|    patchBands = xOverQmf[patch + 1] - xOverQmf[patch];
  160|  18.4k|    target = xOverQmf[patch];
  161|  18.4k|    sourceBands = xOverQmf[MAX_STRETCH_HBE - 1] - xOverQmf[MAX_STRETCH_HBE - 2];
  ------------------
  |  |  118|  18.4k|#define MAX_STRETCH_HBE (4)
  ------------------
                  sourceBands = xOverQmf[MAX_STRETCH_HBE - 1] - xOverQmf[MAX_STRETCH_HBE - 2];
  ------------------
  |  |  118|  18.4k|#define MAX_STRETCH_HBE (4)
  ------------------
  162|       |
  163|  39.4k|    while (patchBands > 0) {
  ------------------
  |  Branch (163:12): [True: 20.9k, False: 18.4k]
  ------------------
  164|  20.9k|      int numBands = sourceBands;
  165|  20.9k|      int startBand = xOverQmf[MAX_STRETCH_HBE - 1] - 1;
  ------------------
  |  |  118|  20.9k|#define MAX_STRETCH_HBE (4)
  ------------------
  166|  20.9k|      if (target + numBands >= xOverQmf[patch + 1]) {
  ------------------
  |  Branch (166:11): [True: 18.4k, False: 2.47k]
  ------------------
  167|  18.4k|        numBands = xOverQmf[patch + 1] - target;
  168|  18.4k|      }
  169|  20.9k|      if ((((target + numBands - 1) % 2) +
  ------------------
  |  Branch (169:11): [True: 18.4k, False: 2.54k]
  ------------------
  170|  20.9k|           ((xOverQmf[MAX_STRETCH_HBE - 1] - 1) % 2)) %
  ------------------
  |  |  118|  20.9k|#define MAX_STRETCH_HBE (4)
  ------------------
  171|  20.9k|          2) {
  172|  18.4k|        if (numBands == sourceBands) {
  ------------------
  |  Branch (172:13): [True: 1.94k, False: 16.4k]
  ------------------
  173|  1.94k|          numBands--;
  174|  16.4k|        } else {
  175|  16.4k|          startBand--;
  176|  16.4k|        }
  177|  18.4k|      }
  178|  20.9k|      if (keepStatesSynced == KEEP_STATES_SYNCED_OUTDIFF) {
  ------------------
  |  Branch (178:11): [True: 2.79k, False: 18.1k]
  ------------------
  179|  41.8k|        for (col = slotOffset; col < overlap + LPC_ORDER; col++) {
  ------------------
  |  |  157|  41.8k|#define LPC_ORDER 2
  ------------------
  |  Branch (179:32): [True: 39.0k, False: 2.79k]
  ------------------
  180|  39.0k|          i = 0;
  181|   300k|          for (band = numBands; band > 0; band--) {
  ------------------
  |  Branch (181:33): [True: 261k, False: 39.0k]
  ------------------
  182|   261k|            if ((target + band - 1 < 64) &&
  ------------------
  |  Branch (182:17): [True: 261k, False: 0]
  ------------------
  183|   261k|                (target + band - 1 < xOverQmf[patch + 1])) {
  ------------------
  |  Branch (183:17): [True: 261k, False: 0]
  ------------------
  184|   261k|              ppqmfReal[col][target + band - 1] = ppqmfReal[col][startBand - i];
  185|   261k|              ppqmfImag[col][target + band - 1] = ppqmfImag[col][startBand - i];
  186|   261k|              i++;
  187|   261k|            }
  188|   261k|          }
  189|  39.0k|        }
  190|  18.1k|      } else {
  191|  1.01M|        for (col = slotOffset; col < noCols; col++) {
  ------------------
  |  Branch (191:32): [True: 999k, False: 18.1k]
  ------------------
  192|   999k|          i = 0;
  193|  8.95M|          for (band = numBands; band > 0; band--) {
  ------------------
  |  Branch (193:33): [True: 7.95M, False: 999k]
  ------------------
  194|  7.95M|            if ((target + band - 1 < 64) &&
  ------------------
  |  Branch (194:17): [True: 7.95M, False: 0]
  ------------------
  195|  7.95M|                (target + band - 1 < xOverQmf[patch + 1])) {
  ------------------
  |  Branch (195:17): [True: 7.95M, False: 0]
  ------------------
  196|  7.95M|              ppqmfReal[col][target + band - 1] = ppqmfReal[col][startBand - i];
  197|  7.95M|              ppqmfImag[col][target + band - 1] = ppqmfImag[col][startBand - i];
  198|  7.95M|              i++;
  199|  7.95M|            }
  200|  7.95M|          }
  201|   999k|        }
  202|  18.1k|      }
  203|  20.9k|      target += numBands;
  204|  20.9k|      patchBands -= numBands;
  205|  20.9k|    }
  206|  18.4k|  }
  207|  32.8k|}

_Z25sbrDecoder_drcInitChannelP18SBRDEC_DRC_CHANNEL:
  124|   414k|void sbrDecoder_drcInitChannel(HANDLE_SBR_DRC_CHANNEL hDrcData) {
  125|   414k|  int band;
  126|       |
  127|   414k|  if (hDrcData == NULL) {
  ------------------
  |  Branch (127:7): [True: 0, False: 414k]
  ------------------
  128|      0|    return;
  129|      0|  }
  130|       |
  131|  26.9M|  for (band = 0; band < (64); band++) {
  ------------------
  |  Branch (131:18): [True: 26.5M, False: 414k]
  ------------------
  132|  26.5M|    hDrcData->prevFact_mag[band] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  26.5M|  (FIXP_DBL)(                                                                \
  |  |  193|  26.5M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 26.5M, Folded]
  |  |  ------------------
  |  |  194|  26.5M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  26.5M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.5M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 26.5M]
  |  |  ------------------
  |  |  195|  26.5M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  26.5M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  26.5M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  26.5M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  26.5M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  26.5M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  26.5M|          : ((((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|  26.5M|  }
  134|       |
  135|  7.04M|  for (band = 0; band < SBRDEC_MAX_DRC_BANDS; band++) {
  ------------------
  |  |  109|  7.04M|#define SBRDEC_MAX_DRC_BANDS (16)
  ------------------
  |  Branch (135:18): [True: 6.63M, False: 414k]
  ------------------
  136|  6.63M|    hDrcData->currFact_mag[band] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  6.63M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.63M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.63M, Folded]
  |  |  ------------------
  |  |  194|  6.63M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.63M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.63M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.63M]
  |  |  ------------------
  |  |  195|  6.63M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.63M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.63M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.63M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.63M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.63M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.63M|          : ((((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|  6.63M|    hDrcData->nextFact_mag[band] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  6.63M|  (FIXP_DBL)(                                                                \
  |  |  193|  6.63M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 6.63M, Folded]
  |  |  ------------------
  |  |  194|  6.63M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  6.63M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.63M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 6.63M]
  |  |  ------------------
  |  |  195|  6.63M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  6.63M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  6.63M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  6.63M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  6.63M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.63M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  6.63M|          : ((((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|  6.63M|  }
  139|       |
  140|   414k|  hDrcData->prevFact_exp = 1;
  141|   414k|  hDrcData->currFact_exp = 1;
  142|   414k|  hDrcData->nextFact_exp = 1;
  143|       |
  144|   414k|  hDrcData->numBandsCurr = 1;
  145|   414k|  hDrcData->numBandsNext = 1;
  146|       |
  147|   414k|  hDrcData->winSequenceCurr = 0;
  148|   414k|  hDrcData->winSequenceNext = 0;
  149|       |
  150|   414k|  hDrcData->drcInterpolationSchemeCurr = 0;
  151|   414k|  hDrcData->drcInterpolationSchemeNext = 0;
  152|       |
  153|   414k|  hDrcData->enable = 0;
  154|   414k|}
_Z27sbrDecoder_drcUpdateChannelP18SBRDEC_DRC_CHANNEL:
  163|   432k|void sbrDecoder_drcUpdateChannel(HANDLE_SBR_DRC_CHANNEL hDrcData) {
  164|   432k|  if (hDrcData == NULL) {
  ------------------
  |  Branch (164:7): [True: 0, False: 432k]
  ------------------
  165|      0|    return;
  166|      0|  }
  167|   432k|  if (hDrcData->enable != 1) {
  ------------------
  |  Branch (167:7): [True: 418k, False: 14.0k]
  ------------------
  168|   418k|    return;
  169|   418k|  }
  170|       |
  171|       |  /* swap previous data */
  172|  14.0k|  FDKmemcpy(hDrcData->currFact_mag, hDrcData->nextFact_mag,
  173|  14.0k|            SBRDEC_MAX_DRC_BANDS * sizeof(FIXP_DBL));
  ------------------
  |  |  109|  14.0k|#define SBRDEC_MAX_DRC_BANDS (16)
  ------------------
  174|       |
  175|  14.0k|  hDrcData->currFact_exp = hDrcData->nextFact_exp;
  176|       |
  177|  14.0k|  hDrcData->numBandsCurr = hDrcData->numBandsNext;
  178|       |
  179|  14.0k|  FDKmemcpy(hDrcData->bandTopCurr, hDrcData->bandTopNext,
  180|  14.0k|            SBRDEC_MAX_DRC_BANDS * sizeof(USHORT));
  ------------------
  |  |  109|  14.0k|#define SBRDEC_MAX_DRC_BANDS (16)
  ------------------
  181|       |
  182|  14.0k|  hDrcData->drcInterpolationSchemeCurr = hDrcData->drcInterpolationSchemeNext;
  183|       |
  184|  14.0k|  hDrcData->winSequenceCurr = hDrcData->winSequenceNext;
  185|  14.0k|}
_Z23sbrDecoder_drcApplySlotP18SBRDEC_DRC_CHANNELPiS1_iii:
  201|   603k|                             int col, int numQmfSubSamples, int maxShift) {
  202|   603k|  const UCHAR *winBorderToColMap;
  203|       |
  204|   603k|  int band, bottomMdct, topMdct, bin, useLP;
  205|   603k|  int indx = numQmfSubSamples - (numQmfSubSamples >> 1) - 10; /* l_border */
  206|   603k|  int frameLenFlag = (numQmfSubSamples == 30) ? 1 : 0;
  ------------------
  |  Branch (206:22): [True: 245k, False: 357k]
  ------------------
  207|   603k|  int frameSize = (frameLenFlag == 1) ? 960 : 1024;
  ------------------
  |  Branch (207:19): [True: 245k, False: 357k]
  ------------------
  208|       |
  209|   603k|  const FIXP_DBL *fact_mag = NULL;
  210|   603k|  INT fact_exp = 0;
  211|   603k|  UINT numBands = 0;
  212|   603k|  USHORT *bandTop = NULL;
  213|   603k|  int shortDrc = 0;
  214|       |
  215|   603k|  FIXP_DBL alphaValue = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   603k|  (FIXP_DBL)(                                                                \
  |  |  193|   603k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 603k, Folded]
  |  |  ------------------
  |  |  194|   603k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   603k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   603k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 603k]
  |  |  ------------------
  |  |  195|   603k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   603k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   603k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   603k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   603k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   603k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   603k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|       |
  217|   603k|  if (hDrcData == NULL) {
  ------------------
  |  Branch (217:7): [True: 0, False: 603k]
  ------------------
  218|      0|    return;
  219|      0|  }
  220|   603k|  if (hDrcData->enable != 1) {
  ------------------
  |  Branch (220:7): [True: 160k, False: 442k]
  ------------------
  221|   160k|    return;
  222|   160k|  }
  223|       |
  224|   442k|  winBorderToColMap = winBorderToColMappingTab[frameLenFlag];
  225|       |
  226|   442k|  useLP = (qmfImagSlot == NULL) ? 1 : 0;
  ------------------
  |  Branch (226:11): [True: 355k, False: 87.0k]
  ------------------
  227|       |
  228|   442k|  col += indx;
  229|   442k|  bottomMdct = 0;
  230|       |
  231|       |  /* get respective data and calc interpolation factor */
  232|   442k|  if (col < (numQmfSubSamples >> 1)) {    /* first half of current frame */
  ------------------
  |  Branch (232:7): [True: 147k, False: 295k]
  ------------------
  233|   147k|    if (hDrcData->winSequenceCurr != 2) { /* long window */
  ------------------
  |  Branch (233:9): [True: 64.5k, False: 82.7k]
  ------------------
  234|  64.5k|      int j = col + (numQmfSubSamples >> 1);
  235|       |
  236|  64.5k|      if (j < winBorderToColMap[15]) {
  ------------------
  |  Branch (236:11): [True: 64.5k, False: 0]
  ------------------
  237|  64.5k|        if (hDrcData->drcInterpolationSchemeCurr == 0) {
  ------------------
  |  Branch (237:13): [True: 50.4k, False: 14.1k]
  ------------------
  238|  50.4k|          INT k = (frameLenFlag) ? 0x4444445 : 0x4000000;
  ------------------
  |  Branch (238:19): [True: 22.1k, False: 28.2k]
  ------------------
  239|       |
  240|  50.4k|          alphaValue = (FIXP_DBL)(j * k);
  241|  50.4k|        } else {
  242|  14.1k|          if (j >=
  ------------------
  |  Branch (242:15): [True: 8.87k, False: 5.30k]
  ------------------
  243|  14.1k|              (int)winBorderToColMap[hDrcData->drcInterpolationSchemeCurr]) {
  244|  8.87k|            alphaValue = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  8.87k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  245|  8.87k|          }
  246|  14.1k|        }
  247|  64.5k|      } else {
  248|      0|        alphaValue = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  249|      0|      }
  250|  82.7k|    } else { /* short windows */
  251|  82.7k|      shortDrc = 1;
  252|  82.7k|    }
  253|       |
  254|   147k|    fact_mag = hDrcData->currFact_mag;
  255|   147k|    fact_exp = hDrcData->currFact_exp;
  256|   147k|    numBands = hDrcData->numBandsCurr;
  257|   147k|    bandTop = hDrcData->bandTopCurr;
  258|   295k|  } else if (col < numQmfSubSamples) {    /* second half of current frame */
  ------------------
  |  Branch (258:14): [True: 219k, False: 75.7k]
  ------------------
  259|   219k|    if (hDrcData->winSequenceNext != 2) { /* next: long window */
  ------------------
  |  Branch (259:9): [True: 75.0k, False: 144k]
  ------------------
  260|  75.0k|      int j = col - (numQmfSubSamples >> 1);
  261|       |
  262|  75.0k|      if (j < winBorderToColMap[15]) {
  ------------------
  |  Branch (262:11): [True: 75.0k, False: 0]
  ------------------
  263|  75.0k|        if (hDrcData->drcInterpolationSchemeNext == 0) {
  ------------------
  |  Branch (263:13): [True: 50.0k, False: 25.0k]
  ------------------
  264|  50.0k|          INT k = (frameLenFlag) ? 0x4444445 : 0x4000000;
  ------------------
  |  Branch (264:19): [True: 26.2k, False: 23.8k]
  ------------------
  265|       |
  266|  50.0k|          alphaValue = (FIXP_DBL)(j * k);
  267|  50.0k|        } else {
  268|  25.0k|          if (j >=
  ------------------
  |  Branch (268:15): [True: 1.66k, False: 23.3k]
  ------------------
  269|  25.0k|              (int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) {
  270|  1.66k|            alphaValue = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  1.66k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  271|  1.66k|          }
  272|  25.0k|        }
  273|  75.0k|      } else {
  274|      0|        alphaValue = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  275|      0|      }
  276|       |
  277|  75.0k|      fact_mag = hDrcData->nextFact_mag;
  278|  75.0k|      fact_exp = hDrcData->nextFact_exp;
  279|  75.0k|      numBands = hDrcData->numBandsNext;
  280|  75.0k|      bandTop = hDrcData->bandTopNext;
  281|   144k|    } else {                                /* next: short windows */
  282|   144k|      if (hDrcData->winSequenceCurr != 2) { /* current: long window */
  ------------------
  |  Branch (282:11): [True: 49.9k, False: 94.2k]
  ------------------
  283|  49.9k|        alphaValue = (FIXP_DBL)0;
  284|       |
  285|  49.9k|        fact_mag = hDrcData->nextFact_mag;
  286|  49.9k|        fact_exp = hDrcData->nextFact_exp;
  287|  49.9k|        numBands = hDrcData->numBandsNext;
  288|  49.9k|        bandTop = hDrcData->bandTopNext;
  289|  94.2k|      } else { /* current: short windows */
  290|  94.2k|        shortDrc = 1;
  291|       |
  292|  94.2k|        fact_mag = hDrcData->currFact_mag;
  293|  94.2k|        fact_exp = hDrcData->currFact_exp;
  294|  94.2k|        numBands = hDrcData->numBandsCurr;
  295|  94.2k|        bandTop = hDrcData->bandTopCurr;
  296|  94.2k|      }
  297|   144k|    }
  298|   219k|  } else {                                /* first half of next frame */
  299|  75.7k|    if (hDrcData->winSequenceNext != 2) { /* long window */
  ------------------
  |  Branch (299:9): [True: 23.8k, False: 51.8k]
  ------------------
  300|  23.8k|      int j = col - (numQmfSubSamples >> 1);
  301|       |
  302|  23.8k|      if (j < winBorderToColMap[15]) {
  ------------------
  |  Branch (302:11): [True: 23.8k, False: 0]
  ------------------
  303|  23.8k|        if (hDrcData->drcInterpolationSchemeNext == 0) {
  ------------------
  |  Branch (303:13): [True: 15.5k, False: 8.31k]
  ------------------
  304|  15.5k|          INT k = (frameLenFlag) ? 0x4444445 : 0x4000000;
  ------------------
  |  Branch (304:19): [True: 8.74k, False: 6.79k]
  ------------------
  305|       |
  306|  15.5k|          alphaValue = (FIXP_DBL)(j * k);
  307|  15.5k|        } else {
  308|  8.31k|          if (j >=
  ------------------
  |  Branch (308:15): [True: 703, False: 7.61k]
  ------------------
  309|  8.31k|              (int)winBorderToColMap[hDrcData->drcInterpolationSchemeNext]) {
  310|    703|            alphaValue = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|    703|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  311|    703|          }
  312|  8.31k|        }
  313|  23.8k|      } else {
  314|      0|        alphaValue = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  315|      0|      }
  316|  51.8k|    } else { /* short windows */
  317|  51.8k|      shortDrc = 1;
  318|  51.8k|    }
  319|       |
  320|  75.7k|    fact_mag = hDrcData->nextFact_mag;
  321|  75.7k|    fact_exp = hDrcData->nextFact_exp;
  322|  75.7k|    numBands = hDrcData->numBandsNext;
  323|  75.7k|    bandTop = hDrcData->bandTopNext;
  324|       |
  325|  75.7k|    col -= numQmfSubSamples;
  326|  75.7k|  }
  327|       |
  328|       |  /* process bands */
  329|  2.02M|  for (band = 0; band < (int)numBands; band++) {
  ------------------
  |  Branch (329:18): [True: 1.58M, False: 442k]
  ------------------
  330|  1.58M|    int bottomQmf, topQmf;
  331|       |
  332|  1.58M|    FIXP_DBL drcFact_mag = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  1.58M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  333|       |
  334|  1.58M|    topMdct = (bandTop[band] + 1) << 2;
  335|       |
  336|  1.58M|    if (!shortDrc) { /* long window */
  ------------------
  |  Branch (336:9): [True: 623k, False: 962k]
  ------------------
  337|   623k|      if (frameLenFlag) {
  ------------------
  |  Branch (337:11): [True: 258k, False: 364k]
  ------------------
  338|       |        /* 960 framing */
  339|   258k|        bottomQmf = fMultIfloor((FIXP_DBL)0x4444445, bottomMdct);
  340|   258k|        topQmf = fMultIfloor((FIXP_DBL)0x4444445, topMdct);
  341|       |
  342|   258k|        topMdct = 30 * topQmf;
  343|   364k|      } else {
  344|       |        /* 1024 framing */
  345|   364k|        topMdct &= ~0x1f;
  346|       |
  347|   364k|        bottomQmf = bottomMdct >> 5;
  348|   364k|        topQmf = topMdct >> 5;
  349|   364k|      }
  350|       |
  351|   623k|      if (band == ((int)numBands - 1)) {
  ------------------
  |  Branch (351:11): [True: 213k, False: 409k]
  ------------------
  352|   213k|        topQmf = (64);
  353|   213k|      }
  354|       |
  355|  16.4M|      for (bin = bottomQmf; bin < topQmf; bin++) {
  ------------------
  |  Branch (355:29): [True: 15.8M, False: 623k]
  ------------------
  356|  15.8M|        FIXP_DBL drcFact1_mag = hDrcData->prevFact_mag[bin];
  357|  15.8M|        FIXP_DBL drcFact2_mag = fact_mag[band];
  358|       |
  359|       |        /* normalize scale factors */
  360|  15.8M|        if (hDrcData->prevFact_exp < maxShift) {
  ------------------
  |  Branch (360:13): [True: 4.50M, False: 11.3M]
  ------------------
  361|  4.50M|          drcFact1_mag >>= maxShift - hDrcData->prevFact_exp;
  362|  4.50M|        }
  363|  15.8M|        if (fact_exp < maxShift) {
  ------------------
  |  Branch (363:13): [True: 2.01M, False: 13.8M]
  ------------------
  364|  2.01M|          drcFact2_mag >>= maxShift - fact_exp;
  365|  2.01M|        }
  366|       |
  367|       |        /* interpolate */
  368|  15.8M|        if (alphaValue == (FIXP_DBL)0) {
  ------------------
  |  Branch (368:13): [True: 7.52M, False: 8.34M]
  ------------------
  369|  7.52M|          drcFact_mag = drcFact1_mag;
  370|  8.34M|        } else if (alphaValue == (FIXP_DBL)MAXVAL_DBL) {
  ------------------
  |  |  156|  8.34M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (370:20): [True: 938k, False: 7.40M]
  ------------------
  371|   938k|          drcFact_mag = drcFact2_mag;
  372|  7.40M|        } else {
  373|  7.40M|          drcFact_mag =
  374|  7.40M|              fMult(alphaValue, drcFact2_mag) +
  375|  7.40M|              fMult(((FIXP_DBL)MAXVAL_DBL - alphaValue), drcFact1_mag);
  ------------------
  |  |  156|  7.40M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  376|  7.40M|        }
  377|       |
  378|       |        /* apply scaling */
  379|  15.8M|        qmfRealSlot[bin] = fMult(qmfRealSlot[bin], drcFact_mag);
  380|  15.8M|        if (!useLP) {
  ------------------
  |  Branch (380:13): [True: 4.25M, False: 11.6M]
  ------------------
  381|  4.25M|          qmfImagSlot[bin] = fMult(qmfImagSlot[bin], drcFact_mag);
  382|  4.25M|        }
  383|       |
  384|       |        /* save previous factors */
  385|  15.8M|        if (col == (numQmfSubSamples >> 1) - 1) {
  ------------------
  |  Branch (385:13): [True: 462k, False: 15.4M]
  ------------------
  386|   462k|          hDrcData->prevFact_mag[bin] = fact_mag[band];
  387|   462k|        }
  388|  15.8M|      }
  389|   962k|    } else { /* short windows */
  390|   962k|      unsigned startWinIdx, stopWinIdx;
  391|   962k|      int startCol, stopCol;
  392|   962k|      FIXP_DBL invFrameSizeDiv8 =
  393|   962k|          (frameLenFlag) ? (FIXP_DBL)0x1111112 : (FIXP_DBL)0x1000000;
  ------------------
  |  Branch (393:11): [True: 431k, False: 531k]
  ------------------
  394|       |
  395|       |      /* limit top at the frame borders */
  396|   962k|      if (topMdct < 0) {
  ------------------
  |  Branch (396:11): [True: 0, False: 962k]
  ------------------
  397|      0|        topMdct = 0;
  398|      0|      }
  399|   962k|      if (topMdct >= frameSize) {
  ------------------
  |  Branch (399:11): [True: 134k, False: 827k]
  ------------------
  400|   134k|        topMdct = frameSize - 1;
  401|   134k|      }
  402|       |
  403|   962k|      if (frameLenFlag) {
  ------------------
  |  Branch (403:11): [True: 431k, False: 531k]
  ------------------
  404|       |        /*  960 framing */
  405|   431k|        topMdct = fMultIfloor((FIXP_DBL)0x78000000,
  406|   431k|                              fMultIfloor((FIXP_DBL)0x22222223, topMdct) << 2);
  407|       |
  408|   431k|        startWinIdx = fMultIfloor(invFrameSizeDiv8, bottomMdct) +
  409|   431k|                      1; /* winBorderToColMap table has offset of 1 */
  410|   431k|        stopWinIdx = fMultIceil(invFrameSizeDiv8 - (FIXP_DBL)1, topMdct) + 1;
  411|   531k|      } else {
  412|       |        /* 1024 framing */
  413|   531k|        topMdct &= ~0x03;
  414|       |
  415|   531k|        startWinIdx = fMultIfloor(invFrameSizeDiv8, bottomMdct) + 1;
  416|   531k|        stopWinIdx = fMultIceil(invFrameSizeDiv8, topMdct) + 1;
  417|   531k|      }
  418|       |
  419|       |      /* startCol is truncated to the nearest corresponding start subsample in
  420|       |         the QMF of the short window bottom is present in:*/
  421|   962k|      startCol = (int)winBorderToColMap[startWinIdx];
  422|       |
  423|       |      /* stopCol is rounded upwards to the nearest corresponding stop subsample
  424|       |         in the QMF of the short window top is present in. */
  425|   962k|      stopCol = (int)winBorderToColMap[stopWinIdx];
  426|       |
  427|   962k|      bottomQmf = fMultIfloor(invFrameSizeDiv8,
  428|   962k|                              ((bottomMdct % (numQmfSubSamples << 2)) << 5));
  429|   962k|      topQmf = fMultIfloor(invFrameSizeDiv8,
  430|   962k|                           ((topMdct % (numQmfSubSamples << 2)) << 5));
  431|       |
  432|       |      /* extend last band */
  433|   962k|      if (band == ((int)numBands - 1)) {
  ------------------
  |  Branch (433:11): [True: 228k, False: 733k]
  ------------------
  434|   228k|        topQmf = (64);
  435|   228k|        stopCol = numQmfSubSamples;
  436|   228k|        stopWinIdx = 10;
  437|   228k|      }
  438|       |
  439|   962k|      if (topQmf == 0) {
  ------------------
  |  Branch (439:11): [True: 116k, False: 846k]
  ------------------
  440|   116k|        if (frameLenFlag) {
  ------------------
  |  Branch (440:13): [True: 50.7k, False: 65.7k]
  ------------------
  441|  50.7k|          FIXP_DBL rem = fMult(invFrameSizeDiv8,
  442|  50.7k|                               (FIXP_DBL)(topMdct << (DFRACT_BITS - 12)));
  ------------------
  |  |  113|  50.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  443|  50.7k|          if ((LONG)rem & (LONG)0x1F) {
  ------------------
  |  Branch (443:15): [True: 22.0k, False: 28.6k]
  ------------------
  444|  22.0k|            stopWinIdx -= 1;
  445|  22.0k|            stopCol = (int)winBorderToColMap[stopWinIdx];
  446|  22.0k|          }
  447|  50.7k|        }
  448|   116k|        topQmf = (64);
  449|   116k|      }
  450|       |
  451|       |      /* save previous factors */
  452|   962k|      if (stopCol == numQmfSubSamples) {
  ------------------
  |  Branch (452:11): [True: 347k, False: 614k]
  ------------------
  453|   347k|        int tmpBottom = bottomQmf;
  454|       |
  455|   347k|        if ((int)winBorderToColMap[8] > startCol) {
  ------------------
  |  Branch (455:13): [True: 313k, False: 34.2k]
  ------------------
  456|   313k|          tmpBottom = 0; /* band starts in previous short window */
  457|   313k|        }
  458|       |
  459|  16.2M|        for (bin = tmpBottom; bin < topQmf; bin++) {
  ------------------
  |  Branch (459:31): [True: 15.9M, False: 347k]
  ------------------
  460|  15.9M|          hDrcData->prevFact_mag[bin] = fact_mag[band];
  461|  15.9M|        }
  462|   347k|      }
  463|       |
  464|       |      /* apply */
  465|   962k|      if ((col >= startCol) && (col < stopCol)) {
  ------------------
  |  Branch (465:11): [True: 624k, False: 338k]
  |  Branch (465:32): [True: 390k, False: 234k]
  ------------------
  466|   390k|        if (col >= (int)winBorderToColMap[startWinIdx + 1]) {
  ------------------
  |  Branch (466:13): [True: 291k, False: 98.5k]
  ------------------
  467|   291k|          bottomQmf = 0; /* band starts in previous short window */
  468|   291k|        }
  469|   390k|        if (col < (int)winBorderToColMap[stopWinIdx - 1]) {
  ------------------
  |  Branch (469:13): [True: 334k, False: 55.8k]
  ------------------
  470|   334k|          topQmf = (64); /* band ends in next short window */
  471|   334k|        }
  472|       |
  473|   390k|        drcFact_mag = fact_mag[band];
  474|       |
  475|       |        /* normalize scale factor */
  476|   390k|        if (fact_exp < maxShift) {
  ------------------
  |  Branch (476:13): [True: 41.9k, False: 348k]
  ------------------
  477|  41.9k|          drcFact_mag >>= maxShift - fact_exp;
  478|  41.9k|        }
  479|       |
  480|       |        /* apply scaling */
  481|  22.5M|        for (bin = bottomQmf; bin < topQmf; bin++) {
  ------------------
  |  Branch (481:31): [True: 22.1M, False: 390k]
  ------------------
  482|  22.1M|          qmfRealSlot[bin] = fMult(qmfRealSlot[bin], drcFact_mag);
  483|  22.1M|          if (!useLP) {
  ------------------
  |  Branch (483:15): [True: 3.83M, False: 18.3M]
  ------------------
  484|  3.83M|            qmfImagSlot[bin] = fMult(qmfImagSlot[bin], drcFact_mag);
  485|  3.83M|          }
  486|  22.1M|        }
  487|   390k|      }
  488|   962k|    }
  489|       |
  490|  1.58M|    bottomMdct = topMdct;
  491|  1.58M|  } /* end of bands loop */
  492|       |
  493|   442k|  if (col == (numQmfSubSamples >> 1) - 1) {
  ------------------
  |  Branch (493:7): [True: 14.8k, False: 427k]
  ------------------
  494|  14.8k|    hDrcData->prevFact_exp = fact_exp;
  495|  14.8k|  }
  496|   442k|}
_Z19sbrDecoder_drcApplyP18SBRDEC_DRC_CHANNELPPiS2_iS1_:
  511|   318k|                         int numQmfSubSamples, int *scaleFactor) {
  512|   318k|  int col;
  513|   318k|  int maxShift = 0;
  514|       |
  515|   318k|  if (hDrcData == NULL) {
  ------------------
  |  Branch (515:7): [True: 0, False: 318k]
  ------------------
  516|      0|    return;
  517|      0|  }
  518|   318k|  if (hDrcData->enable == 0) {
  ------------------
  |  Branch (518:7): [True: 305k, False: 13.2k]
  ------------------
  519|   305k|    return; /* Avoid changing the scaleFactor even though the processing is
  520|       |               disabled. */
  521|   305k|  }
  522|       |
  523|       |  /* get max scale factor */
  524|  13.2k|  if (hDrcData->prevFact_exp > maxShift) {
  ------------------
  |  Branch (524:7): [True: 13.1k, False: 158]
  ------------------
  525|  13.1k|    maxShift = hDrcData->prevFact_exp;
  526|  13.1k|  }
  527|  13.2k|  if (hDrcData->currFact_exp > maxShift) {
  ------------------
  |  Branch (527:7): [True: 1.47k, False: 11.8k]
  ------------------
  528|  1.47k|    maxShift = hDrcData->currFact_exp;
  529|  1.47k|  }
  530|  13.2k|  if (hDrcData->nextFact_exp > maxShift) {
  ------------------
  |  Branch (530:7): [True: 2.08k, False: 11.2k]
  ------------------
  531|  2.08k|    maxShift = hDrcData->nextFact_exp;
  532|  2.08k|  }
  533|       |
  534|   406k|  for (col = 0; col < numQmfSubSamples; col++) {
  ------------------
  |  Branch (534:17): [True: 393k, False: 13.2k]
  ------------------
  535|   393k|    FIXP_DBL *qmfSlotReal = QmfBufferReal[col];
  536|   393k|    FIXP_DBL *qmfSlotImag = (QmfBufferImag == NULL) ? NULL : QmfBufferImag[col];
  ------------------
  |  Branch (536:29): [True: 355k, False: 38.1k]
  ------------------
  537|       |
  538|   393k|    sbrDecoder_drcApplySlot(hDrcData, qmfSlotReal, qmfSlotImag, col,
  539|   393k|                            numQmfSubSamples, maxShift);
  540|   393k|  }
  541|       |
  542|  13.2k|  *scaleFactor += maxShift;
  543|  13.2k|}

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

sbrDecoder_Open:
  447|  21.8k|                          HANDLE_FDK_QMF_DOMAIN pQmfDomain) {
  448|  21.8k|  HANDLE_SBRDECODER self = NULL;
  449|  21.8k|  SBR_ERROR sbrError = SBRDEC_OK;
  450|  21.8k|  int elIdx;
  451|       |
  452|  21.8k|  if ((pSelf == NULL) || (pQmfDomain == NULL)) {
  ------------------
  |  Branch (452:7): [True: 0, False: 21.8k]
  |  Branch (452:26): [True: 0, False: 21.8k]
  ------------------
  453|      0|    return SBRDEC_INVALID_ARGUMENT;
  454|      0|  }
  455|       |
  456|       |  /* Get memory for this instance */
  457|  21.8k|  self = GetRam_SbrDecoder();
  458|  21.8k|  if (self == NULL) {
  ------------------
  |  Branch (458:7): [True: 0, False: 21.8k]
  ------------------
  459|      0|    sbrError = SBRDEC_MEM_ALLOC_FAILED;
  460|      0|    goto bail;
  461|      0|  }
  462|       |
  463|  21.8k|  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|  21.8k|  self->numDelayFrames = (1); /* set to the max value by default */
  473|       |
  474|       |  /* Initialize header sync state */
  475|   196k|  for (elIdx = 0; elIdx < (8); elIdx += 1) {
  ------------------
  |  Branch (475:19): [True: 174k, False: 21.8k]
  ------------------
  476|   174k|    int i;
  477|   524k|    for (i = 0; i < (1) + 1; i += 1) {
  ------------------
  |  Branch (477:17): [True: 349k, False: 174k]
  ------------------
  478|   349k|      self->sbrHeader[elIdx][i].syncState = SBR_NOT_INITIALIZED;
  479|   349k|    }
  480|   174k|  }
  481|       |
  482|  21.8k|  *pSelf = self;
  483|       |
  484|  21.8k|bail:
  485|  21.8k|  return sbrError;
  486|  21.8k|}
sbrDecoder_InitElement:
  532|   677k|    const UCHAR configMode, UCHAR *configChanged, const INT downscaleFactor) {
  533|   677k|  SBR_ERROR sbrError = SBRDEC_OK;
  534|   677k|  int chCnt = 0;
  535|   677k|  int nSbrElementsStart;
  536|   677k|  int nSbrChannelsStart;
  537|   677k|  if (self == NULL) {
  ------------------
  |  Branch (537:7): [True: 0, False: 677k]
  ------------------
  538|      0|    return SBRDEC_INVALID_ARGUMENT;
  539|      0|  }
  540|       |
  541|   677k|  nSbrElementsStart = self->numSbrElements;
  542|   677k|  nSbrChannelsStart = self->numSbrChannels;
  543|       |
  544|       |  /* Check core codec AOT */
  545|   677k|  if (!sbrDecoder_isCoreCodecValid(coreCodec) || elementIndex >= (8)) {
  ------------------
  |  Branch (545:7): [True: 750, False: 677k]
  |  Branch (545:50): [True: 0, False: 677k]
  ------------------
  546|    750|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  547|    750|    goto bail;
  548|    750|  }
  549|       |
  550|   677k|  if (elementID != ID_SCE && elementID != ID_CPE && elementID != ID_LFE) {
  ------------------
  |  Branch (550:7): [True: 444k, False: 232k]
  |  Branch (550:30): [True: 76.3k, False: 368k]
  |  Branch (550:53): [True: 0, False: 76.3k]
  ------------------
  551|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  552|      0|    goto bail;
  553|      0|  }
  554|       |
  555|   677k|  if (self->sampleRateIn == sampleRateIn &&
  ------------------
  |  Branch (555:7): [True: 574k, False: 102k]
  ------------------
  556|   574k|      self->codecFrameSize == samplesPerFrame && self->coreCodec == coreCodec &&
  ------------------
  |  Branch (556:7): [True: 545k, False: 28.8k]
  |  Branch (556:50): [True: 545k, False: 10]
  ------------------
  557|   545k|      self->pSbrElement[elementIndex] != NULL &&
  ------------------
  |  Branch (557:7): [True: 480k, False: 65.5k]
  ------------------
  558|   480k|      self->pSbrElement[elementIndex]->elementID == elementID &&
  ------------------
  |  Branch (558:7): [True: 477k, False: 2.25k]
  ------------------
  559|   477k|      !(self->flags & SBRDEC_FORCE_RESET) &&
  ------------------
  |  |  231|   477k|  32768 /* Flag is used to force a reset of all elements in use. */
  ------------------
  |  Branch (559:7): [True: 477k, False: 0]
  ------------------
  560|   477k|      ((sampleRateOut == 0) ? 1 : (self->sampleRateOut == sampleRateOut)) &&
  ------------------
  |  Branch (560:7): [True: 472k, False: 5.59k]
  |  Branch (560:8): [True: 50.5k, False: 427k]
  ------------------
  561|   472k|      ((harmonicSBR == 2) ? 1
  ------------------
  |  Branch (561:7): [True: 467k, False: 5.01k]
  |  Branch (561:8): [True: 133k, False: 339k]
  ------------------
  562|   472k|                          : (self->harmonicSBR ==
  563|   339k|                             harmonicSBR)) /* The value 2 signalizes that
  564|       |                                              harmonicSBR shall be ignored in
  565|       |                                              the config change detection */
  566|   677k|  ) {
  567|       |    /* Nothing to do */
  568|   467k|    return SBRDEC_OK;
  569|   467k|  } else {
  570|   209k|    if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   209k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (570:9): [True: 111k, False: 97.8k]
  ------------------
  571|   111k|      *configChanged = 1;
  572|   111k|    }
  573|   209k|  }
  574|       |
  575|       |  /* reaching this point the SBR-decoder gets (re-)configured */
  576|       |
  577|       |  /* The flags field is used for all elements! */
  578|   209k|  self->flags &=
  579|   209k|      (SBRDEC_FORCE_RESET | SBRDEC_FLUSH); /* Keep the global flags. They will
  ------------------
  |  |  231|   209k|  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|   209k|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
  580|       |                                              be reset after decoding. */
  581|   209k|  self->flags |= (downscaleFactor > 1) ? SBRDEC_ELD_DOWNSCALE : 0;
  ------------------
  |  |  226|  11.1k|  4096 /* Flag indicating that ELD downscaled mode decoding is used */
  ------------------
  |  Branch (581:18): [True: 11.1k, False: 198k]
  ------------------
  582|   209k|  self->flags |= (coreCodec == AOT_ER_AAC_ELD) ? SBRDEC_ELD_GRID : 0;
  ------------------
  |  |  204|   111k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (582:18): [True: 111k, False: 98.3k]
  ------------------
  583|   209k|  self->flags |= (coreCodec == AOT_ER_AAC_SCAL) ? SBRDEC_SYNTAX_SCAL : 0;
  ------------------
  |  |  205|  2.54k|#define SBRDEC_SYNTAX_SCAL 2
  ------------------
  |  Branch (583:18): [True: 2.54k, False: 207k]
  ------------------
  584|   209k|  self->flags |=
  585|   209k|      (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: 209k]
  ------------------
  586|   209k|  self->flags |= (coreCodec == AOT_DRM_SURROUND)
  ------------------
  |  Branch (586:18): [True: 0, False: 209k]
  ------------------
  587|   209k|                     ? 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|   209k|                     : 0;
  589|   209k|  self->flags |= (coreCodec == AOT_USAC) ? SBRDEC_SYNTAX_USAC : 0;
  ------------------
  |  |  206|  94.1k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (589:18): [True: 94.1k, False: 115k]
  ------------------
  590|       |  /* Robustness: Take integer division rounding into consideration. E.g. 22050
  591|       |   * Hz with 4:1 SBR => 5512 Hz core sampling rate. */
  592|   209k|  self->flags |= (sampleRateIn == sampleRateOut / 4) ? SBRDEC_QUAD_RATE : 0;
  ------------------
  |  |  215|  29.8k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (592:18): [True: 29.8k, False: 179k]
  ------------------
  593|   209k|  self->flags |= (harmonicSBR == 1) ? SBRDEC_USAC_HARMONICSBR : 0;
  ------------------
  |  |  218|  28.9k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (593:18): [True: 28.9k, False: 180k]
  ------------------
  594|       |
  595|   209k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   209k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (595:7): [True: 111k, False: 97.8k]
  ------------------
  596|   111k|    return SBRDEC_OK;
  597|   111k|  }
  598|       |
  599|  97.8k|  self->sampleRateIn = sampleRateIn;
  600|  97.8k|  self->codecFrameSize = samplesPerFrame;
  601|  97.8k|  self->coreCodec = coreCodec;
  602|  97.8k|  self->harmonicSBR = harmonicSBR;
  603|  97.8k|  self->downscaleFactor = downscaleFactor;
  604|       |
  605|       |  /* Init SBR elements */
  606|  97.8k|  {
  607|  97.8k|    int elChannels, ch;
  608|       |
  609|  97.8k|    if (self->pSbrElement[elementIndex] == NULL) {
  ------------------
  |  Branch (609:9): [True: 97.3k, False: 481]
  ------------------
  610|  97.3k|      self->pSbrElement[elementIndex] = GetRam_SbrDecElement(elementIndex);
  611|  97.3k|      if (self->pSbrElement[elementIndex] == NULL) {
  ------------------
  |  Branch (611:11): [True: 0, False: 97.3k]
  ------------------
  612|      0|        sbrError = SBRDEC_MEM_ALLOC_FAILED;
  613|      0|        goto bail;
  614|      0|      }
  615|  97.3k|      self->numSbrElements++;
  616|  97.3k|    } else {
  617|    481|      self->numSbrChannels -= self->pSbrElement[elementIndex]->nChannels;
  618|    481|    }
  619|       |
  620|       |    /* Determine amount of channels for this element */
  621|  97.8k|    switch (elementID) {
  622|      0|      case ID_NONE:
  ------------------
  |  Branch (622:7): [True: 0, False: 97.8k]
  ------------------
  623|  54.3k|      case ID_CPE:
  ------------------
  |  Branch (623:7): [True: 54.3k, False: 43.4k]
  ------------------
  624|  54.3k|        elChannels = 2;
  625|  54.3k|        break;
  626|  7.48k|      case ID_LFE:
  ------------------
  |  Branch (626:7): [True: 7.48k, False: 90.3k]
  ------------------
  627|  43.4k|      case ID_SCE:
  ------------------
  |  Branch (627:7): [True: 36.0k, False: 61.8k]
  ------------------
  628|  43.4k|        elChannels = 1;
  629|  43.4k|        break;
  630|      0|      default:
  ------------------
  |  Branch (630:7): [True: 0, False: 97.8k]
  ------------------
  631|      0|        elChannels = 0;
  632|      0|        break;
  633|  97.8k|    }
  634|       |
  635|       |    /* Handle case of Parametric Stereo */
  636|  97.8k|    if (elementIndex == 0 && elementID == ID_SCE) {
  ------------------
  |  Branch (636:9): [True: 62.2k, False: 35.5k]
  |  Branch (636:30): [True: 34.1k, False: 28.1k]
  ------------------
  637|  34.1k|      switch (coreCodec) {
  638|    925|        case AOT_AAC_LC:
  ------------------
  |  Branch (638:9): [True: 925, False: 33.2k]
  ------------------
  639|    925|        case AOT_SBR:
  ------------------
  |  Branch (639:9): [True: 0, False: 34.1k]
  ------------------
  640|    925|        case AOT_PS:
  ------------------
  |  Branch (640:9): [True: 0, False: 34.1k]
  ------------------
  641|  2.59k|        case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (641:9): [True: 1.67k, False: 32.4k]
  ------------------
  642|  2.59k|        case AOT_DRM_AAC:
  ------------------
  |  Branch (642:9): [True: 0, False: 34.1k]
  ------------------
  643|  2.59k|        case AOT_DRM_SURROUND:
  ------------------
  |  Branch (643:9): [True: 0, False: 34.1k]
  ------------------
  644|  2.59k|          elChannels = 2;
  645|  2.59k|          break;
  646|  31.5k|        default:
  ------------------
  |  Branch (646:9): [True: 31.5k, False: 2.59k]
  ------------------
  647|  31.5k|          break;
  648|  34.1k|      }
  649|  34.1k|    }
  650|       |
  651|       |    /* Sanity check to avoid memory leaks */
  652|  97.8k|    if (elChannels < self->pSbrElement[elementIndex]->nChannels ||
  ------------------
  |  Branch (652:9): [True: 0, False: 97.8k]
  ------------------
  653|  97.8k|        (self->numSbrChannels + elChannels) > (8) + (1)) {
  ------------------
  |  Branch (653:9): [True: 0, False: 97.8k]
  ------------------
  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|  97.8k|    self->pSbrElement[elementIndex]->elementID = elementID;
  662|  97.8k|    self->pSbrElement[elementIndex]->nChannels = elChannels;
  663|       |
  664|   252k|    for (ch = 0; ch < elChannels; ch++) {
  ------------------
  |  Branch (664:18): [True: 154k, False: 97.8k]
  ------------------
  665|   154k|      if (self->pSbrElement[elementIndex]->pSbrChannel[ch] == NULL) {
  ------------------
  |  Branch (665:11): [True: 153k, False: 960]
  ------------------
  666|   153k|        self->pSbrElement[elementIndex]->pSbrChannel[ch] =
  667|   153k|            GetRam_SbrDecChannel(chCnt);
  668|   153k|        if (self->pSbrElement[elementIndex]->pSbrChannel[ch] == NULL) {
  ------------------
  |  Branch (668:13): [True: 0, False: 153k]
  ------------------
  669|      0|          sbrError = SBRDEC_MEM_ALLOC_FAILED;
  670|      0|          goto bail;
  671|      0|        }
  672|   153k|      }
  673|   154k|      self->numSbrChannels++;
  674|       |
  675|   154k|      sbrDecoder_drcInitChannel(&self->pSbrElement[elementIndex]
  676|   154k|                                     ->pSbrChannel[ch]
  677|   154k|                                     ->SbrDec.sbrDrcChannel);
  678|       |
  679|   154k|      chCnt++;
  680|   154k|    }
  681|  97.8k|  }
  682|       |
  683|  97.8k|  if (!self->pQmfDomain->globalConf.qmfDomainExplicitConfig) {
  ------------------
  |  Branch (683:7): [True: 97.8k, False: 0]
  ------------------
  684|  97.8k|    self->pQmfDomain->globalConf.nInputChannels_requested =
  685|  97.8k|        self->numSbrChannels;
  686|  97.8k|    self->pQmfDomain->globalConf.nOutputChannels_requested =
  687|  97.8k|        fMax((INT)self->numSbrChannels,
  688|  97.8k|             (INT)self->pQmfDomain->globalConf.nOutputChannels_requested);
  689|  97.8k|  }
  690|       |
  691|       |  /* Make sure each SBR channel has one QMF channel assigned even if
  692|       |   * numSbrChannels or element set-up has changed. */
  693|  97.8k|  sbrDecoder_AssignQmfChannels2SbrChannels(self);
  694|       |
  695|       |  /* clear error flags for all delay slots */
  696|  97.8k|  FDKmemclear(self->pSbrElement[elementIndex]->frameErrorFlag,
  697|  97.8k|              ((1) + 1) * sizeof(UCHAR));
  698|       |
  699|  97.8k|  {
  700|  97.8k|    int overlap;
  701|       |
  702|  97.8k|    if (coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (702:9): [True: 55.5k, False: 42.2k]
  ------------------
  703|  55.5k|      overlap = 0;
  704|  55.5k|    } else if (self->flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  42.2k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (704:16): [True: 12.0k, False: 30.2k]
  ------------------
  705|  12.0k|      overlap = (3 * 4);
  706|  30.2k|    } else {
  707|  30.2k|      overlap = (3 * 2);
  708|  30.2k|    }
  709|       |    /* Initialize this instance */
  710|  97.8k|    sbrError = sbrDecoder_ResetElement(self, sampleRateIn, sampleRateOut,
  711|  97.8k|                                       samplesPerFrame, elementID, elementIndex,
  712|  97.8k|                                       overlap);
  713|  97.8k|  }
  714|       |
  715|  98.5k|bail:
  716|  98.5k|  if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (716:7): [True: 5.38k, False: 93.1k]
  ------------------
  717|  5.38k|    if ((nSbrElementsStart < self->numSbrElements) ||
  ------------------
  |  Branch (717:9): [True: 4.63k, False: 750]
  ------------------
  718|  4.63k|        (nSbrChannelsStart < self->numSbrChannels)) {
  ------------------
  |  Branch (718:9): [True: 0, False: 750]
  ------------------
  719|       |      /* Free the memory allocated for this element */
  720|  4.63k|      sbrDecoder_DestroyElement(self, elementIndex);
  721|  4.63k|    } else if ((elementIndex < (8)) &&
  ------------------
  |  Branch (721:16): [True: 750, False: 0]
  ------------------
  722|    750|               (self->pSbrElement[elementIndex] !=
  ------------------
  |  Branch (722:16): [True: 0, False: 750]
  ------------------
  723|    750|                NULL)) { /* Set error flag to trigger concealment */
  724|      0|      setFrameErrorFlag(self->pSbrElement[elementIndex], FRAME_ERROR);
  ------------------
  |  |  118|      0|#define FRAME_ERROR (1)
  ------------------
  725|      0|    }
  726|  5.38k|  }
  727|       |
  728|  98.5k|  return sbrError;
  729|  97.8k|}
sbrDecoder_FreeMem:
  735|   311k|SBR_ERROR sbrDecoder_FreeMem(HANDLE_SBRDECODER *self) {
  736|   311k|  int i;
  737|   311k|  int elIdx;
  738|       |
  739|   311k|  if (self != NULL && *self != NULL) {
  ------------------
  |  Branch (739:7): [True: 311k, False: 0]
  |  Branch (739:23): [True: 311k, False: 0]
  ------------------
  740|  2.80M|    for (i = 0; i < (8); i++) {
  ------------------
  |  Branch (740:17): [True: 2.49M, False: 311k]
  ------------------
  741|  2.49M|      sbrDecoder_DestroyElement(*self, i);
  742|  2.49M|    }
  743|       |
  744|  2.80M|    for (elIdx = 0; elIdx < (8); elIdx += 1) {
  ------------------
  |  Branch (744:21): [True: 2.49M, False: 311k]
  ------------------
  745|  7.48M|      for (i = 0; i < (1) + 1; i += 1) {
  ------------------
  |  Branch (745:19): [True: 4.98M, False: 2.49M]
  ------------------
  746|  4.98M|        (*self)->sbrHeader[elIdx][i].syncState = SBR_NOT_INITIALIZED;
  747|  4.98M|      }
  748|  2.49M|    }
  749|   311k|  }
  750|       |
  751|   311k|  return SBRDEC_OK;
  752|   311k|}
sbrDecoder_Header:
  805|   539k|                      const INT downscaleFactor) {
  806|   539k|  SBR_HEADER_STATUS headerStatus;
  807|   539k|  HANDLE_SBR_HEADER_DATA hSbrHeader;
  808|   539k|  SBR_ERROR sbrError = SBRDEC_OK;
  809|   539k|  int headerIndex;
  810|   539k|  UINT flagsSaved =
  811|   539k|      0; /* flags should not be changed in AC_CM_DET_CFG_CHANGE - mode after
  812|       |            parsing */
  813|       |
  814|   539k|  if (self == NULL || elementIndex >= (8)) {
  ------------------
  |  Branch (814:7): [True: 0, False: 539k]
  |  Branch (814:23): [True: 0, False: 539k]
  ------------------
  815|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
  816|      0|  }
  817|       |
  818|   539k|  if (!sbrDecoder_isCoreCodecValid(coreCodec)) {
  ------------------
  |  Branch (818:7): [True: 0, False: 539k]
  ------------------
  819|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
  820|      0|  }
  821|       |
  822|   539k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   539k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (822:7): [True: 357k, False: 182k]
  ------------------
  823|   357k|    flagsSaved = self->flags; /* store */
  824|   357k|  }
  825|       |
  826|   539k|  sbrError = sbrDecoder_InitElement(
  827|   539k|      self, sampleRateIn, sampleRateOut, samplesPerFrame, coreCodec, elementID,
  828|   539k|      elementIndex, harmonicSBR, stereoConfigIndex, configMode, configChanged,
  829|   539k|      downscaleFactor);
  830|       |
  831|   539k|  if ((sbrError != SBRDEC_OK) || (elementID == ID_LFE)) {
  ------------------
  |  Branch (831:7): [True: 4.59k, False: 535k]
  |  Branch (831:34): [True: 64.4k, False: 470k]
  ------------------
  832|  69.0k|    goto bail;
  833|  69.0k|  }
  834|       |
  835|   470k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   470k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (835:7): [True: 312k, False: 158k]
  ------------------
  836|   312k|    hSbrHeader = NULL;
  837|   312k|  } else {
  838|   158k|    headerIndex = getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  839|   158k|                                self->pSbrElement[elementIndex]->useHeaderSlot);
  840|       |
  841|   158k|    hSbrHeader = &(self->sbrHeader[elementIndex][headerIndex]);
  842|   158k|  }
  843|       |
  844|   470k|  headerStatus = sbrGetHeaderData(hSbrHeader, hBs, self->flags, 0, configMode);
  845|       |
  846|   470k|  if (coreCodec == AOT_USAC) {
  ------------------
  |  Branch (846:7): [True: 169k, False: 301k]
  ------------------
  847|   169k|    if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   169k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (847:9): [True: 108k, False: 60.7k]
  ------------------
  848|   108k|      self->flags = flagsSaved; /* restore */
  849|   108k|    }
  850|   169k|    return sbrError;
  851|   169k|  }
  852|       |
  853|   301k|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|   301k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (853:7): [True: 97.6k, False: 203k]
  ------------------
  854|  97.6k|    SBR_DECODER_ELEMENT *pSbrElement;
  855|       |
  856|  97.6k|    pSbrElement = self->pSbrElement[elementIndex];
  857|       |
  858|       |    /* Sanity check */
  859|  97.6k|    if (pSbrElement != NULL) {
  ------------------
  |  Branch (859:9): [True: 97.6k, False: 0]
  ------------------
  860|  97.6k|      if ((elementID == ID_CPE && pSbrElement->nChannels != 2) ||
  ------------------
  |  Branch (860:12): [True: 67.1k, False: 30.5k]
  |  Branch (860:35): [True: 0, False: 67.1k]
  ------------------
  861|  97.6k|          (elementID != ID_CPE && pSbrElement->nChannels != 1)) {
  ------------------
  |  Branch (861:12): [True: 30.5k, False: 67.1k]
  |  Branch (861:35): [True: 0, False: 30.5k]
  ------------------
  862|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  863|      0|      }
  864|  97.6k|      if (headerStatus == HEADER_RESET) {
  ------------------
  |  Branch (864:11): [True: 70.4k, False: 27.2k]
  ------------------
  865|  70.4k|        sbrError = sbrDecoder_HeaderUpdate(self, hSbrHeader, headerStatus,
  866|  70.4k|                                           pSbrElement->pSbrChannel,
  867|  70.4k|                                           pSbrElement->nChannels);
  868|       |
  869|  70.4k|        if (sbrError == SBRDEC_OK) {
  ------------------
  |  Branch (869:13): [True: 61.8k, False: 8.64k]
  ------------------
  870|  61.8k|          hSbrHeader->syncState = SBR_HEADER;
  871|  61.8k|          hSbrHeader->status |= SBRDEC_HDR_STAT_UPDATE;
  ------------------
  |  |  240|  61.8k|#define SBRDEC_HDR_STAT_UPDATE 2
  ------------------
  872|  61.8k|        } else {
  873|  8.64k|          hSbrHeader->syncState = SBR_NOT_INITIALIZED;
  874|  8.64k|          hSbrHeader->status = HEADER_ERROR;
  875|  8.64k|        }
  876|  70.4k|      }
  877|  97.6k|    }
  878|  97.6k|  }
  879|   370k|bail:
  880|   370k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|   370k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (880:7): [True: 248k, False: 122k]
  ------------------
  881|   248k|    self->flags = flagsSaved; /* restore */
  882|   248k|  }
  883|   370k|  return sbrError;
  884|   301k|}
sbrDecoder_SetParam:
  887|  1.22M|                              const INT value) {
  888|  1.22M|  SBR_ERROR errorStatus = SBRDEC_OK;
  889|       |
  890|       |  /* configure the subsystems */
  891|  1.22M|  switch (param) {
  892|   289k|    case SBR_SYSTEM_BITSTREAM_DELAY:
  ------------------
  |  Branch (892:5): [True: 289k, False: 930k]
  ------------------
  893|   289k|      if (value < 0 || value > (1)) {
  ------------------
  |  Branch (893:11): [True: 0, False: 289k]
  |  Branch (893:24): [True: 0, False: 289k]
  ------------------
  894|      0|        errorStatus = SBRDEC_SET_PARAM_FAIL;
  895|      0|        break;
  896|      0|      }
  897|   289k|      if (self == NULL) {
  ------------------
  |  Branch (897:11): [True: 0, False: 289k]
  ------------------
  898|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  899|   289k|      } else {
  900|   289k|        self->numDelayFrames = (UCHAR)value;
  901|   289k|      }
  902|   289k|      break;
  903|   382k|    case SBR_QMF_MODE:
  ------------------
  |  Branch (903:5): [True: 382k, False: 837k]
  ------------------
  904|   382k|      if (self == NULL) {
  ------------------
  |  Branch (904:11): [True: 0, False: 382k]
  ------------------
  905|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  906|   382k|      } else {
  907|   382k|        if (value == 1) {
  ------------------
  |  Branch (907:13): [True: 110k, False: 272k]
  ------------------
  908|   110k|          self->flags |= SBRDEC_LOW_POWER;
  ------------------
  |  |  211|   110k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  909|   272k|        } else {
  910|   272k|          self->flags &= ~SBRDEC_LOW_POWER;
  ------------------
  |  |  211|   272k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  911|   272k|        }
  912|   382k|      }
  913|   382k|      break;
  914|  34.7k|    case SBR_LD_QMF_TIME_ALIGN:
  ------------------
  |  Branch (914:5): [True: 34.7k, False: 1.18M]
  ------------------
  915|  34.7k|      if (self == NULL) {
  ------------------
  |  Branch (915:11): [True: 0, False: 34.7k]
  ------------------
  916|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  917|  34.7k|      } else {
  918|  34.7k|        if (value == 1) {
  ------------------
  |  Branch (918:13): [True: 1.62k, False: 33.1k]
  ------------------
  919|  1.62k|          self->flags |= SBRDEC_LD_MPS_QMF;
  ------------------
  |  |  220|  1.62k|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  920|  33.1k|        } else {
  921|  33.1k|          self->flags &= ~SBRDEC_LD_MPS_QMF;
  ------------------
  |  |  220|  33.1k|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  922|  33.1k|        }
  923|  34.7k|      }
  924|  34.7k|      break;
  925|   253k|    case SBR_FLUSH_DATA:
  ------------------
  |  Branch (925:5): [True: 253k, False: 967k]
  ------------------
  926|   253k|      if (value != 0) {
  ------------------
  |  Branch (926:11): [True: 24, False: 253k]
  ------------------
  927|     24|        if (self == NULL) {
  ------------------
  |  Branch (927:13): [True: 0, False: 24]
  ------------------
  928|      0|          errorStatus = SBRDEC_NOT_INITIALIZED;
  929|     24|        } else {
  930|     24|          self->flags |= SBRDEC_FLUSH;
  ------------------
  |  |  229|     24|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
  931|     24|        }
  932|     24|      }
  933|   253k|      break;
  934|      0|    case SBR_CLEAR_HISTORY:
  ------------------
  |  Branch (934:5): [True: 0, False: 1.22M]
  ------------------
  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|  6.41k|    case SBR_BS_INTERRUPTION: {
  ------------------
  |  Branch (943:5): [True: 6.41k, False: 1.21M]
  ------------------
  944|  6.41k|      int elementIndex;
  945|       |
  946|  6.41k|      if (self == NULL) {
  ------------------
  |  Branch (946:11): [True: 0, False: 6.41k]
  ------------------
  947|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  948|      0|        break;
  949|      0|      }
  950|       |
  951|       |      /* Loop over SBR elements */
  952|  11.8k|      for (elementIndex = 0; elementIndex < self->numSbrElements;
  ------------------
  |  Branch (952:30): [True: 5.38k, False: 6.41k]
  ------------------
  953|  6.41k|           elementIndex++) {
  954|  5.38k|        if (self->pSbrElement[elementIndex] != NULL) {
  ------------------
  |  Branch (954:13): [True: 5.38k, False: 7]
  ------------------
  955|  5.38k|          HANDLE_SBR_HEADER_DATA hSbrHeader;
  956|  5.38k|          int headerIndex =
  957|  5.38k|              getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  958|  5.38k|                            self->pSbrElement[elementIndex]->useHeaderSlot);
  959|       |
  960|  5.38k|          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|  5.38k|          if (hSbrHeader->syncState != SBR_NOT_INITIALIZED) {
  ------------------
  |  Branch (964:15): [True: 5.28k, False: 93]
  ------------------
  965|  5.28k|            hSbrHeader->syncState = UPSAMPLING;
  966|  5.28k|            hSbrHeader->status |= SBRDEC_HDR_STAT_UPDATE;
  ------------------
  |  |  240|  5.28k|#define SBRDEC_HDR_STAT_UPDATE 2
  ------------------
  967|  5.28k|          }
  968|  5.38k|        }
  969|  5.38k|      }
  970|  6.41k|    } break;
  971|       |
  972|   253k|    case SBR_SKIP_QMF:
  ------------------
  |  Branch (972:5): [True: 253k, False: 967k]
  ------------------
  973|   253k|      if (self == NULL) {
  ------------------
  |  Branch (973:11): [True: 0, False: 253k]
  ------------------
  974|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  975|   253k|      } else {
  976|   253k|        if (value == 1) {
  ------------------
  |  Branch (976:13): [True: 12.2k, False: 241k]
  ------------------
  977|  12.2k|          self->flags |= SBRDEC_SKIP_QMF_ANA;
  ------------------
  |  |  233|  12.2k|  (1 << 21) /* Flag indicating that the input data is provided in the QMF \
  ------------------
  978|   241k|        } else {
  979|   241k|          self->flags &= ~SBRDEC_SKIP_QMF_ANA;
  ------------------
  |  |  233|   241k|  (1 << 21) /* Flag indicating that the input data is provided in the QMF \
  ------------------
  980|   241k|        }
  981|   253k|        if (value == 2) {
  ------------------
  |  Branch (981:13): [True: 110k, False: 143k]
  ------------------
  982|   110k|          self->flags |= SBRDEC_SKIP_QMF_SYN;
  ------------------
  |  |  236|   110k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  983|   143k|        } else {
  984|   143k|          self->flags &= ~SBRDEC_SKIP_QMF_SYN;
  ------------------
  |  |  236|   143k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  985|   143k|        }
  986|   253k|      }
  987|   253k|      break;
  988|      0|    default:
  ------------------
  |  Branch (988:5): [True: 0, False: 1.22M]
  ------------------
  989|      0|      errorStatus = SBRDEC_SET_PARAM_FAIL;
  990|      0|      break;
  991|  1.22M|  } /* switch(param) */
  992|       |
  993|  1.22M|  return (errorStatus);
  994|  1.22M|}
sbrDecoder_drcFeedChannel:
 1056|   173k|                                    UCHAR winSequence, USHORT *pBandTop) {
 1057|   173k|  SBRDEC_DRC_CHANNEL *pSbrDrcChannelData = NULL;
 1058|   173k|  int band, isValidData = 0;
 1059|       |
 1060|   173k|  if (self == NULL) {
  ------------------
  |  Branch (1060:7): [True: 0, False: 173k]
  ------------------
 1061|      0|    return SBRDEC_NOT_INITIALIZED;
 1062|      0|  }
 1063|   173k|  if (ch > (8) || pNextFact_mag == NULL) {
  ------------------
  |  Branch (1063:7): [True: 0, False: 173k]
  |  Branch (1063:19): [True: 0, False: 173k]
  ------------------
 1064|      0|    return SBRDEC_SET_PARAM_FAIL;
 1065|      0|  }
 1066|       |
 1067|       |  /* Search for gain values different to 1.0f */
 1068|   338k|  for (band = 0; band < (int)numBands; band += 1) {
  ------------------
  |  Branch (1068:18): [True: 176k, False: 162k]
  ------------------
 1069|   176k|    if (!((pNextFact_mag[band] == FL2FXCONST_DBL(0.5)) &&
  ------------------
  |  |  192|   176k|  (FIXP_DBL)(                                                                \
  |  |  193|   176k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 176k, Folded]
  |  |  ------------------
  |  |  194|   176k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   176k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   176k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 176k]
  |  |  ------------------
  |  |  195|   176k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   176k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   176k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   176k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   176k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   176k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   176k|          : ((((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 (1069:11): [True: 165k, False: 10.9k]
  ------------------
 1070|   165k|          (nextFact_exp == 1)) &&
  ------------------
  |  Branch (1070:11): [True: 165k, False: 0]
  ------------------
 1071|  10.9k|        !((pNextFact_mag[band] == (FIXP_DBL)MAXVAL_DBL) &&
  ------------------
  |  |  156|  10.9k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (1071:11): [True: 0, False: 10.9k]
  ------------------
 1072|  10.9k|          (nextFact_exp == 0))) {
  ------------------
  |  Branch (1072:11): [True: 0, False: 0]
  ------------------
 1073|  10.9k|      isValidData = 1;
 1074|  10.9k|      break;
 1075|  10.9k|    }
 1076|   176k|  }
 1077|       |
 1078|       |  /* Find the right SBR channel */
 1079|   173k|  pSbrDrcChannelData = sbrDecoder_drcGetChannel(self, ch);
 1080|       |
 1081|   173k|  if (pSbrDrcChannelData != NULL) {
  ------------------
  |  Branch (1081:7): [True: 172k, False: 299]
  ------------------
 1082|   172k|    if (pSbrDrcChannelData->enable ||
  ------------------
  |  Branch (1082:9): [True: 12.4k, False: 160k]
  ------------------
 1083|   160k|        isValidData) { /* Activate processing only with real and valid data */
  ------------------
  |  Branch (1083:9): [True: 1.70k, False: 158k]
  ------------------
 1084|  14.1k|      int i;
 1085|       |
 1086|  14.1k|      pSbrDrcChannelData->enable = 1;
 1087|  14.1k|      pSbrDrcChannelData->numBandsNext = numBands;
 1088|       |
 1089|  14.1k|      pSbrDrcChannelData->winSequenceNext = winSequence;
 1090|  14.1k|      pSbrDrcChannelData->drcInterpolationSchemeNext = drcInterpolationScheme;
 1091|  14.1k|      pSbrDrcChannelData->nextFact_exp = nextFact_exp;
 1092|       |
 1093|  68.2k|      for (i = 0; i < (int)numBands; i++) {
  ------------------
  |  Branch (1093:19): [True: 54.1k, False: 14.1k]
  ------------------
 1094|  54.1k|        pSbrDrcChannelData->bandTopNext[i] = pBandTop[i];
 1095|  54.1k|        pSbrDrcChannelData->nextFact_mag[i] = pNextFact_mag[i];
 1096|  54.1k|      }
 1097|  14.1k|    }
 1098|   172k|  }
 1099|       |
 1100|   173k|  return SBRDEC_OK;
 1101|   173k|}
sbrDecoder_drcDisable:
 1103|   296k|void sbrDecoder_drcDisable(HANDLE_SBRDECODER self, INT ch) {
 1104|   296k|  SBRDEC_DRC_CHANNEL *pSbrDrcChannelData = NULL;
 1105|       |
 1106|   296k|  if ((self == NULL) || (ch > (8)) || (self->numSbrElements == 0) ||
  ------------------
  |  Branch (1106:7): [True: 0, False: 296k]
  |  Branch (1106:25): [True: 0, False: 296k]
  |  Branch (1106:39): [True: 33.0k, False: 263k]
  ------------------
 1107|   263k|      (self->numSbrChannels == 0)) {
  ------------------
  |  Branch (1107:7): [True: 0, False: 263k]
  ------------------
 1108|  33.0k|    return;
 1109|  33.0k|  }
 1110|       |
 1111|       |  /* Find the right SBR channel */
 1112|   263k|  pSbrDrcChannelData = sbrDecoder_drcGetChannel(self, ch);
 1113|       |
 1114|   263k|  if (pSbrDrcChannelData != NULL) {
  ------------------
  |  Branch (1114:7): [True: 259k, False: 3.69k]
  ------------------
 1115|   259k|    sbrDecoder_drcInitChannel(pSbrDrcChannelData);
 1116|   259k|  }
 1117|   263k|}
sbrDecoder_Parse:
 1123|   309k|                           UINT acFlags, UINT acElFlags[]) {
 1124|   309k|  SBR_DECODER_ELEMENT *hSbrElement = NULL;
 1125|   309k|  HANDLE_SBR_HEADER_DATA hSbrHeader = NULL;
 1126|   309k|  HANDLE_SBR_CHANNEL *pSbrChannel;
 1127|       |
 1128|   309k|  SBR_FRAME_DATA *hFrameDataLeft = NULL;
 1129|   309k|  SBR_FRAME_DATA *hFrameDataRight = NULL;
 1130|   309k|  SBR_FRAME_DATA frameDataLeftCopy;
 1131|   309k|  SBR_FRAME_DATA frameDataRightCopy;
 1132|       |
 1133|   309k|  SBR_ERROR errorStatus = SBRDEC_OK;
 1134|   309k|  SBR_HEADER_STATUS headerStatus = HEADER_NOT_PRESENT;
 1135|       |
 1136|   309k|  INT startPos = FDKgetValidBits(hBs);
 1137|   309k|  FDK_CRCINFO crcInfo;
 1138|   309k|  INT crcReg = 0;
 1139|   309k|  USHORT sbrCrc = 0;
 1140|   309k|  UINT crcPoly;
 1141|   309k|  UINT crcStartValue = 0;
 1142|   309k|  UINT crcLen;
 1143|       |
 1144|   309k|  HANDLE_FDK_BITSTREAM hBsOriginal = hBs;
 1145|   309k|  FDK_BITSTREAM bsBwd;
 1146|       |
 1147|   309k|  const int fGlobalIndependencyFlag = acFlags & AC_INDEP;
  ------------------
  |  |  319|   309k|#define AC_INDEP 0x100000     /*!< Independency flag */
  ------------------
 1148|   309k|  const int bs_pvc = acElFlags[elementIndex] & AC_EL_USAC_PVC;
  ------------------
  |  |  347|   309k|  0x000008 /*!< USAC SBR predictive vector coding tool is active */
  ------------------
 1149|   309k|  const int bs_interTes = acElFlags[elementIndex] & AC_EL_USAC_ITES;
  ------------------
  |  |  345|   309k|#define AC_EL_USAC_ITES 0x000004  /*!< USAC SBR inter-TES tool is active */
  ------------------
 1150|   309k|  int stereo;
 1151|   309k|  int fDoDecodeSbrData = 1;
 1152|   309k|  int alignBits = 0;
 1153|       |
 1154|   309k|  int lastSlot, lastHdrSlot = 0, thisHdrSlot = 0;
 1155|       |
 1156|   309k|  if (*count <= 0) {
  ------------------
  |  Branch (1156:7): [True: 46.5k, False: 262k]
  ------------------
 1157|  46.5k|    setFrameErrorFlag(self->pSbrElement[elementIndex], FRAME_ERROR);
  ------------------
  |  |  118|  46.5k|#define FRAME_ERROR (1)
  ------------------
 1158|  46.5k|    return SBRDEC_OK;
 1159|  46.5k|  }
 1160|       |
 1161|       |  /* SBR sanity checks */
 1162|   262k|  if (self == NULL) {
  ------------------
  |  Branch (1162:7): [True: 0, False: 262k]
  ------------------
 1163|      0|    errorStatus = SBRDEC_NOT_INITIALIZED;
 1164|      0|    goto bail;
 1165|      0|  }
 1166|       |
 1167|       |  /* Reverse bits of DRM SBR payload */
 1168|   262k|  if ((self->flags & SBRDEC_SYNTAX_DRM) && *count > 0) {
  ------------------
  |  |  224|   262k|  2048 /* Flag indicating that DRM30/DRM+ reverse syntax is being used. */
  ------------------
  |  Branch (1168:7): [True: 0, False: 262k]
  |  Branch (1168:44): [True: 0, False: 0]
  ------------------
 1169|      0|    int dataBytes, dataBits;
 1170|       |
 1171|      0|    FDK_ASSERT(drmBsBufferSize >= (512));
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1171:5): [True: 0, False: 0]
  ------------------
 1172|      0|    dataBits = *count;
 1173|       |
 1174|      0|    if (dataBits > ((512) * 8)) {
  ------------------
  |  Branch (1174:9): [True: 0, False: 0]
  ------------------
 1175|       |      /* do not flip more data than needed */
 1176|      0|      dataBits = (512) * 8;
 1177|      0|    }
 1178|       |
 1179|      0|    dataBytes = (dataBits + 7) >> 3;
 1180|       |
 1181|      0|    int j;
 1182|       |
 1183|      0|    if ((j = (int)FDKgetValidBits(hBs)) != 8) {
  ------------------
  |  Branch (1183:9): [True: 0, False: 0]
  ------------------
 1184|      0|      FDKpushBiDirectional(hBs, (j - 8));
 1185|      0|    }
 1186|       |
 1187|      0|    j = 0;
 1188|      0|    for (; dataBytes > 0; dataBytes--) {
  ------------------
  |  Branch (1188:12): [True: 0, False: 0]
  ------------------
 1189|      0|      int i;
 1190|      0|      UCHAR tmpByte;
 1191|      0|      UCHAR buffer = 0x00;
 1192|       |
 1193|      0|      tmpByte = (UCHAR)FDKreadBits(hBs, 8);
 1194|      0|      for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1194:19): [True: 0, False: 0]
  ------------------
 1195|      0|        int shift = 2 * i + 1;
 1196|      0|        buffer |= (tmpByte & (0x08 >> i)) << shift;
 1197|      0|        buffer |= (tmpByte & (0x10 << i)) >> shift;
 1198|      0|      }
 1199|      0|      pDrmBsBuffer[j++] = buffer;
 1200|      0|      FDKpushBack(hBs, 16);
 1201|      0|    }
 1202|       |
 1203|      0|    FDKinitBitStream(&bsBwd, pDrmBsBuffer, (512), dataBits, BS_READER);
 1204|       |
 1205|       |    /* Use reversed data */
 1206|      0|    hBs = &bsBwd;
 1207|      0|    bsPayLen = *count;
 1208|      0|  }
 1209|       |
 1210|       |  /* Remember start position of  SBR element */
 1211|   262k|  startPos = FDKgetValidBits(hBs);
 1212|       |
 1213|       |  /* SBR sanity checks */
 1214|   262k|  if (self->pSbrElement[elementIndex] == NULL) {
  ------------------
  |  Branch (1214:7): [True: 0, False: 262k]
  ------------------
 1215|      0|    errorStatus = SBRDEC_NOT_INITIALIZED;
 1216|      0|    goto bail;
 1217|      0|  }
 1218|   262k|  hSbrElement = self->pSbrElement[elementIndex];
 1219|       |
 1220|   262k|  lastSlot = (hSbrElement->useFrameSlot > 0) ? hSbrElement->useFrameSlot - 1
  ------------------
  |  Branch (1220:14): [True: 14.3k, False: 248k]
  ------------------
 1221|   262k|                                             : self->numDelayFrames;
 1222|   262k|  lastHdrSlot = hSbrElement->useHeaderSlot[lastSlot];
 1223|   262k|  thisHdrSlot = getHeaderSlot(
 1224|   262k|      hSbrElement->useFrameSlot,
 1225|   262k|      hSbrElement->useHeaderSlot); /* Get a free header slot not used by
 1226|       |                                      frames not processed yet. */
 1227|       |
 1228|       |  /* Assign the free slot to store a new header if there is one. */
 1229|   262k|  hSbrHeader = &self->sbrHeader[elementIndex][thisHdrSlot];
 1230|       |
 1231|   262k|  pSbrChannel = hSbrElement->pSbrChannel;
 1232|   262k|  stereo = (hSbrElement->elementID == ID_CPE) ? 1 : 0;
  ------------------
  |  Branch (1232:12): [True: 99.6k, False: 163k]
  ------------------
 1233|       |
 1234|   262k|  hFrameDataLeft = &self->pSbrElement[elementIndex]
 1235|   262k|                        ->pSbrChannel[0]
 1236|   262k|                        ->frameData[hSbrElement->useFrameSlot];
 1237|   262k|  if (stereo) {
  ------------------
  |  Branch (1237:7): [True: 99.6k, False: 163k]
  ------------------
 1238|  99.6k|    hFrameDataRight = &self->pSbrElement[elementIndex]
 1239|  99.6k|                           ->pSbrChannel[1]
 1240|  99.6k|                           ->frameData[hSbrElement->useFrameSlot];
 1241|  99.6k|  }
 1242|       |
 1243|       |  /* store frameData; new parsed frameData possibly corrupted */
 1244|   262k|  FDKmemcpy(&frameDataLeftCopy, hFrameDataLeft, sizeof(SBR_FRAME_DATA));
 1245|   262k|  if (stereo) {
  ------------------
  |  Branch (1245:7): [True: 99.6k, False: 163k]
  ------------------
 1246|  99.6k|    FDKmemcpy(&frameDataRightCopy, hFrameDataRight, sizeof(SBR_FRAME_DATA));
 1247|  99.6k|  }
 1248|       |
 1249|       |  /* reset PS flag; will be set after PS was found */
 1250|   262k|  self->flags &= ~SBRDEC_PS_DECODED;
  ------------------
  |  |  213|   262k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
 1251|       |
 1252|   262k|  if (hSbrHeader->status & SBRDEC_HDR_STAT_UPDATE) {
  ------------------
  |  |  240|   262k|#define SBRDEC_HDR_STAT_UPDATE 2
  ------------------
  |  Branch (1252:7): [True: 22.1k, False: 240k]
  ------------------
 1253|       |    /* Got a new header from extern (e.g. from an ASC) */
 1254|  22.1k|    headerStatus = HEADER_OK;
 1255|  22.1k|    hSbrHeader->status &= ~SBRDEC_HDR_STAT_UPDATE;
  ------------------
  |  |  240|  22.1k|#define SBRDEC_HDR_STAT_UPDATE 2
  ------------------
 1256|   240k|  } else if (thisHdrSlot != lastHdrSlot) {
  ------------------
  |  Branch (1256:14): [True: 30.7k, False: 209k]
  ------------------
 1257|       |    /* Copy the last header into this slot otherwise the
 1258|       |       header compare will trigger more HEADER_RESETs than needed. */
 1259|  30.7k|    copySbrHeader(hSbrHeader, &self->sbrHeader[elementIndex][lastHdrSlot]);
 1260|  30.7k|  }
 1261|       |
 1262|       |  /*
 1263|       |     Check if bit stream data is valid and matches the element context
 1264|       |  */
 1265|   262k|  if (((prevElement != ID_SCE) && (prevElement != ID_CPE)) ||
  ------------------
  |  Branch (1265:8): [True: 101k, False: 161k]
  |  Branch (1265:35): [True: 1.57k, False: 99.6k]
  ------------------
 1266|   261k|      prevElement != hSbrElement->elementID) {
  ------------------
  |  Branch (1266:7): [True: 0, False: 261k]
  ------------------
 1267|       |    /* In case of LFE we also land here, since there is no LFE SBR element (do
 1268|       |     * upsampling only) */
 1269|  1.57k|    fDoDecodeSbrData = 0;
 1270|  1.57k|  }
 1271|       |
 1272|   262k|  if (fDoDecodeSbrData) {
  ------------------
  |  Branch (1272:7): [True: 261k, False: 1.57k]
  ------------------
 1273|   261k|    if ((INT)FDKgetValidBits(hBs) <= 0) {
  ------------------
  |  Branch (1273:9): [True: 9, False: 261k]
  ------------------
 1274|      9|      fDoDecodeSbrData = 0;
 1275|      9|    }
 1276|   261k|  }
 1277|       |
 1278|       |  /*
 1279|       |     SBR CRC-check
 1280|       |  */
 1281|   262k|  if (fDoDecodeSbrData) {
  ------------------
  |  Branch (1281:7): [True: 261k, False: 1.58k]
  ------------------
 1282|   261k|    if (crcFlag) {
  ------------------
  |  Branch (1282:9): [True: 28.7k, False: 232k]
  ------------------
 1283|  28.7k|      switch (self->coreCodec) {
 1284|      0|        case AOT_DRM_AAC:
  ------------------
  |  Branch (1284:9): [True: 0, False: 28.7k]
  ------------------
 1285|      0|        case AOT_DRM_SURROUND:
  ------------------
  |  Branch (1285:9): [True: 0, False: 28.7k]
  ------------------
 1286|      0|          crcPoly = 0x001d;
 1287|      0|          crcLen = 8;
 1288|      0|          crcStartValue = 0x000000ff;
 1289|      0|          break;
 1290|  28.7k|        default:
  ------------------
  |  Branch (1290:9): [True: 28.7k, False: 0]
  ------------------
 1291|  28.7k|          crcPoly = 0x0633;
 1292|  28.7k|          crcLen = 10;
 1293|  28.7k|          crcStartValue = 0x00000000;
 1294|  28.7k|          break;
 1295|  28.7k|      }
 1296|  28.7k|      sbrCrc = (USHORT)FDKreadBits(hBs, crcLen);
 1297|       |      /* Setup CRC decoder */
 1298|  28.7k|      FDKcrcInit(&crcInfo, crcPoly, crcStartValue, crcLen);
 1299|       |      /* Start CRC region */
 1300|  28.7k|      crcReg = FDKcrcStartReg(&crcInfo, hBs, 0);
 1301|  28.7k|    }
 1302|   261k|  } /* if (fDoDecodeSbrData) */
 1303|       |
 1304|       |  /*
 1305|       |     Read in the header data and issue a reset if change occured
 1306|       |  */
 1307|   262k|  if (fDoDecodeSbrData) {
  ------------------
  |  Branch (1307:7): [True: 261k, False: 1.58k]
  ------------------
 1308|   261k|    int sbrHeaderPresent;
 1309|       |
 1310|   261k|    if (self->flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) {
  ------------------
  |  |  207|   261k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                  if (self->flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) {
  ------------------
  |  |  206|   261k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (1310:9): [True: 186k, False: 74.4k]
  ------------------
 1311|   186k|      SBR_HEADER_DATA_BS_INFO newSbrInfo;
 1312|   186k|      int sbrInfoPresent;
 1313|       |
 1314|   186k|      if (bs_interTes) {
  ------------------
  |  Branch (1314:11): [True: 59.0k, False: 127k]
  ------------------
 1315|  59.0k|        self->flags |= SBRDEC_USAC_ITES;
  ------------------
  |  |  222|  59.0k|  1024 /* Flag indicating that USAC inter TES tool is active. */
  ------------------
 1316|   127k|      } else {
 1317|   127k|        self->flags &= ~SBRDEC_USAC_ITES;
  ------------------
  |  |  222|   127k|  1024 /* Flag indicating that USAC inter TES tool is active. */
  ------------------
 1318|   127k|      }
 1319|       |
 1320|   186k|      if (fGlobalIndependencyFlag) {
  ------------------
  |  Branch (1320:11): [True: 148k, False: 38.5k]
  ------------------
 1321|   148k|        self->flags |= SBRDEC_USAC_INDEP;
  ------------------
  |  |  209|   148k|  16 /* Flag indicating that USAC global independency flag is active. */
  ------------------
 1322|   148k|        sbrInfoPresent = 1;
 1323|   148k|        sbrHeaderPresent = 1;
 1324|   148k|      } else {
 1325|  38.5k|        self->flags &= ~SBRDEC_USAC_INDEP;
  ------------------
  |  |  209|  38.5k|  16 /* Flag indicating that USAC global independency flag is active. */
  ------------------
 1326|  38.5k|        sbrInfoPresent = FDKreadBit(hBs);
 1327|  38.5k|        if (sbrInfoPresent) {
  ------------------
  |  Branch (1327:13): [True: 5.69k, False: 32.8k]
  ------------------
 1328|  5.69k|          sbrHeaderPresent = FDKreadBit(hBs);
 1329|  32.8k|        } else {
 1330|  32.8k|          sbrHeaderPresent = 0;
 1331|  32.8k|        }
 1332|  38.5k|      }
 1333|       |
 1334|   186k|      if (sbrInfoPresent) {
  ------------------
  |  Branch (1334:11): [True: 153k, False: 32.8k]
  ------------------
 1335|   153k|        newSbrInfo.ampResolution = FDKreadBit(hBs);
 1336|   153k|        newSbrInfo.xover_band = FDKreadBits(hBs, 4);
 1337|   153k|        newSbrInfo.sbr_preprocessing = FDKreadBit(hBs);
 1338|   153k|        if (bs_pvc) {
  ------------------
  |  Branch (1338:13): [True: 95.3k, False: 58.5k]
  ------------------
 1339|  95.3k|          newSbrInfo.pvc_mode = FDKreadBits(hBs, 2);
 1340|       |          /* bs_pvc_mode: 0 -> no PVC, 1 -> PVC mode 1, 2 -> PVC mode 2, 3 ->
 1341|       |           * reserved */
 1342|  95.3k|          if (newSbrInfo.pvc_mode > 2) {
  ------------------
  |  Branch (1342:15): [True: 7.55k, False: 87.7k]
  ------------------
 1343|  7.55k|            headerStatus = HEADER_ERROR;
 1344|  7.55k|          }
 1345|  95.3k|          if (stereo && newSbrInfo.pvc_mode > 0) {
  ------------------
  |  Branch (1345:15): [True: 11.1k, False: 84.1k]
  |  Branch (1345:25): [True: 8.61k, False: 2.55k]
  ------------------
 1346|       |            /* bs_pvc is always transmitted but pvc_mode is set to zero in case
 1347|       |             * of stereo SBR. The config might be wrong but we cannot tell for
 1348|       |             * sure. */
 1349|  8.61k|            newSbrInfo.pvc_mode = 0;
 1350|  8.61k|          }
 1351|  95.3k|        } else {
 1352|  58.5k|          newSbrInfo.pvc_mode = 0;
 1353|  58.5k|        }
 1354|   153k|        if (headerStatus != HEADER_ERROR) {
  ------------------
  |  Branch (1354:13): [True: 146k, False: 7.55k]
  ------------------
 1355|   146k|          if (FDKmemcmp(&hSbrHeader->bs_info, &newSbrInfo,
  ------------------
  |  Branch (1355:15): [True: 55.9k, False: 90.3k]
  ------------------
 1356|   146k|                        sizeof(SBR_HEADER_DATA_BS_INFO))) {
 1357|       |            /* in case of ampResolution and preprocessing change no full reset
 1358|       |             * required    */
 1359|       |            /* HEADER reset would trigger HBE transposer reset which breaks
 1360|       |             * eSbr_3_Eaa.mp4 */
 1361|  55.9k|            if ((hSbrHeader->bs_info.pvc_mode != newSbrInfo.pvc_mode) ||
  ------------------
  |  Branch (1361:17): [True: 14.8k, False: 41.1k]
  ------------------
 1362|  48.0k|                (hSbrHeader->bs_info.xover_band != newSbrInfo.xover_band)) {
  ------------------
  |  Branch (1362:17): [True: 33.2k, False: 7.97k]
  ------------------
 1363|  48.0k|              headerStatus = HEADER_RESET;
 1364|  48.0k|            } else {
 1365|  7.97k|              headerStatus = HEADER_OK;
 1366|  7.97k|            }
 1367|       |
 1368|  55.9k|            hSbrHeader->bs_info = newSbrInfo;
 1369|  90.3k|          } else {
 1370|  90.3k|            headerStatus = HEADER_OK;
 1371|  90.3k|          }
 1372|   146k|        }
 1373|   153k|      }
 1374|   186k|      if (headerStatus == HEADER_ERROR) {
  ------------------
  |  Branch (1374:11): [True: 7.55k, False: 179k]
  ------------------
 1375|       |        /* Corrupt SBR info data, do not decode and switch to UPSAMPLING */
 1376|  7.55k|        hSbrHeader->syncState = hSbrHeader->syncState > UPSAMPLING
  ------------------
  |  Branch (1376:33): [True: 3.14k, False: 4.41k]
  ------------------
 1377|  7.55k|                                    ? UPSAMPLING
 1378|  7.55k|                                    : hSbrHeader->syncState;
 1379|  7.55k|        fDoDecodeSbrData = 0;
 1380|  7.55k|        sbrHeaderPresent = 0;
 1381|  7.55k|      }
 1382|       |
 1383|   186k|      if (sbrHeaderPresent && fDoDecodeSbrData) {
  ------------------
  |  Branch (1383:11): [True: 144k, False: 41.7k]
  |  Branch (1383:31): [True: 144k, False: 0]
  ------------------
 1384|   144k|        int useDfltHeader;
 1385|       |
 1386|   144k|        useDfltHeader = FDKreadBit(hBs);
 1387|       |
 1388|   144k|        if (useDfltHeader) {
  ------------------
  |  Branch (1388:13): [True: 85.2k, False: 59.6k]
  ------------------
 1389|  85.2k|          sbrHeaderPresent = 0;
 1390|  85.2k|          if (FDKmemcmp(&hSbrHeader->bs_data, &hSbrHeader->bs_dflt,
  ------------------
  |  Branch (1390:15): [True: 16.2k, False: 69.0k]
  ------------------
 1391|  85.2k|                        sizeof(SBR_HEADER_DATA_BS)) ||
 1392|  69.0k|              hSbrHeader->syncState != SBR_ACTIVE) {
  ------------------
  |  Branch (1392:15): [True: 2.54k, False: 66.4k]
  ------------------
 1393|  18.7k|            hSbrHeader->bs_data = hSbrHeader->bs_dflt;
 1394|  18.7k|            headerStatus = HEADER_RESET;
 1395|  18.7k|          }
 1396|  85.2k|        }
 1397|   144k|      }
 1398|   186k|    } else {
 1399|  74.4k|      sbrHeaderPresent = FDKreadBit(hBs);
 1400|  74.4k|    }
 1401|       |
 1402|   261k|    if (sbrHeaderPresent) {
  ------------------
  |  Branch (1402:9): [True: 102k, False: 158k]
  ------------------
 1403|   102k|      headerStatus = sbrGetHeaderData(hSbrHeader, hBs, self->flags, 1, 0);
 1404|   102k|    }
 1405|       |
 1406|   261k|    if (headerStatus == HEADER_RESET) {
  ------------------
  |  Branch (1406:9): [True: 99.1k, False: 161k]
  ------------------
 1407|  99.1k|      errorStatus = sbrDecoder_HeaderUpdate(
 1408|  99.1k|          self, hSbrHeader, headerStatus, pSbrChannel, hSbrElement->nChannels);
 1409|       |
 1410|  99.1k|      if (errorStatus == SBRDEC_OK) {
  ------------------
  |  Branch (1410:11): [True: 76.8k, False: 22.3k]
  ------------------
 1411|  76.8k|        hSbrHeader->syncState = SBR_HEADER;
 1412|  76.8k|      } else {
 1413|  22.3k|        hSbrHeader->syncState = SBR_NOT_INITIALIZED;
 1414|  22.3k|        headerStatus = HEADER_ERROR;
 1415|  22.3k|      }
 1416|  99.1k|    }
 1417|       |
 1418|   261k|    if (errorStatus != SBRDEC_OK) {
  ------------------
  |  Branch (1418:9): [True: 22.3k, False: 238k]
  ------------------
 1419|  22.3k|      fDoDecodeSbrData = 0;
 1420|  22.3k|    }
 1421|   261k|  } /* if (fDoDecodeSbrData) */
 1422|       |
 1423|       |  /*
 1424|       |    Print debugging output only if state has changed
 1425|       |  */
 1426|       |
 1427|       |  /* read frame data */
 1428|   262k|  if ((hSbrHeader->syncState >= SBR_HEADER) && fDoDecodeSbrData) {
  ------------------
  |  Branch (1428:7): [True: 225k, False: 36.7k]
  |  Branch (1428:48): [True: 225k, False: 8]
  ------------------
 1429|   225k|    int sbrFrameOk;
 1430|       |    /* read the SBR element data */
 1431|   225k|    if (!stereo && (self->hParametricStereoDec != NULL)) {
  ------------------
  |  Branch (1431:9): [True: 140k, False: 85.8k]
  |  Branch (1431:20): [True: 18.6k, False: 121k]
  ------------------
 1432|       |      /* update slot index for PS bitstream parsing */
 1433|  18.6k|      self->hParametricStereoDec->bsLastSlot =
 1434|  18.6k|          self->hParametricStereoDec->bsReadSlot;
 1435|  18.6k|      self->hParametricStereoDec->bsReadSlot = hSbrElement->useFrameSlot;
 1436|  18.6k|    }
 1437|   225k|    sbrFrameOk = sbrGetChannelElement(
 1438|   225k|        hSbrHeader, hFrameDataLeft, (stereo) ? hFrameDataRight : NULL,
  ------------------
  |  Branch (1438:37): [True: 85.8k, False: 140k]
  ------------------
 1439|   225k|        &pSbrChannel[0]->prevFrameData,
 1440|   225k|        pSbrChannel[0]->SbrDec.PvcStaticData.pvc_mode_last, hBs,
 1441|   225k|        (stereo) ? NULL : self->hParametricStereoDec, self->flags,
  ------------------
  |  Branch (1441:9): [True: 85.8k, False: 140k]
  ------------------
 1442|   225k|        self->pSbrElement[elementIndex]->transposerSettings.overlap);
 1443|       |
 1444|   225k|    if (!sbrFrameOk) {
  ------------------
  |  Branch (1444:9): [True: 16.6k, False: 209k]
  ------------------
 1445|  16.6k|      fDoDecodeSbrData = 0;
 1446|   209k|    } else {
 1447|   209k|      INT valBits;
 1448|       |
 1449|   209k|      if (bsPayLen > 0) {
  ------------------
  |  Branch (1449:11): [True: 21.9k, False: 187k]
  ------------------
 1450|  21.9k|        valBits = bsPayLen - ((INT)startPos - (INT)FDKgetValidBits(hBs));
 1451|   187k|      } else {
 1452|   187k|        valBits = (INT)FDKgetValidBits(hBs);
 1453|   187k|      }
 1454|       |
 1455|       |      /* sanity check of remaining bits */
 1456|   209k|      if (valBits < 0) {
  ------------------
  |  Branch (1456:11): [True: 21.8k, False: 187k]
  ------------------
 1457|  21.8k|        fDoDecodeSbrData = 0;
 1458|   187k|      } else {
 1459|   187k|        switch (self->coreCodec) {
 1460|      0|          case AOT_SBR:
  ------------------
  |  Branch (1460:11): [True: 0, False: 187k]
  ------------------
 1461|      0|          case AOT_PS:
  ------------------
  |  Branch (1461:11): [True: 0, False: 187k]
  ------------------
 1462|  2.40k|          case AOT_AAC_LC: {
  ------------------
  |  Branch (1462:11): [True: 2.40k, False: 185k]
  ------------------
 1463|       |            /* This sanity check is only meaningful with General Audio
 1464|       |             * bitstreams */
 1465|  2.40k|            alignBits = valBits & 0x7;
 1466|       |
 1467|  2.40k|            if (valBits > alignBits) {
  ------------------
  |  Branch (1467:17): [True: 308, False: 2.09k]
  ------------------
 1468|    308|              fDoDecodeSbrData = 0;
 1469|    308|            }
 1470|  2.40k|          } break;
 1471|   185k|          default:
  ------------------
  |  Branch (1471:11): [True: 185k, False: 2.40k]
  ------------------
 1472|       |            /* No sanity check available */
 1473|   185k|            break;
 1474|   187k|        }
 1475|   187k|      }
 1476|   209k|    }
 1477|   225k|  } else {
 1478|       |    /* The returned bit count will not be the actual payload size since we did
 1479|       |       not parse the frame data. Return an error so that the caller can react
 1480|       |       respectively. */
 1481|  36.7k|    errorStatus = SBRDEC_PARSE_ERROR;
 1482|  36.7k|  }
 1483|       |
 1484|   262k|  if (crcFlag && (hSbrHeader->syncState >= SBR_HEADER) && fDoDecodeSbrData) {
  ------------------
  |  Branch (1484:7): [True: 28.7k, False: 233k]
  |  Branch (1484:18): [True: 24.1k, False: 4.60k]
  |  Branch (1484:59): [True: 14.2k, False: 9.89k]
  ------------------
 1485|  14.2k|    FDKpushFor(hBs, alignBits);
 1486|  14.2k|    FDKcrcEndReg(&crcInfo, hBs, crcReg); /* End CRC region */
 1487|  14.2k|    FDKpushBack(hBs, alignBits);
 1488|       |    /* Check CRC */
 1489|  14.2k|    if ((FDKcrcGetCRC(&crcInfo) ^ crcStartValue) != sbrCrc) {
  ------------------
  |  Branch (1489:9): [True: 13.4k, False: 805]
  ------------------
 1490|  13.4k|      fDoDecodeSbrData = 0;
 1491|  13.4k|      if (headerStatus != HEADER_NOT_PRESENT) {
  ------------------
  |  Branch (1491:11): [True: 12.7k, False: 694]
  ------------------
 1492|  12.7k|        headerStatus = HEADER_ERROR;
 1493|  12.7k|        hSbrHeader->syncState = SBR_NOT_INITIALIZED;
 1494|  12.7k|      }
 1495|  13.4k|    }
 1496|  14.2k|  }
 1497|       |
 1498|   262k|  if (!fDoDecodeSbrData) {
  ------------------
  |  Branch (1498:7): [True: 83.7k, False: 178k]
  ------------------
 1499|       |    /* Set error flag for this slot to trigger concealment */
 1500|  83.7k|    setFrameErrorFlag(self->pSbrElement[elementIndex], FRAME_ERROR);
  ------------------
  |  |  118|  83.7k|#define FRAME_ERROR (1)
  ------------------
 1501|       |    /* restore old frameData for concealment */
 1502|  83.7k|    FDKmemcpy(hFrameDataLeft, &frameDataLeftCopy, sizeof(SBR_FRAME_DATA));
 1503|  83.7k|    if (stereo) {
  ------------------
  |  Branch (1503:9): [True: 31.4k, False: 52.3k]
  ------------------
 1504|  31.4k|      FDKmemcpy(hFrameDataRight, &frameDataRightCopy, sizeof(SBR_FRAME_DATA));
 1505|  31.4k|    }
 1506|  83.7k|    errorStatus = SBRDEC_PARSE_ERROR;
 1507|   178k|  } else {
 1508|       |    /* Everything seems to be ok so clear the error flag */
 1509|   178k|    setFrameErrorFlag(self->pSbrElement[elementIndex], FRAME_OK);
  ------------------
  |  |  117|   178k|#define FRAME_OK (0)
  ------------------
 1510|   178k|  }
 1511|       |
 1512|   262k|  if (!stereo) {
  ------------------
  |  Branch (1512:7): [True: 163k, False: 99.6k]
  ------------------
 1513|       |    /* Turn coupling off explicitely to avoid access to absent right frame data
 1514|       |       that might occur with corrupt bitstreams. */
 1515|   163k|    hFrameDataLeft->coupling = COUPLING_OFF;
 1516|   163k|  }
 1517|       |
 1518|   262k|bail:
 1519|       |
 1520|   262k|  if (self != NULL) {
  ------------------
  |  Branch (1520:7): [True: 262k, False: 0]
  ------------------
 1521|   262k|    if (self->flags & SBRDEC_SYNTAX_DRM) {
  ------------------
  |  |  224|   262k|  2048 /* Flag indicating that DRM30/DRM+ reverse syntax is being used. */
  ------------------
  |  Branch (1521:9): [True: 0, False: 262k]
  ------------------
 1522|      0|      hBs = hBsOriginal;
 1523|      0|    }
 1524|       |
 1525|   262k|    if (errorStatus != SBRDEC_NOT_INITIALIZED) {
  ------------------
  |  Branch (1525:9): [True: 262k, False: 0]
  ------------------
 1526|   262k|      int useOldHdr =
 1527|   262k|          ((headerStatus == HEADER_NOT_PRESENT) ||
  ------------------
  |  Branch (1527:12): [True: 50.3k, False: 212k]
  ------------------
 1528|   212k|           (headerStatus == HEADER_ERROR) ||
  ------------------
  |  Branch (1528:12): [True: 42.6k, False: 169k]
  ------------------
 1529|   169k|           (headerStatus == HEADER_RESET && errorStatus == SBRDEC_PARSE_ERROR))
  ------------------
  |  Branch (1529:13): [True: 74.3k, False: 95.3k]
  |  Branch (1529:45): [True: 27.1k, False: 47.2k]
  ------------------
 1530|   262k|              ? 1
 1531|   262k|              : 0;
 1532|       |
 1533|   262k|      if (!useOldHdr && (thisHdrSlot != lastHdrSlot) && (hSbrHeader != NULL)) {
  ------------------
  |  Branch (1533:11): [True: 142k, False: 120k]
  |  Branch (1533:25): [True: 7.62k, False: 134k]
  |  Branch (1533:57): [True: 7.62k, False: 0]
  ------------------
 1534|  7.62k|        useOldHdr |=
 1535|  7.62k|            (compareSbrHeader(hSbrHeader,
  ------------------
  |  Branch (1535:13): [True: 3.24k, False: 4.37k]
  ------------------
 1536|  7.62k|                              &self->sbrHeader[elementIndex][lastHdrSlot]) == 0)
 1537|  7.62k|                ? 1
 1538|  7.62k|                : 0;
 1539|  7.62k|      }
 1540|       |
 1541|   262k|      if (hSbrElement != NULL) {
  ------------------
  |  Branch (1541:11): [True: 262k, False: 0]
  ------------------
 1542|   262k|        if (useOldHdr != 0) {
  ------------------
  |  Branch (1542:13): [True: 123k, False: 139k]
  ------------------
 1543|       |          /* Use the old header for this frame */
 1544|   123k|          hSbrElement->useHeaderSlot[hSbrElement->useFrameSlot] = lastHdrSlot;
 1545|   139k|        } else {
 1546|       |          /* Use the new header for this frame */
 1547|   139k|          hSbrElement->useHeaderSlot[hSbrElement->useFrameSlot] = thisHdrSlot;
 1548|   139k|        }
 1549|       |
 1550|       |        /* Move frame pointer to the next slot which is up to be decoded/applied
 1551|       |         * next */
 1552|   262k|        hSbrElement->useFrameSlot =
 1553|   262k|            (hSbrElement->useFrameSlot + 1) % (self->numDelayFrames + 1);
 1554|   262k|      }
 1555|   262k|    }
 1556|   262k|  }
 1557|       |
 1558|   262k|  *count -= startPos - (INT)FDKgetValidBits(hBs);
 1559|       |
 1560|   262k|  return errorStatus;
 1561|   262k|}
sbrDecoder_Apply:
 1806|   253k|                           INT *outDataHeadroom) {
 1807|   253k|  SBR_ERROR errorStatus = SBRDEC_OK;
 1808|       |
 1809|   253k|  int psPossible;
 1810|   253k|  int sbrElementNum;
 1811|   253k|  int numCoreChannels;
 1812|   253k|  int numSbrChannels = 0;
 1813|       |
 1814|   253k|  if ((self == NULL) || (timeData == NULL) || (numChannels == NULL) ||
  ------------------
  |  Branch (1814:7): [True: 0, False: 253k]
  |  Branch (1814:25): [True: 0, False: 253k]
  |  Branch (1814:47): [True: 0, False: 253k]
  ------------------
 1815|   253k|      (sampleRate == NULL) || (psDecoded == NULL) ||
  ------------------
  |  Branch (1815:7): [True: 0, False: 253k]
  |  Branch (1815:31): [True: 0, False: 253k]
  ------------------
 1816|   253k|      !FDK_chMapDescr_isValid(mapDescr)) {
  ------------------
  |  Branch (1816:7): [True: 0, False: 253k]
  ------------------
 1817|      0|    return SBRDEC_INVALID_ARGUMENT;
 1818|      0|  }
 1819|       |
 1820|   253k|  psPossible = *psDecoded;
 1821|   253k|  numCoreChannels = *numChannels;
 1822|   253k|  if (numCoreChannels <= 0) {
  ------------------
  |  Branch (1822:7): [True: 0, False: 253k]
  ------------------
 1823|      0|    return SBRDEC_INVALID_ARGUMENT;
 1824|      0|  }
 1825|       |
 1826|   253k|  if (self->numSbrElements < 1) {
  ------------------
  |  Branch (1826:7): [True: 0, False: 253k]
  ------------------
 1827|       |    /* exit immediately to avoid access violations */
 1828|      0|    return SBRDEC_NOT_INITIALIZED;
 1829|      0|  }
 1830|       |
 1831|       |  /* Sanity check of allocated SBR elements. */
 1832|   557k|  for (sbrElementNum = 0; sbrElementNum < self->numSbrElements;
  ------------------
  |  Branch (1832:27): [True: 304k, False: 253k]
  ------------------
 1833|   304k|       sbrElementNum++) {
 1834|   304k|    if (self->pSbrElement[sbrElementNum] == NULL) {
  ------------------
  |  Branch (1834:9): [True: 97, False: 304k]
  ------------------
 1835|     97|      return SBRDEC_NOT_INITIALIZED;
 1836|     97|    }
 1837|   304k|  }
 1838|       |
 1839|   253k|  if (self->numSbrElements != 1 || self->pSbrElement[0]->elementID != ID_SCE) {
  ------------------
  |  Branch (1839:7): [True: 13.5k, False: 239k]
  |  Branch (1839:36): [True: 94.8k, False: 144k]
  ------------------
 1840|   108k|    psPossible = 0;
 1841|   108k|  }
 1842|       |
 1843|   253k|  self->sbrInDataHeadroom = inDataHeadroom;
 1844|   253k|  *outDataHeadroom = (INT)(8);
 1845|       |
 1846|       |  /* Make sure that even if no SBR data was found/parsed *psDecoded is returned
 1847|       |   * 1 if psPossible was 0. */
 1848|   253k|  if (psPossible == 0) {
  ------------------
  |  Branch (1848:7): [True: 247k, False: 5.50k]
  ------------------
 1849|   247k|    self->flags &= ~SBRDEC_PS_DECODED;
  ------------------
  |  |  213|   247k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
 1850|   247k|  }
 1851|       |
 1852|       |  /* replaces channel based reset inside sbr_dec() */
 1853|   253k|  if (((self->flags & SBRDEC_LOW_POWER) ? 1 : 0) !=
  ------------------
  |  |  211|   253k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (1853:7): [True: 10.5k, False: 242k]
  |  Branch (1853:8): [True: 50.5k, False: 202k]
  ------------------
 1854|   253k|      ((self->pQmfDomain->globalConf.flags & QMF_FLAG_LP) ? 1 : 0)) {
  ------------------
  |  |  126|   253k|#define QMF_FLAG_LP 1
  ------------------
  |  Branch (1854:8): [True: 41.0k, False: 212k]
  ------------------
 1855|  10.5k|    if (self->flags & SBRDEC_LOW_POWER) {
  ------------------
  |  |  211|  10.5k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  |  Branch (1855:9): [True: 10.0k, False: 498]
  ------------------
 1856|  10.0k|      self->pQmfDomain->globalConf.flags |= QMF_FLAG_LP;
  ------------------
  |  |  126|  10.0k|#define QMF_FLAG_LP 1
  ------------------
 1857|  10.0k|      self->pQmfDomain->globalConf.flags_requested |= QMF_FLAG_LP;
  ------------------
  |  |  126|  10.0k|#define QMF_FLAG_LP 1
  ------------------
 1858|  10.0k|    } else {
 1859|    498|      self->pQmfDomain->globalConf.flags &= ~QMF_FLAG_LP;
  ------------------
  |  |  126|    498|#define QMF_FLAG_LP 1
  ------------------
 1860|    498|      self->pQmfDomain->globalConf.flags_requested &= ~QMF_FLAG_LP;
  ------------------
  |  |  126|    498|#define QMF_FLAG_LP 1
  ------------------
 1861|    498|    }
 1862|  10.5k|    if (FDK_QmfDomain_InitFilterBank(self->pQmfDomain, QMF_FLAG_KEEP_STATES)) {
  ------------------
  |  |  135|  10.5k|#define QMF_FLAG_KEEP_STATES 8
  ------------------
  |  Branch (1862:9): [True: 0, False: 10.5k]
  ------------------
 1863|      0|      return SBRDEC_UNSUPPORTED_CONFIG;
 1864|      0|    }
 1865|  10.5k|  }
 1866|   253k|  if (self->numSbrChannels > self->pQmfDomain->globalConf.nInputChannels) {
  ------------------
  |  Branch (1866:7): [True: 0, False: 253k]
  ------------------
 1867|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
 1868|      0|  }
 1869|       |
 1870|   253k|  if (self->flags & SBRDEC_FLUSH) {
  ------------------
  |  |  229|   253k|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
  |  Branch (1870:7): [True: 24, False: 253k]
  ------------------
 1871|       |    /* flushing is signalized, hence increment the flush frame counter */
 1872|     24|    self->numFlushedFrames++;
 1873|   253k|  } else {
 1874|       |    /* no flushing is signalized, hence reset the flush frame counter */
 1875|   253k|    self->numFlushedFrames = 0;
 1876|   253k|  }
 1877|       |
 1878|       |  /* Loop over SBR elements */
 1879|   306k|  for (sbrElementNum = 0; sbrElementNum < self->numSbrElements;
  ------------------
  |  Branch (1879:27): [True: 302k, False: 3.59k]
  ------------------
 1880|   302k|       sbrElementNum++) {
 1881|   302k|    int numElementChan;
 1882|       |
 1883|   302k|    if (psPossible &&
  ------------------
  |  Branch (1883:9): [True: 5.50k, False: 297k]
  ------------------
 1884|  5.50k|        self->pSbrElement[sbrElementNum]->pSbrChannel[1] == NULL) {
  ------------------
  |  Branch (1884:9): [True: 0, False: 5.50k]
  ------------------
 1885|       |      /* Disable PS and try decoding SBR mono. */
 1886|      0|      psPossible = 0;
 1887|      0|    }
 1888|       |
 1889|   302k|    numElementChan =
 1890|   302k|        (self->pSbrElement[sbrElementNum]->elementID == ID_CPE) ? 2 : 1;
  ------------------
  |  Branch (1890:9): [True: 129k, False: 172k]
  ------------------
 1891|       |
 1892|       |    /* If core signal is bad then force upsampling */
 1893|   302k|    if (!coreDecodedOk) {
  ------------------
  |  Branch (1893:9): [True: 107k, False: 195k]
  ------------------
 1894|   107k|      setFrameErrorFlag(self->pSbrElement[sbrElementNum], FRAME_ERROR_ALLSLOTS);
  ------------------
  |  |  119|   107k|#define FRAME_ERROR_ALLSLOTS (2)
  ------------------
 1895|   107k|    }
 1896|       |
 1897|   302k|    errorStatus = sbrDecoder_DecodeElement(
 1898|   302k|        self, input, timeData, timeDataSize, mapDescr, mapIdx, numSbrChannels,
 1899|   302k|        sbrElementNum,
 1900|   302k|        numCoreChannels, /* is correct even for USC SCI==2 case */
 1901|   302k|        &numElementChan, psPossible);
 1902|       |
 1903|   302k|    if (errorStatus != SBRDEC_OK) {
  ------------------
  |  Branch (1903:9): [True: 0, False: 302k]
  ------------------
 1904|      0|      goto bail;
 1905|      0|    }
 1906|       |
 1907|   302k|    numSbrChannels += numElementChan;
 1908|       |
 1909|   302k|    if (numSbrChannels >= numCoreChannels) {
  ------------------
  |  Branch (1909:9): [True: 249k, False: 52.8k]
  ------------------
 1910|   249k|      break;
 1911|   249k|    }
 1912|   302k|  }
 1913|       |
 1914|       |  /* Update numChannels and samplerate */
 1915|       |  /* Do not mess with output channels in case of USAC. numSbrChannels !=
 1916|       |   * numChannels for stereoConfigIndex == 2 */
 1917|   253k|  if (!(self->flags & SBRDEC_SYNTAX_USAC)) {
  ------------------
  |  |  206|   253k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (1917:7): [True: 58.5k, False: 194k]
  ------------------
 1918|  58.5k|    *numChannels = numSbrChannels;
 1919|  58.5k|  }
 1920|   253k|  *sampleRate = self->sampleRateOut;
 1921|   253k|  *psDecoded = (self->flags & SBRDEC_PS_DECODED) ? 1 : 0;
  ------------------
  |  |  213|   253k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
  |  Branch (1921:16): [True: 3.37k, False: 249k]
  ------------------
 1922|       |
 1923|       |  /* Clear reset and flush flag because everything seems to be done
 1924|       |   * successfully. */
 1925|   253k|  self->flags &= ~SBRDEC_FORCE_RESET;
  ------------------
  |  |  231|   253k|  32768 /* Flag is used to force a reset of all elements in use. */
  ------------------
 1926|   253k|  self->flags &= ~SBRDEC_FLUSH;
  ------------------
  |  |  229|   253k|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
 1927|       |
 1928|   253k|bail:
 1929|       |
 1930|   253k|  return errorStatus;
 1931|   253k|}
sbrDecoder_Close:
 1933|  21.8k|SBR_ERROR sbrDecoder_Close(HANDLE_SBRDECODER *pSelf) {
 1934|  21.8k|  HANDLE_SBRDECODER self = *pSelf;
 1935|  21.8k|  int i;
 1936|       |
 1937|  21.8k|  if (self != NULL) {
  ------------------
  |  Branch (1937:7): [True: 21.8k, False: 0]
  ------------------
 1938|  21.8k|    if (self->hParametricStereoDec != NULL) {
  ------------------
  |  Branch (1938:9): [True: 1.68k, False: 20.1k]
  ------------------
 1939|  1.68k|      DeletePsDec(&self->hParametricStereoDec);
 1940|  1.68k|    }
 1941|       |
 1942|   196k|    for (i = 0; i < (8); i++) {
  ------------------
  |  Branch (1942:17): [True: 174k, False: 21.8k]
  ------------------
 1943|   174k|      sbrDecoder_DestroyElement(self, i);
 1944|   174k|    }
 1945|       |
 1946|  21.8k|    FreeRam_SbrDecoder(pSelf);
 1947|  21.8k|  }
 1948|       |
 1949|  21.8k|  return SBRDEC_OK;
 1950|  21.8k|}
sbrDecoder_GetDelay:
 1983|   241k|UINT sbrDecoder_GetDelay(const HANDLE_SBRDECODER self) {
 1984|   241k|  UINT outputDelay = 0;
 1985|       |
 1986|   241k|  if (self != NULL) {
  ------------------
  |  Branch (1986:7): [True: 241k, False: 0]
  ------------------
 1987|   241k|    UINT flags = self->flags;
 1988|       |
 1989|       |    /* See chapter 1.6.7.2 of ISO/IEC 14496-3 for the GA-SBR figures below. */
 1990|       |
 1991|       |    /* Are we initialized? */
 1992|   241k|    if ((self->numSbrChannels > 0) && (self->numSbrElements > 0)) {
  ------------------
  |  Branch (1992:9): [True: 241k, False: 0]
  |  Branch (1992:39): [True: 241k, False: 0]
  ------------------
 1993|       |      /* Add QMF synthesis delay */
 1994|   241k|      if ((flags & SBRDEC_ELD_GRID) && IS_LOWDELAY(self->coreCodec)) {
  ------------------
  |  |  204|   241k|#define SBRDEC_ELD_GRID 1
  ------------------
                    if ((flags & SBRDEC_ELD_GRID) && IS_LOWDELAY(self->coreCodec)) {
  ------------------
  |  |  228|  34.7k|#define IS_LOWDELAY(aot) ((aot) == AOT_ER_AAC_LD || (aot) == AOT_ER_AAC_ELD)
  |  |  ------------------
  |  |  |  Branch (228:27): [True: 0, False: 34.7k]
  |  |  |  Branch (228:53): [True: 34.7k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1994:11): [True: 34.7k, False: 206k]
  ------------------
 1995|       |        /* Low delay SBR: */
 1996|  34.7k|        if (!(flags & SBRDEC_SKIP_QMF_SYN)) {
  ------------------
  |  |  236|  34.7k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  |  Branch (1996:13): [True: 33.7k, False: 1.01k]
  ------------------
 1997|  33.7k|          outputDelay +=
 1998|  33.7k|              (flags & SBRDEC_DOWNSAMPLE) ? 32 : 64; /* QMF synthesis */
  ------------------
  |  |  228|  33.7k|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  |  Branch (1998:15): [True: 18.2k, False: 15.5k]
  ------------------
 1999|  33.7k|          if (flags & SBRDEC_LD_MPS_QMF) {
  ------------------
  |  |  220|  33.7k|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  |  Branch (1999:15): [True: 613, False: 33.1k]
  ------------------
 2000|    613|            outputDelay += 32;
 2001|    613|          }
 2002|  33.7k|        }
 2003|   206k|      } else if (!IS_USAC(self->coreCodec)) {
  ------------------
  |  |  226|   206k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  ------------------
  |  Branch (2003:18): [True: 23.7k, False: 182k]
  ------------------
 2004|       |        /* By the method of elimination this is the GA (AAC-LC, HE-AAC, ...)
 2005|       |         * branch: */
 2006|  23.7k|        outputDelay += (flags & SBRDEC_DOWNSAMPLE) ? 481 : 962;
  ------------------
  |  |  228|  23.7k|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  |  Branch (2006:24): [True: 174, False: 23.6k]
  ------------------
 2007|  23.7k|        if (flags & SBRDEC_SKIP_QMF_SYN) {
  ------------------
  |  |  236|  23.7k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  |  Branch (2007:13): [True: 0, False: 23.7k]
  ------------------
 2008|      0|          outputDelay -= 257; /* QMF synthesis */
 2009|      0|        }
 2010|  23.7k|      }
 2011|   241k|    }
 2012|   241k|  }
 2013|       |
 2014|   241k|  return (outputDelay);
 2015|   241k|}
sbrdecoder.cpp:_ZL27sbrDecoder_isCoreCodecValid17AUDIO_OBJECT_TYPE:
  493|  1.21M|static int sbrDecoder_isCoreCodecValid(AUDIO_OBJECT_TYPE coreCodec) {
  494|  1.21M|  switch (coreCodec) {
  495|  12.2k|    case AOT_AAC_LC:
  ------------------
  |  Branch (495:5): [True: 12.2k, False: 1.20M]
  ------------------
  496|  12.2k|    case AOT_SBR:
  ------------------
  |  Branch (496:5): [True: 0, False: 1.21M]
  ------------------
  497|  12.2k|    case AOT_PS:
  ------------------
  |  Branch (497:5): [True: 0, False: 1.21M]
  ------------------
  498|  54.9k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (498:5): [True: 42.7k, False: 1.17M]
  ------------------
  499|   871k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (499:5): [True: 816k, False: 401k]
  ------------------
  500|   871k|    case AOT_DRM_AAC:
  ------------------
  |  Branch (500:5): [True: 0, False: 1.21M]
  ------------------
  501|   871k|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (501:5): [True: 0, False: 1.21M]
  ------------------
  502|  1.21M|    case AOT_USAC:
  ------------------
  |  Branch (502:5): [True: 345k, False: 872k]
  ------------------
  503|  1.21M|      return 1;
  504|    750|    default:
  ------------------
  |  Branch (504:5): [True: 750, False: 1.21M]
  ------------------
  505|    750|      return 0;
  506|  1.21M|  }
  507|  1.21M|}
sbrdecoder.cpp:_ZL40sbrDecoder_AssignQmfChannels2SbrChannelsP20SBR_DECODER_INSTANCE:
  429|  97.8k|static void sbrDecoder_AssignQmfChannels2SbrChannels(HANDLE_SBRDECODER self) {
  430|  97.8k|  int ch, el, absCh_offset = 0;
  431|   277k|  for (el = 0; el < self->numSbrElements; el++) {
  ------------------
  |  Branch (431:16): [True: 179k, False: 97.8k]
  ------------------
  432|   179k|    if (self->pSbrElement[el] != NULL) {
  ------------------
  |  Branch (432:9): [True: 179k, False: 212]
  ------------------
  433|   457k|      for (ch = 0; ch < self->pSbrElement[el]->nChannels; ch++) {
  ------------------
  |  Branch (433:20): [True: 278k, False: 179k]
  ------------------
  434|   278k|        FDK_ASSERT(((absCh_offset + ch) < ((8) + (1))) &&
  ------------------
  |  |  221|   278k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (434:9): [True: 278k, False: 0]
  |  Branch (434:9): [True: 278k, False: 0]
  |  Branch (434:9): [True: 278k, False: 0]
  ------------------
  435|   278k|                   ((absCh_offset + ch) < ((8) + (1))));
  436|   278k|        self->pSbrElement[el]->pSbrChannel[ch]->SbrDec.qmfDomainInCh =
  437|   278k|            &self->pQmfDomain->QmfDomainIn[absCh_offset + ch];
  438|   278k|        self->pSbrElement[el]->pSbrChannel[ch]->SbrDec.qmfDomainOutCh =
  439|   278k|            &self->pQmfDomain->QmfDomainOut[absCh_offset + ch];
  440|   278k|      }
  441|   179k|      absCh_offset += self->pSbrElement[el]->nChannels;
  442|   179k|    }
  443|   179k|  }
  444|  97.8k|}
sbrdecoder.cpp:_ZL23sbrDecoder_ResetElementP20SBR_DECODER_INSTANCEiii14MP4_ELEMENT_IDii:
  278|  97.8k|                                         const int overlap) {
  279|  97.8k|  SBR_ERROR sbrError = SBRDEC_OK;
  280|  97.8k|  HANDLE_SBR_HEADER_DATA hSbrHeader;
  281|  97.8k|  UINT qmfFlags = 0;
  282|       |
  283|  97.8k|  int i, synDownsampleFac;
  284|       |
  285|       |  /* USAC: assuming theoretical case 8 kHz output sample rate with 4:1 SBR */
  286|  97.8k|  const int sbr_min_sample_rate_in = IS_USAC(self->coreCodec) ? 2000 : 6400;
  ------------------
  |  |  226|  97.8k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 38.1k, False: 59.7k]
  |  |  ------------------
  ------------------
  287|       |
  288|       |  /* Check in/out samplerates */
  289|  97.8k|  if (sampleRateIn < sbr_min_sample_rate_in || sampleRateIn > (96000)) {
  ------------------
  |  Branch (289:7): [True: 1.01k, False: 96.8k]
  |  Branch (289:48): [True: 325, False: 96.4k]
  ------------------
  290|  1.33k|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  291|  1.33k|    goto bail;
  292|  1.33k|  }
  293|       |
  294|  96.4k|  if (sampleRateOut > (96000)) {
  ------------------
  |  Branch (294:7): [True: 388, False: 96.1k]
  ------------------
  295|    388|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  296|    388|    goto bail;
  297|    388|  }
  298|       |
  299|       |  /* Set QMF mode flags */
  300|  96.1k|  if (self->flags & SBRDEC_LOW_POWER) qmfFlags |= QMF_FLAG_LP;
  ------------------
  |  |  211|  96.1k|  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: 96.1k]
  ------------------
  301|       |
  302|  96.1k|  if (self->coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (302:7): [True: 54.8k, False: 41.2k]
  ------------------
  303|  54.8k|    if (self->flags & SBRDEC_LD_MPS_QMF) {
  ------------------
  |  |  220|  54.8k|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  |  Branch (303:9): [True: 0, False: 54.8k]
  ------------------
  304|      0|      qmfFlags |= QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|      0|#define QMF_FLAG_MPSLDFB 16
  ------------------
  305|  54.8k|    } else {
  306|  54.8k|      qmfFlags |= QMF_FLAG_CLDFB;
  ------------------
  |  |  133|  54.8k|#define QMF_FLAG_CLDFB 4
  ------------------
  307|  54.8k|    }
  308|  54.8k|  }
  309|       |
  310|       |  /* Set downsampling factor for synthesis filter bank */
  311|  96.1k|  if (sampleRateOut == 0) {
  ------------------
  |  Branch (311:7): [True: 4.04k, False: 92.0k]
  ------------------
  312|       |    /* no single rate mode */
  313|  4.04k|    sampleRateOut =
  314|  4.04k|        sampleRateIn
  315|  4.04k|        << 1; /* In case of implicit signalling, assume dual rate SBR */
  316|  4.04k|  }
  317|       |
  318|  96.1k|  if (sampleRateIn == sampleRateOut) {
  ------------------
  |  Branch (318:7): [True: 43.6k, False: 52.4k]
  ------------------
  319|  43.6k|    synDownsampleFac = 2;
  320|  43.6k|    self->flags |= SBRDEC_DOWNSAMPLE;
  ------------------
  |  |  228|  43.6k|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  321|  52.4k|  } else {
  322|  52.4k|    synDownsampleFac = 1;
  323|  52.4k|    self->flags &= ~SBRDEC_DOWNSAMPLE;
  ------------------
  |  |  228|  52.4k|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  324|  52.4k|  }
  325|       |
  326|  96.1k|  self->synDownsampleFac = synDownsampleFac;
  327|  96.1k|  self->sampleRateOut = sampleRateOut;
  328|       |
  329|  96.1k|  {
  330|   288k|    for (i = 0; i < (1) + 1; i++) {
  ------------------
  |  Branch (330:17): [True: 192k, False: 96.1k]
  ------------------
  331|   192k|      int setDflt;
  332|   192k|      hSbrHeader = &(self->sbrHeader[elementIndex][i]);
  333|   192k|      setDflt = ((hSbrHeader->syncState == SBR_NOT_INITIALIZED) ||
  ------------------
  |  Branch (333:18): [True: 191k, False: 911]
  ------------------
  334|    911|                 (self->flags & SBRDEC_FORCE_RESET))
  ------------------
  |  |  231|    911|  32768 /* Flag is used to force a reset of all elements in use. */
  ------------------
  |  Branch (334:18): [True: 0, False: 911]
  ------------------
  335|   192k|                    ? 1
  336|   192k|                    : 0;
  337|       |
  338|       |      /* init a default header such that we can at least do upsampling later */
  339|   192k|      sbrError = initHeaderData(hSbrHeader, sampleRateIn, sampleRateOut,
  340|   192k|                                self->downscaleFactor, samplesPerFrame,
  341|   192k|                                self->flags, setDflt);
  342|       |
  343|       |      /* Set synchState to UPSAMPLING in case it already is initialized */
  344|   192k|      hSbrHeader->syncState = hSbrHeader->syncState > UPSAMPLING
  ------------------
  |  Branch (344:31): [True: 224, False: 191k]
  ------------------
  345|   192k|                                  ? UPSAMPLING
  346|   192k|                                  : hSbrHeader->syncState;
  347|   192k|    }
  348|  96.1k|  }
  349|       |
  350|  96.1k|  if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (350:7): [True: 43, False: 96.0k]
  ------------------
  351|     43|    goto bail;
  352|     43|  }
  353|       |
  354|  96.0k|  if (!self->pQmfDomain->globalConf.qmfDomainExplicitConfig) {
  ------------------
  |  Branch (354:7): [True: 96.0k, False: 0]
  ------------------
  355|  96.0k|    self->pQmfDomain->globalConf.flags_requested |= qmfFlags;
  356|  96.0k|    self->pQmfDomain->globalConf.nBandsAnalysis_requested =
  357|  96.0k|        self->sbrHeader[elementIndex][0].numberOfAnalysisBands;
  358|  96.0k|    self->pQmfDomain->globalConf.nBandsSynthesis_requested =
  359|  96.0k|        (synDownsampleFac == 1) ? 64 : 32; /* may be overwritten by MPS */
  ------------------
  |  Branch (359:9): [True: 52.4k, False: 43.6k]
  ------------------
  360|  96.0k|    self->pQmfDomain->globalConf.nBandsSynthesis_requested /=
  361|  96.0k|        self->downscaleFactor;
  362|  96.0k|    self->pQmfDomain->globalConf.nQmfTimeSlots_requested =
  363|  96.0k|        self->sbrHeader[elementIndex][0].numberTimeSlots *
  364|  96.0k|        self->sbrHeader[elementIndex][0].timeStep;
  365|  96.0k|    self->pQmfDomain->globalConf.nQmfOvTimeSlots_requested = overlap;
  366|  96.0k|    self->pQmfDomain->globalConf.nQmfProcBands_requested = 64; /* always 64 */
  367|  96.0k|    self->pQmfDomain->globalConf.nQmfProcChannels_requested =
  368|  96.0k|        1; /* may be overwritten by MPS */
  369|  96.0k|  }
  370|       |
  371|       |  /* Init SBR channels going to be assigned to a SBR element */
  372|  96.0k|  {
  373|  96.0k|    int ch;
  374|   242k|    for (ch = 0; ch < self->pSbrElement[elementIndex]->nChannels; ch++) {
  ------------------
  |  Branch (374:18): [True: 149k, False: 93.1k]
  ------------------
  375|   149k|      int headerIndex =
  376|   149k|          getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  377|   149k|                        self->pSbrElement[elementIndex]->useHeaderSlot);
  378|       |
  379|       |      /* and create sbrDec */
  380|   149k|      sbrError =
  381|   149k|          createSbrDec(self->pSbrElement[elementIndex]->pSbrChannel[ch],
  382|   149k|                       &self->sbrHeader[elementIndex][headerIndex],
  383|   149k|                       &self->pSbrElement[elementIndex]->transposerSettings,
  384|   149k|                       synDownsampleFac, qmfFlags, self->flags, overlap, ch,
  385|   149k|                       self->codecFrameSize);
  386|       |
  387|   149k|      if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (387:11): [True: 2.87k, False: 146k]
  ------------------
  388|  2.87k|        goto bail;
  389|  2.87k|      }
  390|   149k|    }
  391|  96.0k|  }
  392|       |
  393|       |  // FDKmemclear(sbr_OverlapBuffer, sizeof(sbr_OverlapBuffer));
  394|       |
  395|  93.1k|  if (self->numSbrElements == 1) {
  ------------------
  |  Branch (395:7): [True: 57.4k, False: 35.7k]
  ------------------
  396|  57.4k|    switch (self->coreCodec) {
  397|    901|      case AOT_AAC_LC:
  ------------------
  |  Branch (397:7): [True: 901, False: 56.5k]
  ------------------
  398|    901|      case AOT_SBR:
  ------------------
  |  Branch (398:7): [True: 0, False: 57.4k]
  ------------------
  399|    901|      case AOT_PS:
  ------------------
  |  Branch (399:7): [True: 0, False: 57.4k]
  ------------------
  400|  3.44k|      case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (400:7): [True: 2.54k, False: 54.8k]
  ------------------
  401|  3.44k|      case AOT_DRM_AAC:
  ------------------
  |  Branch (401:7): [True: 0, False: 57.4k]
  ------------------
  402|  3.44k|      case AOT_DRM_SURROUND:
  ------------------
  |  Branch (402:7): [True: 0, False: 57.4k]
  ------------------
  403|  3.44k|        if (CreatePsDec(&self->hParametricStereoDec, samplesPerFrame)) {
  ------------------
  |  Branch (403:13): [True: 0, False: 3.44k]
  ------------------
  404|      0|          sbrError = SBRDEC_CREATE_ERROR;
  405|      0|          goto bail;
  406|      0|        }
  407|  3.44k|        break;
  408|  53.9k|      default:
  ------------------
  |  Branch (408:7): [True: 53.9k, False: 3.44k]
  ------------------
  409|  53.9k|        break;
  410|  57.4k|    }
  411|  57.4k|  }
  412|       |
  413|       |  /* Init frame delay slot handling */
  414|  93.1k|  self->pSbrElement[elementIndex]->useFrameSlot = 0;
  415|   279k|  for (i = 0; i < ((1) + 1); i++) {
  ------------------
  |  Branch (415:15): [True: 186k, False: 93.1k]
  ------------------
  416|   186k|    self->pSbrElement[elementIndex]->useHeaderSlot[i] = i;
  417|   186k|  }
  418|       |
  419|  97.8k|bail:
  420|       |
  421|  97.8k|  return sbrError;
  422|  93.1k|}
sbrdecoder.cpp:_ZL25sbrDecoder_DestroyElementP20SBR_DECODER_INSTANCEi:
  510|  2.67M|                                      const int elementIndex) {
  511|  2.67M|  if (self->pSbrElement[elementIndex] != NULL) {
  ------------------
  |  Branch (511:7): [True: 97.3k, False: 2.57M]
  ------------------
  512|  97.3k|    int ch;
  513|       |
  514|   292k|    for (ch = 0; ch < SBRDEC_MAX_CH_PER_ELEMENT; ch++) {
  ------------------
  |  |  115|   292k|#define SBRDEC_MAX_CH_PER_ELEMENT (2)
  ------------------
  |  Branch (514:18): [True: 194k, False: 97.3k]
  ------------------
  515|   194k|      if (self->pSbrElement[elementIndex]->pSbrChannel[ch] != NULL) {
  ------------------
  |  Branch (515:11): [True: 153k, False: 40.8k]
  ------------------
  516|   153k|        deleteSbrDec(self->pSbrElement[elementIndex]->pSbrChannel[ch]);
  517|   153k|        FreeRam_SbrDecChannel(
  518|   153k|            &self->pSbrElement[elementIndex]->pSbrChannel[ch]);
  519|   153k|        self->numSbrChannels -= 1;
  520|   153k|      }
  521|   194k|    }
  522|  97.3k|    FreeRam_SbrDecElement(&self->pSbrElement[elementIndex]);
  523|  97.3k|    self->numSbrElements -= 1;
  524|  97.3k|  }
  525|  2.67M|}
sbrdecoder.cpp:_ZL17setFrameErrorFlagP19SBR_DECODER_ELEMENTh:
  169|   416k|static void setFrameErrorFlag(SBR_DECODER_ELEMENT *pSbrElement, UCHAR value) {
  170|   416k|  if (pSbrElement != NULL) {
  ------------------
  |  Branch (170:7): [True: 416k, False: 0]
  ------------------
  171|   416k|    switch (value) {
  172|   107k|      case FRAME_ERROR_ALLSLOTS:
  ------------------
  |  |  119|   107k|#define FRAME_ERROR_ALLSLOTS (2)
  ------------------
  |  Branch (172:7): [True: 107k, False: 309k]
  ------------------
  173|   107k|        FDKmemset(pSbrElement->frameErrorFlag, FRAME_ERROR,
  ------------------
  |  |  118|   107k|#define FRAME_ERROR (1)
  ------------------
  174|   107k|                  sizeof(pSbrElement->frameErrorFlag));
  175|   107k|        break;
  176|   309k|      default:
  ------------------
  |  Branch (176:7): [True: 309k, False: 107k]
  ------------------
  177|   309k|        pSbrElement->frameErrorFlag[pSbrElement->useFrameSlot] = value;
  178|   416k|    }
  179|   416k|  }
  180|   416k|}
sbrdecoder.cpp:_ZL13getHeaderSlothPh:
  182|   575k|static UCHAR getHeaderSlot(UCHAR currentSlot, UCHAR hdrSlotUsage[(1) + 1]) {
  183|   575k|  UINT occupied = 0;
  184|   575k|  int s;
  185|   575k|  UCHAR slot = hdrSlotUsage[currentSlot];
  186|       |
  187|   575k|  FDK_ASSERT((1) + 1 < 32);
  ------------------
  |  |  221|   575k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 575k, Folded]
  ------------------
  188|       |
  189|  1.53M|  for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (189:15): [True: 1.13M, False: 401k]
  ------------------
  190|  1.13M|    if ((hdrSlotUsage[s] == slot) && (s != slot)) {
  ------------------
  |  Branch (190:9): [True: 728k, False: 402k]
  |  Branch (190:38): [True: 174k, False: 553k]
  ------------------
  191|   174k|      occupied = 1;
  192|   174k|      break;
  193|   174k|    }
  194|  1.13M|  }
  195|       |
  196|   575k|  if (occupied) {
  ------------------
  |  Branch (196:7): [True: 174k, False: 401k]
  ------------------
  197|   174k|    occupied = 0;
  198|       |
  199|   523k|    for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (199:17): [True: 348k, False: 174k]
  ------------------
  200|   348k|      occupied |= 1 << hdrSlotUsage[s];
  201|   348k|    }
  202|   330k|    for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (202:17): [True: 328k, False: 1.55k]
  ------------------
  203|   328k|      if (!(occupied & 0x1)) {
  ------------------
  |  Branch (203:11): [True: 172k, False: 155k]
  ------------------
  204|   172k|        slot = s;
  205|   172k|        break;
  206|   172k|      }
  207|   155k|      occupied >>= 1;
  208|   155k|    }
  209|   174k|  }
  210|       |
  211|   575k|  return slot;
  212|   575k|}
sbrdecoder.cpp:_ZL23sbrDecoder_HeaderUpdateP20SBR_DECODER_INSTANCEP15SBR_HEADER_DATA17SBR_HEADER_STATUSPP11SBR_CHANNELi:
  768|   207k|                                         const int numElementChannels) {
  769|   207k|  SBR_ERROR errorStatus = SBRDEC_OK;
  770|       |
  771|       |  /*
  772|       |    change of control data, reset decoder
  773|       |  */
  774|   207k|  errorStatus = resetFreqBandTables(hSbrHeader, self->flags);
  775|       |
  776|   207k|  if (errorStatus == SBRDEC_OK) {
  ------------------
  |  Branch (776:7): [True: 176k, False: 30.9k]
  ------------------
  777|   176k|    if (hSbrHeader->syncState == UPSAMPLING && headerStatus != HEADER_RESET) {
  ------------------
  |  Branch (777:9): [True: 60.2k, False: 116k]
  |  Branch (777:48): [True: 37.9k, False: 22.2k]
  ------------------
  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|  37.9k|      hSbrHeader->freqBandData.lowSubband = hSbrHeader->numberOfAnalysisBands;
  788|  37.9k|      hSbrHeader->freqBandData.highSubband = hSbrHeader->numberOfAnalysisBands;
  789|  37.9k|    }
  790|       |
  791|       |    /* Trigger a reset before processing this slot */
  792|   176k|    hSbrHeader->status |= SBRDEC_HDR_STAT_RESET;
  ------------------
  |  |  239|   176k|#define SBRDEC_HDR_STAT_RESET 1
  ------------------
  793|   176k|  }
  794|       |
  795|   207k|  return errorStatus;
  796|   207k|}
sbrdecoder.cpp:_ZL24sbrDecoder_drcGetChannelP20SBR_DECODER_INSTANCEi:
  997|   436k|    const HANDLE_SBRDECODER self, const INT channel) {
  998|   436k|  SBRDEC_DRC_CHANNEL *pSbrDrcChannelData = NULL;
  999|   436k|  int elementIndex, elChanIdx = 0, numCh = 0;
 1000|       |
 1001|  1.07M|  for (elementIndex = 0; (elementIndex < (8)) && (numCh <= channel);
  ------------------
  |  Branch (1001:26): [True: 1.07M, False: 0]
  |  Branch (1001:50): [True: 639k, False: 432k]
  ------------------
 1002|   639k|       elementIndex++) {
 1003|   639k|    SBR_DECODER_ELEMENT *pSbrElement = self->pSbrElement[elementIndex];
 1004|   639k|    int c, elChannels;
 1005|       |
 1006|   639k|    elChanIdx = 0;
 1007|   639k|    if (pSbrElement == NULL) break;
  ------------------
  |  Branch (1007:9): [True: 3.98k, False: 635k]
  ------------------
 1008|       |
 1009|       |    /* Determine amount of channels for this element */
 1010|   635k|    switch (pSbrElement->elementID) {
 1011|   354k|      case ID_CPE:
  ------------------
  |  Branch (1011:7): [True: 354k, False: 280k]
  ------------------
 1012|   354k|        elChannels = 2;
 1013|   354k|        break;
 1014|  30.3k|      case ID_LFE:
  ------------------
  |  Branch (1014:7): [True: 30.3k, False: 605k]
  ------------------
 1015|   280k|      case ID_SCE:
  ------------------
  |  Branch (1015:7): [True: 250k, False: 385k]
  ------------------
 1016|   280k|        elChannels = 1;
 1017|   280k|        break;
 1018|      0|      case ID_NONE:
  ------------------
  |  Branch (1018:7): [True: 0, False: 635k]
  ------------------
 1019|      0|      default:
  ------------------
  |  Branch (1019:7): [True: 0, False: 635k]
  ------------------
 1020|      0|        elChannels = 0;
 1021|      0|        break;
 1022|   635k|    }
 1023|       |
 1024|       |    /* Limit with actual allocated element channels */
 1025|   635k|    elChannels = fMin(elChannels, pSbrElement->nChannels);
 1026|       |
 1027|  1.49M|    for (c = 0; (c < elChannels) && (numCh <= channel); c++) {
  ------------------
  |  Branch (1027:17): [True: 990k, False: 505k]
  |  Branch (1027:37): [True: 860k, False: 129k]
  ------------------
 1028|   860k|      if (pSbrElement->pSbrChannel[elChanIdx] != NULL) {
  ------------------
  |  Branch (1028:11): [True: 860k, False: 0]
  ------------------
 1029|   860k|        numCh++;
 1030|   860k|        elChanIdx++;
 1031|   860k|      }
 1032|   860k|    }
 1033|   635k|  }
 1034|   436k|  elementIndex -= 1;
 1035|   436k|  elChanIdx -= 1;
 1036|       |
 1037|   436k|  if (elChanIdx < 0 || elementIndex < 0) {
  ------------------
  |  Branch (1037:7): [True: 3.98k, False: 432k]
  |  Branch (1037:24): [True: 0, False: 432k]
  ------------------
 1038|  3.98k|    return NULL;
 1039|  3.98k|  }
 1040|       |
 1041|   432k|  if (self->pSbrElement[elementIndex] != NULL) {
  ------------------
  |  Branch (1041:7): [True: 432k, False: 0]
  ------------------
 1042|   432k|    if (self->pSbrElement[elementIndex]->pSbrChannel[elChanIdx] != NULL) {
  ------------------
  |  Branch (1042:9): [True: 432k, False: 0]
  ------------------
 1043|   432k|      pSbrDrcChannelData = &self->pSbrElement[elementIndex]
 1044|   432k|                                ->pSbrChannel[elChanIdx]
 1045|   432k|                                ->SbrDec.sbrDrcChannel;
 1046|   432k|    }
 1047|   432k|  }
 1048|       |
 1049|   432k|  return (pSbrDrcChannelData);
 1050|   436k|}
sbrdecoder.cpp:_ZL13copySbrHeaderP15SBR_HEADER_DATAS0_:
  215|  30.7k|                          const HANDLE_SBR_HEADER_DATA hSrc) {
  216|       |  /* copy the whole header memory (including pointers) */
  217|  30.7k|  FDKmemcpy(hDst, hSrc, sizeof(SBR_HEADER_DATA));
  218|       |
  219|       |  /* update pointers */
  220|  30.7k|  hDst->freqBandData.freqBandTable[0] = hDst->freqBandData.freqBandTableLo;
  221|  30.7k|  hDst->freqBandData.freqBandTable[1] = hDst->freqBandData.freqBandTableHi;
  222|  30.7k|}
sbrdecoder.cpp:_ZL16compareSbrHeaderP15SBR_HEADER_DATAS0_:
  225|  7.62k|                            const HANDLE_SBR_HEADER_DATA hHdr2) {
  226|  7.62k|  int result = 0;
  227|       |
  228|       |  /* compare basic data */
  229|  7.62k|  result |= (hHdr1->syncState != hHdr2->syncState) ? 1 : 0;
  ------------------
  |  Branch (229:13): [True: 887, False: 6.73k]
  ------------------
  230|  7.62k|  result |= (hHdr1->status != hHdr2->status) ? 1 : 0;
  ------------------
  |  Branch (230:13): [True: 877, False: 6.74k]
  ------------------
  231|  7.62k|  result |= (hHdr1->frameErrorFlag != hHdr2->frameErrorFlag) ? 1 : 0;
  ------------------
  |  Branch (231:13): [True: 0, False: 7.62k]
  ------------------
  232|  7.62k|  result |= (hHdr1->numberTimeSlots != hHdr2->numberTimeSlots) ? 1 : 0;
  ------------------
  |  Branch (232:13): [True: 0, False: 7.62k]
  ------------------
  233|  7.62k|  result |=
  234|  7.62k|      (hHdr1->numberOfAnalysisBands != hHdr2->numberOfAnalysisBands) ? 1 : 0;
  ------------------
  |  Branch (234:7): [True: 0, False: 7.62k]
  ------------------
  235|  7.62k|  result |= (hHdr1->timeStep != hHdr2->timeStep) ? 1 : 0;
  ------------------
  |  Branch (235:13): [True: 0, False: 7.62k]
  ------------------
  236|  7.62k|  result |= (hHdr1->sbrProcSmplRate != hHdr2->sbrProcSmplRate) ? 1 : 0;
  ------------------
  |  Branch (236:13): [True: 0, False: 7.62k]
  ------------------
  237|       |
  238|       |  /* compare bitstream data */
  239|  7.62k|  result |=
  240|  7.62k|      FDKmemcmp(&hHdr1->bs_data, &hHdr2->bs_data, sizeof(SBR_HEADER_DATA_BS));
  241|  7.62k|  result |=
  242|  7.62k|      FDKmemcmp(&hHdr1->bs_dflt, &hHdr2->bs_dflt, sizeof(SBR_HEADER_DATA_BS));
  243|  7.62k|  result |= FDKmemcmp(&hHdr1->bs_info, &hHdr2->bs_info,
  244|  7.62k|                      sizeof(SBR_HEADER_DATA_BS_INFO));
  245|       |
  246|       |  /* compare frequency band data */
  247|  7.62k|  result |= FDKmemcmp(&hHdr1->freqBandData, &hHdr2->freqBandData,
  248|  7.62k|                      (8 + MAX_NUM_LIMITERS + 1) * sizeof(UCHAR));
  ------------------
  |  |  130|  7.62k|#define MAX_NUM_LIMITERS 12
  ------------------
  249|  7.62k|  result |= FDKmemcmp(hHdr1->freqBandData.freqBandTableLo,
  250|  7.62k|                      hHdr2->freqBandData.freqBandTableLo,
  251|  7.62k|                      (MAX_FREQ_COEFFS / 2 + 1) * sizeof(UCHAR));
  ------------------
  |  |  140|  7.62k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  7.62k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  252|  7.62k|  result |= FDKmemcmp(hHdr1->freqBandData.freqBandTableHi,
  253|  7.62k|                      hHdr2->freqBandData.freqBandTableHi,
  254|  7.62k|                      (MAX_FREQ_COEFFS + 1) * sizeof(UCHAR));
  ------------------
  |  |  140|  7.62k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  7.62k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  255|  7.62k|  result |= FDKmemcmp(hHdr1->freqBandData.freqBandTableNoise,
  256|  7.62k|                      hHdr2->freqBandData.freqBandTableNoise,
  257|  7.62k|                      (MAX_NOISE_COEFFS + 1) * sizeof(UCHAR));
  ------------------
  |  |  128|  7.62k|#define MAX_NOISE_COEFFS 5
  ------------------
  258|  7.62k|  result |=
  259|  7.62k|      FDKmemcmp(hHdr1->freqBandData.v_k_master, hHdr2->freqBandData.v_k_master,
  260|  7.62k|                (MAX_FREQ_COEFFS + 1) * sizeof(UCHAR));
  ------------------
  |  |  140|  7.62k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  7.62k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  261|       |
  262|  7.62k|  return result;
  263|  7.62k|}
sbrdecoder.cpp:_ZL24sbrDecoder_DecodeElementP20SBR_DECODER_INSTANCEPiS1_iPK19FDK_channelMapDescriiiiS1_i:
 1580|   302k|    int *numOutChannels, const int psPossible) {
 1581|   302k|  SBR_DECODER_ELEMENT *hSbrElement = self->pSbrElement[elementIndex];
 1582|   302k|  HANDLE_SBR_CHANNEL *pSbrChannel =
 1583|   302k|      self->pSbrElement[elementIndex]->pSbrChannel;
 1584|   302k|  HANDLE_SBR_HEADER_DATA hSbrHeader =
 1585|   302k|      &self->sbrHeader[elementIndex]
 1586|   302k|                      [hSbrElement->useHeaderSlot[hSbrElement->useFrameSlot]];
 1587|   302k|  HANDLE_PS_DEC h_ps_d = self->hParametricStereoDec;
 1588|       |
 1589|       |  /* get memory for frame data from scratch */
 1590|   302k|  SBR_FRAME_DATA *hFrameDataLeft = NULL;
 1591|   302k|  SBR_FRAME_DATA *hFrameDataRight = NULL;
 1592|       |
 1593|   302k|  SBR_ERROR errorStatus = SBRDEC_OK;
 1594|       |
 1595|   302k|  INT strideOut, offset0 = 255, offset0_block = 0, offset1 = 255,
 1596|   302k|                 offset1_block = 0;
 1597|   302k|  INT codecFrameSize = self->codecFrameSize;
 1598|       |
 1599|   302k|  int stereo = (hSbrElement->elementID == ID_CPE) ? 1 : 0;
  ------------------
  |  Branch (1599:16): [True: 129k, False: 172k]
  ------------------
 1600|   302k|  int numElementChannels =
 1601|   302k|      hSbrElement
 1602|   302k|          ->nChannels; /* Number of channels of the current SBR element */
 1603|       |
 1604|   302k|  hFrameDataLeft =
 1605|   302k|      &hSbrElement->pSbrChannel[0]->frameData[hSbrElement->useFrameSlot];
 1606|   302k|  if (stereo) {
  ------------------
  |  Branch (1606:7): [True: 129k, False: 172k]
  ------------------
 1607|   129k|    hFrameDataRight =
 1608|   129k|        &hSbrElement->pSbrChannel[1]->frameData[hSbrElement->useFrameSlot];
 1609|   129k|  }
 1610|       |
 1611|   302k|  if (self->flags & SBRDEC_FLUSH) {
  ------------------
  |  |  229|   302k|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
  |  Branch (1611:7): [True: 24, False: 302k]
  ------------------
 1612|     24|    if (self->numFlushedFrames > self->numDelayFrames) {
  ------------------
  |  Branch (1612:9): [True: 24, False: 0]
  ------------------
 1613|     24|      int hdrIdx;
 1614|       |      /* No valid SBR payload available, hence switch to upsampling (in all
 1615|       |       * headers) */
 1616|     72|      for (hdrIdx = 0; hdrIdx < ((1) + 1); hdrIdx += 1) {
  ------------------
  |  Branch (1616:24): [True: 48, False: 24]
  ------------------
 1617|     48|        if (self->sbrHeader[elementIndex][hdrIdx].syncState > UPSAMPLING) {
  ------------------
  |  Branch (1617:13): [True: 22, False: 26]
  ------------------
 1618|     22|          self->sbrHeader[elementIndex][hdrIdx].syncState = UPSAMPLING;
 1619|     22|        }
 1620|     48|      }
 1621|     24|    } else {
 1622|       |      /* Move frame pointer to the next slot which is up to be decoded/applied
 1623|       |       * next */
 1624|      0|      hSbrElement->useFrameSlot =
 1625|      0|          (hSbrElement->useFrameSlot + 1) % (self->numDelayFrames + 1);
 1626|       |      /* Update header and frame data pointer because they have already been set
 1627|       |       */
 1628|      0|      hSbrHeader =
 1629|      0|          &self->sbrHeader[elementIndex]
 1630|      0|                          [hSbrElement
 1631|      0|                               ->useHeaderSlot[hSbrElement->useFrameSlot]];
 1632|      0|      hFrameDataLeft =
 1633|      0|          &hSbrElement->pSbrChannel[0]->frameData[hSbrElement->useFrameSlot];
 1634|      0|      if (stereo) {
  ------------------
  |  Branch (1634:11): [True: 0, False: 0]
  ------------------
 1635|      0|        hFrameDataRight =
 1636|      0|            &hSbrElement->pSbrChannel[1]->frameData[hSbrElement->useFrameSlot];
 1637|      0|      }
 1638|      0|    }
 1639|     24|  }
 1640|       |
 1641|       |  /* Update the header error flag */
 1642|   302k|  hSbrHeader->frameErrorFlag =
 1643|   302k|      hSbrElement->frameErrorFlag[hSbrElement->useFrameSlot];
 1644|       |
 1645|       |  /*
 1646|       |     Prepare filterbank for upsampling if no valid bit stream data is available.
 1647|       |   */
 1648|   302k|  if (hSbrHeader->syncState == SBR_NOT_INITIALIZED) {
  ------------------
  |  Branch (1648:7): [True: 37.9k, False: 264k]
  ------------------
 1649|  37.9k|    errorStatus =
 1650|  37.9k|        initHeaderData(hSbrHeader, self->sampleRateIn, self->sampleRateOut,
 1651|  37.9k|                       self->downscaleFactor, codecFrameSize, self->flags,
 1652|  37.9k|                       1 /* SET_DEFAULT_HDR */
 1653|  37.9k|        );
 1654|       |
 1655|  37.9k|    if (errorStatus != SBRDEC_OK) {
  ------------------
  |  Branch (1655:9): [True: 0, False: 37.9k]
  ------------------
 1656|      0|      return errorStatus;
 1657|      0|    }
 1658|       |
 1659|  37.9k|    hSbrHeader->syncState = UPSAMPLING;
 1660|       |
 1661|  37.9k|    errorStatus = sbrDecoder_HeaderUpdate(self, hSbrHeader, HEADER_NOT_PRESENT,
 1662|  37.9k|                                          pSbrChannel, hSbrElement->nChannels);
 1663|       |
 1664|  37.9k|    if (errorStatus != SBRDEC_OK) {
  ------------------
  |  Branch (1664:9): [True: 0, False: 37.9k]
  ------------------
 1665|      0|      hSbrHeader->syncState = SBR_NOT_INITIALIZED;
 1666|      0|      return errorStatus;
 1667|      0|    }
 1668|  37.9k|  }
 1669|       |
 1670|       |  /* reset */
 1671|   302k|  if (hSbrHeader->status & SBRDEC_HDR_STAT_RESET) {
  ------------------
  |  |  239|   302k|#define SBRDEC_HDR_STAT_RESET 1
  ------------------
  |  Branch (1671:7): [True: 156k, False: 145k]
  ------------------
 1672|   156k|    int ch;
 1673|   156k|    int applySbrProc = (hSbrHeader->syncState == SBR_ACTIVE ||
  ------------------
  |  Branch (1673:25): [True: 0, False: 156k]
  ------------------
 1674|   156k|                        (hSbrHeader->frameErrorFlag == 0 &&
  ------------------
  |  Branch (1674:26): [True: 90.3k, False: 66.4k]
  ------------------
 1675|  90.3k|                         hSbrHeader->syncState == SBR_HEADER));
  ------------------
  |  Branch (1675:26): [True: 45.4k, False: 44.8k]
  ------------------
 1676|   405k|    for (ch = 0; ch < numElementChannels; ch++) {
  ------------------
  |  Branch (1676:18): [True: 248k, False: 156k]
  ------------------
 1677|   248k|      SBR_ERROR errorStatusTmp = SBRDEC_OK;
 1678|       |
 1679|   248k|      errorStatusTmp = resetSbrDec(
 1680|   248k|          &pSbrChannel[ch]->SbrDec, hSbrHeader, &pSbrChannel[ch]->prevFrameData,
 1681|   248k|          self->synDownsampleFac, self->flags, pSbrChannel[ch]->frameData);
 1682|       |
 1683|   248k|      if (errorStatusTmp != SBRDEC_OK) {
  ------------------
  |  Branch (1683:11): [True: 3.53k, False: 245k]
  ------------------
 1684|  3.53k|        hSbrHeader->syncState = UPSAMPLING;
 1685|  3.53k|      }
 1686|   248k|    }
 1687|   156k|    if (applySbrProc) {
  ------------------
  |  Branch (1687:9): [True: 45.4k, False: 111k]
  ------------------
 1688|  45.4k|      hSbrHeader->status &= ~SBRDEC_HDR_STAT_RESET;
  ------------------
  |  |  239|  45.4k|#define SBRDEC_HDR_STAT_RESET 1
  ------------------
 1689|  45.4k|    }
 1690|   156k|  }
 1691|       |
 1692|       |  /* decoding */
 1693|   302k|  if ((hSbrHeader->syncState == SBR_ACTIVE) ||
  ------------------
  |  Branch (1693:7): [True: 141k, False: 160k]
  ------------------
 1694|   160k|      ((hSbrHeader->syncState == SBR_HEADER) &&
  ------------------
  |  Branch (1694:8): [True: 93.1k, False: 67.4k]
  ------------------
 1695|   187k|       (hSbrHeader->frameErrorFlag == 0))) {
  ------------------
  |  Branch (1695:8): [True: 45.3k, False: 47.8k]
  ------------------
 1696|   187k|    errorStatus = SBRDEC_OK;
 1697|       |
 1698|   187k|    decodeSbrData(hSbrHeader, hFrameDataLeft, &pSbrChannel[0]->prevFrameData,
 1699|   187k|                  (stereo) ? hFrameDataRight : NULL,
  ------------------
  |  Branch (1699:19): [True: 72.1k, False: 115k]
  ------------------
 1700|   187k|                  (stereo) ? &pSbrChannel[1]->prevFrameData : NULL);
  ------------------
  |  Branch (1700:19): [True: 72.1k, False: 115k]
  ------------------
 1701|       |
 1702|       |    /* Now we have a full parameter set and can do parameter
 1703|       |       based concealment instead of plain upsampling. */
 1704|   187k|    hSbrHeader->syncState = SBR_ACTIVE;
 1705|   187k|  }
 1706|       |
 1707|   302k|  if (timeDataSize <
  ------------------
  |  Branch (1707:7): [True: 0, False: 302k]
  ------------------
 1708|   302k|      hSbrHeader->numberTimeSlots * hSbrHeader->timeStep *
 1709|   302k|          self->pQmfDomain->globalConf.nBandsSynthesis *
 1710|   302k|          (psPossible ? fMax(2, numInChannels) : numInChannels)) {
  ------------------
  |  Branch (1710:12): [True: 5.50k, False: 297k]
  ------------------
 1711|      0|    return SBRDEC_OUTPUT_BUFFER_TOO_SMALL;
 1712|      0|  }
 1713|       |
 1714|   302k|  {
 1715|   302k|    self->flags &= ~SBRDEC_PS_DECODED;
  ------------------
  |  |  213|   302k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
 1716|   302k|    C_ALLOC_SCRATCH_START(pPsScratch, struct PS_DEC_COEFFICIENTS, 1)
  ------------------
  |  |  324|   302k|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1717|       |
 1718|       |    /* decode PS data if available */
 1719|   302k|    if (h_ps_d != NULL && psPossible && (hSbrHeader->syncState == SBR_ACTIVE)) {
  ------------------
  |  Branch (1719:9): [True: 25.3k, False: 277k]
  |  Branch (1719:27): [True: 5.50k, False: 19.8k]
  |  Branch (1719:41): [True: 3.74k, False: 1.75k]
  ------------------
 1720|  3.74k|      int applyPs = 1;
 1721|       |
 1722|       |      /* define which frame delay line slot to process */
 1723|  3.74k|      h_ps_d->processSlot = hSbrElement->useFrameSlot;
 1724|       |
 1725|  3.74k|      applyPs = DecodePs(h_ps_d, hSbrHeader->frameErrorFlag, pPsScratch);
 1726|  3.74k|      self->flags |= (applyPs) ? SBRDEC_PS_DECODED : 0;
  ------------------
  |  |  213|  3.37k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
  |  Branch (1726:22): [True: 3.37k, False: 370]
  ------------------
 1727|  3.74k|    }
 1728|       |
 1729|   302k|    offset0 = FDK_chMapDescr_getMapValue(mapDescr, channelIndex, mapIdx);
 1730|   302k|    offset0_block = offset0 * codecFrameSize;
 1731|   302k|    if (stereo || psPossible) {
  ------------------
  |  Branch (1731:9): [True: 129k, False: 172k]
  |  Branch (1731:19): [True: 5.50k, False: 167k]
  ------------------
 1732|       |      /* the value of offset1 only matters if the condition is true, however if
 1733|       |      it is not true channelIndex+1 may exceed the channel map resutling in an
 1734|       |      error, though the value of offset1 is actually meaningless. This is
 1735|       |      prevented here. */
 1736|   135k|      offset1 = FDK_chMapDescr_getMapValue(mapDescr, channelIndex + 1, mapIdx);
 1737|   135k|      offset1_block = offset1 * codecFrameSize;
 1738|   135k|    }
 1739|       |    /* Set strides for reading and writing */
 1740|   302k|    if (psPossible)
  ------------------
  |  Branch (1740:9): [True: 5.50k, False: 297k]
  ------------------
 1741|  5.50k|      strideOut = (numInChannels < 2) ? 2 : numInChannels;
  ------------------
  |  Branch (1741:19): [True: 5.50k, False: 0]
  ------------------
 1742|   297k|    else
 1743|   297k|      strideOut = numInChannels;
 1744|       |
 1745|       |    /* use same buffers for left and right channel and apply PS per timeslot */
 1746|       |    /* Process left channel */
 1747|   302k|    sbr_dec(&pSbrChannel[0]->SbrDec, input + offset0_block, timeData + offset0,
 1748|   302k|            (self->flags & SBRDEC_PS_DECODED) ? &pSbrChannel[1]->SbrDec : NULL,
  ------------------
  |  |  213|   302k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
  |  Branch (1748:13): [True: 3.37k, False: 299k]
  ------------------
 1749|   302k|            timeData + offset1, strideOut, hSbrHeader, hFrameDataLeft,
 1750|   302k|            &pSbrChannel[0]->prevFrameData,
 1751|   302k|            (hSbrHeader->syncState == SBR_ACTIVE), h_ps_d, self->flags,
 1752|   302k|            codecFrameSize, self->sbrInDataHeadroom);
 1753|       |
 1754|   302k|    if (stereo) {
  ------------------
  |  Branch (1754:9): [True: 129k, False: 172k]
  ------------------
 1755|       |      /* Process right channel */
 1756|   129k|      sbr_dec(&pSbrChannel[1]->SbrDec, input + offset1_block,
 1757|   129k|              timeData + offset1, NULL, NULL, strideOut, hSbrHeader,
 1758|   129k|              hFrameDataRight, &pSbrChannel[1]->prevFrameData,
 1759|   129k|              (hSbrHeader->syncState == SBR_ACTIVE), NULL, self->flags,
 1760|   129k|              codecFrameSize, self->sbrInDataHeadroom);
 1761|   129k|    }
 1762|       |
 1763|   302k|    C_ALLOC_SCRATCH_END(pPsScratch, struct PS_DEC_COEFFICIENTS, 1)
 1764|   302k|  }
 1765|       |
 1766|   302k|  if (h_ps_d != NULL) {
  ------------------
  |  Branch (1766:7): [True: 25.3k, False: 277k]
  ------------------
 1767|       |    /* save PS status for next run */
 1768|  25.3k|    h_ps_d->psDecodedPrv = (self->flags & SBRDEC_PS_DECODED) ? 1 : 0;
  ------------------
  |  |  213|  25.3k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
  |  Branch (1768:28): [True: 3.37k, False: 21.9k]
  ------------------
 1769|  25.3k|  }
 1770|       |
 1771|   302k|  if (psPossible && !(self->flags & SBRDEC_SKIP_QMF_SYN)) {
  ------------------
  |  |  236|  5.50k|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  |  Branch (1771:7): [True: 5.50k, False: 297k]
  |  Branch (1771:21): [True: 5.50k, False: 0]
  ------------------
 1772|  5.50k|    FDK_ASSERT(strideOut > 1);
  ------------------
  |  |  221|  5.50k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1772:5): [True: 5.50k, False: 0]
  ------------------
 1773|  5.50k|    if (!(self->flags & SBRDEC_PS_DECODED)) {
  ------------------
  |  |  213|  5.50k|  64 /* Flag indicating that PS was decoded and rendered. */
  ------------------
  |  Branch (1773:9): [True: 2.12k, False: 3.37k]
  ------------------
 1774|       |      /* A decoder which is able to decode PS has to produce a stereo output
 1775|       |       * even if no PS data is available. */
 1776|       |      /* So copy left channel to right channel. */
 1777|  2.12k|      int copyFrameSize =
 1778|  2.12k|          codecFrameSize * self->pQmfDomain->QmfDomainOut->fb.no_channels;
 1779|  2.12k|      copyFrameSize /= self->pQmfDomain->QmfDomainIn->fb.no_channels;
 1780|  2.12k|      LONG *ptr;
  ------------------
  |  |  181|  2.12k|#define LONG INT
  ------------------
 1781|  2.12k|      INT i;
 1782|  2.12k|      FDK_ASSERT(strideOut == 2);
  ------------------
  |  |  221|  2.12k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1782:7): [True: 2.12k, False: 0]
  ------------------
 1783|       |
 1784|  2.12k|      ptr = timeData;
 1785|  2.09M|      for (i = copyFrameSize >> 1; i--;) {
  ------------------
  |  Branch (1785:36): [True: 2.09M, False: 2.12k]
  ------------------
 1786|  2.09M|        LONG tmp; /* This temporal variable is required because some compilers
  ------------------
  |  |  181|  2.09M|#define LONG INT
  ------------------
 1787|       |                     can't do *ptr++ = *ptr++ correctly. */
 1788|  2.09M|        tmp = *ptr++;
 1789|  2.09M|        *ptr++ = tmp;
 1790|  2.09M|        tmp = *ptr++;
 1791|  2.09M|        *ptr++ = tmp;
 1792|  2.09M|      }
 1793|  2.12k|    }
 1794|  5.50k|    *numOutChannels = 2; /* Output minimum two channels when PS is enabled. */
 1795|  5.50k|  }
 1796|       |
 1797|   302k|  return errorStatus;
 1798|   302k|}

_Z15FDK_add_MantExpiaiaPiPa:
  183|   146M|{
  184|   146M|  FIXP_DBL accu;
  185|   146M|  int shift;
  186|   146M|  int shiftAbs;
  187|       |
  188|   146M|  FIXP_DBL shiftedMantissa;
  189|   146M|  FIXP_DBL otherMantissa;
  190|       |
  191|       |  /* Equalize exponents of the summands.
  192|       |     For the smaller summand, the exponent is adapted and
  193|       |     for compensation, the mantissa is shifted right. */
  194|       |
  195|   146M|  shift = (int)(a_e - b_e);
  196|       |
  197|   146M|  shiftAbs = (shift > 0) ? shift : -shift;
  ------------------
  |  Branch (197:14): [True: 41.7M, False: 104M]
  ------------------
  198|   146M|  shiftAbs = (shiftAbs < DFRACT_BITS - 1) ? shiftAbs : DFRACT_BITS - 1;
  ------------------
  |  |  113|   146M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                shiftAbs = (shiftAbs < DFRACT_BITS - 1) ? shiftAbs : DFRACT_BITS - 1;
  ------------------
  |  |  113|  7.41M|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (198:14): [True: 138M, False: 7.41M]
  ------------------
  199|   146M|  shiftedMantissa = (shift > 0) ? (b >> shiftAbs) : (a >> shiftAbs);
  ------------------
  |  Branch (199:21): [True: 41.7M, False: 104M]
  ------------------
  200|   146M|  otherMantissa = (shift > 0) ? a : b;
  ------------------
  |  Branch (200:19): [True: 41.7M, False: 104M]
  ------------------
  201|   146M|  *ptrSum_e = (shift > 0) ? a_e : b_e;
  ------------------
  |  Branch (201:15): [True: 41.7M, False: 104M]
  ------------------
  202|       |
  203|   146M|  accu = (shiftedMantissa >> 1) + (otherMantissa >> 1);
  204|       |  /* shift by 1 bit to avoid overflow */
  205|       |
  206|   146M|  if ((accu >= (FL2FXCONST_DBL(0.5f) - (FIXP_DBL)1)) ||
  ------------------
  |  |  192|   146M|  (FIXP_DBL)(                                                                \
  |  |  193|   146M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 146M, Folded]
  |  |  ------------------
  |  |  194|   146M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   146M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   146M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 146M]
  |  |  ------------------
  |  |  195|   146M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   146M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   146M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   146M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   146M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   146M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   146M|          : ((((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 (206:7): [True: 9.44M, False: 136M]
  ------------------
  207|   136M|      (accu <= FL2FXCONST_DBL(-0.5f)))
  ------------------
  |  |  192|   136M|  (FIXP_DBL)(                                                                \
  |  |  193|   136M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 136M]
  |  |  ------------------
  |  |  194|   136M|          ? ((((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|   136M|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   136M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   136M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 136M]
  |  |  ------------------
  |  |  199|   136M|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   136M|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   136M|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   136M|                 ? (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|   136M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   136M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   136M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (207:7): [True: 0, False: 136M]
  ------------------
  208|  9.44M|    *ptrSum_e += 1;
  209|   136M|  else
  210|   136M|    accu = (shiftedMantissa + otherMantissa);
  211|       |
  212|   146M|  *ptrSum = accu;
  213|   146M|}
env_calc.cpp:_ZL18FDK_divide_MantExpiaiaPiPa:
  290|  56.8M|{
  291|  56.8M|  int preShift, postShift, index, shift;
  292|  56.8M|  FIXP_DBL ratio_m;
  293|  56.8M|  FIXP_SGL bInv_m = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|  56.8M|  (FIXP_SGL)(                                                                \
  |  |  181|  56.8M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 56.8M, Folded]
  |  |  ------------------
  |  |  182|  56.8M|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  56.8M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  56.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 56.8M]
  |  |  ------------------
  |  |  183|  56.8M|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  56.8M|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  56.8M|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  56.8M|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  56.8M|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  56.8M|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  56.8M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  294|       |
  295|  56.8M|  preShift = CntLeadingZeros(b_m);
  ------------------
  |  |  308|  56.8M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  296|       |
  297|       |  /*
  298|       |    Shift b into the range from 0..INV_TABLE_SIZE-1,
  299|       |
  300|       |    E.g. 10 bits must be skipped for INV_TABLE_BITS 8:
  301|       |    - leave 8 bits as index for table
  302|       |    - skip sign bit,
  303|       |    - skip first bit of mantissa, because this is always the same (>0.5)
  304|       |
  305|       |    We are dealing with energies, so we need not care
  306|       |    about negative numbers
  307|       |  */
  308|       |
  309|       |  /*
  310|       |    The first interval has half width so the lowest bit of the index is
  311|       |    needed for a doubled resolution.
  312|       |  */
  313|  56.8M|  shift = (DFRACT_BITS - 2 - INV_TABLE_BITS - preShift);
  ------------------
  |  |  113|  56.8M|#define DFRACT_BITS 32 /* double precision */
  ------------------
                shift = (DFRACT_BITS - 2 - INV_TABLE_BITS - preShift);
  ------------------
  |  |  212|  56.8M|#define INV_TABLE_BITS 8
  ------------------
  314|       |
  315|  56.8M|  index = (shift < 0) ? (LONG)b_m << (-shift) : (LONG)b_m >> shift;
  ------------------
  |  Branch (315:11): [True: 1.50M, False: 55.3M]
  ------------------
  316|       |
  317|       |  /* The index has INV_TABLE_BITS +1 valid bits here. Clear the other bits. */
  318|  56.8M|  index &= (1 << (INV_TABLE_BITS + 1)) - 1;
  ------------------
  |  |  212|  56.8M|#define INV_TABLE_BITS 8
  ------------------
  319|       |
  320|       |  /* Remove offset of half an interval */
  321|  56.8M|  index--;
  322|       |
  323|       |  /* Now the lowest bit is shifted out */
  324|  56.8M|  index = index >> 1;
  325|       |
  326|       |  /* Fetch inversed mantissa from table: */
  327|  56.8M|  bInv_m = (index < 0) ? bInv_m : FDK_sbrDecoder_invTable[index];
  ------------------
  |  Branch (327:12): [True: 6.94M, False: 49.9M]
  ------------------
  328|       |
  329|       |  /* Multiply a with the inverse of b: */
  330|  56.8M|  ratio_m = (index < 0) ? (a_m >> 1) : fMultDiv2(bInv_m, a_m);
  ------------------
  |  Branch (330:13): [True: 6.94M, False: 49.9M]
  ------------------
  331|       |
  332|  56.8M|  postShift = CntLeadingZeros(ratio_m) - 1;
  ------------------
  |  |  308|  56.8M|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  333|       |
  334|  56.8M|  *ptrResult_m = ratio_m << postShift;
  335|  56.8M|  *ptrResult_e = a_e - b_e + 1 + preShift - postShift;
  336|  56.8M|}
env_calc.cpp:_ZL16FDK_sqrt_MantExpPiPaPKa:
  350|   109M|    SCHAR *exponent, const SCHAR *destScale) {
  351|   109M|  FIXP_DBL input_m = *mantissa;
  352|   109M|  int input_e = (int)*exponent;
  353|   109M|  FIXP_DBL result = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|   109M|  (FIXP_DBL)(                                                                \
  |  |  193|   109M|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 109M, Folded]
  |  |  ------------------
  |  |  194|   109M|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   109M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   109M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 109M]
  |  |  ------------------
  |  |  195|   109M|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   109M|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   109M|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   109M|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   109M|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   109M|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   109M|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  354|   109M|  int result_e = -FRACT_BITS;
  ------------------
  |  |  112|   109M|#define FRACT_BITS 16  /* single precision */
  ------------------
  355|       |
  356|       |  /* Call lookup square root, which does internally normalization. */
  357|   109M|  result = sqrtFixp_lookup(input_m, &input_e);
  358|   109M|  result_e = input_e;
  359|       |
  360|       |  /* Write result */
  361|   109M|  if (exponent == destScale) {
  ------------------
  |  Branch (361:7): [True: 36.4M, False: 72.9M]
  ------------------
  362|  36.4M|    *mantissa = result;
  363|  36.4M|    *exponent = result_e;
  364|  72.9M|  } else {
  365|  72.9M|    int shift = result_e - *destScale;
  366|  72.9M|    *mantissa = (shift >= 0) ? result << (INT)fixMin(DFRACT_BITS - 1, shift)
  ------------------
  |  |  306|  1.55k|#define fixMin(a, b) fMin(a, b)
  ------------------
  |  Branch (366:17): [True: 1.55k, False: 72.9M]
  ------------------
  367|  72.9M|                             : result >> (INT)fixMin(DFRACT_BITS - 1, -shift);
  ------------------
  |  |  306|   145M|#define fixMin(a, b) fMin(a, b)
  ------------------
  368|  72.9M|    *exponent = *destScale;
  369|  72.9M|  }
  370|   109M|}
_Z15FDK_add_MantExpsasaPsPa:
  144|   347k|{
  145|   347k|  FIXP_DBL accu;
  146|   347k|  int shift;
  147|   347k|  int shiftAbs;
  148|       |
  149|   347k|  FIXP_DBL shiftedMantissa;
  150|   347k|  FIXP_DBL otherMantissa;
  151|       |
  152|       |  /* Equalize exponents of the summands.
  153|       |     For the smaller summand, the exponent is adapted and
  154|       |     for compensation, the mantissa is shifted right. */
  155|       |
  156|   347k|  shift = (int)(a_e - b_e);
  157|       |
  158|   347k|  shiftAbs = (shift > 0) ? shift : -shift;
  ------------------
  |  Branch (158:14): [True: 23.0k, False: 324k]
  ------------------
  159|   347k|  shiftAbs = (shiftAbs < DFRACT_BITS - 1) ? shiftAbs : DFRACT_BITS - 1;
  ------------------
  |  |  113|   347k|#define DFRACT_BITS 32 /* double precision */
  ------------------
                shiftAbs = (shiftAbs < DFRACT_BITS - 1) ? shiftAbs : DFRACT_BITS - 1;
  ------------------
  |  |  113|    245|#define DFRACT_BITS 32 /* double precision */
  ------------------
  |  Branch (159:14): [True: 347k, False: 245]
  ------------------
  160|   347k|  shiftedMantissa = (shift > 0) ? (FX_SGL2FX_DBL(b_m) >> shiftAbs)
  ------------------
  |  |  219|  23.0k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  23.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  23.0k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  |  Branch (160:21): [True: 23.0k, False: 324k]
  ------------------
  161|   347k|                                : (FX_SGL2FX_DBL(a_m) >> shiftAbs);
  ------------------
  |  |  219|   324k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   324k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   324k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  162|   347k|  otherMantissa = (shift > 0) ? FX_SGL2FX_DBL(a_m) : FX_SGL2FX_DBL(b_m);
  ------------------
  |  |  219|  23.0k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  23.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  23.0k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
                otherMantissa = (shift > 0) ? FX_SGL2FX_DBL(a_m) : FX_SGL2FX_DBL(b_m);
  ------------------
  |  |  219|   672k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   324k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   324k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  |  Branch (162:19): [True: 23.0k, False: 324k]
  ------------------
  163|   347k|  *ptrSum_e = (shift > 0) ? a_e : b_e;
  ------------------
  |  Branch (163:15): [True: 23.0k, False: 324k]
  ------------------
  164|       |
  165|   347k|  accu = (shiftedMantissa >> 1) + (otherMantissa >> 1);
  166|       |  /* shift by 1 bit to avoid overflow */
  167|       |
  168|   347k|  if ((accu >= (FL2FXCONST_DBL(0.5f) - (FIXP_DBL)1)) ||
  ------------------
  |  |  192|   347k|  (FIXP_DBL)(                                                                \
  |  |  193|   347k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 347k, Folded]
  |  |  ------------------
  |  |  194|   347k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   347k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   347k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 347k]
  |  |  ------------------
  |  |  195|   347k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   347k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   347k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   347k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   347k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   347k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   347k|          : ((((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 (168:7): [True: 9.82k, False: 337k]
  ------------------
  169|   337k|      (accu <= FL2FXCONST_DBL(-0.5f)))
  ------------------
  |  |  192|   337k|  (FIXP_DBL)(                                                                \
  |  |  193|   337k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 337k]
  |  |  ------------------
  |  |  194|   337k|          ? ((((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|   337k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|   337k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   337k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 337k]
  |  |  ------------------
  |  |  199|   337k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|   337k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|   337k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|   337k|                 ? (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|   337k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|   337k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   337k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (169:7): [True: 0, False: 337k]
  ------------------
  170|  9.82k|    *ptrSum_e += 1;
  171|   337k|  else
  172|   337k|    accu = (shiftedMantissa + otherMantissa);
  173|       |
  174|   347k|  *ptrSum_m = FX_DBL2FX_SGL(accu);
  ------------------
  |  |  220|   347k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   347k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   347k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  175|   347k|}
env_dec.cpp:_ZL18FDK_divide_MantExpsasaPsPa:
  234|   347k|{
  235|   347k|  int preShift, postShift, index, shift;
  236|   347k|  FIXP_DBL ratio_m;
  237|   347k|  FIXP_SGL bInv_m = FL2FXCONST_SGL(0.0f);
  ------------------
  |  |  180|   347k|  (FIXP_SGL)(                                                                \
  |  |  181|   347k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 347k, Folded]
  |  |  ------------------
  |  |  182|   347k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|   347k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   347k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 347k]
  |  |  ------------------
  |  |  183|   347k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|   347k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|   347k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|   347k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|   347k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|   347k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|   347k|          : ((((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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|       |
  239|   347k|  preShift = CntLeadingZeros(FX_SGL2FX_DBL(b_m));
  ------------------
  |  |  308|   347k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  240|       |
  241|       |  /*
  242|       |    Shift b into the range from 0..INV_TABLE_SIZE-1,
  243|       |
  244|       |    E.g. 10 bits must be skipped for INV_TABLE_BITS 8:
  245|       |    - leave 8 bits as index for table
  246|       |    - skip sign bit,
  247|       |    - skip first bit of mantissa, because this is always the same (>0.5)
  248|       |
  249|       |    We are dealing with energies, so we need not care
  250|       |    about negative numbers
  251|       |  */
  252|       |
  253|       |  /*
  254|       |    The first interval has half width so the lowest bit of the index is
  255|       |    needed for a doubled resolution.
  256|       |  */
  257|   347k|  shift = (FRACT_BITS - 2 - INV_TABLE_BITS - preShift);
  ------------------
  |  |  112|   347k|#define FRACT_BITS 16  /* single precision */
  ------------------
                shift = (FRACT_BITS - 2 - INV_TABLE_BITS - preShift);
  ------------------
  |  |  212|   347k|#define INV_TABLE_BITS 8
  ------------------
  258|       |
  259|   347k|  index = (shift < 0) ? (LONG)b_m << (-shift) : (LONG)b_m >> shift;
  ------------------
  |  Branch (259:11): [True: 0, False: 347k]
  ------------------
  260|       |
  261|       |  /* The index has INV_TABLE_BITS +1 valid bits here. Clear the other bits. */
  262|   347k|  index &= (1 << (INV_TABLE_BITS + 1)) - 1;
  ------------------
  |  |  212|   347k|#define INV_TABLE_BITS 8
  ------------------
  263|       |
  264|       |  /* Remove offset of half an interval */
  265|   347k|  index--;
  266|       |
  267|       |  /* Now the lowest bit is shifted out */
  268|   347k|  index = index >> 1;
  269|       |
  270|       |  /* Fetch inversed mantissa from table: */
  271|   347k|  bInv_m = (index < 0) ? bInv_m : FDK_sbrDecoder_invTable[index];
  ------------------
  |  Branch (271:12): [True: 122k, False: 225k]
  ------------------
  272|       |
  273|       |  /* Multiply a with the inverse of b: */
  274|   347k|  ratio_m = (index < 0) ? FX_SGL2FX_DBL(a_m >> 1) : fMultDiv2(bInv_m, a_m);
  ------------------
  |  |  219|   122k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   122k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   122k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  |  Branch (274:13): [True: 122k, False: 225k]
  ------------------
  275|       |
  276|   347k|  postShift = CntLeadingZeros(ratio_m) - 1;
  ------------------
  |  |  308|   347k|#define CntLeadingZeros(x) fixnormz_D(x)
  ------------------
  277|       |
  278|   347k|  *ptrResult_m = FX_DBL2FX_SGL(ratio_m << postShift);
  ------------------
  |  |  220|   347k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   347k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   347k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  279|   347k|  *ptrResult_e = a_e - b_e + 1 + preShift - postShift;
  280|   347k|}
env_dec.cpp:_ZL21FDK_getNumOctavesDiv8ii:
  126|  50.5k|{
  127|  50.5k|  return ((SHORT)((LONG)(CalcLdInt(b) - CalcLdInt(a)) >> (FRACT_BITS - 3)));
  ------------------
  |  |  112|  50.5k|#define FRACT_BITS 16  /* single precision */
  ------------------
  128|  50.5k|}
sbrdec_freq_sca.cpp:_ZL21FDK_getNumOctavesDiv8ii:
  126|   493k|{
  127|   493k|  return ((SHORT)((LONG)(CalcLdInt(b) - CalcLdInt(a)) >> (FRACT_BITS - 3)));
  ------------------
  |  |  112|   493k|#define FRACT_BITS 16  /* single precision */
  ------------------
  128|   493k|}

aacdecoder.cpp:_ZL14FDKinitLibInfoP8LIB_INFO:
  735|   159k|static FDK_AUDIO_INLINE void FDKinitLibInfo(LIB_INFO* info) {
  736|   159k|  int i;
  737|       |
  738|  6.37M|  for (i = 0; i < FDK_MODULE_LAST; i++) {
  ------------------
  |  Branch (738:15): [True: 6.21M, False: 159k]
  ------------------
  739|  6.21M|    info[i].module_id = FDK_NONE;
  740|  6.21M|  }
  741|   159k|}
aacdecoder.cpp:_ZL26FDKlibInfo_getCapabilitiesPK8LIB_INFO13FDK_MODULE_ID:
  745|   159k|FDKlibInfo_getCapabilities(const LIB_INFO* info, FDK_MODULE_ID module_id) {
  746|   159k|  int i;
  747|       |
  748|   159k|  for (i = 0; i < FDK_MODULE_LAST; i++) {
  ------------------
  |  Branch (748:15): [True: 159k, False: 0]
  ------------------
  749|   159k|    if (info[i].module_id == module_id) {
  ------------------
  |  Branch (749:9): [True: 159k, False: 0]
  ------------------
  750|   159k|      return info[i].flags;
  751|   159k|    }
  752|   159k|  }
  753|      0|  return 0;
  754|   159k|}

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

FDKsprintf:
  166|   159k|INT FDKsprintf(char *str, const char *format, ...) {
  167|   159k|  INT chars = 0;
  168|   159k|  va_list ap;
  169|   159k|  va_start(ap, format);
  170|   159k|  chars += vsprintf(str, format, ap);
  171|       |  va_end(ap);
  172|   159k|  return chars;
  173|   159k|}
FDKcalloc:
  192|  13.0M|void *FDKcalloc(const UINT n, const UINT size) {
  193|  13.0M|  void *ptr;
  194|       |
  195|  13.0M|  ptr = calloc(n, size);
  196|       |
  197|  13.0M|  return ptr;
  198|  13.0M|}
FDKfree:
  208|  13.0M|void FDKfree(void *ptr) { free((INT *)ptr); }
FDKaalloc:
  210|  5.56M|void *FDKaalloc(const UINT size, const UINT alignment) {
  211|  5.56M|  void *addr, *result = NULL;
  212|  5.56M|  addr = FDKcalloc(1, size + alignment +
  213|  5.56M|                          (UINT)sizeof(void *)); /* Malloc and clear memory. */
  214|       |
  215|  5.56M|  if (addr != NULL) {
  ------------------
  |  Branch (215:7): [True: 5.56M, False: 0]
  ------------------
  216|  5.56M|    result = ALIGN_PTR((unsigned char *)addr +
  ------------------
  |  |  312|  5.56M|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|  5.56M|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|  5.56M|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|  5.56M|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|  5.56M|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|  5.56M|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|  5.56M|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  217|  5.56M|                       sizeof(void *)); /* Get aligned memory base address. */
  218|  5.56M|    *(((void **)result) - 1) = addr;    /* Save malloc'ed memory pointer.   */
  219|  5.56M|    C_ALLOC_ALIGNED_REGISTER(result, size);
  220|  5.56M|  }
  221|       |
  222|  5.56M|  return result; /* Return aligned address.          */
  223|  5.56M|}
FDKafree:
  225|  5.48M|void FDKafree(void *ptr) {
  226|  5.48M|  void *addr;
  227|  5.48M|  addr = *(((void **)ptr) - 1); /* Get pointer to malloc'ed memory. */
  228|       |
  229|  5.48M|  C_ALLOC_ALIGNED_UNREGISTER(ptr);
  230|       |
  231|  5.48M|  FDKfree(addr); /* Free malloc'ed memory area.      */
  232|  5.48M|}
FDKcalloc_L:
  241|  1.50M|void *FDKcalloc_L(const UINT dim, const UINT size, MEMORY_SECTION s) {
  242|  1.50M|  return FDKcalloc(dim, size);
  243|  1.50M|}
FDKfree_L:
  245|  3.11M|void FDKfree_L(void *p) { FDKfree(p); }
FDKaalloc_L:
  247|   801k|void *FDKaalloc_L(const UINT size, const UINT alignment, MEMORY_SECTION s) {
  248|   801k|  void *addr, *result = NULL;
  249|   801k|  addr = FDKcalloc_L(1, size + alignment + (UINT)sizeof(void *),
  250|   801k|                     s); /* Malloc and clear memory.         */
  251|       |
  252|   801k|  if (addr != NULL) {
  ------------------
  |  Branch (252:7): [True: 801k, False: 0]
  ------------------
  253|   801k|    result = ALIGN_PTR((unsigned char *)addr +
  ------------------
  |  |  312|   801k|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|   801k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|   801k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|   801k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|   801k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|   801k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|   801k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  254|   801k|                       sizeof(void *)); /* Get aligned memory base address. */
  255|   801k|    *(((void **)result) - 1) = addr;    /* Save malloc'ed memory pointer.   */
  256|   801k|    C_ALLOC_ALIGNED_REGISTER(result, size);
  257|   801k|  }
  258|       |
  259|   801k|  return result; /* Return aligned address.          */
  260|   801k|}
FDKafree_L:
  262|   874k|void FDKafree_L(void *ptr) {
  263|   874k|  void *addr;
  264|       |
  265|   874k|  addr = *(((void **)ptr) - 1); /* Get pointer to malloc'ed memory. */
  266|       |
  267|   874k|  C_ALLOC_ALIGNED_UNREGISTER(ptr);
  268|       |
  269|   874k|  FDKfree_L(addr); /* Free malloc'ed memory area.      */
  270|   874k|}
FDKmemcpy:
  277|   184M|void FDKmemcpy(void *dst, const void *src, const UINT size) {
  278|       |  /* -- check for overlapping memory areas -- */
  279|   184M|  FDK_ASSERT(((const unsigned char *)dst - (const unsigned char *)src) >=
  ------------------
  |  |  221|   184M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (279:3): [True: 73.5M, False: 110M]
  |  Branch (279:3): [True: 110M, False: 0]
  |  Branch (279:3): [True: 184M, False: 0]
  ------------------
  280|   184M|                 (ptrdiff_t)size ||
  281|   184M|             ((const unsigned char *)src - (const unsigned char *)dst) >=
  282|   184M|                 (ptrdiff_t)size);
  283|       |
  284|       |  /* do the copy */
  285|   184M|  memcpy(dst, src, size);
  286|   184M|}
FDKmemmove:
  288|  53.5M|void FDKmemmove(void *dst, const void *src, const UINT size) {
  289|  53.5M|  memmove(dst, src, size);
  290|  53.5M|}
FDKmemset:
  292|   140M|void FDKmemset(void *memPtr, const INT value, const UINT size) {
  293|   140M|  memset(memPtr, value, size);
  294|   140M|}
FDKmemclear:
  296|   128M|void FDKmemclear(void *memPtr, const UINT size) { FDKmemset(memPtr, 0, size); }
FDKmemcmp:
  301|  1.70M|INT FDKmemcmp(const void *s1, const void *s2, const UINT size) {
  302|  1.70M|  return memcmp(s1, s2, size);
  303|  1.70M|}

FDK_chMapDescr_getMapValue:
  162|  11.3M|                                 const UCHAR chIdx, const UINT mapIdx) {
  163|  11.3M|  UCHAR mapValue = chIdx; /* Pass through by default. */
  164|       |
  165|  11.3M|  FDK_ASSERT(pMapDescr != NULL);
  ------------------
  |  |  221|  11.3M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (165:3): [True: 11.3M, False: 0]
  ------------------
  166|       |
  167|  11.3M|  if ((pMapDescr->fPassThrough == 0) && (pMapDescr->pMapInfoTab != NULL) &&
  ------------------
  |  Branch (167:7): [True: 11.3M, False: 0]
  |  Branch (167:41): [True: 11.3M, False: 0]
  ------------------
  168|  11.3M|      (pMapDescr->mapInfoTabLen > mapIdx)) { /* Nest sanity check to avoid
  ------------------
  |  Branch (168:7): [True: 11.3M, False: 0]
  ------------------
  169|       |                                                possible memory access
  170|       |                                                violation. */
  171|  11.3M|    if (chIdx < pMapDescr->pMapInfoTab[mapIdx].numChannels) {
  ------------------
  |  Branch (171:9): [True: 11.3M, False: 0]
  ------------------
  172|  11.3M|      mapValue = pMapDescr->pMapInfoTab[mapIdx].pChannelMap[chIdx];
  173|  11.3M|    }
  174|  11.3M|  }
  175|  11.3M|  return mapValue;
  176|  11.3M|}
FDK_chMapDescr_isValid:
  228|  1.59M|int FDK_chMapDescr_isValid(const FDK_channelMapDescr* const pMapDescr) {
  229|  1.59M|  int result = 0;
  230|  1.59M|  UINT i;
  231|       |
  232|  1.59M|  if (pMapDescr != NULL) {
  ------------------
  |  Branch (232:7): [True: 1.59M, False: 0]
  ------------------
  233|  1.59M|    result = 1;
  234|  25.5M|    for (i = 0; (i < pMapDescr->mapInfoTabLen) && result; i += 1) {
  ------------------
  |  Branch (234:17): [True: 23.9M, False: 1.59M]
  |  Branch (234:51): [True: 23.9M, False: 0]
  ------------------
  235|  23.9M|      if (!fdk_chMapDescr_isValidMap(&pMapDescr->pMapInfoTab[i])) {
  ------------------
  |  Branch (235:11): [True: 0, False: 23.9M]
  ------------------
  236|      0|        result = 0;
  237|      0|      }
  238|  23.9M|    }
  239|  1.59M|  }
  240|  1.59M|  return result;
  241|  1.59M|}
FDK_chMapDescr_init:
  248|  21.8k|                         const UINT mapInfoTabLen, const UINT fPassThrough) {
  249|  21.8k|  if (pMapDescr != NULL) {
  ------------------
  |  Branch (249:7): [True: 21.8k, False: 0]
  ------------------
  250|  21.8k|    int useDefaultTab = 1;
  251|       |
  252|  21.8k|    pMapDescr->fPassThrough = (fPassThrough == 0) ? 0 : 1;
  ------------------
  |  Branch (252:31): [True: 21.8k, False: 0]
  ------------------
  253|       |
  254|  21.8k|    if ((pMapInfoTab != NULL) && (mapInfoTabLen > 0)) {
  ------------------
  |  Branch (254:9): [True: 0, False: 21.8k]
  |  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|  21.8k|    if (useDefaultTab != 0) {
  ------------------
  |  Branch (261:9): [True: 21.8k, False: 0]
  ------------------
  262|       |      /* Set default table. */
  263|  21.8k|      pMapDescr->pMapInfoTab = mapInfoTabDflt;
  264|  21.8k|      pMapDescr->mapInfoTabLen = DFLT_CH_MAP_TAB_LEN;
  ------------------
  |  |  110|  21.8k|  (15) /* Length of the default channel map info table. */
  ------------------
  265|  21.8k|    }
  266|  21.8k|  }
  267|  21.8k|}
syslib_channelMapDescr.cpp:_ZL25fdk_chMapDescr_isValidMapPK16CHANNEL_MAP_INFO:
  184|  23.9M|static int fdk_chMapDescr_isValidMap(const CHANNEL_MAP_INFO* const pMapInfo) {
  185|  23.9M|  int result = 1;
  186|  23.9M|  UINT i;
  187|       |
  188|  23.9M|  if (pMapInfo == NULL) {
  ------------------
  |  Branch (188:7): [True: 0, False: 23.9M]
  ------------------
  189|      0|    result = 0;
  190|  23.9M|  } else {
  191|  23.9M|    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|  23.9M|    if (numChannels < 32) { /* Optimized version for less than 32 channels.
  ------------------
  |  Branch (195:9): [True: 23.9M, False: 0]
  ------------------
  196|       |                               Needs only one loop. */
  197|  23.9M|      UINT mappedChMask = 0x0;
  198|   300M|      for (i = 0; i < numChannels; i += 1) {
  ------------------
  |  Branch (198:19): [True: 276M, False: 23.9M]
  ------------------
  199|   276M|        mappedChMask |= 1 << pMapInfo->pChannelMap[i];
  200|   276M|      }
  201|  23.9M|      if (mappedChMask != (((UINT)1 << numChannels) - 1)) {
  ------------------
  |  Branch (201:11): [True: 0, False: 23.9M]
  ------------------
  202|      0|        result = 0;
  203|      0|      }
  204|  23.9M|    } 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|  23.9M|  }
  221|       |
  222|  23.9M|  return result;
  223|  23.9M|}

LLVMFuzzerTestOneInput:
   21|  21.8k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   22|  21.8k|  HANDLE_AACDECODER aacDecoderInfo = NULL;
   23|       |
   24|  21.8k|  INT_PCM TimeData[OUT_BUF_SIZE];
   25|  21.8k|  AAC_DECODER_ERROR err;
   26|  21.8k|  aacDecoderInfo = aacDecoder_Open(TT_MP4_LOAS, FILEREAD_MAX_LAYERS);
  ------------------
  |  |   18|  21.8k|#define FILEREAD_MAX_LAYERS 1
  ------------------
   27|  21.8k|  FDK_ASSERT(aacDecoderInfo != NULL);
  ------------------
  |  |  221|  21.8k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (27:3): [True: 21.8k, False: 0]
  ------------------
   28|       |
   29|  21.8k|  const uint8_t *start = Data;
   30|  21.8k|  UINT valid, buffer_size;
   31|       |
   32|  22.8k|  do {
   33|  22.8k|    valid = buffer_size = Data + Size - start;
   34|  22.8k|    err = aacDecoder_Fill(aacDecoderInfo, const_cast<UCHAR **>(&start),
   35|  22.8k|                          &buffer_size, &valid);
   36|  22.8k|    start += buffer_size - valid;
   37|  22.8k|    if (err == AAC_DEC_OK) {
  ------------------
  |  Branch (37:9): [True: 22.8k, False: 0]
  ------------------
   38|   363k|      do {
   39|   363k|        err = aacDecoder_DecodeFrame(aacDecoderInfo, TimeData, OUT_BUF_SIZE, 0);
  ------------------
  |  |   19|   363k|#define OUT_BUF_SIZE (8 * 2048 * 4)
  ------------------
   40|   363k|        if (err != AAC_DEC_OK && err != AAC_DEC_NOT_ENOUGH_BITS) {
  ------------------
  |  Branch (40:13): [True: 22.8k, False: 340k]
  |  Branch (40:34): [True: 15.1k, False: 7.65k]
  ------------------
   41|  15.1k|          aacDecoder_Close(aacDecoderInfo);
   42|  15.1k|          aacDecoderInfo = NULL;
   43|  15.1k|          return 0;
   44|  15.1k|        }
   45|   363k|      } while (err != AAC_DEC_NOT_ENOUGH_BITS);
  ------------------
  |  Branch (45:16): [True: 340k, False: 7.65k]
  ------------------
   46|  22.8k|    }
   47|  22.8k|  } while (valid > 0);
  ------------------
  |  Branch (47:12): [True: 977, False: 6.67k]
  ------------------
   48|  6.67k|  aacDecoder_Close(aacDecoderInfo);
   49|       |  aacDecoderInfo = NULL;
   50|  6.67k|  return 0;
   51|  21.8k|}

